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

Disassembly:
sub esp, 0xb8
fldz
xor eax, eax
fst dword [esp + 0x70]
push ebp
fldz
xor ecx, ecx
fst qword [esp + 0x88]
xor edx, edx
fst qword [esp + 0x68]
xor ebp, ebp
push esi
mov word [esp + 0x18], ax
mov word [esp + 0x14], cx
mov word [esp + 0x18], dx
fstp qword [esp + 0x94]
mov dword [esp + 0x54], ebp
mov word [esp + 0x10], ax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x5c], ebp
mov word [esp + 0xc], cx
fstp dword [esp + 8]
fld qword [0x4241c0]
push edi
fsub qword [0x41f418]
mov edi, dword [esp + 0xd4]
lea eax, [esp + 0xa0]
push eax
mov esi, 1
fstp qword [0x4241c0]
lea edx, [esp + 0x90]
push edi
mov dword [esp + 0x94], ebp
mov dword [esp + 0xa8], esi
mov dword [esp + 0xac], esi
mov dword [esp + 0xb0], edx
call fcn.00401dd0
add esp, 8
test eax, eax
jne 0x405ff7
pop edi
pop esi
lea eax, [ebp - 0xc]
pop ebp
add esp, 0xb8
ret
push ebx
push ebp
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.004016c0
mov ebx, dword [esp + 0xec]
push edi
push ebx
call fcn.00403110
add esp, 0x20
test eax, eax
jge 0x4060c0
mov edi, dword [esp + 0xcc]
cmp edi, ebp
je 0x406084
fldz
xor eax, eax
push esi
fstp dword [esp + 0x14]
push edi
mov word [esp + 0x1c], ax
call fcn.00401880
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
add ecx, ecx
add ecx, ecx
push ecx
push ebp
push edx
call fcn.0040b360
mov eax, dword [edi + 8]
add esp, 0xc
mov dword [eax], ebp
mov dword [edi], 1
cmp esi, ebp
jne 0x4069fa
mov eax, dword [esp + 0xd0]
cmp eax, ebp
je 0x4060a3
push ebx
push eax
call fcn.004023c0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
inc dword [0x424dac]
mov ecx, dword [0x424dac]
sub dword [esp + 0x34], ecx
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xb8
ret
lea edx, [esp + 0x28]
push ebx
push edx
call fcn.004023c0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
lea eax, [esp + 0x44]
push edi
push eax
call fcn.004023c0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
mov ecx, dword [ebx + 4]
add ecx, 2
push ecx
lea edx, [esp + 0x54]
mov edi, 1
push edx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x30], edi
call fcn.00401880
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
fldz
lea ecx, [esp + 0x50]
xor eax, eax
fstp dword [esp + 0x10]
push edi
push ecx
mov word [esp + 0x1c], ax
call fcn.00401880
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
lea eax, [edx*4]
push eax
push ebp
push ecx
call fcn.0040b360
mov edx, dword [esp + 0x64]
add esp, 0xc
mov dword [edx], ebp
mov dword [esp + 0x50], edi
cmp esi, ebp
jne 0x4069fa
lea eax, [esp + 0x38]
push 2
push eax
call fcn.00401880
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
lea ecx, [esp + 0x68]
push 3
push ecx
call fcn.00401880
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
lea edx, [esp + 0x44]
push edx
call fcn.00402d40
add esp, 4
and eax, 0x8000001f
jns 0x4061b7
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x406208
mov edi, 0x1f
sub edi, eax
lea edx, [esp + 0x28]
mov ecx, 0xffff9413
push edi
push edx
mov word [0x423594], cx
mov dword [esp + 0x8c], edi
call fcn.00402f20
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
lea eax, [esp + 0x44]
push edi
push eax
call fcn.00402f20
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4069fa
jmp 0x40620f
mov dword [esp + 0x84], ebp
mov ebx, dword [esp + 0x2c]
fld qword [0x425c10]
mov eax, dword [esp + 0x48]
fsub qword [0x41f350]
dec ebx
dec eax
mov edi, ebx
fstp qword [0x425c10]
fld qword [0x425c10]
sub edi, eax
fsub qword [0x41f6e8]
mov ebp, edi
shl ebp, 5
lea ecx, [esp + 0x44]
push ebp
fstp qword [0x424d70]
push ecx
mov dword [esp + 0x68], eax
call fcn.00402f20
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.00401dd0
add esp, 0x10
test eax, eax
jl 0x4062d1
jmp 0x406270
mov cx, word [esp + 0x18]
mov eax, dword [esp + 0x58]
inc dword [eax + edi*4]
movsx edx, cx
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fmul qword [0x425e40]
call fcn.0040b2b0
mov word [esp + 0x18], ax
fld qword [0x425e40]
fsub qword [0x41f350]
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
push ecx
fstp qword [0x425e40]
mov edx, ecx
push edx
call fcn.00404a60
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00401dd0
add esp, 0x14
test eax, eax
jge 0x406270
dec word [0x425e18]
mov dx, word [0x425e18]
mov cx, word [esp + 0x18]
movsx eax, dx
movsx edx, cx
sub edx, eax
add edx, 0x6c96f68a
mov dword [esp + 0x24], edx
lea eax, [esp + 0x44]
push ebp
fild dword [esp + 0x28]
push eax
fstp qword [esp + 0x7c]
call fcn.004020f0
add esp, 8
cmp ebx, dword [esp + 0x60]
mov dword [esp + 0x7c], ebx
jle 0x406882
add edi, edi
add edi, edi
add ebp, 0xffffffe0
mov dword [esp + 0x14], edi
mov dword [esp + 0x24], ebp
lea esp, [esp]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x60]
lea ebp, [ecx + ebx*4]
mov ecx, dword [ebp]
lea eax, [edx + eax*4]
mov dword [esp + 0x10], ebp
cmp ecx, dword [eax]
jb 0x40635f
mov edx, dword [esp + 0x58]
fld1
or esi, 0xffffffff
mov dword [edi + edx - 4], esi
jmp 0x40655a
mov cx, word [esp + 0x1c]
movsx edx, cx
mov ecx, dword [esp + 0x64]
mov esi, dword [eax]
lea edx, [edx + ecx + 0x7ca5b0e8]
mov dword [esp + 0x64], edx
mov eax, dword [esp + 0x34]
mov dword [esp + 0x5c], eax
xor edx, edx
mov edi, esi
fild dword [esp + 0x5c]
shr edi, 0x10
fadd dword [0x424d88]
fmul qword [str.G1_bE]
fstp qword [str.G1_bE]
fld dword [0x424d88]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x424d88]
dec dword [esp + 0x34]
mov ecx, dword [ebp]
mov eax, ecx
div edi
mov dword [esp + 0x5c], 0x662f7a79
mov ebx, eax
movzx eax, word [ebp - 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 0x40641f
inc dword [esp + 0x18]
mov dx, word [esp + 0x18]
movsx edx, dx
mov ebp, 0x206b8181
sub ebp, edx
mov dword [esp + 0x74], ebp
add ecx, esi
dec ebx
fild dword [esp + 0x74]
fmul qword [esp + 0x94]
fstp qword [esp + 0x94]
cmp ecx, esi
jb 0x40641b
cmp ecx, eax
jae 0x40641b
add ecx, esi
dec ebx
cmp ecx, esi
jae 0x406410
mov ebp, dword [esp + 0x10]
sub ecx, eax
fld dword [0x41f6e0]
mov eax, ecx
fstp dword [str.___]
xor edx, edx
div edi
mov edx, eax
imul eax, edi
sub ecx, eax
movzx eax, word [ebp - 4]
shl ecx, 0x10
or ecx, eax
mov eax, dword [0x425da8]
sub eax, 0x6fe19deb
mov dword [esp + 0x10], eax
mov ax, word [0x425cb8]
cwde
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsub dword [0x423550]
fsub dword [0x4241d8]
fcompp
fnstsw ax
fld dword [0x4241d8]
fsub st(1)
fstp dword [0x4241d8]
fld dword [0x423550]
fadd st(1)
fstp dword [0x423550]
test ah, 1
jne 0x4064a9
fld qword [0x423538]
fsub qword [0x41f6d8]
fstp qword [0x423538]
jmp 0x4064b9
mov eax, dword [0x4245f4]
imul eax, eax, 0x990c0694
mov dword [0x4245f4], eax
fld qword [0x424180]
movzx eax, si
fsub qword [0x41f6d0]
mov edi, edx
imul edi, eax
mov ax, word [esp + 0x18]
inc dword [esp + 0x18]
cwde
add eax, 0x76cfc2b3
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fcompp
fnstsw ax
fld qword [0x424180]
fadd st(1)
fstp qword [0x424180]
test ah, 1
jne 0x40650f
fld dword [esp + 0x80]
fadd qword [0x41f6c8]
fstp dword [esp + 0x80]
cmp ecx, edi
jae 0x406535
add ecx, esi
dec edx
cmp ecx, esi
jb 0x406525
cmp ecx, edi
jae 0x406525
add ecx, esi
dec edx
cmp ecx, esi
jae 0x40651a
movzx ecx, word [esp + 0x20]
sub ecx, 0x4162accb
mov word [esp + 0x20], cx
mov ecx, dword [esp + 0x58]
shl ebx, 0x10
or ebx, edx
mov edx, dword [esp + 0x14]
mov eax, 0xffff9405
mov word [0x424df4], ax
mov dword [edx + ecx - 4], ebx
mov ebx, dword [esp + 0x7c]
mov edi, edx
or esi, 0xffffffff
mov ax, word [0x4235cc]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fadd qword [esp + 0x9c]
call fcn.0040b2b0
mov word [0x4235cc], ax
fadd qword [esp + 0x9c]
mov eax, dword [esp + 0x58]
mov ebp, 1
add dword [edi + eax - 4], ebp
fstp qword [esp + 0x9c]
jmp 0x4065a3
or esi, 0xffffffff
add word [0x423094], si
mov dx, word [0x423094]
movsx eax, dx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x58]
add dword [edi + eax - 4], esi
fild dword [esp + 0x10]
lea edx, [esp + 0x38]
xor ecx, ecx
push ebp
fstp qword [esp + 0x78]
push edx
fldz
fstp dword [esp + 0x18]
mov word [esp + 0x1c], cx
call fcn.00401880
mov esi, eax
add esp, 8
test esi, esi
jne 0x4069f8
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
lea ecx, [eax*4]
push ecx
push esi
push edx
call fcn.0040b360
mov eax, dword [esp + 0x4c]
add esp, 0xc
mov dword [eax], esi
mov dword [esp + 0x38], ebp
test esi, esi
jne 0x4069f8
mov ecx, dword [esp + 0x60]
cmp ecx, ebp
jge 0x406625
xor eax, eax
jmp 0x40662d
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x40]
mov dword [edx], eax
fld dword [0x425bc8]
fsub qword [0x41f6c0]
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x40]
fstp dword [0x425bc8]
mov ecx, dword [eax + ecx*4]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x58]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x3c]
push edx
mov eax, edx
push eax
call fcn.004050b0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4069f8
fldz
lea edx, [esp + 0x68]
xor ecx, ecx
fstp dword [esp + 0x10]
push ebp
push edx
mov word [esp + 0x1c], cx
call fcn.00401880
mov esi, eax
add esp, 8
test esi, esi
jne 0x4069f8
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x70]
lea ecx, [eax*4]
push ecx
push esi
push edx
call fcn.0040b360
mov eax, dword [esp + 0x7c]
add esp, 0xc
mov dword [eax], esi
mov dword [esp + 0x68], ebp
test esi, esi
jne 0x4069f8
cmp ebx, 2
jge 0x4066d0
xor eax, eax
jmp 0x4066d8
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx + ebx*4 - 8]
cmp ebx, ebp
mov edx, dword [esp + 0x70]
mov dword [edx], eax
jge 0x4066e6
xor eax, eax
jmp 0x4066ee
mov eax, dword [esp + 0x30]
mov eax, dword [eax + ebx*4 - 4]
mov ecx, dword [esp + 0x70]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x30]
mov eax, dword [edx + ebx*4]
mov ecx, dword [esp + 0x70]
lea edx, [esp + 0x68]
mov dword [ecx + 8], eax
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.00401dd0
add esp, 8
test eax, eax
jg 0x4065a0
mov ecx, dword [esp + 0x58]
mov edx, dword [edi + ecx - 4]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.004050b0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4069f8
mov ebp, dword [esp + 0x24]
lea edx, [esp + 0x38]
push ebp
push edx
call fcn.00402f20
mov esi, eax
add esp, 8
test esi, esi
jne 0x4069f8
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov edx, ecx
push edx
call fcn.00404a60
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4069f8
mov eax, 1
add dword [esp + 0x1c], eax
fld qword [0x424df8]
mov cx, word [esp + 0x1c]
movsx edx, cx
mov ecx, dword [esp + 0x5c]
lea edx, [edx + ecx + 0x13f24997]
mov dword [esp + 0x10], edx
xor ecx, ecx
lea edx, [esp + 0x8c]
fild dword [esp + 0x10]
fsubp st(1)
fstp qword [0x424df8]
mov word [esp + 0x14], cx
fldz
fstp dword [esp + 0x10]
fld qword [0x4241c0]
fsub qword [0x41f418]
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], eax
lea eax, [esp + 0xb0]
mov dword [esp + 0x8c], ecx
push eax
fstp qword [0x4241c0]
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0xc0], edx
call fcn.00401dd0
add esp, 8
test eax, eax
jge 0x406865
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004023c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4069f8
lea ecx, [esp + 0x38]
push ebp
push ecx
call fcn.00402f20
mov esi, eax
add esp, 8
test esi, esi
jne 0x4069f8
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x2c]
push eax
mov ecx, eax
push ecx
call fcn.00404420
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4069f8
mov eax, dword [esp + 0x58]
dec dword [edi + eax - 4]
dec ebx
sub ebp, 0x20
sub edi, 4
cmp ebx, dword [esp + 0x60]
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x14], edi
jg 0x406330
mov edi, dword [esp + 0xcc]
test edi, edi
je 0x4068e4
lea edx, [esp + 0x50]
push edx
push edi
call fcn.004023c0
add dword [esp + 0x6c], 0xc6d0950a
mov eax, dword [esp + 0xdc]
mov ecx, dword [eax]
mov edx, dword [esp + 0xe0]
add esp, 8
imul ecx, dword [edx]
mov dword [edi], ecx
fld dword [0x423578]
fsub qword [0x41f350]
fstp dword [0x423578]
fld dword [0x423578]
fsubr qword [0x41f6b8]
fsub qword [0x425c28]
fmul qword [esp + 0x74]
fstp qword [esp + 0x74]
fld dword [0x424dd4]
mov ebx, 1
fadd qword [0x41f350]
fstp dword [0x424dd4]
fld dword [0x424dd4]
mov ax, word [esp + 0x1c]
add dword [esp + 0x1c], ebx
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fcompp
fnstsw ax
test ah, 0x41
jne 0x406950
fld qword [esp + 0x94]
fsub qword [0x4241f0]
fcomp qword [0x41f6b0]
fnstsw ax
test ah, 0x41
jne 0x406950
mov edx, dword [esp + 0x34]
mov ecx, dword [0x425da0]
mov eax, 0x3665f803
sub eax, edx
sub eax, ecx
mov dword [0x4259fc], eax
mov edi, dword [esp + 0xd0]
test edi, edi
je 0x4069e0
mov edx, dword [esp + 0x84]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.004020f0
lea ecx, [esp + 0x30]
push ecx
push edi
call fcn.004023c0
fldz
mov edx, dword [esp + 0xe4]
mov eax, dword [edx]
mov dword [edi], eax
xor ecx, ecx
mov word [esp + 0x24], cx
fstp dword [esp + 0x20]
fld qword [0x4241c0]
lea eax, [esp + 0xcc]
fsub qword [0x41f418]
push eax
lea edx, [esp + 0x9c]
push edi
fstp qword [0x4241c0]
mov dword [esp + 0xa0], ecx
mov dword [esp + 0xd4], ebx
mov dword [esp + 0xd8], ebx
mov dword [esp + 0xdc], edx
call fcn.00401dd0
add esp, 0x18
test eax, eax
jne 0x4069e0
mov dword [edi], ebx
fld dword [0x423520]
fsub qword [0x41f6a8]
fmul qword [0x425e68]
fstp qword [0x425e68]
xor ebp, ebp
push ebp
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00401310
fld dword [0x4235e0]
fmul qword [0x41f6a0]
add esp, 0x18
pop ebx
pop edi
mov eax, esi
fstp dword [0x4235e0]
pop esi
pop ebp
add esp, 0xb8
ret