Function at 0x10008810
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x18
mov eax, dword [0x10082594]
xor eax, esp
mov dword [esp + 0x14], eax
mov edx, dword [sym.imp.GDI32.dll_CreateDCA]
or dword [0x1008742c], 2
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetWindowDC]
push ebp
mov ebp, dword [sym.imp.USER32.dll_ReleaseDC]
push esi
mov esi, dword [esp + 0x28]
push edi
mov edi, dword [sym.imp.USER32.dll_GetDC]
mov eax, 0x3b9c
mov ecx, 0x11d2
mov word [esp + 0x1a], cx
mov ecx, dword [sym.imp.GDI32.dll_BitBlt]
mov word [esp + 0x18], ax
mov al, 0x97
mov dword [0x10086f3c], edx
mov edx, dword [sym.imp.GDI32.dll_PatBlt]
mov dword [0x10086f34], ecx
mov ecx, dword [sym.imp.GDI32.dll_StretchBlt]
push 0x100070d0
mov byte [esp + 0x24], al
mov byte [esp + 0x25], al
mov eax, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0x10062544
mov dword [0x10086f84], edx
mov edx, dword [sym.imp.GDI32.dll_DeleteDC]
mov dword [0x10086fb0], ecx
mov ecx, dword [sym.imp.GDI32.dll_SaveDC]
push eax
mov dword [0x10086f54], edx
mov edx, dword [sym.imp.GDI32.dll_RestoreDC]
mov dword [0x10083a6c], ecx
mov ecx, dword [sym.imp.GDI32.dll_SelectPalette]
push 0x10062538
push esi
mov dword [esp + 0x28], 0x15e65ec0
mov byte [esp + 0x30], 0xb9
mov byte [esp + 0x31], 0x2f
mov byte [esp + 0x32], 0
mov byte [esp + 0x33], 0x60
mov byte [esp + 0x36], 0xea
mov byte [esp + 0x37], 0x5b
mov dword [0x10086f38], eax
mov dword [0x10087130], edi
mov dword [0x10087148], ebx
mov dword [0x10087178], ebp
mov dword [0x10083a70], edx
mov dword [0x10086fa0], ecx
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008921
mov dword [0x10086f38], eax
push 0x10006f90
push 0x10062530
push edi
push str.user32.dll
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008943
mov dword [0x10087130], eax
push 0x10006fc0
push 0x10062518
push ebx
push str.user32.dll
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008965
mov dword [0x10087148], eax
push 0x10006ff0
push 0x1006250c
push ebp
push str.user32.dll
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008987
mov dword [0x10087178], eax
mov edx, dword [sym.imp.GDI32.dll_CreateDCA]
push 0x10007040
push 0x10062500
push edx
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x100089af
mov dword [0x10086f3c], eax
mov eax, dword [sym.imp.GDI32.dll_BitBlt]
push 0x10007120
push 0x100624f8
push eax
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x100089d6
mov dword [0x10086f34], eax
mov ecx, dword [sym.imp.GDI32.dll_StretchBlt]
push 0x10007220
push 0x100624ec
push ecx
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x100089fe
mov dword [0x10086fb0], eax
mov edx, dword [sym.imp.GDI32.dll_PatBlt]
push 0x100071b0
push 0x100624e4
push edx
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008a26
mov dword [0x10086f84], eax
mov eax, dword [sym.imp.GDI32.dll_DeleteDC]
push 0x100072c0
push 0x100624d8
push eax
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008a4d
mov dword [0x10086f54], eax
mov ecx, dword [sym.imp.GDI32.dll_SaveDC]
push 0x10007300
push 0x100624d0
push ecx
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008a75
mov dword [0x10086f98], eax
mov edx, dword [sym.imp.GDI32.dll_RestoreDC]
push 0x10007330
push 0x100624c4
push edx
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008a9d
mov dword [0x10086f94], eax
mov eax, dword [sym.imp.GDI32.dll_SelectPalette]
push 0x10007360
push 0x100624b4
push eax
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008ac4
mov dword [0x10086fa0], eax
mov ecx, dword [sym.imp.GDI32.dll_RealizePalette]
push 0x100073a0
push 0x100624a4
push ecx
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008aec
mov dword [0x10086f8c], eax
mov edx, dword [sym.imp.GDI32.dll_GetSystemPaletteEntries]
push 0x100073d0
push 0x1006248c
push edx
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008b14
mov dword [0x10086f74], eax
mov eax, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0x10007490
push 0x1006247c
push eax
push 0x10062538
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008b3b
mov dword [0x10086f6c], eax
mov ecx, dword [sym.imp.USER32.dll_BeginPaint]
push 0x10007450
push 0x10062470
push ecx
push str.user32.dll
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008b63
mov dword [0x100870d0], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x100085a0
push 0x10062460
push edi
push 0x10062450
push esi
mov dword [0x10087064], edi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008b91
mov dword [0x10087064], eax
mov eax, dword [esp + 0x30]
cmp eax, 7
ja case.0x10008b9e.4
jmp dword [eax*4 + 0x10008e3c]
push fcn.10008340
push str.DirectDrawCreate
push 0
push str.ddraw.dll
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008bc8
mov dword [0x1008410c], eax
push fcn.10008460
push str.DirectDrawCreateEx
push 0
push str.ddraw.dll
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008beb
mov dword [0x10084110], eax
push 0x10006ec0
push str.DirectDrawEnumerateA
push 0
push str.ddraw.dll
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je 0x10008c0e
mov dword [0x10084114], eax
push 0x10006f20
push str.DirectDrawEnumerateExA
push 0
push str.ddraw.dll
push esi
call fcn.10025860
add esp, 0x14
test eax, eax
je case.0x10008b9e.4
mov dword [0x10084118], eax
jmp case.0x10008b9e.4
push str.ddraw.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
push str.DirectDrawEnumerateA
push ebx
call edi
push str.DirectDrawCreate
push ebx
mov dword [0x10084114], eax
call edi
mov dword [0x1008410c], eax
test eax, eax
je 0x10008e06
push fcn.10008340
push str.DirectDrawCreate
push eax
push str.ddraw.dll
push esi
call fcn.10025860
mov edx, dword [0x10084114]
push 0x10006ec0
push str.DirectDrawEnumerateA
push edx
push str.ddraw.dll
push esi
call fcn.10025860
add esp, 0x28
push 0
lea eax, [esp + 0x14]
push eax
push 0
call fcn.10008340
mov esi, eax
test esi, esi
je 0x10008cc7
push esi
call fcn.100240b0
push eax
push esi
push str.DirectDrawCreate:_ERROR_res_x__s__n
call fcn.10025250
add esp, 0x10
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp case.0x10008b9e.4
push str.ddraw.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
push str.DirectDrawEnumerateA
push ebx
call edi
push str.DirectDrawEnumerateExA
push ebx
mov dword [0x10084114], eax
call edi
push str.DirectDrawCreate
push ebx
mov dword [0x10084118], eax
call edi
mov dword [0x1008410c], eax
test eax, eax
je 0x10008d99
push fcn.10008340
push str.DirectDrawCreate
push eax
push str.ddraw.dll
push esi
call fcn.10025860
mov eax, dword [0x10084114]
push 0x10006ec0
push str.DirectDrawEnumerateA
push eax
push str.ddraw.dll
push esi
call fcn.10025860
mov ecx, dword [0x10084118]
push 0x10006f20
push str.DirectDrawEnumerateExA
push ecx
push str.ddraw.dll
push esi
call fcn.10025860
add esp, 0x3c
push 0
lea edx, [esp + 0x14]
push edx
push 0
call fcn.10008340
mov ebp, eax
test ebp, ebp
je 0x10008d8d
push ebp
call fcn.100240b0
push eax
push ebp
push str.DirectDrawCreate:_ERROR_res_x__s__n
call fcn.10025250
add esp, 0x10
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push str.DirectDrawCreateEx
push ebx
call edi
mov dword [0x10084110], eax
test eax, eax
je case.0x10008b9e.4
push fcn.10008460
push str.DirectDrawCreateEx
push eax
push str.ddraw.dll
push esi
call fcn.10025860
add esp, 0x14
push 0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0
call fcn.10008460
mov esi, eax
test esi, esi
je 0x10008df1
push esi
call fcn.100240b0
push eax
push esi
push str.DirectDrawCreateEx:_ERROR_res_x__s__n
call fcn.10025250
add esp, 0x10
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
cmp dword [0x1008410c], 0
jne 0x10008e24
cmp dword [0x10084110], 0
jne 0x10008e24
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.10047cbc
add esp, 0x18
ret
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.10047cbc
add esp, 0x18
ret