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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ea67e
mov eax, dword fs:[0]
push eax
sub esp, 0x124
push ebx
push esi
push edi
mov eax, dword [0x6396a8]
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.004037d0
mov eax, dword [0x6405b4]
test eax, eax
push 0
je 0x4025f7
push 0x5fee70
lea esi, [edi + 0x5c]
push esi
push 0
call eax
push eax
mov ebx, str.DirectDrawCreateEx
call fcn.004020e0
test al, al
je 0x4025ad
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 0x5fee60
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.004020e0
test al, al
je 0x402609
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 [0x6405b0]
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp + 8]
push ebx
mov esi, edi
call fcn.00402440
test al, al
je 0x402631
mov edx, dword [edi + 0x34]
cmp byte [edx + 0xba], 0
je 0x402631
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.00478e20
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.00478e20
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.00470030
mov edx, dword [ebp - 0x18]
add esp, 0x14
push edx
mov ebx, 0x5feec0
call fcn.004020e0
test al, al
jne 0x40258a
cmp byte [ebp + 0xc], al
je 0x402aeb
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.00470030
mov eax, dword [edi + 0x2c]
add esp, 0xc
cmp byte [eax + 0x5e4], 0
je 0x4028f7
lea ebx, [eax + 0x5e8]
mov eax, ebx
mov edx, esi
call fcn.00401c00
test al, al
je 0x4028f7
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 0x4028c6
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 0x4028fa
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 0x4028fa
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.00470030
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.005b30e0
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 0x40296f
mov dword [ebp - 0x48], 0x2200
mov dword [ebp - 0x9c], eax
lea eax, [edi + 0x60]
push eax
push edi
lea ecx, [ebp - 0xb0]
call fcn.004021b0
cmp eax, 0x88760091
jne 0x4029af
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.004020e0
test al, al
je 0x4029e1
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.005b30e0
add esp, 0xc
cmp byte [edi + 0x38], 0
mov dword [ebp - 0xb0], 0x7c
mov dword [ebp - 0xac], 7
mov dword [ebp - 0x48], 0x840
je 0x402a1c
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.004021b0
push eax
mov ebx, str.CreateSurface_Windowed_DrawSurface
call fcn.004020e0
test al, al
je 0x402a70
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.004020e0
test al, al
je 0x402ab7
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 0x402adb
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 0x402e38
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.00470030
add esp, 0x14
cmp byte [edi + 0x38], 0
je 0x402bc7
mov eax, ebx
mov edx, esi
call fcn.00401c00
test al, al
je 0x402bc7
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 0x402b93
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 0x402bbb
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.00470030
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.004020e0
test al, al
je 0x402c35
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.004020e0
test al, al
je 0x402c89
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.005b30e0
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 0x402cce
mov dword [ebp - 0x48], 0x2218
lea eax, [edi + 0x60]
push eax
push edi
lea ecx, [ebp - 0xb0]
call fcn.004021b0
push eax
mov ebx, str.CreateSurface_FullScreen_Primary
call fcn.004020e0
test al, al
jne 0x4029be
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.004020e0
test al, al
je 0x402d3d
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 0x402d58
mov ecx, dword [edi + 0x60]
push ecx
call fcn.004023b0
mov edx, dword [edi + 0x64]
push edx
call fcn.004023b0
push 0x7c
lea eax, [ebp - 0xb0]
push 0
push eax
call fcn.005b30e0
add esp, 0xc
cmp byte [edi + 0x38], 0
mov dword [ebp - 0xb0], 0x7c
mov dword [ebp - 0xac], 7
mov dword [ebp - 0x48], 0x840
je 0x402d93
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.004021b0
push eax
mov ebx, str.CreateSurface_FullScreen_DrawSurface
call fcn.004020e0
test al, al
jne 0x402a4d
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.004020e0
test al, al
jne 0x402a94
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 0x402e14
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 0x402e38
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.00470030
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 0x402e71
cmp dword [esi], 0x3c
jae 0x402e84
mov eax, dword [edi + 0x2c]
mov cl, 1
mov byte [eax + 0x5b1], cl
mov dword [esi], 0x3c
jmp 0x402e86
mov cl, 1
mov eax, dword [esi]
cmp eax, 0x3c
jae 0x402e9e
mov edx, dword [edi + 0x2c]
mov byte [edx + 0x5b1], cl
mov dword [esi], 0x3c
jmp 0x402eb2
cmp eax, 0x64
jbe 0x402eb2
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.005b30e0
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.004021b0
push eax
mov ebx, str.CreateSurface_OldCursorArea
call fcn.004020e0
test al, al
jne 0x402a4d
lea eax, [edi + 0xd14]
push eax
push edi
lea ecx, [ebp - 0xb0]
call fcn.004021b0
push eax
mov ebx, str.CreateSurface_NewCursorArea
call fcn.004020e0
test al, al
jne 0x4029be
push 0xec
call fcn.005b2b20
add esp, 4
mov dword [ebp + 0xc], eax
test eax, eax
mov byte [ebp - 4], 1
je 0x402f75
push edi
mov ecx, eax
call fcn.0040b6a0
jmp 0x402f77
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.005b2b20
add esp, 4
mov dword [ebp + 0xc], eax
test eax, eax
mov byte [ebp - 4], 2
je 0x402fc6
push edi
mov ecx, eax
call fcn.0040b6a0
jmp 0x402fc8
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 0x4034a3
push 0x6c
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.005b30e0
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 0x40304e
cmp eax, 0x20
jne 0x40298c
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 0x40307d
mov dword [edi + 0x20], ecx
mov edx, eax
shr edx, cl
test dl, 1
je 0x403089
mov dword [edi + 0x24], ecx
mov edx, esi
shr edx, cl
test dl, 1
je 0x403095
mov dword [edi + 0x28], ecx
sub ecx, 1
jns 0x403071
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 0x4030c6
mov ebx, dword [ebp - 0xc8]
lea ecx, [edx - 2]
cmp ecx, 0x20
jge 0x4030dd
lea ecx, [edx - 2]
shr ebx, cl
test ebx, ebx
je 0x4030dd
lea ecx, [eax - 1]
mov dword [edi + 0x14], ecx
lea ecx, [esi - 2]
cmp ecx, 0x20
jge 0x4030fa
mov ebx, dword [ebp - 0xc4]
lea ecx, [esi - 2]
shr ebx, cl
test ebx, ebx
je 0x4030fa
lea ecx, [eax - 1]
mov dword [edi + 0x18], ecx
mov ecx, dword [ebp + 0xc]
lea ebx, [ecx - 2]
cmp ebx, 0x20
jge 0x40311a
mov ebx, dword [ebp - 0xc0]
add ecx, 0xfffffffe
shr ebx, cl
test ebx, ebx
je 0x40311a
lea ecx, [eax - 1]
mov dword [edi + 0x1c], ecx
lea ecx, [edx - 1]
cmp ecx, 0x20
jge 0x403134
mov ebx, dword [ebp - 0xc8]
lea ecx, [edx - 1]
shr ebx, cl
test ebx, ebx
je 0x403134
mov dword [edi + 0x14], eax
lea ecx, [esi - 1]
cmp ecx, 0x20
jge 0x40314e
mov ebx, dword [ebp - 0xc4]
lea ecx, [esi - 1]
shr ebx, cl
test ebx, ebx
je 0x40314e
mov dword [edi + 0x18], eax
mov ecx, dword [ebp + 0xc]
lea ebx, [ecx - 1]
cmp ebx, 0x20
jge 0x40316b
mov ebx, dword [ebp - 0xc0]
add ecx, 0xffffffff
shr ebx, cl
test ebx, ebx
je 0x40316b
mov dword [edi + 0x1c], eax
cmp edx, 0x20
jge 0x403184
mov ebx, dword [ebp - 0xc8]
mov ecx, edx
shr ebx, cl
test ebx, ebx
je 0x403184
lea ecx, [eax + 1]
mov dword [edi + 0x14], ecx
cmp esi, 0x20
jge 0x40319d
mov ebx, dword [ebp - 0xc4]
mov ecx, esi
shr ebx, cl
test ebx, ebx
je 0x40319d
lea ecx, [eax + 1]
mov dword [edi + 0x18], ecx
mov ecx, dword [ebp + 0xc]
cmp ecx, 0x20
jge 0x4031b7
mov ebx, dword [ebp - 0xc0]
shr ebx, cl
test ebx, ebx
je 0x4031b7
lea ecx, [eax + 1]
mov dword [edi + 0x1c], ecx
lea ecx, [edx + 1]
cmp ecx, 0x20
jge 0x4031d1
mov ebx, dword [ebp - 0xc8]
shr ebx, cl
test ebx, ebx
je 0x4031d1
lea ecx, [eax + 2]
mov dword [edi + 0x14], ecx
lea ecx, [esi + 1]
cmp ecx, 0x20
jge 0x4031eb
mov ebx, dword [ebp - 0xc4]
shr ebx, cl
test ebx, ebx
je 0x4031eb
lea ecx, [eax + 2]
mov dword [edi + 0x18], ecx
mov ecx, dword [ebp + 0xc]
add ecx, 1
cmp ecx, 0x20
jge 0x403208
mov ebx, dword [ebp - 0xc0]
shr ebx, cl
test ebx, ebx
je 0x403208
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 0x4030c0
mov edx, dword [edi + 0xc0]
push edx
call fcn.005b39bc
mov eax, dword [edi + 0xc4]
add esp, 4
push eax
call fcn.005b39bc
mov ecx, dword [edi + 0xc8]
add esp, 4
push ecx
call fcn.005b39bc
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.005b25e7
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.005b25e7
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.005b25e7
mov dword [edi + 0xc8], eax
xor eax, eax
add esp, 4
cmp dword [ebp + 0xc], eax
jle 0x403309
lea esp, [esp]
cmp eax, esi
mov ecx, eax
jl 0x4032f8
mov ecx, esi
mov edx, dword [edi + 0xc0]
mov dword [edx + eax*4], ecx
add eax, 1
cmp eax, dword [ebp + 0xc]
jl 0x4032f0
lea edx, [ebx + ebx + 1]
xor eax, eax
test edx, edx
jle 0x40332b
cmp eax, ebx
mov ecx, eax
jl 0x40331b
mov ecx, ebx
mov esi, dword [edi + 0xc4]
mov dword [esi + eax*4], ecx
add eax, 1
cmp eax, edx
jl 0x403313
mov esi, dword [ebp + 8]
lea edx, [esi + esi + 1]
xor eax, eax
test edx, edx
jle 0x403350
cmp eax, esi
mov ecx, eax
jl 0x403340
mov ecx, esi
mov ebx, dword [edi + 0xc8]
mov dword [ebx + eax*4], ecx
add eax, 1
cmp eax, edx
jl 0x403338
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 0x403362
movzx eax, byte [edi + 0xce8]
push eax
mov esi, edi
call fcn.00403540
cmp byte [edi + 0x38], 0
je 0x40350b
mov eax, dword [edi + 0x30]
call fcn.004051d0
test al, al
jne 0x40350b
push 0xf
lea esi, [edi + 0xd20]
push str.3D_init_error:
mov ecx, esi
call fcn.0043df40
push 0xffffffffffffffff
push 0
push 0x63dc88
mov ecx, esi
call fcn.0043dd20
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