Function at 0x402570
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59897e
mov eax, dword fs:[0]
push eax
sub esp, 0x124
push ebx
push esi
push edi
mov eax, dword [0x5d5de8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea eax, [edi + 0x3c]
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov esi, edi
mov byte [edi + 0xccc], 0
call fcn.00403830
mov eax, dword [0x5dcd44]
test eax, eax
push 0
je 0x402657
push 0x5a5750
lea esi, [edi + 0x5c]
push esi
push 0
call eax
push eax
mov ebx, str.DirectDrawCreateEx
call fcn.00402140
test al, al
je 0x40260d
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 2
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi]
mov edx, dword [eax]
lea ecx, [edi + 0x58]
push ecx
push 0x5a5740
push eax
mov eax, dword [edx]
mov dword [ebp - 0x14], ecx
call eax
push eax
mov ebx, str.QueryrInterface_IID_IDirectDraw
mov dword [ebp - 0x18], eax
call fcn.00402140
test al, al
je 0x402669
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 2
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [edi + 0x58]
push eax
push 0
mov dword [ebp - 0x14], eax
call dword [0x5dcd40]
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp + 8]
push ebx
mov esi, edi
call fcn.004024a0
test al, al
je 0x402691
mov edx, dword [edi + 0x34]
cmp byte [edx + 0xba], 0
je 0x402691
mov ecx, dword [edi + 0x2c]
mov eax, dword [ecx]
mov edx, dword [eax + 0x15c]
call edx
lea eax, [ebp - 0x130]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [edi + 0x2c]
mov dword [edi + 0xcd0], ebx
mov ecx, dword [eax + 0xc0]
mov edx, ecx
mov dword [edi + 0x6c], ecx
mov eax, dword [eax + 0xc4]
push edx
lea esi, [edi + 0x74]
push esi
mov ebx, eax
mov dword [edi + 0x70], eax
call fcn.004790d0
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call ebx
push 1
mov dword [edi + 0x7c], eax
call ebx
mov edx, dword [edi + 0x7c]
lea ecx, [edi + 0x84]
push edx
push ecx
mov ebx, eax
mov dword [edi + 0x80], eax
call fcn.004790d0
mov eax, dword [edi + 0x70]
mov edx, dword [esi]
mov ecx, dword [edi + 0x6c]
mov dword [edi + 0x94], eax
mov eax, dword [esi + 4]
mov dword [edi + 0x9c], eax
xor eax, eax
mov dword [edi + 0x98], edx
mov edx, dword [edi + 0x70]
xor ebx, ebx
mov dword [edi + 0xa0], ebx
mov dword [edi + 0xa4], eax
mov eax, dword [edi + 0x2c]
mov dword [edi + 0xa8], ecx
mov dword [edi + 0x90], ecx
add eax, 0x5d4
mov dword [edi + 0xac], edx
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov ecx, dword [edi + 0x2c]
mov edx, dword [ecx + 0xc8]
mov ecx, dword [edi + 0x78]
mov al, byte [ebp + 0xc]
push ecx
mov ecx, dword [edi + 0x6c]
mov dword [edi + 0xb0], edx
mov edx, dword [esi]
push edx
mov byte [edi + 0xcd4], al
mov eax, dword [edi + 0x70]
push eax
push ecx
push str.Application_requests__4lu_x__4lu___2d:_2d__n
mov byte [edi + 0xd0c], bl
call fcn.004703b0
mov edx, dword [ebp - 0x18]
add esp, 0x14
push edx
mov ebx, 0x5a57a0
call fcn.00402140
test al, al
jne 0x4025ea
cmp byte [ebp + 0xc], al
je 0x402b4b
mov eax, dword [edi + 0x2c]
mov ecx, dword [eax + 0x5ec]
mov edx, dword [eax + 0x5e8]
push ecx
push edx
push str.Hack_aspect_is_____________________2d:_2d__n
call fcn.004703b0
mov eax, dword [edi + 0x2c]
add esp, 0xc
cmp byte [eax + 0x5e4], 0
je 0x402957
lea ebx, [eax + 0x5e8]
mov eax, ebx
mov edx, esi
call fcn.00401c40
test al, al
je 0x402957
mov byte [edi + 0x8c], 1
mov eax, dword [ebx]
imul eax, dword [edi + 0x70]
cdq
idiv dword [ebx + 4]
mov dword [edi + 0x90], eax
mov eax, dword [edi + 0x70]
mov dword [edi + 0x94], eax
mov ecx, dword [ebx]
mov dword [edi + 0x98], ecx
mov edx, dword [ebx + 4]
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0xf0]
push eax
push ebx
mov dword [edi + 0x9c], edx
call dword [sym.imp.USER32.dll_GetWindowInfo]
lea ecx, [ebp - 0x2c]
push ecx
push ebx
call dword [sym.imp.USER32.dll_GetClientRect]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x1c]
push ecx
push ebx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], eax
call dword [sym.imp.USER32.dll_ClientToScreen]
mov eax, dword [edi + 0x90]
sub eax, dword [edi + 0x6c]
mov ecx, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
mov eax, dword [edi + 0x94]
sub eax, dword [edi + 0x70]
mov dword [ebp - 0x2c], ecx
cdq
sub eax, edx
mov edx, eax
mov eax, dword [ebp - 0x18]
sar edx, 1
sub eax, edx
mov edx, dword [edi + 0x90]
add edx, ecx
mov ecx, dword [edi + 0x94]
add ecx, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc8]
push eax
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0xcc]
push 0
mov dword [ebp - 0x24], edx
push ecx
lea edx, [ebp - 0x2c]
push edx
call dword [sym.imp.USER32.dll_AdjustWindowRectEx]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
sub ecx, eax
push 0
push ecx
mov ecx, dword [ebp - 0x2c]
sub edx, ecx
push edx
xor edx, edx
test eax, eax
setl dl
sub edx, 1
and edx, eax
xor eax, eax
test ecx, ecx
setl al
push edx
sub eax, 1
and eax, ecx
push eax
push ebx
call dword [sym.imp.USER32.dll_MoveWindow]
mov ecx, dword [edi + 0x2c]
cmp byte [ecx + 0x5d0], 0
je 0x402926
mov eax, dword [edi + 0x90]
mov edx, dword [edi + 0x98]
mov ecx, dword [edi + 0x94]
mov dword [edi + 0x6c], eax
mov dword [esi], edx
mov edx, dword [edi + 0x9c]
mov dword [edi + 0xa8], eax
xor eax, eax
mov dword [edi + 0x70], ecx
mov dword [esi + 4], edx
mov dword [edi + 0xac], ecx
mov dword [edi + 0xa0], eax
mov dword [edi + 0xa4], eax
jmp 0x40295a
mov eax, dword [edi + 0x70]
mov ecx, dword [edi + 0x6c]
mov dword [edi + 0xac], eax
mov eax, dword [edi + 0x90]
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
mov dword [edi + 0xa8], ecx
mov dword [edi + 0xa0], eax
mov dword [edi + 0xa4], 0
jmp 0x40295a
mov ebx, dword [ebp + 8]
mov ecx, dword [edi + 0x9c]
mov edx, dword [edi + 0x98]
mov eax, dword [edi + 0x94]
push ecx
mov ecx, dword [edi + 0x90]
push edx
push eax
push ecx
push str.Window_is_____________4lu_x__4lu___2d:_2d__n
call fcn.004703b0
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x50]
add esp, 0x14
push 8
push ebx
push eax
call edx
push 0x7c
lea eax, [ebp - 0xb0]
push 0
push eax
call fcn.00569a00
add esp, 0xc
cmp byte [edi + 0x38], 0
mov eax, 1
mov dword [ebp - 0xb0], 0x7c
mov dword [ebp - 0xac], eax
mov dword [ebp - 0x48], 0x200
je 0x4029cf
mov dword [ebp - 0x48], 0x2200
mov dword [ebp - 0x9c], eax
lea eax, [edi + 0x60]
push eax
push edi
lea ecx, [ebp - 0xb0]
call fcn.00402210
cmp eax, 0x88760091
jne 0x402a0f
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push eax
mov ebx, str.CreateSurface_Windowed_Primary
call fcn.00402140
test al, al
je 0x402a41
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x7c
lea eax, [ebp - 0xb0]
push 0
push eax
call fcn.00569a00
add esp, 0xc
cmp byte [edi + 0x38], 0
mov dword [ebp - 0xb0], 0x7c
mov dword [ebp - 0xac], 7
mov dword [ebp - 0x48], 0x840
je 0x402a7c
mov dword [ebp - 0x48], 0x6040
mov ecx, dword [edi + 0x6c]
mov edx, dword [edi + 0x70]
lea eax, [edi + 0x68]
push eax
mov dword [ebp - 0xa4], ecx
push edi
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0xa8], edx
call fcn.00402210
push eax
mov ebx, str.CreateSurface_Windowed_DrawSurface
call fcn.00402140
test al, al
je 0x402ad0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
mov ecx, dword [eax]
push 0
lea edx, [ebp + 0xc]
push edx
push 0
push eax
mov eax, dword [ecx + 0x10]
call eax
push eax
mov ebx, str.CreateClipper_Windowed
call fcn.00402140
test al, al
je 0x402b17
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
mov edx, dword [edx + 0x20]
push ecx
push 0
push eax
call edx
test eax, eax
jl 0x402b3b
mov eax, dword [edi + 0x60]
mov edx, dword [ebp + 0xc]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x70]
call eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x402e98
mov eax, dword [edi + 0x88]
mov ecx, dword [edi + 0x84]
mov edx, dword [edi + 0x80]
push eax
mov eax, dword [edi + 0x7c]
lea ebx, [edi + 0x84]
push ecx
push edx
push eax
push str.Desktop_is____________4lu_x__4lu___2d:_2d__n
call fcn.004703b0
add esp, 0x14
cmp byte [edi + 0x38], 0
je 0x402c27
mov eax, ebx
mov edx, esi
call fcn.00401c40
test al, al
je 0x402c27
mov eax, dword [edi + 0x7c]
mov edx, dword [ebx]
mov ecx, dword [edi + 0x80]
mov dword [edi + 0x90], eax
mov eax, dword [ebx + 4]
mov dword [edi + 0x98], edx
mov edx, dword [edi + 0x2c]
mov byte [edi + 0x8c], 1
mov dword [edi + 0x94], ecx
mov dword [edi + 0x9c], eax
cmp byte [edx + 0x5d0], 0
je 0x402bf3
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esi], eax
imul eax, dword [edi + 0x70]
mov dword [esi + 4], edx
cdq
idiv dword [esi + 4]
mov dword [edi + 0x6c], eax
mov eax, dword [edi + 0x7c]
mov dword [edi + 0xa8], eax
xor eax, eax
mov dword [edi + 0xa4], eax
jmp 0x402c1b
mov eax, dword [edi + 0x6c]
imul eax, ecx
cdq
idiv dword [edi + 0x70]
mov dword [edi + 0xa4], 0
mov dword [edi + 0xa8], eax
mov eax, dword [edi + 0x7c]
sub eax, dword [edi + 0xa8]
cdq
sub eax, edx
sar eax, 1
mov dword [edi + 0xa0], eax
mov dword [edi + 0xac], ecx
mov eax, dword [edi + 0x9c]
mov ecx, dword [edi + 0x98]
mov edx, dword [edi + 0x94]
push eax
mov eax, dword [edi + 0x90]
push ecx
push edx
push eax
push str.Display_is____________4lu_x__4lu___2d:_2d__n
call fcn.004703b0
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
mov ecx, dword [ebp + 8]
mov edx, dword [eax]
mov edx, dword [edx + 0x50]
add esp, 0x14
push 0x11
push ecx
push eax
call edx
push eax
mov ebx, str.SetCooperativeLevel_FullScreen
call fcn.00402140
test al, al
je 0x402c95
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
mov ecx, dword [edi + 0xb0]
mov edx, dword [eax]
mov edx, dword [edx + 0x54]
push ecx
mov ecx, dword [edi + 0x94]
push ecx
mov ecx, dword [edi + 0x90]
push ecx
push eax
call edx
push eax
mov ebx, str.SetDisplayMode_FullScreen
call fcn.00402140
test al, al
je 0x402ce9
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x7c
lea ecx, [ebp - 0xb0]
push 0
push ecx
call fcn.00569a00
add esp, 0xc
cmp byte [edi + 0x38], 0
mov dword [ebp - 0xb0], 0x7c
mov dword [ebp - 0xac], 0x21
mov dword [ebp - 0x48], 0x218
mov dword [ebp - 0x9c], 1
je 0x402d2e
mov dword [ebp - 0x48], 0x2218
lea eax, [edi + 0x60]
push eax
push edi
lea ecx, [ebp - 0xb0]
call fcn.00402210
push eax
mov ebx, str.CreateSurface_FullScreen_Primary
call fcn.00402140
test al, al
jne 0x402a1e
mov eax, dword [edi + 0x60]
lea ecx, [edi + 0x64]
push ecx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 4
mov edx, dword [eax]
mov edx, dword [edx + 0x30]
push ecx
push eax
call edx
push eax
mov ebx, str.GetAttachedSurface
call fcn.00402140
test al, al
je 0x402d9d
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [edi + 0x8c], 0
je 0x402db8
mov ecx, dword [edi + 0x60]
push ecx
call fcn.00402410
mov edx, dword [edi + 0x64]
push edx
call fcn.00402410
push 0x7c
lea eax, [ebp - 0xb0]
push 0
push eax
call fcn.00569a00
add esp, 0xc
cmp byte [edi + 0x38], 0
mov dword [ebp - 0xb0], 0x7c
mov dword [ebp - 0xac], 7
mov dword [ebp - 0x48], 0x840
je 0x402df3
mov dword [ebp - 0x48], 0x6040
mov ecx, dword [edi + 0x6c]
mov edx, dword [edi + 0x70]
lea eax, [edi + 0x68]
push eax
mov dword [ebp - 0xa4], ecx
push edi
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0xa8], edx
call fcn.00402210
push eax
mov ebx, str.CreateSurface_FullScreen_DrawSurface
call fcn.00402140
test al, al
jne 0x402aad
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
mov ecx, dword [eax]
push 0
lea edx, [ebp + 0xc]
push edx
push 0
push eax
mov eax, dword [ecx + 0x10]
call eax
push eax
mov ebx, str.CreateClipper_FullScreen
call fcn.00402140
test al, al
jne 0x402af4
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
mov edx, dword [edx + 0x20]
push ecx
push 0
push eax
call edx
test eax, eax
jl 0x402e74
mov eax, dword [edi + 0x60]
mov edx, dword [ebp + 0xc]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x70]
call eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [edi + 0x2c]
cmp byte [eax + 0x369], 0
jne 0x402e98
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 0x28]
call eax
mov ecx, dword [edi + 0x78]
mov edx, dword [esi]
mov eax, dword [edi + 0x70]
push ecx
mov ecx, dword [edi + 0x6c]
push edx
push eax
push ecx
push str.Draw_buffer_is________4lu_x__4lu___2d:_2d__n
call fcn.004703b0
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x3c]
add esp, 0x14
lea esi, [edi + 0xb4]
push esi
push eax
call edx
test eax, eax
jl 0x402ed1
cmp dword [esi], 0x3c
jae 0x402ee4
mov eax, dword [edi + 0x2c]
mov cl, 1
mov byte [eax + 0x5b1], cl
mov dword [esi], 0x3c
jmp 0x402ee6
mov cl, 1
mov eax, dword [esi]
cmp eax, 0x3c
jae 0x402efe
mov edx, dword [edi + 0x2c]
mov byte [edx + 0x5b1], cl
mov dword [esi], 0x3c
jmp 0x402f12
cmp eax, 0x64
jbe 0x402f12
mov eax, dword [edi + 0x2c]
mov byte [eax + 0x5b1], cl
mov dword [esi], 0x64
xor edx, edx
mov eax, 0x3e8
div dword [esi]
push 0x7c
lea ecx, [ebp - 0xb0]
push 0
push ecx
mov dword [edi + 0xb8], eax
call fcn.00569a00
mov edx, dword [edi + 0xcf0]
mov eax, dword [edi + 0xcf4]
add esp, 0xc
lea esi, [edi + 0xd10]
push esi
push edi
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0xb0], 0x7c
mov dword [ebp - 0xac], 7
mov dword [ebp - 0x48], 0x840
mov dword [ebp - 0xa4], edx
mov dword [ebp - 0xa8], eax
call fcn.00402210
push eax
mov ebx, str.CreateSurface_OldCursorArea
call fcn.00402140
test al, al
jne 0x402aad
lea eax, [edi + 0xd14]
push eax
push edi
lea ecx, [ebp - 0xb0]
call fcn.00402210
push eax
mov ebx, str.CreateSurface_NewCursorArea
call fcn.00402140
test al, al
jne 0x402a1e
push 0xec
call fcn.0056980a
add esp, 4
mov dword [ebp + 0xc], eax
test eax, eax
mov byte [ebp - 4], 1
je 0x402fd5
push edi
mov ecx, eax
call fcn.0040b700
jmp 0x402fd7
xor eax, eax
mov byte [ebp - 4], 0
mov ecx, dword [esi]
mov dword [edi + 0xd18], eax
mov edx, dword [eax]
mov edx, dword [edx + 0xc4]
push ecx
mov ecx, eax
call edx
mov ecx, dword [edi + 0xd18]
mov eax, dword [ecx]
mov edx, dword [eax + 0x80]
push 0
push 0
call edx
push 0xec
call fcn.0056980a
add esp, 4
mov dword [ebp + 0xc], eax
test eax, eax
mov byte [ebp - 4], 2
je 0x403026
push edi
mov ecx, eax
call fcn.0040b700
jmp 0x403028
xor eax, eax
mov byte [ebp - 4], 0
mov ecx, dword [edi + 0xd14]
mov dword [edi + 0xd1c], eax
mov edx, dword [eax]
mov edx, dword [edx + 0xc4]
push ecx
mov ecx, eax
call edx
mov ecx, dword [edi + 0xd1c]
mov eax, dword [ecx]
mov edx, dword [eax + 0x80]
push 0
push 0
call edx
mov esi, dword [edi + 0x60]
test esi, esi
je 0x403503
push 0x6c
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.00569a00
add esp, 0xc
lea edx, [ebp - 0x120]
mov dword [ebp - 0x120], 0x6c
mov dword [ebp - 0x11c], 0x1006
mov ecx, dword [esi]
mov eax, dword [ecx + 0x58]
push edx
push esi
call eax
mov eax, dword [ebp - 0xcc]
cmp eax, 0x10
je 0x4030ae
cmp eax, 0x20
jne 0x4029ec
mov ebx, dword [ebp - 0xc8]
mov esi, dword [ebp - 0xc0]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0xc4]
mov dword [edi + 8], ebx
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], esi
mov ecx, 0x20
mov edx, ebx
shr edx, cl
test dl, 1
je 0x4030dd
mov dword [edi + 0x20], ecx
mov edx, eax
shr edx, cl
test dl, 1
je 0x4030e9
mov dword [edi + 0x24], ecx
mov edx, esi
shr edx, cl
test dl, 1
je 0x4030f5
mov dword [edi + 0x28], ecx
sub ecx, 1
jns 0x4030d1
mov ecx, dword [edi + 0x28]
mov esi, dword [edi + 0x24]
mov edx, dword [edi + 0x20]
mov eax, 2
add ecx, eax
add esi, eax
mov dword [ebp + 0xc], ecx
add edx, eax
mov dword [ebp + 8], 8
jmp 0x403126
mov ebx, dword [ebp - 0xc8]
lea ecx, [edx - 2]
cmp ecx, 0x20
jge 0x40313d
lea ecx, [edx - 2]
shr ebx, cl
test ebx, ebx
je 0x40313d
lea ecx, [eax - 1]
mov dword [edi + 0x14], ecx
lea ecx, [esi - 2]
cmp ecx, 0x20
jge 0x40315a
mov ebx, dword [ebp - 0xc4]
lea ecx, [esi - 2]
shr ebx, cl
test ebx, ebx
je 0x40315a
lea ecx, [eax - 1]
mov dword [edi + 0x18], ecx
mov ecx, dword [ebp + 0xc]
lea ebx, [ecx - 2]
cmp ebx, 0x20
jge 0x40317a
mov ebx, dword [ebp - 0xc0]
add ecx, 0xfffffffe
shr ebx, cl
test ebx, ebx
je 0x40317a
lea ecx, [eax - 1]
mov dword [edi + 0x1c], ecx
lea ecx, [edx - 1]
cmp ecx, 0x20
jge 0x403194
mov ebx, dword [ebp - 0xc8]
lea ecx, [edx - 1]
shr ebx, cl
test ebx, ebx
je 0x403194
mov dword [edi + 0x14], eax
lea ecx, [esi - 1]
cmp ecx, 0x20
jge 0x4031ae
mov ebx, dword [ebp - 0xc4]
lea ecx, [esi - 1]
shr ebx, cl
test ebx, ebx
je 0x4031ae
mov dword [edi + 0x18], eax
mov ecx, dword [ebp + 0xc]
lea ebx, [ecx - 1]
cmp ebx, 0x20
jge 0x4031cb
mov ebx, dword [ebp - 0xc0]
add ecx, 0xffffffff
shr ebx, cl
test ebx, ebx
je 0x4031cb
mov dword [edi + 0x1c], eax
cmp edx, 0x20
jge 0x4031e4
mov ebx, dword [ebp - 0xc8]
mov ecx, edx
shr ebx, cl
test ebx, ebx
je 0x4031e4
lea ecx, [eax + 1]
mov dword [edi + 0x14], ecx
cmp esi, 0x20
jge 0x4031fd
mov ebx, dword [ebp - 0xc4]
mov ecx, esi
shr ebx, cl
test ebx, ebx
je 0x4031fd
lea ecx, [eax + 1]
mov dword [edi + 0x18], ecx
mov ecx, dword [ebp + 0xc]
cmp ecx, 0x20
jge 0x403217
mov ebx, dword [ebp - 0xc0]
shr ebx, cl
test ebx, ebx
je 0x403217
lea ecx, [eax + 1]
mov dword [edi + 0x1c], ecx
lea ecx, [edx + 1]
cmp ecx, 0x20
jge 0x403231
mov ebx, dword [ebp - 0xc8]
shr ebx, cl
test ebx, ebx
je 0x403231
lea ecx, [eax + 2]
mov dword [edi + 0x14], ecx
lea ecx, [esi + 1]
cmp ecx, 0x20
jge 0x40324b
mov ebx, dword [ebp - 0xc4]
shr ebx, cl
test ebx, ebx
je 0x40324b
lea ecx, [eax + 2]
mov dword [edi + 0x18], ecx
mov ecx, dword [ebp + 0xc]
add ecx, 1
cmp ecx, 0x20
jge 0x403268
mov ebx, dword [ebp - 0xc0]
shr ebx, cl
test ebx, ebx
je 0x403268
lea ecx, [eax + 2]
mov dword [edi + 0x1c], ecx
add dword [ebp + 0xc], 4
add eax, 4
add edx, 4
add esi, 4
sub dword [ebp + 8], 1
jne 0x403120
mov edx, dword [edi + 0xc0]
push edx
call fcn.0056a975
mov eax, dword [edi + 0xc4]
add esp, 4
push eax
call fcn.0056a975
mov ecx, dword [edi + 0xc8]
add esp, 4
push ecx
call fcn.0056a975
mov ecx, dword [edi + 0x14]
mov esi, 1
shl esi, cl
mov ecx, dword [edi + 0x18]
mov ebx, 1
shl ebx, cl
mov ecx, dword [edi + 0x1c]
mov eax, 1
shl eax, cl
sub esi, 1
xor ecx, ecx
add esp, 4
sub eax, 1
mov dword [ebp + 8], eax
lea eax, [esi + esi + 1]
mov dword [ebp + 0xc], eax
mov edx, 4
sub ebx, 1
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00568c31
mov dword [edi + 0xc0], eax
xor ecx, ecx
add esp, 4
lea eax, [ebx + ebx + 1]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00568c31
mov dword [edi + 0xc4], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
lea eax, [eax + eax + 1]
add esp, 4
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00568c31
mov dword [edi + 0xc8], eax
xor eax, eax
add esp, 4
cmp dword [ebp + 0xc], eax
jle 0x403369
lea esp, [esp]
cmp eax, esi
mov ecx, eax
jl 0x403358
mov ecx, esi
mov edx, dword [edi + 0xc0]
mov dword [edx + eax*4], ecx
add eax, 1
cmp eax, dword [ebp + 0xc]
jl 0x403350
lea edx, [ebx + ebx + 1]
xor eax, eax
test edx, edx
jle 0x40338b
cmp eax, ebx
mov ecx, eax
jl 0x40337b
mov ecx, ebx
mov esi, dword [edi + 0xc4]
mov dword [esi + eax*4], ecx
add eax, 1
cmp eax, edx
jl 0x403373
mov esi, dword [ebp + 8]
lea edx, [esi + esi + 1]
xor eax, eax
test edx, edx
jle 0x4033b0
cmp eax, esi
mov ecx, eax
jl 0x4033a0
mov ecx, esi
mov ebx, dword [edi + 0xc8]
mov dword [ebx + eax*4], ecx
add eax, 1
cmp eax, edx
jl 0x403398
mov esi, 2
lea ecx, [edi + 0x4cc]
mov dword [ebp + 0xc], 0x40
mov eax, dword [edi + 8]
lea ebx, [esi - 2]
mov edx, ebx
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
and edx, dword [edi + 8]
mov dword [ecx - 0x400], edx
mov eax, dword [edi + 0xc]
mov edx, ebx
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
and edx, dword [edi + 0xc]
mov eax, 0x80808081
mov dword [ecx], edx
imul ebx, dword [edi + 0x10]
mul ebx
shr edx, 7
and edx, dword [edi + 0x10]
lea ebx, [esi - 1]
mov dword [ecx + 0x400], edx
mov eax, dword [edi + 8]
mov edx, ebx
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
and edx, dword [edi + 8]
mov dword [ecx - 0x3fc], edx
mov eax, dword [edi + 0xc]
mov edx, ebx
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
and edx, dword [edi + 0xc]
mov eax, 0x80808081
mov dword [ecx + 4], edx
imul ebx, dword [edi + 0x10]
mul ebx
shr edx, 7
and edx, dword [edi + 0x10]
mov eax, 0x80808081
mov dword [ecx + 0x404], edx
mov ebx, dword [edi + 8]
mov edx, esi
imul edx, ebx
mul edx
shr edx, 7
and edx, ebx
mov dword [ecx - 0x3f8], edx
mov ebx, dword [edi + 0xc]
mov edx, esi
imul edx, ebx
mov eax, 0x80808081
mul edx
shr edx, 7
and edx, ebx
mov dword [ecx + 8], edx
mov ebx, dword [edi + 0x10]
mov edx, esi
imul edx, ebx
mov eax, 0x80808081
mul edx
shr edx, 7
and edx, ebx
mov dword [ecx + 0x408], edx
mov eax, dword [edi + 8]
lea ebx, [esi + 1]
mov edx, ebx
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
and edx, dword [edi + 8]
mov dword [ecx - 0x3f4], edx
mov eax, dword [edi + 0xc]
mov edx, ebx
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
and edx, dword [edi + 0xc]
mov eax, 0x80808081
mov dword [ecx + 0xc], edx
imul ebx, dword [edi + 0x10]
mul ebx
shr edx, 7
and edx, dword [edi + 0x10]
add ecx, 0x10
mov dword [ecx + 0x3fc], edx
add esi, 4
sub dword [ebp + 0xc], 1
jne 0x4033c2
movzx eax, byte [edi + 0xce8]
push eax
mov esi, edi
call fcn.004035a0
cmp byte [edi + 0x38], 0
je 0x40356b
mov eax, dword [edi + 0x30]
call fcn.00405230
test al, al
jne 0x40356b
push 0xf
lea esi, [edi + 0xd20]
push str.3D_init_error:
mov ecx, esi
call fcn.0043dd50
push 0xffffffffffffffff
push 0
push 0x5da3b8
mov ecx, esi
call fcn.0043db30
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp - 0x10]
add dword [edi + 0xcec], 1
push edx
mov byte [edi + 0xccc], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8