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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
fldz
push ebx
push esi
xor esi, esi
mov dword [esp + 0x1c], esi
xor eax, eax
mov word [esp + 0x4c], ax
mov dword [esp + 0x50], esi
mov dword [esp + 0x18], esi
fst qword [esp + 0x44]
fst qword [esp + 0x8c]
xor ecx, ecx
fldz
push edi
fst dword [esp + 0x44]
fst dword [esp + 0x18]
fxch st(1)
fstp qword [esp + 0x78]
fstp dword [esp + 0x64]
mov word [esp + 0x24], cx
fld dword [0x4232f8]
mov ecx, 1
fsubr qword [0x41f800]
fsub dword [esp + 0x18]
mov edx, dword [0x425f28]
add dword [0x425f28], ecx
sub edx, 0x36b8b55d
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fcompp
fnstsw ax
fld dword [esp + 0x18]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x18]
test ah, 0x41
jp 0x4061e4
fadd dword [esp + 0x44]
fstp dword [esp + 0x44]
mov eax, dword [0x423140]
add eax, 0x24cdf57
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fld dword [esp + 0x44]
mov dx, word [esp + 0x50]
movsx eax, dx
mov edx, dword [esp + 0x1c]
add dword [esp + 0x50], ecx
dec dword [0x423140]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
mov dword [esp + 0x14], edx
fsubp st(1)
fiadd dword [esp + 0x14]
fcompp
fnstsw ax
test ah, 5
jp 0x4061f2
mov ecx, dword [0x425ffc]
mov eax, 0xbd1cd473
sub eax, ecx
add dword [esp + 0x1c], eax
jmp 0x4061f2
fstp st(0)
fld qword [0x41f7f8]
fstp qword [0x4233b0]
mov edi, dword [ebp + 0x14]
push esi
push edi
call fcn.004034c0
add esp, 8
test eax, eax
jne 0x40620f
mov eax, 0xfffffff4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x20]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fld qword [0x425ec0]
fadd qword [0x41f7f0]
fsubp st(1)
call fcn.0040b3c0
mov dword [esp + 0x20], eax
fld qword [0x425ec0]
fadd qword [0x41f368]
push esi
lea eax, [esp + 0x88]
push eax
lea ecx, [esp + 0x40]
fstp qword [0x425ec0]
push ecx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.00401b90
mov ebx, dword [ebp + 0x10]
push edi
push ebx
call fcn.00401a20
add esp, 0x20
test eax, eax
jge 0x40637f
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fld qword [esp + 0x48]
fadd qword [0x41f7e8]
fsubp st(1)
fsubp st(1)
call fcn.0040b3c0
mov edi, dword [ebp + 8]
mov dword [esp + 0x20], eax
dec dword [esp + 0x1c]
cmp edi, esi
je 0x40631a
fldz
push 1
mov dword [esp + 0x14], esi
fstp dword [esp + 0x18]
push edi
call fcn.00401ec0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
fld qword [0x423cf8]
fld dword [esp + 0x14]
fadd qword [0x41f570]
fadd qword [0x41f568]
fsubp st(1)
fstp qword [0x423cf8]
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
add ecx, ecx
add ecx, ecx
push ecx
push eax
push edx
call fcn.0040b470
mov eax, dword [edi + 8]
add esp, 0xc
mov dword [eax], esi
mov dword [edi], 1
test esi, esi
jne 0x406bda
mov ecx, dword [esp + 0x20]
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fadd qword [0x425f70]
fld qword [0x423908]
faddp st(1)
fsubr dword [esp + 0x64]
fstp dword [esp + 0x64]
fld qword [0x425f70]
fadd qword [0x41f368]
fstp qword [0x425f70]
cmp eax, esi
je 0x406369
push ebx
push eax
call fcn.00402860
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
fld qword [0x41f7e0]
xor eax, eax
fstp qword [esp + 0x90]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x2c]
push ebx
push edx
call fcn.00402860
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
lea eax, [esp + 0x58]
push edi
push eax
call fcn.00402860
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
mov ecx, dword [ebx + 4]
add ecx, 2
mov eax, 1
push ecx
lea edx, [esp + 0x70]
push edx
mov dword [esp + 0x60], eax
mov dword [esp + 0x34], eax
call fcn.00401ec0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
push eax
lea eax, [esp + 0x70]
push eax
call fcn.00403ad0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
lea ecx, [esp + 0x38]
push 2
push ecx
call fcn.00401ec0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
lea edx, [esp + 0x84]
push 3
push edx
call fcn.00401ec0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
lea eax, [esp + 0x58]
push eax
call fcn.004010c0
mov ebx, eax
add esp, 4
and ebx, 0x8000001f
jns 0x406443
dec ebx
or ebx, 0xffffffe0
inc ebx
mov cx, word [0x423958]
movsx edx, cx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fadd qword [esp + 0x90]
mov ax, word [esp + 0x24]
movsx ecx, ax
mov dword [esp + 0x14], ecx
fsub qword [0x41f7d8]
fild dword [esp + 0x14]
faddp st(1)
call fcn.0040b3c0
cmp ebx, 0x1f
mov word [esp + 0x24], ax
jge 0x406513
fld qword [0x423290]
mov edx, dword [0x425f30]
mov eax, dword [esp + 0x20]
lea ecx, [eax + edx - 0x611b5356]
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
mov edi, 0x1f
sub edi, ebx
lea edx, [esp + 0x2c]
fsubp st(1)
push edi
push edx
mov dword [esp + 0x1c], edi
fstp qword [0x423290]
inc dword [0x425f30]
call fcn.00402fa0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
fld dword [esp + 0x18]
lea eax, [esp + 0x58]
fadd qword [esp + 0x78]
push edi
push eax
fmul qword [0x4231d0]
fstp qword [0x4231d0]
fld dword [esp + 0x20]
fsub qword [0x41f368]
fstp dword [esp + 0x20]
call fcn.00402fa0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
jmp 0x40651b
mov dword [esp + 0x14], 0
mov ecx, dword [esp + 0x54]
mov edi, dword [esp + 0x30]
imul ecx, ecx, 0x62a1632
mov eax, dword [esp + 0x5c]
dec edi
dec eax
mov dword [esp + 0x18], edi
sub edi, eax
mov ebx, edi
shl ebx, 5
lea edx, [esp + 0x58]
push ebx
push edx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x70], eax
call fcn.00402fa0
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00401d60
add esp, 0x10
test eax, eax
jl 0x406592
mov eax, dword [esp + 0x74]
inc dword [eax + edi*4]
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x30]
push eax
mov ecx, eax
push ecx
call fcn.00405100
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.00401d60
add esp, 0x14
test eax, eax
jge 0x406563
fld qword [esp + 0x48]
mov ecx, dword [0x4233fc]
fsub qword [0x41f7d0]
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fmulp st(1)
call fcn.0040b3c0
mov dword [0x4233fc], eax
fld qword [esp + 0x48]
fsub qword [0x41f368]
lea edx, [esp + 0x58]
push ebx
push edx
fstp qword [esp + 0x50]
call fcn.004026a0
fld qword [esp + 0x50]
mov eax, dword [esp + 0x20]
fsub qword [0x41f7c8]
add esp, 8
cmp eax, dword [esp + 0x68]
mov dword [esp + 0x18], eax
fstp qword [esp + 0x48]
jle 0x406b0f
add edi, edi
add edi, edi
add ebx, 0xffffffe0
mov dword [esp + 0x28], edi
mov dword [esp + 0x1c], ebx
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x60]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x68]
mov esi, dword [edx + ecx*4]
mov dword [esp + 0x10], eax
cmp dword [eax], esi
jb 0x40662f
mov edx, dword [esp + 0x74]
or esi, 0xffffffff
mov dword [edi + edx - 4], esi
jmp 0x4066e6
mov ecx, dword [eax]
mov eax, ecx
xor edx, edx
mov edi, esi
shr edi, 0x10
div edi
mov edx, dword [0x423350]
mov dword [0x42601c], edx
dec dword [0x423350]
movzx edx, si
mov ebx, eax
imul eax, edi
sub ecx, eax
mov eax, dword [esp + 0x10]
mov eax, dword [eax - 4]
mov dword [esp + 0x10], eax
shr eax, 0x10
shl ecx, 0x10
or ecx, eax
mov eax, ebx
imul eax, edx
cmp ecx, eax
jae 0x40668b
add ecx, esi
dec ebx
cmp ecx, esi
jb 0x40668b
jmp 0x406680
cmp ecx, eax
jae 0x40668b
add ecx, esi
dec ebx
cmp ecx, esi
jae 0x406680
sub ecx, eax
xor edx, edx
mov eax, ecx
div edi
mov edx, eax
imul edx, edi
sub ecx, edx
movzx edx, word [esp + 0x10]
shl ecx, 0x10
or ecx, edx
movzx edi, si
mov edx, eax
imul edx, edi
cmp ecx, edx
jae 0x4066d0
fld qword [esp + 0x78]
add ecx, esi
fsub qword [0x41f7c0]
dec eax
fstp qword [esp + 0x78]
cmp ecx, esi
jb 0x4066d0
cmp ecx, edx
jae 0x4066d0
add ecx, esi
dec eax
cmp ecx, esi
jae 0x4066c5
mov ecx, dword [esp + 0x28]
shl ebx, 0x10
or ebx, eax
mov eax, dword [esp + 0x74]
mov dword [ecx + eax - 4], ebx
mov edi, ecx
or esi, 0xffffffff
add dword [esp + 0x54], esi
mov edx, dword [esp + 0x54]
mov eax, 0x4b4b9507
sub eax, edx
add eax, dword [0x42355c]
mov ebx, 1
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fld dword [esp + 0x64]
add dword [0x42355c], esi
fcompp
fnstsw ax
test ah, 0x41
jp 0x406759
add dword [0x425ea4], ebx
mov ecx, dword [0x4232e4]
mov edx, dword [0x425ea4]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fadd dword [esp + 0x64]
fsubp st(1)
call fcn.0040b3c0
fld1
mov dword [0x4232e4], eax
mov eax, dword [esp + 0x74]
add dword [edi + eax - 4], ebx
jmp 0x406796
mov ax, word [esp + 0x50]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fadd qword [esp + 0x78]
fsub qword [0x41f7b8]
fstp qword [0x423cf8]
fld qword [esp + 0x78]
mov eax, dword [esp + 0x74]
fld1
add dword [edi + eax - 4], ebx
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x78]
jmp 0x406796
fld1
or esi, 0xffffffff
fld qword [0x426040]
mov edx, dword [esp + 0x20]
mov ax, word [esp + 0x50]
fadd qword [0x41f7b0]
add dword [esp + 0x20], esi
movsx ecx, ax
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fsubp st(2)
fcompp
fnstsw ax
test ah, 5
jp 0x4067e8
fld qword [esp + 0x90]
fsub qword [0x41f7a8]
fsub qword [0x41f7a0]
fmul qword [esp + 0x48]
fstp qword [esp + 0x48]
fld qword [esp + 0x90]
mov eax, dword [esp + 0x74]
fsub qword [0x41f798]
add dword [edi + eax - 4], esi
fsub qword [0x41f790]
fld qword [0x4236a8]
fadd qword [0x41f788]
fcompp
fnstsw ax
fld qword [0x4236a8]
fadd st(1)
fstp qword [0x4236a8]
fadd qword [esp + 0x90]
fstp qword [esp + 0x90]
test ah, 0x41
jne 0x40685a
fld qword [0x425ea8]
mov edx, dword [0x423cc0]
fsubr qword [0x41f780]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmulp st(1)
call fcn.0040b3c0
mov dword [0x423cc0], eax
fldz
lea eax, [esp + 0x38]
push ebx
mov dword [esp + 0x14], 0
fstp dword [esp + 0x14]
push eax
call fcn.00401ec0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
fld qword [0x423cf8]
fld dword [esp + 0x10]
mov ecx, dword [esp + 0x3c]
fadd qword [0x41f570]
lea edx, [ecx*4]
push edx
push eax
fadd qword [0x41f568]
mov eax, dword [esp + 0x48]
push eax
fsubp st(1)
fstp qword [0x423cf8]
call fcn.0040b470
mov ecx, dword [esp + 0x4c]
add esp, 0xc
mov dword [ecx], esi
mov dword [esp + 0x38], ebx
test esi, esi
jne 0x406bda
mov ecx, dword [esp + 0x68]
cmp ecx, ebx
jge 0x4068d6
xor eax, eax
jmp 0x4068de
mov edx, dword [esp + 0x60]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x40]
mov dword [edx], eax
mov eax, dword [esp + 0x60]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x40]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x74]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x3c]
push edx
mov eax, edx
push eax
call fcn.004050a0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406bda
fldz
lea ecx, [esp + 0x84]
push ebx
mov dword [esp + 0x14], eax
fstp dword [esp + 0x14]
push ecx
call fcn.00401ec0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
fld qword [0x423cf8]
fld dword [esp + 0x10]
mov edx, dword [esp + 0x88]
fadd qword [0x41f570]
mov ecx, dword [esp + 0x8c]
lea eax, [edx*4]
push eax
fadd qword [0x41f568]
push esi
push ecx
fsubp st(1)
fstp qword [0x423cf8]
call fcn.0040b470
mov edx, dword [esp + 0x98]
add esp, 0xc
mov dword [edx], esi
mov dword [esp + 0x84], ebx
test esi, esi
jne 0x406bda
mov eax, dword [esp + 0x18]
cmp eax, 2
jge 0x40699d
xor ecx, ecx
jmp 0x4069a5
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, ebx
mov edx, dword [esp + 0x8c]
mov dword [edx], ecx
jge 0x4069b6
xor ecx, ecx
jmp 0x4069be
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x8c]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x8c]
lea ecx, [esp + 0x84]
mov dword [eax + 8], edx
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00401d60
add esp, 8
test eax, eax
jg 0x406791
mov eax, dword [esp + 0x74]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.004050a0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406bda
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00402fa0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x30]
push ecx
mov edx, ecx
push edx
call fcn.00405100
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406bda
push eax
lea eax, [esp + 0x30]
push eax
mov dword [0x424840], 0x465427d0
call fcn.004034c0
add esp, 8
test eax, eax
jge 0x406aef
movzx ecx, word [esp + 0x24]
imul ecx, ecx, 0xb2455325
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x3c]
push eax
mov word [esp + 0x2c], cx
call fcn.00402860
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00402fa0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406bda
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x30]
push ecx
mov edx, ecx
push edx
call fcn.00404f30
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406bda
mov eax, dword [esp + 0x74]
dec dword [edi + eax - 4]
mov eax, dword [esp + 0x20]
imul eax, eax, 0x7586ccbf
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
sub dword [esp + 0x1c], 0x20
sub eax, ebx
sub edi, 4
cmp eax, dword [esp + 0x68]
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], edi
jg 0x406601
mov edi, dword [ebp + 8]
test edi, edi
je 0x406b6b
fld qword [0x4233b0]
lea ecx, [esp + 0x6c]
fadd qword [esp + 0x78]
push ecx
push edi
fsub qword [0x425200]
fmul dword [0x423174]
fstp dword [0x423174]
fld qword [0x425200]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [0x425200]
fadd qword [0x4233b0]
fstp qword [0x4233b0]
call fcn.00402860
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 0x406bda
fld dword [0x423164]
mov edx, dword [esp + 0x14]
fadd qword [esp + 0x48]
push edx
lea eax, [esp + 0x30]
push eax
fstp dword [0x423164]
fld qword [esp + 0x50]
fadd qword [0x41f368]
fstp qword [esp + 0x50]
call fcn.004026a0
lea ecx, [esp + 0x34]
push ecx
push edi
call fcn.00402860
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov dword [edi], eax
fld dword [0x425e80]
fsubr qword [0x41f778]
push 0
push edi
fmul dword [esp + 0x5c]
fstp dword [esp + 0x5c]
call fcn.004034c0
add esp, 0x18
test eax, eax
jne 0x406bda
mov dword [edi], 1
push 0
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00401180
mov ax, word [0x4251bc]
movsx ecx, ax
add esp, 0x18
mov edx, 0xf569e874
sub edx, ecx
mov dword [esp + 0x10], edx
pop edi
mov eax, esi
fild dword [esp + 0xc]
pop esi
pop ebx
fstp dword [0x4235f0]
mov esp, ebp
pop ebp
ret