The Archaeologologogology #1 – vbd6.dll and vbe7.dll MIDI file
November 23, 2016 in Archaeology, Reversing
With this post I start a new series that will talk about ancient code scrolls that are nothing, but a trivia related to some old software. Basically, a stuff of the past, re-visited without any other purpose, but the amusement…
I will kick it off by inviting you to explore the content of vbe6.dll or vbe7.dll inside your Microsoft Office installation. Using Resource Hacker you can quickly discover that it has a mysterious resource 5432:
Using the very same Resource Hacker you can immediately play the music file that it recognizes. The md5 of the MIDI resource is 9b90e2e51483460501f711aa80508f7e.
I am not the first one to discover it, there are a number of posts online that discuss it, for example this German post says that:
In the PC Welt (German magazine PC World) 10/02, it is reported on page 252 that there is a musical Easter egg in the Office 97 or 2000 file vbe6.dll.
but I was curious what code I can find that is related to this resource – pretty sure that programmers didn’t leave it there as a result of an accident. After checking the usual suspects (vbe6.dll/vbe7.dll) and not being able to find any quick reference to the resource ID 5432, I assumed that it could be some legacy stuff and no longer present in the code. I then started looking at the older versions of the vbeX.dll .
That was a good idea and I soon discovered the sequence of code that actually loads and plays the MIDI file:
The playMidi function uses mciSendCommandA API to play the extracted MIDI file.
The file created by the code is saved inside %TEMP%\VB16B.tmp (GetTempFileNameA used to create a temp file path receives the ‘VB’ prefix).
I also noticed that the code playing the MIDI creates a window (class ‘OfVbEg’, which I guess stands for Office Visual Basic Egg):
So yeah… it has the Easter egg written all over it.
I forced the routine to execute and surely enough, it launched the VB credits – a known Easter Egg that can be watched after adding a menu item ‘Show VB Credits’ to Visual Basic IDE. You can follow the steps presented in the video in Office 97 VBA IDE as well and you will see the very same demo:
Comments are closed.