Function at 0x4dbc88
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x17c
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x18]
mov dword [0x5e8148], 1
mov edx, dword [esi + 0x1c]
test edx, edx
je 0x4dbcbf
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [ebx + 0x60]
mov dword [esi + 0x1c], 0
mov eax, dword [ebx + 0x2ac]
mov eax, dword [eax + 4]
test eax, eax
je 0x4dbce2
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
push eax
mov eax, dword [ebx + 0x2ac]
mov dword [eax + 4], 0
mov eax, dword [esi]
mov edx, eax
and edx, 0x80000002
cmp edx, 0x80000002
je 0x4dc460
test al, 2
jne 0x4dc018
test byte [ebp + 0x1c], 2
je 0x4dbe80
mov eax, dword [esi + 4]
movzx eax, byte [eax + 4]
cmp eax, edi
je 0x4dceae
lea eax, [edi - 0xf]
cmp eax, 0x11
ja 0x4dbe74
mov edx, dword [eax*4 + 0x597f60]
mov ecx, dword [eax*4 + 0x597fc0]
mov eax, dword [eax*4 + 0x598020]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sym.OpenBOR.elf_SDL_CreateRGBSurface
mov dword [ebp - 0x14c], eax
test eax, eax
je 0x4dcb44
mov eax, dword [ebp - 0x14c]
mov eax, dword [eax + 8]
mov dword [ebp - 0x15c], eax
mov edx, dword [ebp - 0x14c]
mov edx, dword [edx + 0xc]
mov dword [ebp - 0x160], edx
mov ecx, dword [ebp - 0x14c]
mov dword [ecx], 0
mov eax, dword [ebp + 0x10]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 0x14]
mov dword [ecx + 0xc], edx
mov dword [esp], ecx
call fcn.004dd7e4
mov ecx, dword [ebp - 0x14c]
mov word [ecx + 0x10], ax
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
js 0x4dc480
mov dword [esp + 4], 0xfffffff0
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_GetWindowLongA
sub esp, 8
mov ecx, dword [ebp - 0x14c]
mov edx, dword [ecx]
test edx, edx
js 0x4dc44c
test byte [ebp + 0x1c], 0x20
je 0x4dc028
mov esi, eax
and esi, 0xfe30ffff
or esi, 0x80000000
or edx, 0x20
mov eax, dword [ebp - 0x14c]
mov dword [eax], edx
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_IsZoomed
push edx
test eax, eax
je 0x4dbe32
or esi, 0x1000000
mov edi, dword [0x5e815c]
test edi, edi
je 0x4dc340
mov dword [0x5e8148], 0
mov dword [esp], ebx
call fcn.004e72e8
test eax, eax
js 0x4dc434
mov eax, dword [ebp - 0x14c]
or dword [eax], 2
mov eax, dword [ebp - 0x14c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
xor eax, eax
xor ecx, ecx
xor edx, edx
jmp 0x4dbd3a
mov dword [esp + 4], 0xfffffff0
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_GetWindowLongA
sub esp, 8
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
js 0x4dc580
test byte [ebp + 0x1c], 0x20
jne 0x4dc058
and eax, 0x7efaffff
mov edx, eax
or edx, 0xca0000
test byte [ebp + 0x1c], 0x10
je 0x4dbec8
mov edx, eax
or edx, 0xcf0000
mov eax, dword [0x5e812c]
mov dword [esp], eax
mov dword [ebp - 0x168], edx
call sub.USER32.dll_IsZoomed
push edx
test eax, eax
mov edx, dword [ebp - 0x168]
je 0x4dbeec
or edx, 0x1000000
mov eax, dword [0x5e815c]
test eax, eax
je 0x4dc55c
mov eax, dword [ebp + 0x1c]
sar eax, 0x1f
and eax, 0xb
add eax, 8
mov edx, dword [ebx + 0x2ac]
mov edx, dword [edx]
mov ecx, dword [edx]
mov dword [esp + 8], eax
mov eax, dword [0x5e812c]
mov dword [esp + 4], eax
mov dword [esp], edx
call dword [ecx + 0x50]
sub esp, 0xc
test eax, eax
jne 0x4dce8f
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
js 0x4dc594
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.004ea6e8
mov eax, ebx
call fcn.004dbb60
lea eax, [ebp - 0xa0]
mov dword [ebp - 0x14c], eax
mov ecx, 0x6c
xor eax, eax
mov edi, dword [ebp - 0x14c]
rep stosb byte es:[edi], al
mov dword [ebp - 0xa0], 0x6c
mov dword [ebp - 0x9c], 1
mov dword [ebp - 0x38], 0x4200
and dword [ebp + 0x1c], 0xbfffffff
mov edx, dword [ebp + 0x1c]
and edx, 0x40000000
mov dword [ebp - 0x15c], edx
je 0x4dbfb8
mov dword [ebp - 0x9c], 0x21
mov dword [ebp - 0x38], 0x4218
mov dword [ebp - 0x8c], 1
mov eax, dword [ebx + 0x2ac]
mov eax, dword [eax]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
lea edi, [ebp - 0x1c]
mov dword [esp + 8], edi
mov ecx, dword [ebp - 0x14c]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0x10
test eax, eax
je 0x4dc0b1
mov edx, dword [ebp - 0x15c]
test edx, edx
jne 0x4dc06b
mov dword [esp + 4], eax
mov dword [esp], str.DirectDraw2::CreateSurface_PRIMARY_
call fcn.004daabc
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov dword [esp], ebx
call fcn.004e7264
jmp 0x4dbd00
and eax, 0x7efaffff
mov esi, eax
or esi, 0xca0000
test byte [ebp + 0x1c], 0x10
je 0x4dbe1a
mov esi, eax
or esi, 0xcf0000
or edx, 0x10
mov ecx, dword [ebp - 0x14c]
mov dword [ecx], edx
jmp 0x4dbe1a
mov edx, eax
and edx, 0xfe30ffff
or edx, 0x80000000
jmp 0x4dbec8
and dword [ebp - 0x9c], 0xffffffdf
and dword [ebp - 0x38], 0xffffffe7
mov dword [ebp - 0x8c], 0
mov eax, dword [ebx + 0x2ac]
mov edx, dword [eax]
mov eax, dword [edx]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov ecx, dword [ebp - 0x14c]
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [eax + 0x18]
sub esp, 0x10
test eax, eax
jne 0x4dbff6
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov ecx, dword [ebx + 0x2ac]
add ecx, 4
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x59d120
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
test eax, eax
jne 0x4dcdbe
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
push eax
mov ecx, 0x6c
xor eax, eax
mov edi, dword [ebp - 0x14c]
rep stosb byte es:[edi], al
mov dword [ebp - 0xa0], 0x6c
mov dword [ebp - 0x9c], 0x1001
mov eax, dword [ebx + 0x2ac]
mov eax, dword [eax + 4]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x14c]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x58]
sub esp, 8
test eax, eax
jne 0x4dcf37
test byte [ebp - 0x54], 0x40
je 0x4dcf56
mov edx, dword [ebx + 0x2ac]
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4dc15d
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
push edi
mov edx, dword [ebx + 0x2ac]
mov dword [edx + 0xc], 0
cmp dword [ebp - 0x4c], 8
je 0x4dc7ec
mov eax, dword [ebp + 0x10]
cmp dword [esi + 8], eax
jne 0x4dc17b
mov edx, dword [ebp + 0x14]
cmp dword [esi + 0xc], edx
je 0x4dcd65
mov dword [esp], esi
call sym.OpenBOR.elf_SDL_FreeSurface
mov dword [esp + 0x1c], 0
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sym.OpenBOR.elf_SDL_CreateRGBSurface
mov dword [ebp - 0x14c], eax
test eax, eax
je 0x4dcb44
mov ecx, dword [ebp - 0x14c]
mov ecx, dword [ecx + 8]
mov dword [ebp - 0x160], ecx
mov eax, dword [ebp - 0x14c]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x14c]
mov dword [edx + 8], ecx
mov eax, dword [ebp + 0x14]
mov dword [edx + 0xc], eax
mov word [edx + 0x10], 0
mov edx, dword [ebp - 0x14c]
mov dword [edx], 0
mov eax, dword [ebp + 0x1c]
test eax, eax
js 0x4dc918
mov edi, dword [edx + 0x14]
test edi, edi
je 0x4dcefa
xor eax, eax
mov edx, dword [ebp - 0x14c]
mov dword [edx], eax
mov edx, dword [ebp + 0x1c]
and edx, 0x30
cmp edx, 0x10
je 0x4dcb55
test byte [ebp + 0x1c], 0x20
jne 0x4dc6dc
mov edx, dword [ebp - 0x14c]
mov eax, dword [edx]
xor ecx, ecx
test byte [ebp - 0x38], 0x10
je 0x4dc269
or eax, 0x40000000
mov edx, dword [ebp - 0x14c]
mov dword [edx], eax
and eax, 1
mov dword [esp], eax
mov edx, dword [ebp - 0x14c]
mov eax, ebx
call fcn.004db560
test eax, eax
js 0x4dcf71
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
js 0x4dcb10
mov dword [ebx + 0x20], 0x4d9d40
mov edx, dword [ebx + 0x2ac]
mov eax, dword [edx + 8]
test eax, eax
je 0x4dcddd
mov edx, dword [eax]
mov ecx, dword [0x5e812c]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x20]
sub esp, 0xc
test eax, eax
jne 0x4dcb65
mov edx, dword [ebx + 0x2ac]
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov edx, dword [edx + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [ecx + 0x70]
sub esp, 8
test eax, eax
jne 0x4dceb9
mov eax, dword [0x5e815c]
test eax, eax
je 0x4dcba6
mov dword [esp + 4], 5
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_ShowWindow
sub esp, 8
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_SetForegroundWindow
push edi
mov dword [0x5e8148], 0
call fcn.004e6158
mov eax, dword [ebp - 0x14c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov dword [esp + 8], esi
mov dword [esp + 4], 0xfffffff0
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_SetWindowLongA
sub esp, 0xc
mov ecx, dword [0x5e815c]
test ecx, ecx
jne 0x4dbe40
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_IsZoomed
push edx
test eax, eax
jne 0x4dbe40
mov edx, dword [ebp - 0x15c]
mov eax, dword [ebp - 0x14c]
cmp dword [eax + 8], edx
je 0x4dc95c
mov dword [esp], str.SDL_VIDEO_WINDOW_POS
call sym.OpenBOR.elf_SDL_getenv
mov dword [ebp - 0x154], eax
mov dword [esp], str.SDL_VIDEO_CENTERED
call sym.OpenBOR.elf_SDL_getenv
mov dword [ebp - 0x158], eax
mov edi, dword [ebp - 0x154]
test edi, edi
je 0x4dcdb2
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x24]
mov dword [esp + 8], eax
mov dword [esp + 4], str._d__d
mov eax, dword [ebp - 0x154]
mov dword [esp], eax
call sub.msvcrt.dll_sscanf
cmp eax, 2
je 0x4dcaae
mov eax, dword [0x5e8140]
mov edx, eax
mov edi, str.center
mov ecx, 7
mov esi, dword [ebp - 0x154]
repe cmpsb byte [esi], byte es:[edi]
seta cl
setb byte [ebp - 0x15c]
cmp cl, byte [ebp - 0x15c]
jne 0x4dc988
mov ecx, dword [ebp - 0x154]
mov dword [ebp - 0x158], ecx
jmp 0x4dc988
mov dword [ebp - 0x14c], 0
mov eax, dword [ebp - 0x14c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov esi, eax
and esi, 0xfe30ffff
or esi, 0x80000000
jmp 0x4dbe32
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.USER32.dll_ChangeDisplaySettingsA
sub esp, 8
mov eax, dword [esi]
jmp 0x4dbcf8
lea esi, [ebp - 0x13c]
mov ecx, 0x9c
xor eax, eax
mov edi, esi
rep stosb byte es:[edi], al
mov word [ebp - 0x118], 0x9c
mov edx, dword [ebp - 0x14c]
mov eax, dword [edx + 4]
movzx eax, byte [eax + 4]
mov dword [ebp - 0xd4], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xd0], ecx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0x114], 0x1c0000
cmp ecx, dword [0x71fde4]
jg 0x4dc4ee
cmp eax, dword [0x71fde8]
jg 0x4dc4ee
mov eax, dword [0x71fdf0]
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0x114], 0x5c0000
mov dword [esp + 4], 4
mov dword [esp], esi
call sub.USER32.dll_ChangeDisplaySettingsA
sub esp, 8
test eax, eax
je 0x4dc53c
mov eax, dword [ebp - 0x114]
test eax, 0x400000
je 0x4dbdcf
and eax, 0xffbfffff
mov dword [ebp - 0x114], eax
mov dword [esp + 4], 4
mov dword [esp], esi
call sub.USER32.dll_ChangeDisplaySettingsA
sub esp, 8
test eax, eax
jne 0x4dbdcf
mov edx, dword [ebp - 0x14c]
or dword [edx], 0x80000000
mov edi, 0x71fe38
mov ecx, 0x27
rep movsd dword es:[edi], dword [esi]
jmp 0x4dbdcf
mov dword [esp + 8], edx
mov dword [esp + 4], 0xfffffff0
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_SetWindowLongA
sub esp, 0xc
jmp 0x4dbef9
mov edx, eax
and edx, 0xfe30ffff
or edx, 0x80000000
jmp 0x4dbeec
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [esp], 0
call sub.USER32.dll_GetSystemMetrics
push edx
mov dword [ebp - 0x2c], eax
mov dword [esp], 1
call sub.USER32.dll_GetSystemMetrics
push ecx
mov dword [ebp - 0x28], eax
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_GetMenu
push edx
mov edx, eax
mov dword [esp + 4], 0xfffffff0
mov eax, dword [0x5e812c]
mov dword [esp], eax
mov dword [ebp - 0x168], edx
call sub.USER32.dll_GetWindowLongA
sub esp, 8
mov dword [esp + 0xc], 0
mov edx, dword [ebp - 0x168]
test edx, edx
setne dl
movzx edx, dl
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x34]
mov dword [esp], eax
call sub.USER32.dll_AdjustWindowRectEx
sub esp, 0x10
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0x18], 0x100
mov eax, dword [ebp - 0x28]
sub eax, edx
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x2c]
sub eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], 0xffffffff
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_SetWindowPos
sub esp, 0x1c
mov dword [esp + 4], 5
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_ShowWindow
sub esp, 8
jmp 0x4dc68d
mov dword [esp], edx
call sub.USER32.dll_SetForegroundWindow
push ecx
mov dword [esp], 0x64
call sym.OpenBOR.elf_SDL_Delay
call sub.USER32.dll_GetForegroundWindow
mov edx, dword [0x5e812c]
cmp eax, edx
jne 0x4dc678
mov eax, edi
test edi, edi
js 0x4dce17
sar eax, 3
mov eax, dword [eax*4 + 0x5e7f8c]
test eax, eax
je 0x4dc6f0
mov ecx, dword [ebp + 0x10]
jmp 0x4dc6c3
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4dc6f0
movzx edx, word [eax + 4]
cmp edx, ecx
jne 0x4dc6bc
movzx edx, word [eax + 6]
cmp edx, dword [ebp + 0x14]
jne 0x4dc6bc
mov ecx, dword [eax + 8]
jmp 0x4dc6f2
or eax, 0x20
mov ecx, dword [ebp - 0x14c]
mov dword [ecx], eax
xor ecx, ecx
jmp 0x4dc256
xor ecx, ecx
mov eax, dword [ebx + 0x2ac]
mov eax, dword [eax]
mov edx, dword [eax]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edi
mov ecx, dword [ebp + 0x14]
mov dword [esp + 8], ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x54]
sub esp, 0x18
test eax, eax
je 0x4dc798
mov eax, dword [ebx + 0x2ac]
mov edx, dword [eax]
mov eax, dword [edx]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov ecx, dword [ebp + 0x14]
mov dword [esp + 8], ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [eax + 0x54]
sub esp, 0x18
test eax, eax
je 0x4dc798
mov eax, dword [ebp + 0x1c]
and eax, 0x7fffffff
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edi
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
mov edx, dword [ebp + 0x10]
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.004dbc88
mov dword [ebp - 0x14c], eax
jmp 0x4dbe63
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.004ea6e8
mov eax, ebx
call fcn.004dbb60
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x14c], ecx
mov ecx, 0x6c
xor eax, eax
mov edi, dword [ebp - 0x14c]
rep stosb byte es:[edi], al
mov dword [ebp - 0xa0], 0x6c
mov dword [ebp - 0x9c], 1
mov dword [ebp - 0x38], 0x4200
jmp 0x4dbf8c
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
js 0x4dcacd
xor eax, eax
jmp 0x4dc802
mov edx, dword [ebx + 0x2ac]
lea ecx, [eax + 4]
mov byte [edx + ecx*4 + 3], 2
mov edx, dword [ebx + 0x2ac]
mov byte [edx + ecx*4], al
mov edx, dword [ebx + 0x2ac]
mov byte [edx + ecx*4 + 1], 0
mov edx, dword [ebx + 0x2ac]
mov byte [edx + ecx*4 + 2], 0
inc eax
cmp eax, 0xa
jne 0x4dc7fc
nop
mov ecx, dword [ebx + 0x2ac]
lea edx, [eax + 4]
mov byte [ecx + edx*4 + 3], 4
mov ecx, dword [ebx + 0x2ac]
mov byte [ecx + edx*4], 0
mov ecx, dword [ebx + 0x2ac]
mov byte [ecx + edx*4 + 1], 0
mov ecx, dword [ebx + 0x2ac]
mov byte [ecx + edx*4 + 2], 0
inc eax
cmp eax, 0xf6
jne 0x4dc830
nop
mov ecx, dword [ebx + 0x2ac]
lea edx, [eax + 4]
mov byte [ecx + edx*4 + 3], 2
mov ecx, dword [ebx + 0x2ac]
mov byte [ecx + edx*4], al
mov ecx, dword [ebx + 0x2ac]
mov byte [ecx + edx*4 + 1], 0
mov ecx, dword [ebx + 0x2ac]
mov byte [ecx + edx*4 + 2], 0
inc eax
cmp eax, 0x100
jne 0x4dc868
mov eax, dword [ebx + 0x2ac]
mov edx, dword [eax]
mov edi, dword [edx]
mov dword [esp + 0x10], 0
lea ecx, [eax + 0xc]
mov dword [esp + 0xc], ecx
add eax, 0x10
mov dword [esp + 8], eax
mov dword [esp + 4], 0x44
mov dword [esp], edx
call dword [edi + 0x14]
sub esp, 0x14
test eax, eax
jne 0x4dcf9a
mov edx, dword [ebx + 0x2ac]
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov edx, dword [edx + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [ecx + 0x7c]
sub esp, 8
test eax, eax
je 0x4dc167
mov dword [esp + 4], eax
mov dword [esp], str.DirectDrawSurface3::SetPalette
call fcn.004daabc
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov edx, dword [ebp - 0x14c]
mov eax, dword [edx + 0x14]
test eax, eax
je 0x4dcac6
mov dword [esp], eax
call sub.msvcrt.dll_free
mov ecx, dword [ebp - 0x14c]
mov dword [ecx + 0x14], 0
mov eax, dword [ecx]
or eax, 1
mov edx, dword [ebx + 0x2ac]
mov ecx, dword [edx + 4]
mov edx, dword [ebp - 0x14c]
mov dword [edx], eax
jmp 0x4dc256
mov ecx, dword [ebp - 0x160]
cmp dword [eax + 0xc], ecx
jne 0x4dc395
mov eax, dword [0x5e8140]
mov edx, eax
mov dword [ebp - 0x158], 0
mov dword [ebp - 0x154], 0
nop
mov dword [ebp - 0x34], edx
mov edx, dword [0x5e8144]
mov dword [ebp - 0x30], edx
mov ecx, dword [ebp - 0x14c]
add eax, dword [ecx + 8]
mov dword [ebp - 0x2c], eax
add edx, dword [ecx + 0xc]
mov dword [ebp - 0x28], edx
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_GetMenu
push esi
mov esi, eax
mov dword [esp + 4], 0xfffffff0
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_GetWindowLongA
sub esp, 8
mov dword [esp + 0xc], 0
xor edx, edx
test esi, esi
setne dl
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x34]
mov dword [esp], eax
call sub.USER32.dll_AdjustWindowRectEx
sub esp, 0x10
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp - 0x2c]
sub edi, eax
mov edx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x28]
sub esi, edx
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
js 0x4dce1f
mov ecx, dword [ebp - 0x158]
test ecx, ecx
je 0x4dcd80
mov dword [esp], 0
call sub.USER32.dll_GetSystemMetrics
push ecx
sub eax, edi
mov edx, eax
shr edx, 0x1f
lea eax, [edx + eax]
sar eax, 1
mov dword [ebp - 0x24], eax
mov dword [esp], 1
call sub.USER32.dll_GetSystemMetrics
push edx
sub eax, esi
mov edx, eax
shr edx, 0x1f
add edx, eax
sar edx, 1
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x24]
mov ecx, 0x140
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0xfffffffe
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_SetWindowPos
sub esp, 0x1c
mov eax, dword [0x5e8130]
mov dword [0x5e8140], eax
mov eax, dword [0x5e8134]
mov dword [0x5e8144], eax
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_SetForegroundWindow
push esi
jmp 0x4dbe40
mov edx, dword [ebp - 0x24]
mov dword [0x5e8140], edx
mov eax, dword [ebp - 0x20]
mov dword [0x5e8144], eax
mov eax, edx
jmp 0x4dc3fb
mov al, 1
jmp 0x4dc943
xor ecx, ecx
jmp 0x4dcada
mov edx, dword [ebx + 0x2ac]
lea eax, [ecx + 4]
mov byte [edx + eax*4 + 3], 5
mov edx, dword [ebx + 0x2ac]
mov byte [edx + eax*4], 0
mov edx, dword [ebx + 0x2ac]
mov byte [edx + eax*4 + 1], 0
mov edx, dword [ebx + 0x2ac]
mov byte [edx + eax*4 + 2], 0
inc ecx
cmp ecx, 0x100
jne 0x4dcad4
jmp 0x4dc89d
mov edx, dword [ebp - 0x14c]
mov eax, dword [edx]
mov edx, eax
or edx, 0x80000000
mov ecx, dword [ebp - 0x14c]
mov dword [ecx], edx
mov edx, dword [ecx + 4]
mov edx, dword [edx]
test edx, edx
je 0x4dcb38
or eax, 0xa0000000
mov dword [ecx], eax
mov dword [ebx + 0x20], 0x4d9e6c
jmp 0x4dc2fc
mov dword [esp], 0
call sym.OpenBOR.elf_SDL_Error
jmp 0x4dbe63
or eax, 0x10
mov ecx, dword [ebp - 0x14c]
mov dword [ecx], eax
jmp 0x4dc242
cmp dword [ebp - 0x14c], esi
je 0x4dcb87
mov ecx, dword [ebp - 0x14c]
mov dword [esp], ecx
mov dword [ebp - 0x168], eax
call sym.OpenBOR.elf_SDL_FreeSurface
mov eax, dword [ebp - 0x168]
mov dword [esp + 4], eax
mov dword [esp], str.DirectDrawClipper::SetHWnd
call fcn.004daabc
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_IsZoomed
push edi
test eax, eax
jne 0x4dc2fc
mov eax, dword [ebp - 0x160]
mov ecx, dword [ebp - 0x14c]
cmp dword [ecx + 8], eax
jne 0x4dcbdc
mov edx, dword [ebp - 0x164]
cmp dword [ecx + 0xc], edx
je 0x4dd049
mov dword [esp], str.SDL_VIDEO_WINDOW_POS
call sym.OpenBOR.elf_SDL_getenv
mov ebx, eax
mov dword [esp], str.SDL_VIDEO_CENTERED
call sym.OpenBOR.elf_SDL_getenv
mov dword [ebp - 0x150], eax
test ebx, ebx
je 0x4dcfe4
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x20]
mov dword [esp + 8], eax
mov dword [esp + 4], str._d__d
mov dword [esp], ebx
call sub.msvcrt.dll_sscanf
cmp eax, 2
je 0x4dcff0
mov eax, dword [0x5e8140]
mov edx, eax
mov edi, str.center
mov ecx, 7
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
seta cl
setb byte [ebp - 0x154]
cmp cl, byte [ebp - 0x154]
jne 0x4dcc58
mov dword [ebp - 0x150], ebx
mov dword [ebp - 0x34], edx
mov edx, dword [0x5e8144]
mov dword [ebp - 0x30], edx
mov ecx, dword [ebp - 0x14c]
add eax, dword [ecx + 8]
mov dword [ebp - 0x2c], eax
add edx, dword [ecx + 0xc]
mov dword [ebp - 0x28], edx
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_GetMenu
push esi
mov esi, eax
mov dword [esp + 4], 0xfffffff0
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_GetWindowLongA
sub esp, 8
mov dword [esp + 0xc], 0
xor edx, edx
test esi, esi
setne dl
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x34]
mov dword [esp], eax
call sub.USER32.dll_AdjustWindowRectEx
sub esp, 0x10
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x2c]
sub esi, eax
mov edx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x28]
sub edi, edx
mov ecx, dword [ebp - 0x150]
test ecx, ecx
je 0x4dcfb9
mov dword [esp], 0
call sub.USER32.dll_GetSystemMetrics
push edx
sub eax, esi
mov edx, eax
shr edx, 0x1f
lea eax, [edx + eax]
sar eax, 1
mov dword [ebp - 0x20], eax
mov dword [esp], 1
call sub.USER32.dll_GetSystemMetrics
push ebx
sub eax, edi
mov edx, eax
shr edx, 0x1f
add edx, eax
sar edx, 1
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x20]
mov ecx, 0x100
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0xfffffffe
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_SetWindowPos
sub esp, 0x1c
mov eax, dword [0x5e8130]
mov dword [0x5e8140], eax
mov eax, dword [0x5e8134]
mov dword [0x5e8144], eax
jmp 0x4dc2fc
mov eax, dword [esi + 4]
movzx eax, byte [eax + 4]
cmp eax, dword [ebp - 0x4c]
jne 0x4dc17b
mov dword [ebp - 0x14c], esi
jmp 0x4dc207
mov ecx, dword [0x5e8140]
test ecx, ecx
jne 0x4dcda2
mov ecx, dword [0x5e8144]
test ecx, ecx
jne 0x4dcda2
mov ecx, dword [ebp - 0x154]
test ecx, ecx
je 0x4dd061
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
mov ecx, 0x140
jmp 0x4dca5b
mov eax, dword [0x5e8140]
mov edx, eax
jmp 0x4dc988
mov dword [esp + 4], eax
mov dword [esp], 0x597b98
call fcn.004daabc
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [esp + 0xc], 0
add edx, 8
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [ecx + 0x10]
sub esp, 0x10
test eax, eax
jne 0x4dd008
mov eax, dword [ebx + 0x2ac]
mov eax, dword [eax + 8]
jmp 0x4dc2a7
lea eax, [edi + 7]
jmp 0x4dc6a6
mov dword [esp], 0
call sub.USER32.dll_GetSystemMetrics
push ecx
sub eax, edi
mov edx, eax
shr edx, 0x1f
lea eax, [edx + eax]
sar eax, 1
mov dword [ebp - 0x24], eax
mov dword [esp], 1
call sub.USER32.dll_GetSystemMetrics
push edx
sub eax, esi
mov edx, eax
shr edx, 0x1f
lea eax, [edx + eax]
sar eax, 1
mov dword [ebp - 0x20], eax
mov dword [esp + 0x18], 0x140
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xffffffff
mov eax, dword [0x5e812c]
mov dword [esp], eax
call sub.USER32.dll_SetWindowPos
sub esp, 0x1c
jmp 0x4dca9b
mov dword [esp + 4], eax
mov dword [esp], str.DirectDraw2::SetCooperativeLevel
call fcn.004daabc
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov dword [ebp - 0x14c], esi
jmp 0x4dbd7c
cmp dword [ebp - 0x14c], esi
je 0x4dcedb
mov edx, dword [ebp - 0x14c]
mov dword [esp], edx
mov dword [ebp - 0x168], eax
call sym.OpenBOR.elf_SDL_FreeSurface
mov eax, dword [ebp - 0x168]
mov dword [esp + 4], eax
mov dword [esp], str.DirectDrawSurface3::SetClipper
call fcn.004daabc
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov eax, dword [edx + 4]
movzx eax, byte [eax + 5]
imul ax, word [ebp + 0x10]
add eax, 7
and eax, 0xfffffff8
mov word [edx + 0x10], ax
movzx eax, ax
imul eax, dword [edx + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ecx, dword [ebp - 0x14c]
mov dword [ecx + 0x14], eax
test eax, eax
je 0x4dd09d
mov eax, dword [ecx]
jmp 0x4dc22b
mov dword [esp + 4], eax
mov dword [esp], str.DirectDrawSurface::GetSurfaceDesc
call fcn.004daabc
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov dword [esp], str.Primary_DDRAW_surface_is_not_RGB_format
call sym.OpenBOR.elf_SDL_SetError
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
cmp dword [ebp - 0x14c], esi
je 0x4dc434
mov ecx, dword [ebp - 0x14c]
mov dword [esp], ecx
call sym.OpenBOR.elf_SDL_FreeSurface
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov dword [esp + 4], eax
mov dword [esp], str.DirectDraw2::CreatePalette
call fcn.004daabc
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov ecx, dword [0x5e8140]
test ecx, ecx
jne 0x4dcfd4
cmp dword [0x5e8144], 0
jne 0x4dcfd4
test ebx, ebx
je 0x4dd07f
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], edx
mov ecx, 0x100
jmp 0x4dcd20
mov eax, dword [0x5e8140]
mov edx, eax
jmp 0x4dcc58
mov edx, dword [ebp - 0x20]
mov dword [0x5e8140], edx
mov eax, dword [ebp - 0x24]
mov dword [0x5e8144], eax
mov eax, edx
jmp 0x4dcc32
cmp dword [ebp - 0x14c], esi
je 0x4dd02a
mov edx, dword [ebp - 0x14c]
mov dword [esp], edx
mov dword [ebp - 0x168], eax
call sym.OpenBOR.elf_SDL_FreeSurface
mov eax, dword [ebp - 0x168]
mov dword [esp + 4], eax
mov dword [esp], str.DirectDraw2::CreateClipper
call fcn.004daabc
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63
mov eax, dword [0x5e8140]
mov edx, eax
mov dword [ebp - 0x150], 0
xor ebx, ebx
jmp 0x4dcc58
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x24], 0xffffffff
or edx, 0xffffffff
or eax, 0xffffffff
mov ecx, 0x142
jmp 0x4dca5b
mov dword [ebp - 0x24], 0xffffffff
mov dword [ebp - 0x20], 0xffffffff
or eax, 0xffffffff
or edx, 0xffffffff
mov ecx, 0x102
jmp 0x4dcd20
cmp dword [ebp - 0x14c], esi
je 0x4dd0b3
mov eax, dword [ebp - 0x14c]
mov dword [esp], eax
call sym.OpenBOR.elf_SDL_FreeSurface
mov dword [esp], 0
call sym.OpenBOR.elf_SDL_Error
mov dword [ebp - 0x14c], 0
jmp 0x4dbe63