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

Microsofters' SLAPP Censorship - Part 2 Out of 200: Detailed Timeline From 2012 (Attack on Reporters That Question Restricted Boot) to 2024 (Lawsuit Against Reporter and His Wife in Another Continent)
we reproduce a document produced 2 years ago to give people more context and more facts
GNU/Linux in Laptops/Desktops Still Matters, It's Likely the Only Way to Achieve Software Freedom
Software Freedom requires all sorts of things at the "OS level"
 
FSF Promoting Richard M. Stallman (RMS) Talk in Switzerland in Just Over a Day From Now
RMS may have more talks on the way
Why Slop Will Flop - Part IV - We've Seen the End of It
Some years ago they insisted blockchains would revolutionise everything
Android is Proprietary 'Linux' and It Becomes More Malicious Over Time, Google Only Delayed What It Planned All Along
Google is a proprietary software giant, GSoC is only a distraction and confusion
Links 04/03/2026: Scam Altman Causes Chatbot Sub Numbers to Plunge, "Stocks Drop as Inflation Risk Emerges"
Links for the day
Why Slop Will Flop - Part III - Our Relationship With Slop (and Yours)
I never - except inadvertently - "used" an LLM-based chatbot
Why Slop Will Flop - Part II - Devil in the Details
News sites or social control media sites which tolerate slop are digging their own grave
Simpler Means Faster
Do you know your bottlenecks?
Gemini Links 04/03/2026: About a Missing Symbol and "Good Manners"
Links for the day
The Register MS Takes Money From Chinese Surveillance Threat to Promote a Ponzi Scheme
"Sponsored by Huawei."
Nicaragua's GNU/Linux Usage Measured at Over 8% by statCounter
Nicaragua is a poor country, but it also has rich culture
Why Slop Will Flop - Part I - Slop Fatigue Prevalent
See, sooner or later people (audiences of colleagues) find out and as soon as they find out you are slopping, they will lose interest
Links 04/03/2026: "The EU moves to kill infinite scrolling" and a call to "Nationalize Amazon"
Links for the day
Coming Soon: Evidence of Abuse in Our IRC Network
IRC's freedom can sometimes be its 'weakness' if not properly guarded
High GNU/Linux Adoption in Brunei Darussalam
It's worth noting (or at least noticing) that Microsoft loses ground in some of the countries where the government contracts paid the most
Media Blackout Reducing or Preventing Press Coverage of Microsoft Layoffs in 2026
Worse yet, there will be gaslighting and deceit
Gemini Links 04/03/2026: The Garnet Star, The Hunt, The SYN Attacks
Links for the day
The EPO's General Consultative Committee (GCC) Discussion Illuminates How Much Worse Things Have Gotten ("on Strike and Participated in the 'Meeting'")
a videoconference - not a physical meeting - discussed EPO policies
Free Software Foundation Supports Its Founder, Advertises His Talks in Switzerland
When you suppress voices, assuming the reasons for suppression are bunk, it is always bound to backfire very badly
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, March 03, 2026
IRC logs for Tuesday, March 03, 2026
Over 1,500 EPO Workers Went on Strike Last Week
a new publication which celebrates some accomplishments of industrial actions and calls for further actions
Madame Streisand Wanted to Censor The Web, Instead She 'Created' a New Term, "Streisand Effect"
It is basically an own goal
Solicitors Regulation Authority (SRA) Failed to Detect Fraud in Law Firms... Until It Was Too Late
Earlier today we contacted some more politicians about this and received mail from them as well
Our EPO and IBM Coverage Bears Fruit
In case insiders want to get in touch with us, please ensure or at least try doing so securely
Defending Women Isn't a Crime, Everybody Can Agree on That
Their culture is unlike ours
EPO "Cocaine Communication Manager" - Part VI - Influx of Spaniards and Portuguese Workers (+77%) at Europe's Second-Largest Institution, Led by the 'Alicante Mafia'
There is now data supporting this assertion, new and complete data in fact
Links 03/03/2026: "Scam Altman in Damage Control" and Oil Traffic Disrupted
Links for the day
Gemini Links 03/03/2026: Phones, LLMs, and Changes on the Web
Links for the day
Richard Stallman Confirms Talk in Bern Next Week
Dr. Stallman has just formally confirmed his third talk this month in Switzerland
Nobody is Safe at IBM (or Red Hat)
There is no job security at IBM
GNU/Linux at All-Time High in Guam
there are many computers in that island
Bad faith: Hugo Roy knew FSFE impersonating FSF before French tribunal, colleagues deceived
Reprinted with permission from Daniel Pocock
Microsofters' SLAPP Censorship - Part 1 Out of 200: Claim No. KB-2024-001270 in a Nutshell
abuse of process by a law firm working for an American who was arrested for strangling women and another American whose own spouse calls a "rapist"
When EPO Team Managers (TMs) Are Harassing People Who Strictly Apply the European Patent Convention (EPC) in Patent Examination
There are two strikes planned for this month
Confirmed: Using Slop Gets You Fired
Let the story of Benj Edwards be a cautionary tale
Links 03/03/2026: "No one wants to read your AI slop" and "chatbots in the kill chain"
Links for the day
EPO and "Equivalent to More Than 100 Days of Strike"
The industrial actions continue and already have a positive effect
Streisand Effect, the Microsoft Way
Microsoft has once again proven the Streisand Effect
Keeping Track of IBM Layoffs in March 2026
IBM depends on bribery
GNU/Linux Measured at 7% in Yemen
Windows is too hostile and dangerous
Links 03/03/2026: Security Breaches, Iceland Wants EU Membership, and "Wall Street–Backed Lawmakers Want to Help Banks Gouge You"
Links for the day
Queensland Health Payroll System: IBM billion-dollar-blowout inquiry
Reprinted with permission from Daniel Pocock
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, March 02, 2026
IRC logs for Monday, March 02, 2026
Gemini Links 03/03/2026: GrapheneOS and Keyboard Shortcuts
Links for the day
Tomorrow should be sunny (at long last!) and a generally productive dayProductive Week Ahead
Tomorrow should be sunny (at long last!) and a generally productive day
Only One Slopfarm Seems to Have Targeted "Linux" Today
It certainly does feel like the slop hype is reaching the "late life crisis" and companies that benefited from this bubble are overdue for a day of reckoning
Microsoft Mass Layoffs: Being Sacked at 1AM in the Morning
Watch what happens to Microsoft employees who get pregnant
Links 02/03/2026: More Social Control Media Bans, Climate Change Woes, and "Journalist With Germany's Deutsche Welle Arrested in Turkey"
Links for the day
Gemini Links 02/03/2026: Small Phones, "I 3D Printed My Brain", and "Managing 5 Servers at Once with tmux"
Links for the day
IBM is Trying to Hide Mass Layoffs, Not Only With NDAs and 'Scripted' LinkedIn Posts
From what we can gather (screenshot above), today many people leave IBM and Red Hat
Richard Stallman is Giving a Public Talk This Week (Friday in Lucerne School of Computer Science and Information Technology)
His birthday is just around the corner.
Windows Falls to New Low in World's Largest Population (India)
Windows is now down to 7%
Never Miss a Good Opportunity to Shut Up and Drink Coffee
Threats come at a cost; each time you issue a threat you stigmatise yourself as a bully
Last Month Matthew Garrett Said Ridiculous Things After His Spouse Had Called Him a "Rapist", Now He's Trying to Take the Site Offline and Put My Family in Prison
The real issue of concern to him (and his alleged reputation) is the spouse and the matter is to be dealt with in America, not the UK
Machine-Generated Legal Documents, Over 2,000 Pages Sent to Us Today Alone
We now know that the papers we receive are produced using bots (algorithms)
Reporting to Our Politicians/MPs the Failure of the SRA to Stop Hired Guns Who Help Americans (Men Who Attack Women and Nowadays Also Attack British Reporters)
About a month ago my wife wrote to politicians to get the ball rolling
The Topic Many People Don't Want to Talk or Write About
"DEI" is inherently about making racial and gender patterns better reflect society's
XBox is Virtually Dead Already, What Next Will Die at Microsoft?
Now that there are mass layoffs at Microsoft datacentres it is not premature to speculate about what dies after XBox
For the First Time, statCounter Measures Internet Explorer at 0.01% "Market Share"
What Microsoft replaced it with is just a Chrome clone with extra spyware
Was a Lot of "Windows" and "Unknown" in Iran Just GNU/Linux in Disguise?
more than 1 in 10 desktop/laptop requests is estimated to be GNU/Linux
"Here in the UK, GNU/Linux rose to all-time high at Windows' expense"
Will this entail Software Freedom as well? This depends on all of us
Links 02/03/2026: Claude Code Causes a Mexican Government Cyberattack, "London Repair Week" Noted
Links for the day
2026 Microsoft Mass Layoffs in So-called 'AI' Datacentres, Why Doesn't the Mainstream Media Cover The News?
What does this tell us about the state of the media?
Don't Fall for "Top X Law Firms" in "Discipline Y", They Pay $Z to Get False Endorsement/s
It's a scheme, a scam, an elaborate fraud
More Publishers Have Turned From Slop Boosters Into Slop Sceptics and Critics
There's a "hidden cost" when one participates (for profit) in "pump and dump" schemes
TeX Live Has New Release, But Planet Debian Won't Tell You That
It 'unpersoned' the developer
LLM Slop Does Not Know People (It Knows Nothing) and Cannot Distinguish Between People. It's a Recipe for Disaster.
no way of knowing who's who
"Over 1,100 Law Firms Gone in Five Years" in the United Kingdom (UK) Alone
There are basically way too many lawyers (looking for "business", e.g. threats and lawfare) and not enough positions to fill
Microsoft FUD From Microsoft Site Helps Distract From Actual Microsoft Back Doors
Published on a Sunday
Free Software Foundation Needs to Become More Active in Europe to Avoid Impersonation by Microsoft-Sponsored Groups
So far we've hardly seen the FSF saying anything at all about the US president
Links 02/03/2026: "Not Envious of Billionaires" and Palantir SLAPPs "Swiss Magazine For Accurately Reporting That The Swiss Government Didn't Want Palantir"
Links for the day
There Has Never Been a Better Time to Quit Social Control Media
Those networks are selling something. And that something is not peace because peace does not sell "attention".
Microsoft Users Drowning in Slop, If They Complain Microsoft Censors Them
Like an authoritarian regime
IBM is Killing Red Hat's Portfolio - Including Linux - to Prop Up Ponzi Scheme ("AI")
IBM is killing Red Hat
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, March 01, 2026
IRC logs for Sunday, March 01, 2026
Speed of Sites Matters
Being easily accessible all the time matters to us
Gemini Links 02/03/2026: Weird Phone Calls, Small Phones, and Exploring Racket
Links for the day
Dr. Andy Farnell on "Good Tech"
in the age of "rent everything" and "own nothing"