Function at 0x496af0
Capabilities:
Hide graphical window

Disassembly:
push ecx
push ebx
mov bl, cl
mov ecx, dword [0x4f9b54]
push esi
or ecx, 1
push edi
mov dword [0x4f9b54], ecx
call fcn.0048ea90
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
mov edi, dword [sym.imp.USER32.dll_SetWindowLongA]
mov dword [esp + 0xc], eax
mov eax, dword [0x4f9ba4]
test eax, eax
mov byte [0x4f8e84], 1
je 0x496bca
cmp byte [0x4d4bbc], 5
jne 0x496bca
mov eax, dword [0x4f8e1c]
push 0
push eax
call esi
mov ecx, dword [0x4f8e1c]
push 0x300
push 0xffffffffffffffec
push ecx
call edi
mov eax, dword [0x4f9ba4]
mov ecx, dword [0x4f8e1c]
push 8
push ecx
mov edx, dword [eax]
push eax
call dword [edx + 0x50]
test eax, eax
je 0x496bbf
mov cl, byte [0x4f9b18]
test cl, cl
jne 0x496bbf
xor edx, edx
mov ecx, 0x4d50a0
cmp dword [ecx], eax
je 0x496b8e
add ecx, 8
inc edx
cmp ecx, str.X_Alignment_error
jb 0x496b7e
cmp edx, 0x60
jne 0x496bb2
push eax
push str.Unknown_DirectDraw_error_code__08X
push 0x4f95d8
call fcn.004b77e0
add esp, 0xc
mov dword [0x4f9b60], 0x4f95d8
jmp 0x496bbf
mov edx, dword [edx*8 + 0x4d50a4]
mov dword [0x4f9b60], edx
mov eax, dword [0x4f9ba4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov edx, dword [0x4f8e1c]
push 2
push edx
call esi
mov al, byte [0x6086d4]
mov ecx, dword [0x4f9b54]
mov byte [0x4f9b68], al
mov al, byte [0x6086d4]
and ecx, 0xfffffffe
test al, al
mov dword [0x4f9b54], ecx
je 0x496bfc
call fcn.0049a3f0
test bl, bl
je 0x496dff
push 1
push 0
push 0
push 0xfff0
push 0xf120
push 0x112
call fcn.0048f940
mov ecx, dword [0x4f9b54]
mov al, byte [0x4d4bbc]
add esp, 0x18
or ecx, 2
cmp al, 5
mov dword [0x4f9b54], ecx
jne 0x496c51
mov ecx, dword [0x4f8e1c]
push 8
push 0xffffffffffffffec
push ecx
call edi
mov edx, dword [0x4f8e1c]
push 9
push edx
call esi
mov eax, dword [0x4f9ba4]
mov esi, dword [0x4f9b6c]
test eax, eax
je 0x496da8
cmp byte [0x4d4bbc], 5
jne 0x496da8
mov dl, byte [0x4f9b4c]
mov ecx, 0x11
test dl, dl
jne 0x496c85
mov ecx, 0x13
mov edx, dword [eax]
push ecx
mov ecx, dword [0x4f8e1c]
push ecx
push eax
call dword [edx + 0x50]
test eax, eax
je 0x496ce9
mov cl, byte [0x4f9b18]
test cl, cl
jne 0x496ce9
xor edx, edx
mov ecx, 0x4d50a0
cmp dword [ecx], eax
je 0x496cb8
add ecx, 8
inc edx
cmp ecx, str.X_Alignment_error
jb 0x496ca8
cmp edx, 0x60
jne 0x496cdc
push eax
push str.Unknown_DirectDraw_error_code__08X
push 0x4f95d8
call fcn.004b77e0
add esp, 0xc
mov dword [0x4f9b60], 0x4f95d8
jmp 0x496ce9
mov edx, dword [edx*8 + 0x4d50a4]
mov dword [0x4f9b60], edx
mov edx, dword [0x4d4bac]
mov eax, dword [0x4f9ba4]
push 0
and edx, 0xff
mov ecx, dword [eax]
push 0
push edx
mov edx, dword [0x4d4ba8]
push edx
mov edx, dword [0x4d4ba4]
push edx
push eax
call dword [ecx + 0x54]
test eax, eax
je 0x496d68
mov cl, byte [0x4f9b18]
test cl, cl
jne 0x496d68
xor edx, edx
mov ecx, 0x4d50a0
cmp dword [ecx], eax
je 0x496d38
add ecx, 8
inc edx
cmp ecx, str.X_Alignment_error
jb 0x496d28
cmp edx, 0x60
jne 0x496d5c
push eax
push str.Unknown_DirectDraw_error_code__08X
push 0x4f95d8
call fcn.004b77e0
add esp, 0xc
mov dword [0x4f9b60], 0x4f95d8
jmp 0x496d68
mov eax, dword [edx*8 + 0x4d50a4]
mov dword [0x4f9b60], eax
mov ecx, dword [0x4f9b70]
call fcn.00497060
call fcn.00497910
test esi, esi
je 0x496d8a
mov ecx, esi
call fcn.00497060
mov esi, dword [esi + 0x40]
test esi, esi
jne 0x496d7c
mov ecx, dword [0x4f9b74]
test ecx, ecx
je 0x496d99
call fcn.00497060
mov ecx, dword [0x4f9b78]
test ecx, ecx
je 0x496da8
call fcn.00497060
mov al, byte [0x4f9b68]
test al, al
je 0x496db6
call fcn.00499990
mov al, byte [0x4f9b30]
test al, al
je 0x496dec
mov ecx, dword [0x4f8e1c]
push ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, dword [sym.imp.GDI32.dll_SetSystemPaletteUse]
mov esi, eax
push 2
push esi
call edi
push 1
push esi
call edi
mov edx, dword [0x4f8e1c]
push esi
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [0x4f9b54]
mov byte [0x4f8e84], 0
and al, 0xfd
mov dword [0x4f9b54], eax
call fcn.0048ea90
mov edx, dword [esp + 0xc]
mov ecx, dword [0x4f8e30]
sub eax, edx
pop edi
add ecx, eax
pop esi
mov dword [0x4f8e30], ecx
pop ebx
pop ecx
ret