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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x88
mov eax, dword [0x42a010]
xor eax, esp
mov dword [esp + 0x84], eax
push esi
push edi
mov edi, dword [0x59ee00]
xor ecx, ecx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x28], 0
mov eax, dword [edi + 0x3c]
mov dword [esp + 0x18], ecx
mov eax, dword [eax + edi + 0x78]
add eax, edi
mov dword [esp + 0x54], eax
mov edx, dword [eax + 0x20]
mov eax, dword [eax + 0x18]
add edx, edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x50], eax
test eax, eax
je 0x4022c1
nop dword [eax]
mov edx, dword [edx]
xorps xmm0, xmm0
add edx, edi
movaps xmmword [esp + 0x60], xmm0
mov eax, edx
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402081
sub eax, esi
lea ecx, [esp + 0x60]
push eax
push edx
call fcn.00403130
mov eax, dword [esp + 0x70]
lea edx, [esp + 0x60]
mov esi, dword [esp + 0x60]
mov ecx, eax
xor ecx, 0x235
mov dword [esp + 0x30], eax
cmp dword [esp + 0x74], 0x10
mov dword [esp + 0x24], ecx
cmovae edx, esi
mov dword [esp + 0x48], esi
mov dword [esp + 0xc], edx
xor edi, edi
mov edx, eax
shr edx, 2
mov dword [esp + 0x10], edx
test edx, edx
je 0x40219e
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.GDI32.dll_ArcTo]
mov edx, str.Z81xbyuAua
mov ecx, 0x42b048
call fcn.00402e90
mov dword [esp + 0x2c], eax
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + eax + 0x30]
mov esi, dword [ecx + 4]
mov ecx, esi
mov dword [esp + 0x5c], esi
mov edx, dword [esi]
call dword [edx + 4]
lea eax, [esp + 0x58]
push eax
call fcn.004037f0
add esp, 4
mov ecx, eax
mov edx, dword [eax]
push 0xa
mov eax, dword [edx + 0x30]
call eax
movzx eax, ax
mov dword [esp + 0x20], eax
test esi, esi
je 0x402152
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 8]
call eax
test eax, eax
je 0x40214e
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
push eax
call fcn.00403530
mov ecx, dword [esp + 0x2c]
call fcn.00403430
mov eax, dword [esp + 0xc]
imul ecx, dword [eax + edi*4], 0x5bd1e995
inc edi
mov eax, ecx
shr eax, 0x18
xor eax, ecx
imul ecx, eax, 0x5bd1e995
imul eax, dword [esp + 0x24], 0x5bd1e995
xor ecx, eax
mov dword [esp + 0x24], ecx
cmp edi, dword [esp + 0x10]
jl 0x4020d4
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x48]
and eax, 3
xor edx, edx
sub eax, 1
je 0x4021e2
sub eax, 1
je 0x4021ce
sub eax, 1
jne 0x4021f8
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0xc]
movsx edx, byte [edi + eax*4 + 2]
movsx eax, byte [edi + eax*4 + 1]
shl edx, 0x10
shl eax, 8
xor edx, eax
jmp 0x4021e6
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0xc]
movsx eax, byte [edi + eax*4 + 1]
shl eax, 8
xor edx, eax
jmp 0x4021e6
mov edi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
movsx eax, byte [edi + eax*4]
xor eax, edx
imul eax, eax, 0x5bd1e995
xor ecx, eax
mov eax, ecx
shr eax, 0xd
xor eax, ecx
imul ecx, eax, 0x5bd1e995
mov eax, ecx
shr eax, 0xf
xor eax, ecx
cmp eax, dword [esp + 0x4c]
je 0x40226e
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x74]
add edx, 4
mov dword [esp + 0x14], edx
cmp eax, 0x10
jb 0x402255
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x402247
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4022db
push ecx
push esi
call fcn.00405a95
mov edx, dword [esp + 0x1c]
add esp, 8
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [esp + 0x50]
jb 0x402060
jmp 0x4022c1
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
mov eax, dword [edx + 0x24]
lea eax, [eax + ecx*2]
movzx ecx, word [eax + edi]
mov eax, dword [edx + 0x1c]
lea eax, [eax + ecx*4]
mov eax, dword [eax + edi]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x74]
cmp eax, 0x10
jb 0x4022c1
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x4022b7
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4022db
push ecx
push esi
call fcn.00405a95
add esp, 8
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x8c]
add eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.00405a57
mov esp, ebp
pop ebp
ret
call fcn.0040a52a
int3