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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x38c
fldz
push ebx
push esi
xor esi, esi
mov dword [esp + 0x3c], esi
fst qword [esp + 0x6c]
xor eax, eax
mov word [esp + 0x28], ax
mov dword [esp + 0xc], esi
xor ecx, ecx
mov word [esp + 0x30], cx
fst qword [esp + 0x64]
fst qword [esp + 0x34]
mov eax, 1
fldz
mov dword [esp + 0x7c], eax
fst dword [esp + 0x44]
mov dword [esp + 0x80], eax
fst dword [esp + 0x40]
mov dword [esp + 0x78], esi
fstp dword [esp + 0x10]
lea edx, [esp + 0x78]
push edi
fstp qword [esp + 0x20]
fld qword [esp + 0x20]
fsub qword [0x41f348]
fsub qword [0x41f340]
fstp dword [esp + 0x14]
fld qword [esp + 0x20]
mov dword [esp + 0x88], edx
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x20]
mov eax, dword [0x437748]
mov dword [esp + 0xc], eax
fild dword [esp + 0xc]
fld dword [esp + 0x14]
fsub qword [0x41f338]
fadd dword [0x437510]
fsubp st(1)
call fcn.0040b2f0
mov edi, dword [ebp + 0x14]
mov dword [0x437748], eax
fsubr dword [esp + 0x14]
lea ecx, [esp + 0x80]
push ecx
push edi
fstp dword [esp + 0x1c]
call fcn.00401b00
add esp, 8
test eax, eax
jl 0x406663
mov edx, dword [edi + 8]
test byte [edx], 1
je 0x406663
lea eax, [esp + 0x28]
push edi
push eax
call fcn.004014e0
push esi
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x6c]
push edx
call fcn.00401730
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
push 0x300
lea ecx, [esp + 0xb0]
push esi
fadd qword [0x4376e8]
push ecx
fsub qword [esp + 0x88]
fmul qword [esp + 0x90]
fstp qword [esp + 0x90]
dec dword [esp + 0x30]
call fcn.0040b8d0
mov edx, dword [ebp + 0x10]
push edx
call fcn.00401c30
add esp, 0x24
cmp eax, 0x29f
jle 0x405e97
mov dword [esp + 0x1c], 6
jmp 0x405ec7
cmp eax, 0xef
jle 0x405ea8
mov dword [esp + 0x1c], 5
jmp 0x405ec7
cmp eax, 0x4f
jle 0x405eb7
mov dword [esp + 0x1c], 4
jmp 0x405ec7
xor ecx, ecx
cmp eax, 0x17
setg cl
lea ecx, [ecx + ecx + 1]
mov dword [esp + 0x1c], ecx
mov ebx, dword [edi + 4]
mov edx, dword [ebp + 8]
inc ebx
push ebx
push edx
call fcn.00402250
add esp, 8
mov dword [esp + 0x18], eax
cmp eax, esi
jne 0x4065e2
lea eax, [esp + 0xa4]
push ebx
push eax
call fcn.00402250
add esp, 8
mov dword [esp + 0x18], eax
cmp eax, esi
jne 0x4065e2
lea ecx, [ebx + ebx]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00402250
add esp, 8
mov dword [esp + 0x18], eax
cmp eax, esi
jne 0x4065e2
mov ebx, dword [ebp + 0x18]
cmp ebx, esi
je 0x405f40
cmp dword [ebx + 8], esi
je 0x405f40
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], edx
jmp 0x405fb8
lea eax, [esp + 0x5c]
push 1
push eax
call fcn.00402ef0
add esp, 8
mov dword [esp + 0x18], eax
cmp eax, esi
jne 0x4065e5
mov ecx, dword [edi + 4]
shl ecx, 6
push ecx
lea edx, [esp + 0x60]
push edx
call fcn.00403e40
add esp, 8
mov dword [esp + 0x18], eax
cmp eax, esi
jne 0x4065e5
add dword [esp + 0x10], 0xedc332d9
lea eax, [esp + 0x5c]
push edi
push eax
mov ecx, eax
push ecx
call fcn.00405b50
add esp, 0xc
mov dword [esp + 0x18], eax
cmp eax, esi
jne 0x4065e5
cmp ebx, esi
je 0x405fb8
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [ebx], edx
mov dword [ebx + 4], eax
mov dword [ebx + 8], ecx
mov esi, dword [ebp + 0xc]
push edi
push esi
call fcn.00401b00
add esp, 8
test eax, eax
jl 0x405fdd
push edi
lea edx, [esp + 0xa8]
push esi
push edx
call fcn.00405b50
add esp, 0xc
jmp 0x405fee
lea eax, [esp + 0xa4]
push esi
push eax
call fcn.00403b40
add esp, 8
mov esi, dword [esp + 0x28]
lea ecx, [esp + 0x50]
push ecx
push esi
push edi
lea edx, [esp + 0x68]
push edx
lea eax, [esp + 0xb4]
push eax
call fcn.00402a60
mov ebx, dword [ebp + 8]
lea ecx, [esp + 0x70]
push ecx
push ebx
call fcn.00403b40
add esp, 0x1c
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4065e2
lea edx, [esp + 0x50]
push edx
push esi
push edi
push ebx
call fcn.004031c0
mov ecx, dword [esp + 0x2c]
add esp, 0x10
cmp ecx, 1
jle 0x406189
fld dword [0x437930]
mov ax, word [esp + 0x34]
movsx edx, ax
mov dword [esp + 0xc], edx
dec ecx
mov esi, 1
fild dword [esp + 0xc]
shl esi, cl
fsubp st(1)
fstp dword [0x437930]
mov eax, dword [edi + 4]
inc eax
lea ebx, [esi + esi*2]
push eax
lea ebx, [esp + ebx*4 + 0x9c]
push ebx
call fcn.00402250
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4065e2
lea ecx, [esp + 0xa4]
push ecx
push ebx
call fcn.00403b40
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4065e2
fld qword [0x437408]
call fcn.0040b2f0
mov dword [0x4375e8], eax
fld qword [0x437408]
fld1
mov eax, dword [esp + 0x1c]
fadd st(1), st(0)
dec eax
fxch st(1)
fstp qword [0x437408]
test eax, eax
jle 0x4060fe
fstp st(0)
mov dword [esp + 0xc], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x50]
push edx
push eax
push edi
push ebx
push ebx
call fcn.00402a60
add esp, 0x14
sub dword [esp + 0xc], 1
jne 0x4060e0
fld1
movzx ecx, word [esp + 0x2c]
imul ecx, ecx, 0xaf030177
mov word [esp + 0x2c], cx
mov ecx, dword [esp + 0x1c]
mov eax, 1
shl eax, cl
lea ebx, [esi + 1]
cmp ebx, eax
mov dword [esp + 0xc], eax
jge 0x40618b
lea esi, [ebx + ebx*2]
fstp st(0)
lea esi, [esp + esi*4 + 0x98]
mov edx, dword [edi + 4]
inc edx
push edx
push esi
call fcn.00402250
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4065e2
lea eax, [esi - 0xc]
push eax
push esi
call fcn.00403b40
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4065e2
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x50]
push ecx
push edx
push edi
lea eax, [esp + 0xb0]
push eax
push esi
call fcn.00402a60
inc ebx
add esp, 0x14
add esi, 0xc
cmp ebx, dword [esp + 0xc]
jl 0x406130
fld1
mov cx, word [esp + 0x34]
movsx edx, cx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0xc], edx
mov eax, 1
xor ebx, ebx
fild dword [esp + 0xc]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x4c], ebx
fstp dword [esp + 0x48]
add dword [esp + 0x34], eax
mov edx, dword [ecx + 4]
add dword [esp + 0x2c], eax
mov ax, word [esp + 0x2c]
movsx ecx, ax
add ecx, dword [esp + 0x10]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
fld qword [esp + 0x70]
fsubr qword [0x41f558]
fstp qword [0x437670]
mov dword [esp + 0x30], ebx
cmp dword [esp + 0x14], 0
jne 0x406250
fld qword [0x437610]
mov esi, 1
fadd st(1)
fstp qword [0x437610]
add dword [esp + 0x10], esi
fld qword [0x437610]
mov edx, dword [esp + 0x10]
mov ax, word [0x43773c]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
movsx ecx, ax
mov dword [esp + 0x14], ecx
faddp st(1)
fild dword [esp + 0x14]
faddp st(1)
call fcn.0040b2f0
mov word [0x43773c], ax
mov eax, dword [esp + 0xc]
mov edx, eax
sub eax, esi
mov dword [esp + 0xc], eax
test edx, edx
je 0x4063f8
mov dword [esp + 0x14], 0x20
mov ax, word [esp + 0x34]
movsx ecx, ax
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fadd qword [esp + 0x70]
call fcn.0040b2f0
mov edx, dword [ebp + 0x10]
mov ecx, dword [esp + 0xc]
dec dword [esp + 0x14]
mov word [esp + 0x34], ax
fld qword [esp + 0x70]
mov eax, dword [edx + 8]
fsub st(1)
mov esi, dword [eax + ecx*4]
mov ecx, dword [esp + 0x14]
fstp qword [esp + 0x70]
shr esi, cl
fld qword [esp + 0x68]
fadd st(1)
and esi, 1
fstp qword [esp + 0x68]
fld qword [esp + 0x68]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fmulp st(1)
call fcn.0040b2f0
mov dword [esp + 0x40], eax
test esi, esi
jne 0x4062ed
cmp dword [esp + 0x4c], esi
je 0x4061e4
cmp dword [esp + 0x4c], 1
jne 0x4062ed
mov ecx, dword [esp + 0x28]
fstp st(0)
lea eax, [esp + 0x50]
push eax
mov eax, dword [ebp + 8]
push ecx
push edi
push eax
push eax
call fcn.00402a60
fld1
add esp, 0x14
jmp 0x4061e4
fld dword [esp + 0x48]
mov dword [esp + 0x4c], 2
fadd qword [0x437410]
fcomp qword [0x41f550]
fnstsw ax
fld dword [esp + 0x48]
fadd st(1)
fstp dword [esp + 0x48]
test ah, 0x41
jne 0x406355
fld dword [0x437524]
or eax, 0xffffffff
fsub st(1)
fstp dword [0x437524]
add dword [0x4376f4], eax
fld dword [0x437524]
mov edx, dword [0x4376f4]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x20], edx
fisub dword [esp + 0x20]
mov dword [esp + 0x20], ecx
fisub dword [esp + 0x20]
fstp dword [esp + 0x44]
add dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
inc eax
mov ecx, edx
sub ecx, eax
shl esi, cl
mov dword [esp + 0x30], eax
or ebx, esi
cmp eax, edx
jne 0x4061e4
mov esi, dword [esp + 0x28]
fstp st(0)
mov eax, edx
test eax, eax
jle 0x40639d
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 8]
lea edx, [esp + 0x50]
push edx
push esi
push edi
push eax
push eax
call fcn.00402a60
add esp, 0x14
sub dword [esp + 0x30], 1
jne 0x406382
lea eax, [esp + 0x50]
push eax
mov eax, dword [ebp + 8]
push esi
lea ecx, [ebx + ebx*2]
push edi
lea edx, [esp + ecx*4 + 0xa4]
push edx
push eax
call fcn.00402a60
fld qword [0x4378e0]
fsubr qword [0x41f548]
add esp, 0x14
fld dword [0x437570]
mov dword [esp + 0x4c], 1
fsubp st(1)
xor ebx, ebx
fsubr qword [esp + 0x38]
fstp qword [esp + 0x38]
fld qword [0x4378e0]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [0x4378e0]
jmp 0x4061e0
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
rol esi, cl
test eax, eax
jle 0x40647f
fstp st(0)
mov dword [esp + 0xc], eax
mov edx, dword [esp + 0x28]
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x50]
push ecx
push edx
push edi
push eax
push eax
call fcn.00402a60
mov ecx, 1
add dword [esp + 0x54], ecx
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x54]
sub eax, edx
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
add ebx, ebx
add esp, 0x14
fmul qword [esp + 0x68]
fstp qword [esp + 0x68]
test ebx, esi
je 0x406475
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x50]
push eax
mov eax, dword [ebp + 8]
push ecx
push edi
lea edx, [esp + 0xb0]
push edx
push eax
call fcn.00402a60
add esp, 0x14
mov ecx, 1
sub dword [esp + 0xc], ecx
jne 0x406410
fld1
jmp 0x406484
mov ecx, 1
fld qword [0x4377a0]
fsub st(1)
fstp qword [0x4377a0]
fld dword [0x4378b4]
fadd st(1)
fstp dword [0x4378b4]
fld qword [0x4377a0]
fld dword [0x4378b4]
fadd dword [esp + 0x44]
fucompp
fnstsw ax
fld dword [esp + 0x44]
fsub st(1)
fstp dword [esp + 0x44]
test ah, 0x44
jp 0x40653f
movzx edx, word [str.Jn_a]
movsx edx, dx
mov eax, 0x5d57af54
sub eax, edx
mov edx, dword [0x437788]
add eax, edx
movzx edx, word [esp + 0x2c]
add word [str.Jn_a], cx
dec dword [esp + 0x2c]
movsx edx, dx
add edx, 0x3da9652e
cmp edx, eax
jg 0x40651a
fld qword [esp + 0x38]
fsub qword [0x41f540]
fsub qword [0x41f538]
fadd qword [esp + 0x68]
fstp qword [esp + 0x68]
jmp 0x406591
add dword [esp + 0x10], ecx
fstp st(0)
mov eax, dword [esp + 0x10]
add eax, 0x55942385
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fmul dword [0x437930]
fstp dword [0x437930]
jmp 0x406599
add word [0x4374fc], cx
fld qword [esp + 0x38]
mov dx, word [0x4374fc]
fadd qword [0x41f530]
movsx eax, dx
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
faddp st(1)
fcomp qword [0x41f528]
fnstsw ax
fld qword [esp + 0x38]
fadd st(1)
fstp qword [esp + 0x38]
test ah, 1
jne 0x40658b
mov edx, 0x55b0
fstp st(0)
mov word [0x437564], dx
jmp 0x406599
fld qword [esp + 0x38]
fstp st(0)
fsubr qword [esp + 0x38]
fstp qword [esp + 0x38]
mov edx, dword [esp + 0x28]
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x78], ecx
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], ecx
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [ebp + 8]
push edx
lea eax, [esp + 0x80]
mov dword [esp + 0x9c], eax
push edi
lea eax, [esp + 0x98]
push eax
push ecx
call fcn.00402a60
add esp, 0x14
mov ebx, dword [ebp + 0x18]
mov esi, dword [esp + 0x1c]
lea ecx, [esi - 1]
mov eax, 1
shl eax, cl
mov edx, 1
mov ecx, esi
shl edx, cl
cmp eax, edx
jge 0x406623
lea edi, [eax + eax*2]
sub edx, eax
lea edi, [esp + edi*4 + 0x98]
mov esi, edx
mov edi, edi
push 0
push edi
call fcn.00401790
add esp, 8
add edi, 0xc
sub esi, 1
jne 0x406610
push 0
lea edx, [esp + 0x54]
lea eax, [esp + 0xa8]
test ebx, ebx
je 0x406649
push edx
push eax
call fcn.00401790
mov eax, dword [esp + 0x24]
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x60]
push ecx
push edx
push eax
call fcn.00401790
mov eax, dword [esp + 0x28]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xfffffffc
pop ebx
mov esp, ebp
pop ebp
ret