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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xbc
fldz
xor eax, eax
mov word [esp + 0x80], ax
fst qword [esp + 0x3c]
fst qword [esp + 0x84]
push ebx
fst qword [esp + 0x70]
push esi
xor esi, esi
mov dword [esp + 0xc], esi
fst qword [esp + 0x74]
fldz
push edi
fst dword [esp + 0x18]
fst dword [esp + 0x6c]
mov dword [esp + 0x50], esi
fst dword [esp + 0x28]
fst dword [esp + 0xc]
fld dword [0x425be8]
mov ecx, dword [0x423830]
fsub qword [0x41f810]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fmulp st(1)
call fcn.0040b410
mov edi, dword [ebp + 0x14]
mov dword [0x423830], eax
fstp dword [esp + 0x20]
mov eax, 1
mov dword [esp + 0xa4], eax
fstp qword [esp + 0x20]
mov dword [esp + 0xa8], eax
lea eax, [esp + 0xa4]
push eax
lea edx, [esp + 0xa0]
push edi
mov dword [esp + 0xa4], esi
mov dword [esp + 0xb4], edx
call fcn.00402f50
add esp, 8
test eax, eax
jne 0x4065c2
lea eax, [esi - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.004025c0
mov ebx, dword [ebp + 0x10]
push edi
push ebx
call fcn.004020b0
add esp, 0x20
test eax, eax
jge 0x406690
mov edi, dword [ebp + 8]
cmp edi, esi
je 0x40664c
fldz
push 1
fstp qword [esp + 0x94]
push edi
fldz
fstp dword [esp + 0x28]
call fcn.00403670
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
add eax, eax
add eax, eax
push eax
push esi
push ecx
call fcn.0040b830
mov edx, dword [edi + 8]
add esp, 0xc
mov dword [edx], esi
mov dword [edi], 1
test esi, esi
jne 0x40709e
inc dword [0x425eec]
mov eax, dword [0x425eec]
sub eax, 0x7a22af4c
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
mov eax, dword [ebp + 0xc]
fmul dword [esp + 0x18]
fstp dword [esp + 0x18]
cmp eax, esi
je 0x406687
push ebx
push eax
call fcn.00404330
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x30]
push ebx
push ecx
call fcn.00404330
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
fld dword [esp + 0x18]
mov dx, word [0x423f5c]
movsx eax, dx
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x54]
push edi
fild dword [esp + 0x18]
push ecx
fsubp st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x20]
fadd qword [0x41f370]
fstp dword [esp + 0x20]
call fcn.00404330
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
mov edx, dword [ebx + 4]
add edx, 2
push edx
lea eax, [esp + 0x64]
mov edi, 1
push eax
mov dword [esp + 0x5c], edi
mov dword [esp + 0x38], edi
call fcn.00403670
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
fldz
lea ecx, [esp + 0x60]
fstp qword [esp + 0x20]
push edi
fldz
push ecx
fstp dword [esp + 0x28]
call fcn.00403670
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
lea eax, [edx*4]
push eax
push esi
push ecx
call fcn.0040b830
mov edx, dword [esp + 0x74]
add esp, 0xc
mov dword [edx], esi
mov dword [esp + 0x60], edi
test esi, esi
jne 0x40709e
lea eax, [esp + 0x3c]
push 2
push eax
call fcn.00403670
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
fld dword [esp + 0x28]
lea ecx, [esp + 0x80]
fsubr qword [0x41f808]
push 3
push ecx
fstp dword [esp + 0x74]
call fcn.00403670
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
lea edx, [esp + 0x54]
push edx
call fcn.004010c0
mov ebx, eax
add esp, 4
and ebx, 0x8000001f
jns 0x4067c4
dec ebx
or ebx, 0xffffffe0
inc ebx
cmp ebx, 0x1f
fld dword [0x41f800]
fstp dword [esp + 0x28]
jge 0x406886
mov ecx, edi
add dword [esp + 0x10], ecx
mov ax, word [0x425b5c]
mov edx, dword [0x425b74]
cwde
add edx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fsub qword [esp + 0x48]
dec dword [0x425b74]
add word [0x425b5c], cx
fcompp
fnstsw ax
test ah, 0x41
jp 0x406849
fld qword [0x425f08]
fsub qword [0x41f370]
fstp qword [0x425f08]
fld qword [0x425f08]
fsub qword [0x41f7f8]
fsub qword [0x425b10]
call fcn.0040b410
mov word [0x425bdc], ax
mov edi, 0x1f
sub edi, ebx
lea ecx, [esp + 0x30]
push edi
push ecx
mov dword [esp + 0x1c], edi
call fcn.00403ee0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
lea edx, [esp + 0x54]
push edi
push edx
call fcn.00403ee0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
jmp 0x40688e
mov dword [esp + 0x14], 0
fld dword [0x42399c]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x42399c]
fld dword [0x42399c]
fadd dword [esp + 0xc]
fsub qword [0x41f7f0]
fmul qword [0x423338]
fstp qword [0x423338]
fadd dword [esp + 0xc]
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x58]
dec eax
dec edi
fstp dword [esp + 0xc]
mov dword [esp + 0x2c], edi
sub edi, eax
mov ebx, edi
mov dword [esp + 0x74], eax
shl ebx, 5
lea eax, [esp + 0x54]
push ebx
push eax
call fcn.00403ee0
mov ecx, dword [esp + 0x58]
add ecx, 0x1e065c67
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
add esp, 8
fld dword [esp + 0xc]
mov edx, dword [esp + 0x10]
mov eax, dword [0x42326c]
dec dword [0x42326c]
mov dword [esp + 0x1c], edx
fisub dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
fisub dword [esp + 0x1c]
fucompp
fnstsw ax
fld dword [esp + 0xc]
fsub qword [0x41f370]
fstp dword [esp + 0xc]
test ah, 0x44
jnp 0x40695a
dec dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
mov edx, 0x6b42f1af
sub edx, ecx
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fadd qword [0x423330]
fstp qword [0x423330]
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.00402f50
add esp, 8
test eax, eax
jl 0x40699f
mov eax, dword [esp + 0x68]
inc dword [eax + edi*4]
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, eax
push ecx
call fcn.00406260
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00402f50
add esp, 0x14
test eax, eax
jge 0x406970
lea ecx, [esp + 0x54]
push ebx
push ecx
call fcn.004032e0
fld dword [0x423254]
fld qword [0x423330]
add esp, 8
fld qword [esp + 0x48]
fsubp st(2)
fxch st(1)
fadd qword [0x41f7e8]
fcompp
fnstsw ax
fld qword [esp + 0x48]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x48]
fld dword [0x423254]
fadd st(1)
fstp dword [0x423254]
test ah, 0x41
jp 0x406a00
fld qword [0x424e78]
fsub qword [0x41f7e0]
fstp qword [0x424e78]
jmp 0x406a24
fld qword [0x4259a8]
fsub st(1)
fstp qword [0x4259a8]
fld qword [esp + 0x48]
fld qword [0x4259a8]
fsub qword [0x41f7d8]
fsubp st(1)
fstp qword [esp + 0x48]
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x74]
mov dword [esp + 0x70], eax
jle 0x406ef1
lea edx, [edi*4]
add ebx, 0xffffffe0
mov dword [esp + 0xc], edx
mov dword [esp + 0x2c], ebx
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x5c]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x74]
mov esi, dword [edx + ecx*4]
mov dword [esp + 0x1c], eax
mov eax, dword [eax]
cmp eax, esi
jb 0x406a7f
mov edx, dword [esp + 0x68]
fstp st(0)
mov ecx, dword [esp + 0xc]
mov dword [ecx + edx - 4], 0xffffffff
jmp 0x406b97
mov edi, esi
shr edi, 0x10
xor edx, edx
div edi
mov ebx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fld qword [esp + 0x78]
fucompp
fnstsw ax
fld qword [esp + 0x78]
fadd st(1)
fstp qword [esp + 0x78]
test ah, 0x44
jp 0x406ae6
fld qword [0x423238]
fsub qword [0x41f7d0]
fcomp qword [0x41f7c8]
fnstsw ax
test ah, 1
jne 0x406ada
fld dword [0x423248]
fsub qword [0x41f7c0]
fstp dword [0x423248]
jmp 0x406ae6
mov ecx, 0x49d3
mov word [0x423324], cx
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
movzx eax, word [eax - 2]
mov edx, ebx
imul edx, edi
sub ecx, edx
shl ecx, 0x10
or ecx, eax
movzx edx, si
mov eax, ebx
imul eax, edx
cmp ecx, eax
jae 0x406b22
add dword [esp + 0x50], 0xbb4df208
add ecx, esi
dec ebx
cmp ecx, esi
jb 0x406b22
cmp ecx, eax
jae 0x406b22
add ecx, esi
dec ebx
cmp ecx, esi
jae 0x406b17
sub ecx, eax
fld qword [0x41f7b8]
mov edx, 0xcee
mov word [0x4231fc], dx
fstp qword [esp + 0x48]
xor edx, edx
mov eax, ecx
div edi
mov edx, eax
imul edx, edi
sub ecx, edx
mov edx, dword [esp + 0x1c]
movzx edx, word [edx - 4]
shl ecx, 0x10
or ecx, edx
movzx edi, si
mov edx, eax
imul edx, edi
cmp ecx, edx
jae 0x406b72
add ecx, esi
dec eax
cmp ecx, esi
jb 0x406b72
cmp ecx, edx
jae 0x406b72
add ecx, esi
dec eax
cmp ecx, esi
jae 0x406b67
fld dword [esp + 0x6c]
mov ecx, dword [esp + 0xc]
fadd dword [esp + 0x18]
shl ebx, 0x10
or ebx, eax
fstp dword [esp + 0x6c]
fadd dword [esp + 0x18]
mov eax, dword [esp + 0x68]
mov dword [ecx + eax - 4], ebx
fstp dword [esp + 0x18]
mov eax, dword [esp + 0x68]
inc dword [ecx + eax - 4]
fld dword [esp + 0x28]
mov eax, dword [esp + 0x68]
fadd qword [0x41f7b0]
mov ecx, dword [esp + 0xc]
dec dword [ecx + eax - 4]
lea edx, [esp + 0x3c]
fstp dword [esp + 0x28]
push 1
fldz
push edx
fstp qword [esp + 0x50]
fldz
fstp dword [esp + 0x28]
call fcn.00403670
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
lea ecx, [eax*4]
push ecx
push esi
push edx
call fcn.0040b830
mov eax, dword [esp + 0x50]
add esp, 0xc
mov dword [eax], esi
mov dword [esp + 0x3c], 1
test esi, esi
jne 0x40709e
mov ecx, dword [esp + 0x74]
cmp ecx, 1
jge 0x406c1b
xor eax, eax
jmp 0x406c23
mov edx, dword [esp + 0x5c]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x44]
mov dword [edx], eax
mov eax, dword [esp + 0x5c]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x44]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + eax - 4]
push edx
lea eax, [esp + 0x40]
push eax
mov ecx, eax
push ecx
call fcn.004061e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40709e
mov edx, dword [0x425bac]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fadd qword [0x424e90]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fmulp st(1)
call fcn.0040b410
mov dword [esp + 0x10], eax
fld qword [0x424e90]
fadd qword [0x41f370]
lea ecx, [esp + 0x80]
push 1
push ecx
fstp qword [0x424e90]
fldz
fstp qword [esp + 0x50]
fldz
fstp dword [esp + 0x28]
call fcn.00403670
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
mov edx, dword [esp + 0x84]
mov ecx, dword [esp + 0x88]
lea eax, [edx*4]
push eax
push esi
push ecx
call fcn.0040b830
mov edx, dword [esp + 0x94]
add esp, 0xc
mov dword [edx], esi
mov dword [esp + 0x80], 1
test esi, esi
jne 0x40709e
mov eax, dword [esp + 0x70]
cmp eax, 2
jge 0x406d0c
xor ecx, ecx
jmp 0x406d14
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, 1
mov edx, dword [esp + 0x88]
mov dword [edx], ecx
jge 0x406d26
xor ecx, ecx
jmp 0x406d2e
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x88]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x88]
lea ecx, [esp + 0x80]
mov dword [eax + 8], edx
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00402f50
add esp, 8
test eax, eax
jg 0x406b9f
add dword [esp + 0x50], 0xbc393801
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + eax - 4]
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.004061e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40709e
mov edx, dword [esp + 0x2c]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00403ee0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x34]
push edx
mov eax, edx
push eax
call fcn.00406260
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40709e
fldz
mov dword [esp + 0x98], eax
mov eax, 1
fstp dword [esp + 0x20]
fldz
lea edx, [esp + 0xb0]
mov dword [esp + 0xb0], eax
fstp qword [esp + 0x48]
mov dword [esp + 0xb4], eax
push edx
lea eax, [esp + 0x34]
lea ecx, [esp + 0x9c]
push eax
mov dword [esp + 0xc0], ecx
call fcn.00402f50
add esp, 8
test eax, eax
jge 0x406ed2
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00404330
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
mov eax, dword [esp + 0x2c]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.00403ee0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40709e
fld qword [0x41f7a8]
lea edx, [esp + 0x3c]
push edx
fstp qword [esp + 0x94]
lea eax, [esp + 0x34]
push eax
mov ecx, eax
push ecx
call fcn.00405cc0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40709e
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0xc]
dec dword [ecx + eax - 4]
fld dword [0x423ecc]
fsubr qword [0x41f7a0]
fcomp qword [0x41f798]
fnstsw ax
fld dword [0x423ecc]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x423ecc]
test ah, 5
jp 0x406ed4
fld qword [0x425ae8]
fmul qword [0x41f790]
fstp qword [0x425ae8]
jmp 0x406ed4
fld1
mov eax, dword [esp + 0x70]
sub dword [esp + 0x2c], 0x20
sub dword [esp + 0xc], 4
dec eax
cmp eax, dword [esp + 0x74]
mov dword [esp + 0x70], eax
jg 0x406a48
mov ebx, 1
add dword [esp + 0x10], ebx
mov edx, dword [0x425e28]
add edx, dword [esp + 0x10]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fadd qword [0x423290]
add dword [0x425e28], ebx
fcomp qword [0x41f788]
fnstsw ax
test ah, 0x44
jp 0x406fa1
mov ax, word [esp + 0x8c]
movsx ecx, ax
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fsub qword [esp + 0x78]
fsub qword [0x41f780]
fld dword [esp + 0x18]
fsub qword [0x41f778]
fadd dword [esp + 0x28]
fcompp
fnstsw ax
fld dword [esp + 0x28]
fadd st(1)
fstp dword [esp + 0x28]
test ah, 0x41
jp 0x406f77
mov dx, word [0x425b50]
dec word [0x425b50]
jmp 0x406fb2
fld dword [esp + 0x6c]
mov ax, word [0x4232a8]
fsub qword [0x41f770]
movsx ecx, ax
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fmulp st(1)
call fcn.0040b410
mov word [0x4232a8], ax
jmp 0x406fb2
mov edx, dword [0x425ad8]
mov eax, 0xd36db44
sub eax, edx
mov dword [esp + 0x10], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x406fd8
lea ecx, [esp + 0x60]
fstp st(0)
push ecx
push edi
call fcn.00404330
fld1
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x14]
add esp, 8
imul eax, dword [ecx]
mov dword [edi], eax
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x407088
mov edx, dword [esp + 0x14]
fstp st(0)
push edx
lea eax, [esp + 0x34]
push eax
call fcn.004032e0
fld qword [esp + 0x98]
fadd qword [0x41f370]
fstp qword [esp + 0x98]
fld dword [esp + 0x30]
fadd qword [esp + 0x98]
call fcn.0040b410
lea ecx, [esp + 0x38]
push ecx
mov dword [0x425ad0], eax
push edi
call fcn.00404330
fldz
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov dword [edi], eax
fstp dword [esp + 0x30]
fldz
lea edx, [esp + 0xcc]
push edx
fstp qword [esp + 0xa4]
lea ecx, [esp + 0xb4]
push edi
mov dword [esp + 0xb8], 0
mov dword [esp + 0xd4], ebx
mov dword [esp + 0xd8], ebx
mov dword [esp + 0xdc], ecx
call fcn.00402f50
add esp, 0x18
test eax, eax
jne 0x40707c
mov dword [edi], ebx
fld dword [0x41f768]
fstp dword [esp + 0x18]
fld1
fld qword [esp + 0x78]
fadd qword [0x41f760]
fstp qword [esp + 0x48]
fadd qword [esp + 0x78]
fstp qword [esp + 0x78]
push 0
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00403570
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret