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

Disassembly:
sub esp, 0xb0
fldz
push ebp
xor eax, eax
mov word [esp + 0x18], ax
xor ebp, ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x1c], ebp
xor ecx, ecx
mov word [esp + 8], cx
fst qword [esp + 0xa4]
fst qword [esp + 0x6c]
push esi
fldz
xor edx, edx
fst dword [esp + 0x18]
push edi
mov edi, dword [esp + 0xcc]
fst dword [esp + 0x28]
fxch st(1)
mov esi, 1
fstp qword [esp + 0xb4]
lea ecx, [esp + 0x84]
mov word [esp + 0x14], dx
lea edx, [esp + 0x88]
push edx
mov dword [esp + 0x30], ebp
fstp dword [esp + 0x28]
push edi
mov word [esp + 0x14], ax
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], esi
mov dword [esp + 0x98], ecx
call fcn.00402860
add esp, 8
test eax, eax
jne 0x405126
pop edi
pop esi
lea eax, [ebp - 0xc]
pop ebp
add esp, 0xb0
ret
push ebx
push ebp
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.00402a50
mov ebx, dword [esp + 0xe4]
push edi
push ebx
call fcn.00402d60
add esp, 0x20
test eax, eax
jge 0x4051fb
mov edi, dword [esp + 0xc4]
mov edx, 0x3d7b
mov word [0x423cc0], dx
cmp edi, ebp
je 0x4051cf
fldz
xor eax, eax
fstp dword [esp + 0x28]
push esi
mov word [esp + 0x18], ax
movzx ecx, word [esp + 0x18]
add ecx, 0x2b581fe8
push edi
mov word [esp + 0x1c], cx
call fcn.004014d0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
mov edx, dword [edi + 4]
mov eax, dword [edi + 8]
add edx, edx
add edx, edx
push edx
push ebp
push eax
call fcn.0040b3c0
mov ecx, dword [edi + 8]
add esp, 0xc
mov dword [ecx], ebp
mov dword [edi], 1
cmp esi, ebp
jne 0x405a57
mov eax, dword [esp + 0xc8]
cmp eax, ebp
je 0x4051ee
push ebx
push eax
call fcn.00402b60
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xb0
ret
add dword [esp + 0x24], esi
mov dx, word [esp + 0x24]
movsx eax, dx
mov ecx, 0xa9a2970f
sub ecx, eax
add ecx, dword [esp + 0x30]
lea edx, [esp + 0x34]
push ebx
push edx
mov dword [esp + 0x38], ecx
call fcn.00402b60
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
fld dword [0x423b18]
fadd dword [esp + 0x20]
mov ax, word [0x423cd8]
movsx ecx, ax
mov dword [esp + 0x28], ecx
fsub qword [0x41f738]
fild dword [esp + 0x28]
fmulp st(1)
call fcn.0040b240
mov word [0x423cd8], ax
fld dword [0x423b18]
fld1
lea edx, [esp + 0x4c]
fsub st(1), st(0)
push edi
fxch st(1)
push edx
fstp dword [0x423b18]
fsubr dword [esp + 0x28]
fstp dword [esp + 0x28]
call fcn.00402b60
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
mov eax, dword [ebx + 4]
add eax, 2
push eax
lea ecx, [esp + 0x5c]
mov edi, 1
push ecx
mov dword [esp + 0x54], edi
mov dword [esp + 0x3c], edi
call fcn.004014d0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
fldz
xor edx, edx
fstp dword [esp + 0x28]
lea ecx, [esp + 0x58]
mov word [esp + 0x10], dx
movzx eax, word [esp + 0x10]
add eax, 0x2b581fe8
push edi
push ecx
mov word [esp + 0x18], ax
call fcn.004014d0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
lea eax, [edx*4]
push eax
push ebp
push ecx
call fcn.0040b3c0
mov edx, dword [esp + 0x6c]
add esp, 0xc
mov dword [edx], ebp
mov dword [esp + 0x58], edi
cmp esi, ebp
jne 0x405a57
lea eax, [esp + 0x40]
push 2
push eax
call fcn.004014d0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
lea ecx, [esp + 0x68]
push 3
push ecx
call fcn.004014d0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
lea edx, [esp + 0x4c]
push edx
call fcn.00401cd0
add esp, 4
and eax, 0x8000001f
jns 0x405364
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x40541a
mov edi, 0x1f
sub edi, eax
lea eax, [esp + 0x34]
push edi
push eax
mov dword [esp + 0x30], edi
call fcn.00402c10
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
fld dword [esp + 0x2c]
mov cx, word [0x423d10]
fadd qword [0x41f730]
movsx edx, cx
mov dword [esp + 0x1c], edx
lea eax, [esp + 0x4c]
push edi
fild dword [esp + 0x20]
push eax
fsubp st(1)
fadd dword [esp + 0x34]
fstp dword [esp + 0x34]
call fcn.00402c10
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x405a57
mov ecx, dword [0x423d00]
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
fadd dword [0x4243ac]
fsub dword [0x425db8]
call fcn.0040b240
mov word [esp + 0x14], ax
fld dword [0x425db8]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x425db8]
fld dword [0x4243ac]
fadd st(1)
fstp dword [0x4243ac]
inc dword [0x423d00]
jmp 0x405420
fld1
mov dword [esp + 0x28], ebp
mov dx, word [esp + 0x18]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x50]
movsx ecx, dx
mov dword [esp + 0x1c], ecx
dec eax
dec ebx
fild dword [esp + 0x1c]
mov edi, ebx
sub edi, eax
mov ebp, edi
fsub dword [esp + 0x20]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x64], eax
shl ebp, 5
fisub dword [esp + 0x1c]
lea eax, [esp + 0x4c]
push ebp
push eax
fadd dword [0x423cf8]
fstp dword [0x423cf8]
fadd dword [esp + 0x28]
fstp dword [esp + 0x28]
dec dword [esp + 0x20]
call fcn.00402c10
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00402860
add esp, 0x10
test eax, eax
jl 0x4054bf
mov eax, dword [esp + 0x60]
inc dword [eax + edi*4]
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x38]
push ecx
mov edx, ecx
push edx
call fcn.00404ab0
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00402860
add esp, 0x14
test eax, eax
jge 0x405490
lea edx, [esp + 0x4c]
push ebp
push edx
call fcn.004025b0
add esp, 8
cmp ebx, dword [esp + 0x64]
mov dword [esp + 0x20], ebx
jle 0x4059ab
lea ebx, [edi*4]
add ebp, 0xffffffe0
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebp
lea ecx, [ecx]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x54]
mov ebp, dword [esp + 0x64]
mov esi, dword [edx + ebp*4]
lea edi, [eax + ecx*4]
mov eax, dword [edi]
mov dword [esp + 0x30], edi
cmp eax, esi
jb 0x405521
mov eax, dword [esp + 0x60]
mov dword [ebx + eax - 4], 0xffffffff
jmp 0x4056f7
mov ebx, esi
xor edx, edx
mov ecx, dword [0x423ab4]
shr ebx, 0x10
div ebx
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
fadd qword [0x423b20]
mov ebp, eax
call fcn.0040b240
mov dword [0x423ab4], eax
fld qword [esp + 0xb8]
mov ax, word [0x423f10]
fsubr qword [0x41f728]
mov edi, dword [edi]
movsx ecx, ax
fsub qword [0x41f720]
mov edx, ebp
imul edx, ebx
mov dword [esp + 0x24], ecx
sub edi, edx
fild dword [esp + 0x24]
faddp st(1)
call fcn.0040b240
mov edx, dword [esp + 0x30]
mov word [0x423f10], ax
fld dword [esp + 0x2c]
fsub qword [0x41f718]
movzx ecx, word [edx - 2]
shl edi, 0x10
or ecx, edi
fcomp qword [0x41f710]
fnstsw ax
test ah, 5
jp 0x4055da
fld qword [esp + 0x78]
mov ax, word [esp + 0x14]
movsx edx, ax
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fsub qword [0x423a80]
fsubp st(1)
fstp qword [esp + 0x78]
fld qword [0x423a80]
fadd qword [0x41f340]
fstp qword [0x423a80]
fld qword [0x41f708]
movzx edx, si
mov eax, ebp
fstp qword [esp + 0xb0]
imul eax, edx
cmp ecx, eax
jae 0x40561b
add ecx, esi
dec ebp
cmp ecx, esi
jb 0x40560b
lea ebx, [ebx]
cmp ecx, eax
jae 0x40560b
add ecx, esi
dec ebp
cmp ecx, esi
jae 0x405600
movzx edx, word [esp + 0x14]
sub edx, 0x6acffeb7
mov word [esp + 0x14], dx
sub ecx, eax
fld qword [0x423ca0]
mov eax, ecx
fmul qword [0x41f700]
xor edx, edx
div ebx
fstp qword [0x423ca0]
mov edx, eax
mov eax, dword [0x424f0c]
imul eax, eax, 0x43836df0
mov dword [0x424f0c], eax
mov eax, edx
imul eax, ebx
sub ecx, eax
mov eax, dword [esp + 0x30]
movzx eax, word [eax - 4]
shl ecx, 0x10
or ecx, eax
movzx eax, si
mov edi, edx
imul edi, eax
cmp ecx, edi
jae 0x4056a5
fld qword [0x4243b0]
fcomp qword [0x41f6f8]
fnstsw ax
test ah, 0x41
jne 0x405684
mov eax, 0x74ca
mov word [esp + 0x24], ax
add ecx, esi
dec edx
cmp ecx, esi
jb 0x40569b
jmp 0x405690
cmp ecx, edi
jae 0x40569b
add ecx, esi
dec edx
cmp ecx, esi
jae 0x405690
add dword [0x423ad4], 0x700842d9
mov ecx, dword [esp + 0x74]
mov eax, 0x13f1a250
sub eax, ecx
movzx ecx, word [0x423c4c]
imul eax, ecx
mov word [0x423c4c], ax
mov eax, dword [esp + 0x18]
shl ebp, 0x10
or ebp, edx
mov edx, dword [esp + 0x60]
mov dword [eax + edx - 4], ebp
mov ebp, dword [esp + 0x64]
fld qword [0x4242b0]
mov ebx, eax
fmul qword [esp + 0x78]
fstp qword [esp + 0x78]
fld qword [0x4242b0]
fadd qword [0x41f340]
fstp qword [0x4242b0]
mov eax, dword [esp + 0x60]
mov edi, 1
add dword [ebx + eax - 4], edi
mov eax, dword [esp + 0x60]
fldz
dec dword [ebx + eax - 4]
fstp dword [esp + 0x18]
xor ecx, ecx
mov word [esp + 0x10], cx
movzx edx, word [esp + 0x10]
lea eax, [esp + 0x40]
add edx, 0x2b581fe8
push edi
push eax
mov word [esp + 0x18], dx
call fcn.004014d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a55
mov ecx, dword [esp + 0x44]
lea edx, [ecx*4]
push edx
push eax
mov eax, dword [esp + 0x50]
push eax
call fcn.0040b3c0
mov ecx, dword [esp + 0x54]
add esp, 0xc
mov dword [ecx], esi
mov dword [esp + 0x40], edi
test esi, esi
jne 0x405a55
cmp ebp, edi
jge 0x405775
xor eax, eax
jmp 0x40577d
mov edx, dword [esp + 0x54]
mov eax, dword [edx + ebp*4 - 4]
mov ecx, dword [esp + 0x48]
mov dword [ecx], eax
mov edx, dword [esp + 0x54]
mov eax, dword [edx + ebp*4]
mov ecx, dword [esp + 0x48]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x60]
mov eax, dword [ebx + edx - 4]
push eax
lea ecx, [esp + 0x44]
push ecx
mov edx, ecx
push edx
call fcn.00404370
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405a55
mov eax, dword [esp + 0x74]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
xor ecx, ecx
lea eax, [esp + 0x68]
push edi
fadd dword [esp + 0x30]
push eax
fstp dword [esp + 0x34]
fldz
fstp dword [esp + 0x20]
mov word [esp + 0x18], cx
movzx edx, word [esp + 0x18]
add edx, 0x2b581fe8
mov word [esp + 0x18], dx
call fcn.004014d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a55
mov ecx, dword [esp + 0x6c]
lea edx, [ecx*4]
push edx
push eax
mov eax, dword [esp + 0x78]
push eax
call fcn.0040b3c0
mov ecx, dword [esp + 0x7c]
add esp, 0xc
mov dword [ecx], esi
mov dword [esp + 0x68], edi
test esi, esi
jne 0x405a55
mov eax, dword [esp + 0x20]
cmp eax, 2
jge 0x405836
xor ecx, ecx
jmp 0x40583e
mov edx, dword [esp + 0x3c]
mov ecx, dword [edx + eax*4 - 8]
cmp eax, edi
mov edx, dword [esp + 0x70]
mov dword [edx], ecx
jge 0x40584c
xor ecx, ecx
jmp 0x405854
mov ecx, dword [esp + 0x3c]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x70]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x70]
lea ecx, [esp + 0x68]
mov dword [eax + 8], edx
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00402860
add esp, 8
test eax, eax
jg 0x405704
mov eax, dword [esp + 0x60]
mov ecx, dword [ebx + eax - 4]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x48]
push eax
call fcn.00404370
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405a55
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x40]
push edi
push ecx
call fcn.00402c10
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a55
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x38]
push eax
mov ecx, eax
push ecx
call fcn.00404ab0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405a55
fldz
xor edx, edx
mov eax, 1
fstp dword [esp + 0x1c]
lea ecx, [esp + 0xa4]
mov word [esp + 0x10], dx
mov dword [esp + 0x80], edx
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
push ecx
lea edx, [esp + 0x38]
lea eax, [esp + 0x84]
push edx
mov dword [esp + 0xb4], eax
call fcn.00402860
add esp, 8
test eax, eax
jge 0x40598c
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00402b60
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a55
lea edx, [esp + 0x40]
push edi
push edx
call fcn.00402c10
mov esi, eax
add esp, 8
test esi, esi
jne 0x405a55
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x38]
push ecx
mov edx, ecx
push edx
call fcn.00404430
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405a55
mov eax, dword [esp + 0x60]
dec dword [ebx + eax - 4]
mov eax, dword [esp + 0x20]
dec eax
sub edi, 0x20
sub ebx, 4
cmp eax, ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebx
jg 0x4054f0
mov edi, dword [esp + 0xc4]
test edi, edi
je 0x4059d9
lea eax, [esp + 0x58]
push eax
push edi
call fcn.00402b60
mov ecx, dword [esp + 0xd4]
mov edx, dword [ecx]
mov eax, dword [esp + 0xd8]
add esp, 8
imul edx, dword [eax]
mov dword [edi], edx
mov edi, dword [esp + 0xc8]
test edi, edi
je 0x405a55
mov ecx, dword [esp + 0x28]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.004025b0
lea eax, [esp + 0x3c]
push eax
push edi
call fcn.00402b60
fldz
mov ecx, dword [esp + 0xdc]
mov edx, dword [ecx]
mov dword [edi], edx
fstp dword [esp + 0x38]
lea edx, [esp + 0xa8]
xor eax, eax
push edx
mov ebx, 1
lea ecx, [esp + 0x98]
push edi
mov word [esp + 0x28], ax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xb4], ebx
mov dword [esp + 0xb8], ecx
call fcn.00402860
add esp, 0x18
test eax, eax
jne 0x405a55
mov dword [edi], ebx
xor ebp, ebp
push ebp
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.004012d0
fld qword [0x423608]
fmul qword [0x41f6f0]
add esp, 0x18
pop ebx
pop edi
mov eax, esi
fstp qword [0x423608]
pop esi
pop ebp
add esp, 0xb0
ret