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

If You Value Privacy, Follow the Likes of Eben Moglen, Phil Zimmermann, and Richard Stallman, Not Back Doors' Boosters Who Mislabel Themselves as Security Experts
Signal is not really secure
Writer's Block is Not a Problem to Us, Only a Lack of Time
Or timewasting by aggressive militants who try to silence us [...] People who experience writer's block very often find it depressing (it feels unproductive) and sometimes come to the conclusion that perhaps writing isn't for them
March Plans for Techrights
next month we plan to start the series about how the SRA failed
 
[Video] "New RMS [Richard Stallman] Positive Media" Reaches Millions of Viewers This Week
Assuming 5+ million people will watch this on the first week, that's good publicity for the Free software movement
Another Quiet Slop Day Passes By
the number of slopfarms we can locate/track is fast decreasing
Gemini Links 26/02/2026: Sending a Thesis and Lupa/Onion ("Lupa now lists Gemini .onion addresses")
Links for the day
Links 26/02/2026: Bcachefs Man Bonkers, "Seven Journalists Convicted for Taking Photos at Courtroom"
Links for the day
Links 26/02/2026: "Peak Mental Sharpness" and "The Whole Economy Pays the Amazon Tax"
Links for the day
"Community" Site Deleted by Jeffrey Epstein-Connected 'Linux' Foundation Had Interview Where Eben Moglen Spoke of GPLv3 and of DRM, Back Doors Etc.
Deleting what happened or what was said two decades ago
Richard Stallman (Free Software Foundation) and Eben Moglen (Columbia Law School) Explained 25 Years Ago That Proprietary Software (and Proprietary Firmware) Would Lead to Back Doors
a fortnight after the 9/11 terror attacks in the US
Giving to the Community Versus Taking From the Community (or Worse, Attacking the Community)
some people bring no contributions, only harm
LLM Slop Will Try to 'Rewrite' History of UNIX and GNU/Linux
We occasionally see slopfarms spreading misinformation about UNIX, GNU, and Linux
Where Does the Solicitors Regulation Authority (SRA) Stand on Machine-Generated Legal Documents and Copy-pasting One Client's Lawsuit to Start Another (for American Serial Strangler)?
Now that many law firms cheat (copypasta, paper DOoS, LLM slop, breaches of rules, even defaming the other side) the SRA cannot keep up
Of Course Android is Not Free Software
That Android is not about freedom should not be so shocking
Talking About Blackboxes
Having just reposted a couple of articles from Alex Oliva
Microsoft Slop is Already Killing XBox
Microsoft will fail at alleviating such concerns
Two Weeks Have Passed and It Looks Like Conde Nast's Ars Sloppica Sacked "Senior" "AI" "Reporter" Benj Edwards But Did Not Remove All His LLM-Produced 'Articles'
the editorial standards at Conde Nast's Ars Sloppica are a joke
Alex Oliva (GNU Linux-Libre): Stricter is Less Popular
Reprinted with permission from Alex Oliva
Fraud and Crimes at Microsoft
A lot of these American companies simply cheat and even bribe
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, February 25, 2026
IRC logs for Wednesday, February 25, 2026
FSF's Alex Oliva on Hardware Black Boxes
Reprinted with permission from Alex Oliva
What Microsoft Hides Underneath
In recent years a lot of this shell game was played via "Open" "AI" [sic]
A Lot of Slopfarms Died, Google News Feeds the Few Which Survived and Still Target "Linux"
Many just simply died
Links 25/02/2026: Fifth Year of War in Ukraine, Dihydroxyacetone Man Looking to Start More Wars
Links for the day
Gemini Links 25/02/2026: Retired a Year, Illness, Losing a Lung, and "Back to Gemini"
Links for the day
The Register MS Published a Ponzi Scheme-Boosting Fake Article This Morning. It Mentions "AI" 30 Times.
Will credibility be left after the bubble pops entirely?
They Try to Ruin Linux, Too ("Attestation" in GNU/Linux)
In the context of Web browsers, this isn't unprecedented and we wrote a lot about it
Mozzarella Company: All Our Cheese Comes With Mold Now, But You Can Ask the Seller to Remove the Mold
If you reject and oppose slop, do not download/use Firefox
Stallman Was Right About Back Doors
I had some conversations with Dr. Stallman about security and back doors
Australian Signals Directorate ex-employee sold back doors to Russia
Reprinted with permission from Daniel Pocock
IBM Debt-Loading and Liability (Toxic Asset) Offloading
One can hope that IBM will be subjected to the same attention Kyndryl received, but this boils down to politics
Links 25/02/2026: 'Hybrid Warfare' and "Boycott the State of the Union"
Links for the day
IBM (and Red Hat) Can Disappear in the Coming Years, Along With Kyndryl (Debt Twice as Big as Its 'Worth')
No wonder Red Hat workers tell us they hate IBM
Software Freedom is Science, But It Also Sustains Life
In some sense, Software Freedom can be explained in the context of nourishing people
“Xbox, like a lot of businesses that aren’t the core AI business, is being sunsetted."
There has been a lot of narrative control lately, including at 9PM on a Friday
3,300 Capsules Known to Lupa and Currently Accessible
Gemini Protocol turns 7 this summer
When it Comes to Firmware, the FSF and Its Founder RMS Won the Argument (But Not the Fight, Yet)
The "whataboutism" tactics are physiological manipulation means of discouraging those who move in the correct direction
Austria Tackles Digital Weapon Disguised as "Social" and/or "Media"
Are we seeing the end days of Social Control Media?
Nothing Over the Horizon for XBox
XBox is not even being sold in many places anymore
Solicitors Regulation Authority (SRA) Contradicting Itself: You Can Use Slop to Cheat Clients, But You Can Also Face Disciplinary Actions Over Slop
Where does the SRA stand on the matter?
In Praise of Eben Moglen
Hopefully Professor Moglen will be with us for many decades to come and become an active speaker on issues such as Software Freedom
Sunsetting IBM (for the Benefit of Few Corrupt Officials and Wall Street Speculators)
IBM will not (and cannot) survive for much longer [...] The issue is bad leadership, not any particular nationality/race
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, February 24, 2026
IRC logs for Tuesday, February 24, 2026
Gemini Links 25/02/2026: Rise of Solar in 2025 and Smallnet Protocols
Links for the day
HR Blunder at IBM or IBM Struggling With Money?
Weird for such an allegedly rich company to be so stingy
Gemini Links 24/02/2026: x86 Computer In-Browser and Administration
Links for the day
Envy is the #1 Enemy of Richard Stallman
Whenever you see someone mocking Richard Stallman, ask yourself: does this person have a reason to be jealous of Richard Stallman?
Life is Sweeter When Less Means More
People need to think "small", not "big" (as in capital)
Championing a Cause
Probably over 100 million GNU/Linux users on laptops/desktops
Balmoral rape cult & Debian suicide cluster indifference, community
Reprinted with permission from Daniel Pocock
Father of XBox Says What Microsoft Does Not Want to Hear About XBox (They All Know It's Dead)
Microsoft just worried shareholders will find out Sharma is "just a face" and an undertaker
Can Much Longer Can the Financial 'Press' (Pump-n-Dump Megaphone) Cheer for IBM's Accounting Enigma?
IBM has fallen almost 25%
France Needs to Focus on Software Freedom, Not Flags
We need more SIP advocacy!
Combatting Censorship in the "Civilised World": The Media Blackout Surrounding EPO Strikes and Other Large-Scale Actions
We - collectively speaking - cannot afford to keep the Office in the hands of a "Mafia"
Religious or Not, Consider Quitting Social Control Networks (All of Them) This Season
Lent is a good time to quit addiction such as social control media
EPO Strike Actions and Other Industrial Actions Are Effective When Management Fears the Staff and Staff No Longer Fears Any Managers
'António the unready' should get ready to be ousted
Liberating the Self From the Invisible Prison of Plutocrats-Controlled Media and Social Control Media
Can you always see the full picture or does something (someone powerful) obstruct it?
Links 24/02/2026: Drug Cartel Decapitated, Jeffrey Epstein-Connected 'Linux' Foundation Promotes Slop and Buzzwords at MWC Barcelona 2026
Links for the day
2023: Layoffs Are Because of "AI". 2024: Shares Up Owing to "AI". 2025: Shares Recently Fell Due to "AI". 2026 Forbes (Paid by IBM): Shares Falling is Good!
"AI" is smoke and mirrors
Bitcoin: Code of Conduct stifled open source concerns
Reprinted with permission from Daniel Pocock
Slop Boosters and 'Hype Agents' Render Themselves Irrelevant and the General Public Becomes Incredulous Due to "Bros Who Cry Wolf!"
It won't age well
"Half-baked Vibe Code Shipped Full of Errors"
Seems timely after our latest article
IBM Did Not Fall Because of COBOL Vapourware, IBM Still Collapses Because It's Worthless, Way Overvalued, and Very Likely Cooks the Books
language-to-language conversion (in the context of programming) is nothing new
Links 24/02/2026: Copyright Litigation Over Anne Frank’s Diary, "Arrogance of Developers"
Links for the day
Another New Low for Solicitors Regulation Authority (SRA): Authorising Slop Disguised as "Legal Advice"
SRA is a lapdog - not a watchdog - of the "litigation industry"
EPO "Cocaine Communication Manager" - Part IV - "Many Jobs Were Given to Spanish Employees for No Related Skills At All"
The EPO's fate might be similar to that of the XBox
Gemini Links 24/02/2026: Hardware Tinkering and Slop Bots Attacking the "Small Web"
Links for the day
Quitting Reddit (Social Control Media Controlled by Conde Nast)
There is a new post in Reddit
IBM is the World Champion at Layoffs and There Are Reportedly More Layoffs in IBM This Month (EU)
IBM fired 60,000 in 1993
Free Software is for Everyone
Young and old, rich and poor etc.
Gemini Links 24/02/2026: Voltage Divider on Slide Rule and Many Raspberry Pi Projects
Links for the day
Links 24/02/2026: Telephone Turns 150, Political News Catchup, and Rearmament
Links for the day
Asha Sharma "a Palliative Care Doctor Who Slides Xbox Gently Into the Night"
2026 will probably be the last year of XBox
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, February 23, 2026
IRC logs for Monday, February 23, 2026