
This is a 'very schematic' guide about how the program is divided, and what it does.
A good level of knowledge of X86, DOS & Win32 programming should helps.

- What the launcher (bleemrun.exe) does:

1) fix bleem!.exe file:
	- fix PE headers as espected from XP
	- enable 'large address aware' image flag
	- replace import library 'kernel32.dll' with 'bleem_nt.dll'
2) (for Win2K only) does an in-memory patch of ntoskrnl.exe:
	- bypass 'ExVerifySuite' check for starting a '/3gb enabled' prog on non-Server OS
3) enable '/3gb' switch on 'boot.ini' file

- What the adapter dll (bleem_nt.dll) does:

1) replace Win9x-only functions (from 'kernel32.dll') with adapters:
	- VxDCall:
		- memory pages allocation handling
		- real-mode (DOS/DPMI) interrupts dispatching
	- LoadLibrary16 / FreeLibrary16 / GetProcAddress16 / QT_Thunk
		- allocate a DOS memory block for MSCDEX (cdrom) interface
	- MapLS / SMapLS / UnMapLS
		- access LDT selector for executing ring-0 (kernel) mode
2) trap SEH exceptions caused by:
	- access LDT & GDT selector
	- enter/leave ring-0 mode
	- 'int 20' service (VxDCall from ring-0)
	- access to 'privileged' opcodes:
		- CLI / STI (ignored)
		- MOV reg,DRn / DRn,reg (debug registers)
		- LGDT / LIDT (descriptor tables)
3) emulate X86 opcodes for 'protection check' routines:
	- avoid double fault on SEH handler when ESP used as 'scratch' register
	- modify 'address translation' of DOS memory block
4) emulate MSCDEX interface
	- access to cdrom using native (SPTI) interface
5) hooks DirectDraw API & replace several 'not thread-safe' calls:
	- on XP, fails when called from a thread different from creation:
		- IDirectDraw4::CreateSurface (re-create interface from calling thread)
		- IDirectDrawSurface4::Lock (return previous 'saved' value)

