Bonum Certa Men Certa

[Resurrected] 'We Are Morons': A Quick Look at the Win2k Source

The last copy of this article is in the Wayback Machine (the original was removed not long ago), so it's outside of search engines' reach. We're fixing that today.




Overview


Several days ago, two files containing Microsoft source code began circulating on the Internet. One contains a majority of the NT4 source code: this is not discussed here. The other contains a fraction of the Windows 2000 source code, reportedly about 15% of the total. This includes some networking code including winsock and inet; as well as some shell code. Some other familiar items include the event log, and some of the default screensavers.

The timestamps on the files generally say 25 July 2000. The source is contained in a Zip file of size 213,748,207 bytes, named windows_2000_source_code.zip, which has been widely circulated on P2P networks. Some dummy files of similar size, containing just strings of zeroes, have also circulated.



There has been some speculation that while the bulk of the source is genuine, some of the comments have been tampered with to embarrass Microsoft. This is difficult to disprove, but I find it implausible. The embarrassing comments occur on thousands of lines, in realistic places. Furthermore, if someone had done that, it would have been easy to make the comments far more incriminating.



Embarrassments
In the struggle to meet deadlines, I think pretty much all programmers have put in comments they might later regret, including swearwords and acerbic comments about other code or requirements. Also, any conscientious coder will put in prominent comments warning others about the trickier parts of the code. Comments like "UGLY TERRIBLE HACK" tend to indicate good code rather than bad: in bad code ugly terrible hacks are considered par for the course. It would therefore be both hypocritical and meaningless to go through the comments looking for embarrassments. But also fun, so let's go.



Curse words: there are a dozen or so "fucks" and "shits", and hundreds of "craps". Some dissatisfaction with the compiler is expressed in private\shell\shell32\util.cpp:

// the fucking alpha cpp compiler seems to fuck up the goddam type "LPITEMIDLIST", so to work
// around the fucking peice of shit compiler we pass the last param as an void *instead of a LPITEMIDLIST


Some insight into Microsoft's famous daily build process is given in private\windows\media\avi\verinfo.16\verinfo.h:

* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!IF YOU CHANGE TABS TO SPACES, YOU WILL BE KILLED!!!!!!!
* !!!!!!!!!!!!!!DOING SO FUCKS THE BUILD PROCESS!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


There are also various references to idiots and morons, some external, some within Microsoft. The file private\ntos\rtl\heap.c, which dates from 1989, tells us

// The specific idiot in this case is Office95, which likes
// to free a random pointer when you start Word95 from a desktop
// shortcut.


The file private\ntos\w32\ntuser\kernel\swp.c from 11-Jul-1991 points at

* for idiots like MS-Access 2.0 who SetWindowPos( SWP_BOZO
* and blow away themselves on the shell, then lets
* just ignore their plea to be removed from the tray


Morons also abound, as in this selection

private\genx\shell\inc\prsht.w:
// we are such morons. Wiz97 underwent a redesign between IE4 and IE5



private\shell\ext\ftp\ftpdrop.cpp:
We have to do this only because Exchange is a moron.



private\shell\shdoc401\unicpp\desktop.cpp:
// We are morons. We changed the IDeskTray interface between IE4



private\shell\browseui\itbar.cpp:
// should be fixed in the apps themselves. Morons!



Microsoft programmers also take their duty to warn others seriously. There are over 4,000 references to "hacks", mostly warnings. These include



private\inet\mshtml\src\core\cdbase\baseprop.cxx:
// HACK! HACK! HACK! (MohanB) In order to fix #64710 at this very late



private\inet\mshtml\src\core\cdutil\genutil.cxx:
// HACK HACK HACK. REMOVE THIS ONCE MARLETT IS AROUND



private\inet\mshtml\src\other\moniker\resprot.cxx:
// <HACK>
goto EndHack;
// </HACK>



private\inet\mshtml\src\site\layout\flowlyt.cxx:
// God, I hate this hack ...



private\inet\wininet\urlcache\cachecfg.cxx:
// Dumb hack for back compat. *sigh*

private\inet\wininet\urlcache\filemgr.cxx:
// ACHTUNG!!! this is a special hack for IBM antivirus software



private\ispu\pkitrust\trustui\acuictl.cpp:
// HACK ALERT, believe it or not there is no way to get the height of the current
// HACK ON TOP OF HACK ALERT,



private\ntos\udfs\devctrl.c:
// Add the hack-o-ramma to fix formats.

private\shell\shdoc401\unicpp\sendto.cpp:
// Mondo hackitude-o-rama.

private\ntos\w32\ntcon\server\link.c:
// HUGE, HUGE hack-o-rama to get NTSD started on this process!

private\ntos\w32\ntuser\client\dlgmgr.c:
// HACK OF DEATH:



private\shell\lib\util.cpp:
// TERRIBLE HORRIBLE NO GOOD VERY BAD HACK



private\ntos\w32\ntuser\client\nt6\user.h:
* The magnitude of this hack compares favorably with that of the national debt.



While surprisingly informal, there are limits to how far the programmers go. There are no derogatory references to Microsoft or Windows themselves. Bill Gates is never mentioned. There are no racist or homophobic slurs. I saw only one drug reference.

private\shell\ext\tweakui\genthunk.c:
* CallProc32W is insane. It's a variadic function that uses
* the pascal calling convention. (It probably makes more sense
* when you're stoned.)


Quality
Despite the above, the quality of the code is generally excellent. Modules are small, and procedures generally fit on a single screen. The commenting is very detailed about intentions, but doesn't fall into "add one to i" redundancy.



There is some variety in the commenting style. Sometimes blocks use a // at every line, sometimes the /* */ style. In some modules functions have a history, some do not. Some functions describe their variables in a comment block, some don't. Microsoft appears not to have fallen into the trap of enforcing over-rigid standards or universal use of over-complicated automatic tools. They seem to trust their developers to comment well, and they do.



However, not everything is so rosy. Some of the modules are clearly suffering from the hacks upon hacks mentioned earlier. As someone who struggled immensely trying to get the MSInet control working not long after this code was released, it's a relief to see that the inet code is as bad as I thought.



From the comments, it also appears that most of the uglier hacks are due to compatibility issues: either backward-compatibility, hardware compatibility or issues caused by particular software. Microsoft's vast compatibility strengths have clearly come at a cost, both in developer-sweat and the elegance (and hence stability and maintainability) of the code.



Open Source
It's been widely rumored for a while that Microsoft relies on stolen open source code. The rumor has faced widespread skepticism too. Microsoft has hundreds of millions of lines of code, most of it highly specialized. Hardly any of that could benefit from stealing: it hardly seems worth the legal risk. It's true that early versions of the TCP-IP stack were (legally) taken from BSD: but that was a long time ago, when Microsoft was much smaller.



Searching the code for "linux" and "GPL" finds no references. "BSD" finds only a couple of references to BSD-convention strings. "GNU" finds a lot of references to a GNUmakefile in private\genx\shell, which in turn mentions a "mode for Emacs." This is apparently legitimate: simply using a makefile does not apply the makefile's copyright to the resulting code.



Therefore, a superficial look at the code finds no evidence that Microsoft has violated the GPL or stolen other open source code. Closer examination might turn something up.

Favoritism
It's noticeable that a lot of the "hacks" refer to individual applications. In some cases they are non-Microsoft, such as this case: a Borland compiler came to depend on an existing bug, so their fix worked to preserve some of the bug's behaviour. But just as often these application-specific fixes are for Microsoft's own apps. There seems to be an informal hierarchy when it comes these: Microsoft apps take precedence, then major software companies like IBM and Borland.

It's also interesting to finally see references to the notorious undocumented features, which Microsoft application developers have long been known to use.

private\mvdm\wow32\wcntl32.c:
// These undocumented messages are used by Excel 5.0



private\mvdm\wow32\wgdi31.c:
// InquireVisRgn is an undocumented Win 3.1 API. This code has been
// suggested by ChuckWh. If this does not fix the s 2.0
// problem, then ChuckWh would be providing us with an private entry
// point.



private\mvdm\wow32\wgfont.c:
* This thunk implements the undocumented Win3.0 and Win3.1 API
* GetCurLogFont (GDI.411). Symantec QA4.0 uses it.
* To implement this undocumented API we will use the NT undocumented API



In some cases, the programmers themselves appear to have been frustrated or surprised.

private\ntos\w32\ntuser\kernel\mnpopup.c:
// Set the GlobalPopupMenu variable so that EndMenu works for popupmenus so
// that WinWart II people can continue to abuse undocumented functions.



private\windows\shell\accesory\hypertrm\emu\minitel.c:
// Guess what? Latent background color is always adopted for mosaics.
// This is a major undocumented find...



private\windows\shell\accesory\hypertrm\emu\minitelf.c:
// Ah, the life of the undocumented. The documentation says
// that this guys does not validate, colors, act as a delimiter
// and fills with spaces. Wrong. It does validate the color.
// As such its a delimiter. If...



Conclusions
The security risks from this code appear to be low. Microsoft do appear to be checking for buffer overruns in the obvious places. The amount of networking code here is small enough for Microsoft to easily check for any vulnerabilities that might be revealed: it's the big applications that pose more of a risk. This code is also nearly four years old: any obvious problems should be patched by now.



Microsoft's fears that this code will be pirated by its competitors also seem largely unfounded. With application code this would be a risk, but it's hard to see Microsoft's operating system competitors taking advantage of it. Neither Apple nor Linux are in a much of position to steal code and get away with it, even if it was useful to them.



In short, there is nothing really surprising in this leak. Microsoft does not steal open-source code. Their older code is flaky, their modern code excellent. Their programmers are skilled and enthusiastic. Problems are generally due to a trade-off of current quality against vast hardware, software and backward compatibility. ⬆

Recent Techrights' Posts

Ethics in Perspective, Free Software and Morality
top clients of Jeffrey Epstein are one happy family
The Register MS Made Millions of Pounds by Participating in the Slop Hype Campaign (It's Still Doing It), Now It Admits That It's Just a Bubble
the slop frenzy played a role in the Microsoft meltdown
Intercontinental Brigading - Part XXXXX - Pyramid Schemes (Planned Plunder) and Canceled/Botched Surgeries Aren't "Funny", They Cause Serious Harm and Distress
We were right about Microsoft
The Real Issue With The Register MS is Not the Politics of Some Staff's "Tweets", It's That The Register MS Publishes Fake Articles for Sponsors (50,000 Pounds Minimum)
AWS and Google each pay millions for fake articles which beget journalistic bias too (they literally pay the salaries of the 'reporters')
Microsoft Total Cost of Ownership (TCO): We Need Accountability Because Many People Die and It's Because of Microsoft Diehards or People Bribed by Microsoft to Deploy Microsoft Where Lives Are at Risk
They're trying to save face right now
What the Media Misses: It's Not an NVIDIA Issue, Super Micro Computer Inc Also Fell From $45 to $26 in the Period NVIDIA Lost 33% of Its Faked 'Value', NVIDIA is Collapsing Like Intel
History goes in circles
Waste of Money: Giving More Money to Toothless Regulators That Don't Even Examine Evidence
Shame in SRA
 
Links 14/11/2026: "The Claude Delusion" and "The Microsoft Outage is a Warning for the World"
Links for the day
Richard Stallman (RMS) at Universidad Central del Ecuador (Guayaquil), Cuenca, Campus Sur Universidad Politecnica Salesiana (Quito), and Ohio State University
Long live the message and mission of RMS
They Paid Workers in 'Shares' (That Lost Almost Half Their Value in One Month)
Welcome back 1999 or 2007
Links 14/11/2026: "OpenAI Is Sustaining Enormous Losses" and Slop "Loses the Popular Vote"
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, November 13, 2026
IRC logs for Friday, November 13, 2026
Gemini Links 14/11/2026: Code of Conduct, Back to Gemini, and Gemlog to Inbox
Links for the day
Slop Promotion, Including Paid-for Slop Promotion for So-called 'Linux' Foundation (Its Clients Are Slop Companies)
We've noticed a lot of this lately in "It's FOSS" and to a lesser degree in "FOSS Force"
Gemini Links 13/11/2026: Productivity Metrics and Antenna Outage
Links for the day
It's Not About China or Sex, It's About Corruption at NVIDIA and a Pyramid Scheme Perpetrated Under the Guise of "Hey Hi Revolution" (That Wasn't, It's Manufactured and Hyped by Bribes, Subsidised by Multi-Trillion-Dollar Loans, People's Pension Funds and More)
What's at stake here is a lot bigger than the "Ponzi hub" of Jensen Huang
No, You're Not a "Most Valuable Company" When Everything is Down for Half a Day in the Entire Planet
Still down, still no explanation (maybe they too aren't sure)
"Techrights Statement on Phoronix" Still Valid Five Years Later
Our position as stated in early 2022 has not changed
Vista 11's 'Growth' Has Stalled, It's Measured at Only 17.9% in the US This Year
That helps put in perspective Microsoft's attempt to discard almost 30% of its remaining workforce
"NVIDIA is Enron" (Subsidising the Pyramid Scheme That It Profited From), Microsoft is Next to be Down for the Count
Microsoft increasingly looks like the "next NVIDIA"
Richard Stallman Travels to South America to Give Talks About Free Software in Spanish, FSF Raises Money
The FSF is raising money (goal is $400,000) and the FSF has just mentioned the upcoming talks by the FSF's founder
United States Adding ~300 Billion in Government Debt Per Month, Wall Street Shaves Off Trillions in 'Value' in Less Than One Week
cushioning "assets" by helping them fake "value"
Microsoft: Pay Us for the Stuff That's Offline and We Cannot Fix
Learn to take control of the technology that you rely on
Links 13/11/2026: "Copyright-Strike-for-Hire" and "Stevie Wonder Photo Lawsuit"
Links for the day
The Slop Bubble (or Pyramid Scheme) Relied on Trust and Patience (Being Patient as Losses Grow and Debt Explodes, Trusting the Roadmap of Cheaters and Frauds)
Remember that it all began with trust
Anthropic's IPO Depends on $895.4 Billion in Debt (Money It Doesn't Have, It Loses Over 100 Billion Dollars Per Reporting Period), NVIDIA Has Just Lost Almost 2 Trillion Dollars In Value and Its Debt Trebled in Three Months
This coming week will be very, very entertaining for slop critics/sceptics to watch
At Microsoft, "Buyouts" or "Global Voluntary Separation Agreement" (GVSA) Not Much Different From Layoffs (Severance Shockingly Low)
From what we are able to gather, many people are leaving Microsoft 'voluntarily'
Is Microsoft the Next Fake-Valued Corporation to Lose 35% in "Market Value"? Is Slop Bringing Microsoft Down?
Will NDAs prevent people talking or journalists finding out the true cause?
Lorenzo Stoakes (ARM) the Latest of Many to Quit Linux Development Over Linus Torvalds' Obsession With Slop (Linus Wants to Work With Bots, Not Humans Who Understand Whatever Code They Write)
Linus caught the 'brain virus'
Silent Layoffs at IBM (and Red Hat) Continue in November 2026
IBM's CEO is "a Palliative Care Doctor Who Slides [IBM] Gently Into the Night"
Microsoft Asks 60,000 Workers to Leave, Some Leave, Services Go Down
Microsoft laid off about 40,000-50,000 people in past years
Gemini Links 13/11/2026: Roku Exits the Smart Home Market and Poor Reporting/Journalism Regarding Slop Plagiarism
Links for the day
Links 13/11/2026: "Apple Support Community Forums to Permanently Close" and "The Slop Market is Getting Nervous"
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, November 12, 2026
IRC logs for Thursday, November 12, 2026
Gemini Links 12/11/2026: A Firing of a Boss and Geminispace Growing Fast
Links for the day
Bill Epsteingate-Funded BBC "Totally Ignoring the $1.7 Trillion Wiped off NVIDIA Stocks"
Imagine how many pension funds are tied to this NVIDIA pyramid scheme
A Few Hours Before NVIDIA CEO Canned (and NVIDIA Shares Plunged) the NVIDIA-Funded The Register MS Published Paid Spam With "AI" 18 Times in It
Anything to inflate the bubble
Links 11/11/2026: NVIDIA Decapitated, "The Company That Published Fake Journalists in Sports Illustrated is Collapsing Dramatically"
Links for the day
Intercontinental Brigading - Part XXXXIX - We Didn't Start the Fire
It started in 2012
Photo Ops Are Liabilities
NVIDIA is not a "family business" and its CEO isn't some modest genius
NVIDIA’s Total Debt Trebled in Three Months!
Not the hallmark of a rich company unless its accounting is fraudulent
NVIDIA Turns Out to be Serial Cheater, Stock Plunges 33% in 5 Weeks
The "slop bros" have long relied on patience and blind faith
Adopting LLM Slop is Still Suicide
Suicide (in the literal sense) is also linked to adoption of chatbots
On Laundering Licences and Code
A "Second SCO" waiting to happen
The Cyber Show on Slop and the Ministry Of Truth in "Nineteen Eighty Four"
"cultural erasure" by slop
Intercontinental Brigading - Part XXXXVIII - Keeping Both Eyes on the Ball
One upside of these disputes is that they raise at least two very important issues concerning the law
Gemini Links 12/11/2026: Encryption is Easy, Human Emacs, and Legislation in Italy
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, November 11, 2026
IRC logs for Wednesday, November 11, 2026