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

Disassembly:
sub esp, 0x37c
fldz
push ebx
fst qword [esp + 0x5c]
push ebp
fst qword [esp + 0x70]
xor ebp, ebp
fldz
push esi
fst dword [esp + 0x18]
mov esi, dword [esp + 0x398]
fst dword [esp + 0x20]
lea ecx, [esp + 0x7c]
fxch st(1)
mov ebx, 1
fst qword [esp + 0x50]
push ecx
fxch st(1)
lea eax, [esp + 0x5c]
fst dword [esp + 0x28]
push esi
fxch st(1)
fst qword [esp + 0x4c]
fst qword [esp + 0x74]
fstp qword [esp + 0x64]
fld dword [0x41f828]
fstp dword [esp + 0x28]
fld dword [0x423a74]
fstp st(0)
fstp dword [esp + 0x14]
mov dword [esp + 0x60], ebp
mov dword [esp + 0x84], ebx
mov dword [esp + 0x20], ebp
fld dword [esp + 0x14]
fmul qword [0x41f4a0]
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], eax
fstp dword [esp + 0x14]
call fcn.00402230
add esp, 8
test eax, eax
jl 0x407e0f
mov edx, dword [esi + 8]
test byte [edx], bl
je 0x407e0f
mov ax, word [0x423380]
mov ecx, dword [0x423e14]
cwde
add ecx, eax
mov dword [esp + 0xc], ecx
push edi
lea edx, [esp + 0x20]
fild dword [esp + 0x10]
push esi
or edi, 0xffffffff
push edx
fmul qword [esp + 0x50]
fstp qword [esp + 0x50]
add dword [0x423e14], edi
call fcn.00401590
fld qword [esp + 0x5c]
fsub qword [0x41f348]
fstp qword [esp + 0x5c]
mov eax, dword [0x423384]
mov ecx, dword [0x423384]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
fsub qword [esp + 0x5c]
fsubp st(1)
call fcn.0040b890
mov dword [0x423384], eax
push ebp
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00401470
push 0x300
lea ecx, [esp + 0xa4]
push ebp
push ecx
call fcn.0040be70
mov edx, dword [esp + 0x3b8]
push edx
call fcn.00401190
mov cx, word [0x423478]
mov edx, dword [0x4230cc]
movsx ecx, cx
add ecx, 0xe3fec6a3
add edx, ecx
mov dword [esp + 0x34], edx
add esp, 0x24
fild dword [esp + 0x10]
fstp dword [esp + 0x28]
add dword [0x4230cc], edi
add word [0x423478], di
cmp eax, 0x29f
jle 0x40770d
mov dword [esp + 0x18], 6
jmp 0x40773d
cmp eax, 0xef
jle 0x40771e
mov dword [esp + 0x18], 5
jmp 0x40773d
cmp eax, 0x4f
jle 0x40772d
mov dword [esp + 0x18], 4
jmp 0x40773d
xor ecx, ecx
cmp eax, 0x17
setg cl
lea ecx, [ecx + ecx + 1]
mov dword [esp + 0x18], ecx
mov edi, dword [esi + 4]
add edi, ebx
mov ebx, dword [esp + 0x390]
push edi
push ebx
call fcn.00402070
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x407d85
lea edx, [esp + 0x98]
push edi
push edx
call fcn.00402070
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x407d85
lea eax, [edi + edi]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.00402070
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x407d85
fld dword [esp + 0x24]
mov ebp, dword [esp + 0x3a0]
fadd qword [0x41f348]
fstp dword [esp + 0x24]
fld dword [0x423218]
fld dword [esp + 0x24]
fsub qword [0x41f820]
fsubp st(1)
fstp dword [0x423218]
test ebp, ebp
je 0x4077ea
cmp dword [ebp + 8], 0
je 0x4077ea
mov edx, dword [ebp]
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
jmp 0x407885
lea edx, [esp + 0x30]
push 1
push edx
call fcn.00402e10
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407d8c
mov eax, dword [0x423484]
mov word [0x423194], ax
inc dword [0x423484]
mov ecx, dword [esi + 4]
shl ecx, 6
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00402b40
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407d8c
mov eax, dword [0x424d98]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
lea ecx, [esp + 0x30]
push esi
push ecx
fadd dword [0x424a08]
mov edx, ecx
push edx
fstp dword [0x424a08]
call fcn.004065b0
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407d8c
test ebp, ebp
je 0x407885
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [ebp], eax
mov dword [ebp + 4], ecx
mov dword [ebp + 8], edx
fld qword [esp + 0x60]
mov edi, dword [esp + 0x394]
fsub qword [0x41f818]
push esi
push edi
fadd qword [0x423048]
fstp qword [0x423048]
call fcn.00402230
add esp, 8
test eax, eax
jl 0x4078c4
push esi
lea eax, [esp + 0x9c]
push edi
push eax
call fcn.004065b0
add esp, 0xc
jmp 0x4078d5
lea ecx, [esp + 0x98]
push edi
push ecx
call fcn.004041d0
add esp, 8
mov edi, dword [esp + 0x20]
lea edx, [esp + 0x3c]
push edx
push edi
push esi
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0xa8]
push ecx
call fcn.004036d0
lea edx, [esp + 0x44]
push edx
push ebx
call fcn.004041d0
add esp, 0x1c
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407d8c
lea eax, [esp + 0x3c]
push eax
push edi
push esi
push ebx
call fcn.00404a20
mov ecx, dword [esp + 0x28]
add esp, 0x10
cmp ecx, 1
jle 0x407a6f
dec ecx
mov ebp, 1
shl ebp, cl
mov ecx, dword [esi + 4]
inc ecx
push ecx
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x90]
push edi
call fcn.00402070
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407d85
lea edx, [esp + 0x98]
push edx
push edi
call fcn.004041d0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407d85
mov eax, dword [esp + 0x18]
dec eax
test eax, eax
jle 0x40799c
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x3c]
push eax
push ecx
push esi
push edi
push edi
call fcn.004036d0
add esp, 0x14
sub dword [esp + 0x10], 1
jne 0x407980
mov ecx, dword [esp + 0x18]
fld qword [esp + 0x54]
mov eax, 1
fstp st(0)
shl eax, cl
inc ebp
cmp ebp, eax
mov dword [esp + 0x10], eax
jge 0x407a6f
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x8c]
mov edx, dword [esi + 4]
inc edx
push edx
push edi
call fcn.00402070
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407d85
fld qword [esp + 0x68]
lea eax, [edi - 0xc]
fadd qword [0x41f810]
push eax
push edi
fstp qword [esp + 0x70]
call fcn.004041d0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407d85
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x3c]
push ecx
push edx
push esi
lea eax, [esp + 0xa4]
push eax
push edi
call fcn.004036d0
fld qword [0x423c98]
fsubr qword [0x41f808]
add esp, 0x14
fcomp qword [0x41f800]
fnstsw ax
test ah, 5
jp 0x407a4b
fld dword [esp + 0x28]
fsub qword [0x41f7f8]
fstp dword [esp + 0x28]
jmp 0x407a61
fld dword [0x424a3c]
fsub qword [0x41f7f0]
fsub qword [0x41f7e8]
fstp qword [esp + 0x70]
inc ebp
add edi, 0xc
cmp ebp, dword [esp + 0x10]
jl 0x4079c5
fld dword [0x425d50]
mov ecx, dword [esp + 0x398]
fld1
mov edx, dword [ecx + 4]
fsub st(1), st(0)
mov dword [esp + 0x50], edx
fxch st(1)
mov dword [esp + 0x2c], 0
fstp dword [0x425d50]
fld dword [0x425d50]
fsub st(1)
fstp dword [0x425d50]
fld dword [0x425d50]
fld dword [0x425d50]
fsubr qword [0x41f7e0]
fcompp
fnstsw ax
test ah, 0x41
jne 0x407afd
fld qword [esp + 0x70]
fld qword [esp + 0x48]
fadd qword [0x41f7d8]
fcompp
fnstsw ax
fld qword [esp + 0x48]
fsub st(1)
fstp qword [esp + 0x48]
test ah, 5
jp 0x407afd
fld qword [0x424a20]
fsub qword [0x41f7d0]
fadd qword [0x423960]
call fcn.0040b890
mov dword [0x4230d0], eax
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x10], ebp
cmp dword [esp + 0x2c], 0
jne 0x407b27
mov eax, dword [esp + 0x50]
mov ecx, eax
dec eax
mov dword [esp + 0x50], eax
test ecx, ecx
je 0x407cf6
mov dword [esp + 0x2c], 0x20
mov edx, dword [esp + 0x398]
mov eax, dword [edx + 8]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x50]
mov edx, dword [eax + edx*4]
dec ecx
shr edx, cl
mov dword [esp + 0x2c], ecx
and edx, 1
jne 0x407b70
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407b05
cmp eax, 1
jne 0x407b70
mov ecx, dword [esp + 0x20]
fstp st(0)
lea eax, [esp + 0x3c]
push eax
push ecx
push esi
push ebx
push ebx
call fcn.004036d0
fld1
add esp, 0x14
jmp 0x407b05
mov eax, dword [str.__b_]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
mov ecx, 1
fadd qword [0x423058]
add dword [str.__b_], ecx
fcomp qword [0x41f7c8]
fnstsw ax
test ah, 0x41
jp 0x407bbb
mov ax, word [0x423dec]
cwde
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fadd qword [esp + 0x78]
fstp qword [esp + 0x78]
add word [0x423dec], cx
jmp 0x407bd5
fld dword [0x4231f4]
fstp dword [0x424a4c]
fld dword [0x4231f4]
fsub st(1)
fstp dword [0x4231f4]
fld qword [0x423e30]
add edi, ecx
mov ecx, dword [esp + 0x18]
fstp qword [0x4233d0]
fld qword [esp + 0x60]
sub ecx, edi
fadd qword [0x41f7c0]
shl edx, cl
mov dword [esp + 0x10], 2
fsub qword [esp + 0x68]
mov cx, word [0x423170]
or ebp, edx
movsx edx, cx
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
faddp st(1)
call fcn.0040b890
mov word [0x423170], ax
mov eax, dword [esp + 0x18]
cmp edi, eax
jne 0x407ce7
fstp st(0)
test eax, eax
jle 0x407c50
mov edi, eax
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x3c]
push eax
push ecx
push esi
push ebx
push ebx
call fcn.004036d0
add esp, 0x14
sub edi, 1
jne 0x407c36
fld qword [esp + 0x48]
mov dx, word [0x423e00]
movsx eax, dx
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x3c]
push ecx
fild dword [esp + 0x20]
lea eax, [ebp + ebp*2]
lea ecx, [esp + eax*4 + 0x90]
fsubp st(1)
fstp qword [esp + 0x4c]
dec word [0x423e00]
mov edx, dword [esp + 0x24]
push edx
push esi
push ecx
push ebx
call fcn.004036d0
fld qword [esp + 0x68]
fmul qword [0x41f7b8]
add esp, 0x14
xor edi, edi
mov dword [esp + 0x10], 1
fstp qword [esp + 0x54]
xor ebp, ebp
fld dword [esp + 0x28]
fsubr qword [0x41f7b0]
fmul dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [esp + 0x28]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x28]
fld dword [0x425d78]
fadd st(1)
fstp dword [0x425d78]
fld dword [0x425d78]
fstp qword [0x423168]
fld qword [0x41f7a8]
fstp qword [esp + 0x60]
jmp 0x407b05
mov ecx, dword [esp + 0x18]
fstp st(0)
fld dword [0x423cc4]
mov dx, word [str.Wb4wT]
movsx eax, dx
mov dword [esp + 0x1c], eax
mov eax, 1
rol eax, cl
fild dword [esp + 0x1c]
fsubp st(1)
mov dword [esp + 0x1c], eax
fadd qword [0x41f7a0]
fstp qword [esp + 0x70]
test edi, edi
jle 0x407d71
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x3c]
push ecx
push edi
push esi
push ebx
push ebx
call fcn.004036d0
add ebp, ebp
add esp, 0x14
test dword [esp + 0x1c], ebp
je 0x407d68
lea edx, [esp + 0x3c]
push edx
push edi
push esi
lea eax, [esp + 0xa4]
push eax
push ebx
call fcn.004036d0
add esp, 0x14
sub dword [esp + 0x10], 1
jne 0x407d33
jmp 0x407d75
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x3c]
push ecx
push edi
push esi
push ebx
call fcn.00404a20
add esp, 0x10
mov ebp, dword [esp + 0x3a0]
mov esi, dword [esp + 0x18]
lea ecx, [esi - 1]
mov eax, 1
shl eax, cl
mov edx, 1
mov ecx, esi
shl edx, cl
cmp eax, edx
jge 0x407dc8
lea esi, [eax + eax*2]
sub edx, eax
lea esi, [esp + esi*4 + 0x8c]
mov edi, edx
push 0
push esi
call fcn.00403390
add esp, 8
add esi, 0xc
sub edi, 1
jne 0x407db5
pop edi
push 0
lea edx, [esp + 0x3c]
lea eax, [esp + 0x98]
test ebp, ebp
je 0x407df2
push edx
push eax
call fcn.00403390
mov eax, dword [esp + 0x1c]
add esp, 0xc
pop esi
pop ebp
pop ebx
add esp, 0x37c
ret
lea ecx, [esp + 0x30]
push ecx
push edx
push eax
call fcn.00403390
mov eax, dword [esp + 0x20]
add esp, 0x10
pop esi
pop ebp
pop ebx
add esp, 0x37c
ret
pop esi
pop ebp
mov eax, 0xfffffffc
pop ebx
add esp, 0x37c
ret