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

Disassembly:
sub esp, 0xa4
push ebx
push ebp
mov ebp, dword [esp + 0xb8]
push esi
mov esi, dword [esp + 0xb4]
mov ebx, eax
mov eax, dword [esi]
push 7
push eax
call fcn.0042cd0d
xor ecx, ecx
cmp eax, ecx
je 0x4058ac
mov dword [esi + 4], eax
mov eax, dword [edi + 0x88]
cmp eax, 3
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
ja 0x4059a6
jmp dword [eax*4 + 0x4057d8]
cmp dword [edi + 0x14], 0x20
push 0xc
jl 0x4059e9
call fcn.0042cccd
mov esi, eax
test esi, esi
je 0x405a24
lea edx, [esp + 0x18]
push edx
push 0x1000000
mov dword [esi + 8], 6
mov dword [esi], 0x4315d4
mov dword [esp + 0x20], 0
call fcn.0042cdcd
mov dword [esi + 8], eax
mov eax, dword [esp + 0x18]
mov dword [esi + 4], eax
jmp 0x405a26
call fcn.0042cccd
mov esi, eax
test esi, esi
je 0x405a24
lea ecx, [esp + 0x18]
push ecx
push 0x4000000
mov dword [esi + 8], 6
mov dword [esi], 0x4315d4
mov dword [esp + 0x20], 0
call fcn.0042cdcd
mov edx, dword [esp + 0x18]
mov dword [esi + 8], eax
mov dword [esi + 4], edx
jmp 0x405a26
xor esi, esi
test esi, esi
je 0x405ae1
mov eax, dword [esp + 0xc0]
test eax, eax
jle 0x405a6e
mov eax, dword [esp + 0xc4]
mov ecx, dword [esp + 0xc0]
mov edx, dword [esi + 4]
push eax
mov eax, dword [esp + 0xb8]
push ecx
mov ecx, dword [eax]
push ebp
push ebx
push edx
push ecx
call fcn.0042ce4d
test eax, eax
je 0x405aa4
mov edx, dword [esp + 0xb4]
mov dword [edx + 4], eax
jmp 0x405aa4
mov eax, dword [esp + 0xb8]
test eax, eax
je 0x405aa4
mov eax, dword [edi + 0x48]
mov ecx, dword [edi + 0x44]
push eax
mov eax, dword [esi + 4]
push ecx
mov ecx, dword [esp + 0xbc]
mov edx, dword [ecx]
push ebp
push ebx
push eax
push edx
call fcn.0042ce4d
test eax, eax
je 0x405aa4
mov ecx, dword [esp + 0xb4]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [esi + 4]
push ecx
mov ecx, dword [esp + 0xc0]
push edx
mov edx, dword [ecx]
push eax
push edx
call fcn.0042ce4d
test eax, eax
je 0x405ad9
mov ecx, dword [esp + 0xb4]
mov dword [ecx + 4], eax
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
mov eax, dword [esp + 0xb8]
xor esi, esi
cmp eax, esi
je 0x4063c9
cmp dword [edi], 1
jne 0x405c6e
mov edx, dword [esp + 0xc0]
cmp edx, esi
jge 0x405b12
mov eax, dword [edi + 0x44]
mov dword [esp + 0xc0], eax
mov edx, eax
mov ecx, dword [esp + 0xc4]
test ecx, ecx
jge 0x405b27
mov ecx, dword [edi + 0x48]
mov dword [esp + 0xc4], ecx
mov eax, dword [edi + 0x88]
test eax, eax
je 0x405b87
cmp eax, 3
je 0x405b87
test ecx, ecx
mov esi, dword [edi + 0x44]
lea edx, [esi + 0xa]
mov dword [esp + 0x1c], edx
jge 0x405b47
mov ecx, dword [edi + 0x48]
mov eax, dword [edi + 0x48]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x18]
sub eax, ecx
add eax, ebp
mov dword [esp + 0x20], eax
cmp dword [edi + 0x88], 1
jne 0x405b78
lea esi, [ebx - 5]
jmp 0x405be5
mov eax, dword [esp + 0xc0]
sub ebx, esi
lea esi, [ebx + eax - 5]
jmp 0x405be5
test edx, edx
jge 0x405b94
mov ecx, dword [edi + 0x44]
mov dword [esp + 0x1c], ecx
jmp 0x405b98
mov dword [esp + 0x1c], edx
mov ecx, dword [edi + 0x48]
mov eax, dword [edi + 0x44]
lea edx, [ecx + 0xa]
mov dword [esp + 0x10], edx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
cdq
sub eax, edx
mov esi, eax
mov eax, dword [esp + 0x18]
sar esi, 1
sub esi, eax
mov eax, dword [edi + 0x88]
add esi, ebx
test eax, eax
jne 0x405bde
mov eax, dword [esp + 0xc4]
sub ebp, ecx
lea ecx, [eax + ebp - 5]
mov dword [esp + 0x20], ecx
jmp 0x405be5
add ebp, 0xfffffffb
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0xb4]
mov eax, dword [ebp]
lea edx, [esp + 0x18]
push edx
push eax
mov dword [esp + 0x20], 0
call fcn.0042ce2d
test eax, eax
je 0x405c09
mov dword [ebp + 4], eax
mov ecx, dword [edi + 0x9c]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
push 0xcc0020
push 0
push 0
push ecx
mov ecx, dword [esp + 0x30]
push edx
push eax
push ecx
push esi
push ebx
call dword [0x42f054]
mov edx, dword [ebp]
push ebx
push edx
call fcn.0042ce7d
test eax, eax
je 0x405c45
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x54]
mov edx, dword [edi + 0x58]
mov dword [edi + 0x5c], esi
mov dword [edi + 0x60], eax
mov dword [edi + 0x64], ecx
mov dword [edi + 0x68], edx
mov dword [edi + 0x6c], 0
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret 0x34
cmp dword [edi + 0x70], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], esi
jle 0x405cc2
mov eax, dword [edi + 0x88]
cmp eax, esi
jne 0x405c93
mov eax, dword [edi + 0x80]
neg eax
mov dword [esp + 0x14], eax
jmp 0x405cc2
cmp eax, 3
jne 0x405ca4
mov eax, dword [edi + 0x80]
mov dword [esp + 0x14], eax
jmp 0x405cc2
cmp eax, 1
jne 0x405cb1
mov esi, dword [edi + 0x80]
jmp 0x405cbe
cmp eax, 2
jne 0x405cc2
mov esi, dword [edi + 0x80]
neg esi
mov dword [esp + 0x10], esi
mov ecx, dword [esp + 0xc0]
test ecx, ecx
jle 0x40611f
fld qword [esp + 0xd8]
fsub qword [0x431878]
fabs
fcomp qword [0x431998]
fnstsw ax
test ah, 0x41
je 0x405f1d
cmp dword [esp + 0xd4], 0xff
jne 0x405f1d
mov eax, dword [edi + 0xc]
test eax, eax
je 0x405d1a
cmp ecx, dword [edi + 0x44]
jne 0x405d86
mov eax, dword [esp + 0xc4]
cmp eax, dword [edi + 0x48]
jne 0x405d86
mov esi, dword [esp + 0xb4]
call fcn.00403f20
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push 0xcc0020
push 0
push 0
mov esi, eax
lea eax, [ecx + ebp]
lea ecx, [edx + ebx]
mov edx, dword [edi + 0x9c]
push edx
mov edx, dword [edi + 0x48]
push edx
mov edx, dword [edi + 0x44]
push edx
push eax
push ecx
push esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
call dword [0x42f054]
mov eax, dword [esp + 0xb4]
mov ecx, dword [eax]
push esi
push ecx
call fcn.0042ce7d
test eax, eax
je 0x406196
mov edx, dword [esp + 0xb4]
mov dword [edx + 4], eax
jmp 0x406196
mov eax, dword [esp + 0xcc]
test eax, eax
je 0x405dfa
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xc0]
mov esi, dword [esp + 0xb8]
add eax, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
lea eax, [ecx + ebp]
push 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xc8]
push 0
push 2
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
call fcn.00401da0
push eax
call fcn.00401d70
push eax
push 0
mov edx, esi
mov esi, dword [esp + 0xcc]
push 0
xor ecx, ecx
lea eax, [esp + 0x3c]
call fcn.00401cb0
jmp 0x406196
mov esi, dword [esp + 0xb4]
call fcn.00403f20
mov ecx, dword [edi + 4]
mov esi, dword [esp + 0xc0]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 8]
sub eax, ecx
mov ecx, dword [edi + 0x44]
cdq
sub eax, edx
sar eax, 1
lea edx, [ecx + eax]
cmp esi, edx
jge 0x405e7d
mov edx, dword [edi + 0x48]
mov esi, dword [esp + 0xc4]
add eax, edx
cmp esi, eax
jge 0x405e7d
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
push 0xcc0020
push edx
mov edx, dword [esp + 0xcc]
push ecx
mov ecx, dword [edi + 0x9c]
push 0
push 0
push ecx
mov ecx, dword [esp + 0xd8]
push edx
mov edx, dword [esp + 0x3c]
push ecx
add eax, ebp
add esi, ebx
push eax
push esi
push edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], esi
call dword [0x42f058]
jmp 0x405ef2
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov esi, dword [edi + 0x94]
mov byte [esp + 0x1c], 0
mov byte [esp + 0x1d], 0
mov byte [esp + 0x1e], 0xff
mov byte [esp + 0x1f], 1
mov edx, dword [esp + 0x1c]
add eax, ebp
add ecx, ebx
push edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
call fcn.00401da0
mov esi, dword [edi + 0x94]
push eax
call fcn.00401d70
mov ecx, dword [esp + 0xcc]
mov edx, dword [esp + 0xc8]
push eax
mov eax, dword [edi + 0xa8]
push 0
push 0
push eax
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x40]
push eax
push ecx
push edx
call dword [0x42f208]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xb4]
mov edx, dword [ecx]
push eax
push edx
call fcn.0042ce7d
test eax, eax
je 0x406196
mov ecx, dword [esp + 0xb4]
mov dword [ecx + 4], eax
jmp 0x406196
mov eax, dword [esp + 0xd0]
movzx edx, al
mov dword [esp + 0x18], edx
movzx ecx, ah
fild dword [esp + 0x18]
mov dword [esp + 0x18], ecx
fmul dword [0x431990]
shr eax, 0x10
movzx edx, al
fstp dword [esp + 0x48]
fild dword [esp + 0x18]
mov dword [esp + 0x18], edx
lea eax, [esp + 0x20]
xor esi, esi
fmul dword [0x431990]
push eax
mov dword [esp + 0x50], 0
fstp dword [esp + 0x64]
mov dword [esp + 0x54], 0
fild dword [esp + 0x1c]
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
fmul dword [0x431990]
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
fstp dword [esp + 0x7c]
mov dword [esp + 0x70], 0
fild dword [esp + 0xd8]
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x80], 0
fmul dword [0x431990]
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
fstp dword [esp + 0x94]
mov dword [esp + 0x90], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0x3f000000
mov dword [esp + 0x24], esi
call fcn.0042ce0d
mov edx, dword [esp + 0x20]
push esi
push esi
lea ecx, [esp + 0x50]
push ecx
push 1
push esi
push edx
mov dword [esp + 0x3c], eax
call fcn.0042cd6d
cmp eax, esi
je 0x406073
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0xb8]
mov ecx, dword [esi + 4]
lea eax, [esp + 0x18]
push eax
push ecx
call fcn.0042cc6d
test eax, eax
je 0x406093
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x24], 0
call fcn.0042cd2d
test eax, eax
je 0x4060b0
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0xb4]
lea eax, [ecx + ebx]
mov ecx, dword [esp + 0xc4]
push 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x34], eax
lea eax, [edx + ebp]
mov edx, dword [esp + 0x1c]
push 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xc8]
push 2
push edx
mov edx, dword [esp + 0xc8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x2c]
push eax
push 0
mov dword [esp + 0x54], ecx
push 0
lea ecx, [esp + 0x3c]
lea eax, [esp + 0x4c]
call fcn.00401cb0
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0042cded
jmp 0x406196
mov eax, dword [esp + 0xb4]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push ecx
mov dword [esp + 0x20], 0
call fcn.0042ce2d
test eax, eax
je 0x406149
mov edx, dword [esp + 0xb4]
mov dword [edx + 4], eax
mov edx, dword [edi + 0x9c]
mov eax, dword [esp + 0x14]
push 0xcc0020
push 0
push 0
push edx
mov edx, dword [edi + 0x48]
push edx
mov edx, dword [edi + 0x44]
push edx
add eax, ebp
lea ecx, [esi + ebx]
mov esi, dword [esp + 0x30]
push eax
push ecx
push esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
call dword [0x42f054]
push esi
mov esi, dword [esp + 0xb8]
mov eax, dword [esi]
push eax
call fcn.0042ce7d
test eax, eax
je 0x406196
mov dword [esi + 4], eax
mov eax, dword [edi + 0xb8]
test eax, eax
je 0x4063a8
mov esi, dword [edi + 0xb4]
test esi, esi
je 0x4063a8
mov eax, dword [esp + 0xc0]
test eax, eax
jge 0x4061c7
mov ecx, dword [edi + 0x44]
mov dword [esp + 0xc0], ecx
mov eax, dword [esp + 0xc4]
test eax, eax
jge 0x4061dc
mov edx, dword [edi + 0x48]
mov dword [esp + 0xc4], edx
call fcn.00401d70
mov esi, dword [edi + 0xb4]
mov dword [esp + 0x1c], eax
call fcn.00401da0
mov edx, dword [esp + 0x1c]
mov ecx, eax
mov eax, dword [esp + 0xc0]
cmp edx, eax
jle 0x406207
mov dword [esp + 0x1c], eax
jmp 0x40620b
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0xc4]
cmp ecx, edx
jle 0x406218
mov ecx, edx
mov edx, dword [edi + 0x88]
test edx, edx
jne 0x406267
mov edx, dword [esp + 0xc4]
mov esi, dword [esp + 0x1c]
sub ebp, ecx
lea eax, [edx + ebp + 5]
push eax
mov eax, esi
cdq
sub eax, edx
mov ebp, eax
mov eax, dword [esp + 0xc4]
cdq
sub eax, edx
sar eax, 1
sar ebp, 1
sub eax, ebp
add eax, ebx
push eax
mov eax, dword [edi + 0xb4]
mov edx, esi
mov esi, dword [esp + 0xbc]
call fcn.00404010
jmp 0x4063a8
cmp edx, 3
jne 0x4062cc
cdq
sub eax, edx
mov esi, eax
mov eax, dword [esp + 0xc0]
cdq
sub eax, edx
sar eax, 1
sar esi, 1
mov edx, eax
sub edx, esi
add eax, esi
add edx, ebx
lea ecx, [ecx + ebp - 5]
add eax, ebx
add ebp, 0xfffffffa
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ebp
mov eax, dword [edi + 0xb4]
test eax, eax
je 0x40630f
mov eax, dword [eax + 4]
mov esi, dword [esp + 0xb4]
mov edx, dword [esi]
push 3
lea ecx, [esp + 0x34]
push ecx
push eax
push edx
jmp 0x40639c
cmp edx, 1
jne 0x406325
cdq
sub eax, edx
lea esi, [ecx + ebx - 5]
mov ecx, eax
mov eax, dword [esp + 0xc4]
cdq
sub eax, edx
sar eax, 1
sar ecx, 1
mov edx, eax
sub edx, ecx
add eax, ecx
add edx, ebp
add eax, ebp
add ebx, 0xfffffffa
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], edx
jmp 0x4062a8
mov esi, dword [esp + 0xb4]
mov edx, dword [esi]
push 3
lea ecx, [esp + 0x34]
push ecx
xor eax, eax
push eax
push edx
jmp 0x40639c
cmp edx, 2
jne 0x4063a8
mov edx, ebx
sub edx, ecx
mov ecx, dword [esp + 0xc0]
lea esi, [edx + ecx + 5]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0xc4]
cdq
sub eax, edx
sar eax, 1
sar ecx, 1
mov edx, eax
add eax, ecx
add eax, ebp
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xc0]
sub edx, ecx
lea ecx, [ebx + eax + 5]
mov eax, dword [edi + 0xb4]
add edx, ebp
test eax, eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], esi
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
je 0x406388
mov eax, dword [eax + 4]
jmp 0x40638a
xor eax, eax
mov esi, dword [esp + 0xb4]
push 3
lea edx, [esp + 0x34]
push edx
push eax
mov eax, dword [esi]
push eax
call fcn.0042cd9d
test eax, eax
je 0x4063a8
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [edi + 0x54]
mov dword [edi + 0x5c], ecx
mov ecx, dword [edi + 0x58]
mov dword [edi + 0x60], edx
mov dword [edi + 0x64], eax
mov dword [edi + 0x68], ecx
mov dword [edi + 0x6c], 0
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret 0x34