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

Disassembly:
sub esp, 0x98
fldz
xor eax, eax
mov word [esp + 0x10], ax
fst qword [esp + 0x80]
fldz
push ebp
xor ebp, ebp
xor ecx, ecx
mov word [esp + 0x30], cx
mov dword [esp + 0x1c], ebp
fst dword [esp + 0x28]
xor edx, edx
mov word [esp + 0x24], dx
mov word [esp + 0x34], ax
fst dword [esp + 0x18]
mov dword [esp + 0x20], ebp
fstp dword [esp + 0x50]
mov dword [esp + 0x10], ebp
fld qword [0x425df0]
fsub qword [0x41f768]
mov dword [esp + 0x8c], ebp
push esi
push edi
mov edi, dword [esp + 0xb4]
fstp qword [0x425df0]
lea edx, [esp + 0x98]
fstp qword [esp + 0x10]
mov dword [esp + 0x7c], ebp
fld qword [0x4242d8]
mov esi, 1
fadd qword [0x41f348]
lea ecx, [esp + 0x94]
push edx
push edi
fstp qword [0x4242d8]
fld qword [0x424b58]
fsub qword [0x4242d8]
mov dword [esp + 0xa0], esi
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa8], ecx
fstp qword [0x424b58]
mov dword [esp + 0x84], 0x227a978b
call fcn.004025d0
add esp, 8
test eax, eax
jne 0x405b22
pop edi
pop esi
lea eax, [ebp - 0xc]
pop ebp
add esp, 0x98
ret
push ebx
push ebp
lea eax, [esp + 0x88]
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.004022e0
mov ebx, dword [esp + 0xcc]
push edi
push ebx
call fcn.00401240
add esp, 0x20
test eax, eax
jge 0x405bde
mov edi, dword [esp + 0xac]
cmp edi, ebp
je 0x405bb2
fldz
xor edx, edx
push esi
fstp dword [esp + 0x18]
push edi
mov word [esp + 0x38], dx
call fcn.00401d90
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
add eax, eax
add eax, eax
push eax
push ebp
push ecx
call fcn.0040ae70
mov edx, dword [edi + 8]
add esp, 0xc
mov dword [edx], ebp
mov dword [edi], 1
cmp esi, ebp
jne 0x4065d4
mov eax, dword [esp + 0xb0]
cmp eax, ebp
je 0x405bd1
push ebx
push eax
call fcn.00402c20
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x98
ret
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.00402c20
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
lea ecx, [esp + 0x60]
push edi
push ecx
call fcn.00402c20
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
fld dword [esp + 0x24]
mov edx, dword [ebx + 4]
fsub qword [0x41f760]
add edx, 2
mov edi, 1
push edx
lea eax, [esp + 0x70]
mov dword [esp + 0x64], edi
mov dword [esp + 0x48], edi
fstp dword [esp + 0x28]
push eax
call fcn.00401d90
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
fldz
lea edx, [esp + 0x6c]
xor ecx, ecx
fstp dword [esp + 0x14]
push edi
push edx
mov word [esp + 0x40], cx
call fcn.00401d90
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
lea ecx, [eax*4]
push ecx
push ebp
push edx
call fcn.0040ae70
mov eax, dword [esp + 0x80]
add esp, 0xc
mov dword [eax], ebp
mov dword [esp + 0x6c], edi
cmp esi, ebp
jne 0x4065d4
lea ecx, [esp + 0x50]
push 2
push ecx
call fcn.00401d90
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
mov dx, word [esp + 0x30]
lea eax, [esp + 0x84]
push 3
push eax
mov word [esp + 0x48], dx
call fcn.00401d90
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
lea ecx, [esp + 0x60]
push ecx
call fcn.004019e0
add esp, 4
and eax, 0x8000001f
jns 0x405cf3
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x405dc4
fld dword [esp + 0x5c]
mov edx, dword [esp + 0x2c]
fsub qword [0x41f758]
mov edi, 0x1f
sub edi, eax
mov eax, 0x7699bc80
sub eax, edx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
mov dword [esp + 0x80], edi
fcompp
fnstsw ax
test ah, 0x41
jp 0x405d8d
fld dword [0x424454]
fsub qword [0x41f348]
fstp dword [0x424454]
inc dword [esp + 0x28]
mov ecx, dword [0x424340]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fsub dword [0x424454]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x405d8d
fld dword [0x423d4c]
mov ax, word [esp + 0x3c]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fmulp st(1)
fstp dword [0x423d4c]
lea edx, [esp + 0x44]
push edi
push edx
call fcn.004034a0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
lea eax, [esp + 0x60]
push edi
push eax
call fcn.004034a0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4065d4
mov edi, 1
jmp 0x405dcb
mov dword [esp + 0x80], ebp
mov cx, word [0x424b88]
mov edx, dword [str.7bO]
movsx eax, cx
or ebx, 0xffffffff
add word [0x424b88], bx
add dword [str.7bO], ebx
add edx, eax
cmp edx, 0x55bb5a17
jl 0x405e35
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fadd qword [0x424798]
mov ecx, dword [esp + 0x2c]
mov dx, word [esp + 0x3c]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
movsx eax, dx
mov dword [esp + 0x10], eax
faddp st(1)
fild dword [esp + 0x10]
faddp st(1)
call fcn.0040aef0
mov word [esp + 0x3c], ax
add dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x48]
add dword [esp + 0x1c], edi
mov ecx, dword [esp + 0x1c]
sub ecx, 0x148a8521
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
dec ebx
fadd qword [0x424798]
fcomp qword [0x41f750]
fnstsw ax
test ah, 0x44
jnp 0x405e89
mov edx, dword [0x424440]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fstp dword [esp + 0x10]
fld dword [0x424b60]
fadd dword [esp + 0x10]
call fcn.0040aef0
mov dword [0x424440], eax
mov eax, dword [esp + 0x64]
dec eax
mov edi, ebx
sub edi, eax
mov ebp, edi
mov dword [esp + 0x7c], eax
shl ebp, 5
lea eax, [esp + 0x60]
push ebp
push eax
call fcn.004034a0
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x50]
push edx
call fcn.004025d0
add esp, 0x10
test eax, eax
jl 0x405f06
lea esp, [esp]
mov eax, dword [esp + 0x74]
inc dword [eax + edi*4]
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x48]
push ecx
mov edx, ecx
push edx
call fcn.00404de0
mov ax, word [0x4242d0]
movsx ecx, ax
mov dword [esp + 0x1c], ecx
lea edx, [esp + 0x6c]
push edx
fild dword [esp + 0x20]
lea eax, [esp + 0x54]
push eax
fstp qword [0x4245d0]
call fcn.004025d0
add esp, 0x14
test eax, eax
jge 0x405ec0
movzx ecx, word [0x4244a0]
lea edx, [esp + 0x60]
add ecx, 0x5dbd1315
push ebp
mov word [0x4244a0], cx
push edx
call fcn.00401aa0
add dword [0x424700], 0xecd87f43
fld1
add esp, 8
cmp ebx, dword [esp + 0x7c]
mov dword [esp + 0x30], ebx
jle 0x4064ac
lea eax, [edi*4]
add ebp, 0xffffffe0
mov dword [esp + 0x78], eax
mov dword [esp + 0x10], ebp
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x68]
lea ebp, [ecx + edx*4]
mov ecx, dword [esp + 0x7c]
mov edi, dword [eax + ecx*4]
mov dword [esp + 0x14], ebp
cmp dword [ebp], edi
jb 0x405f88
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x78]
mov dword [eax + edx - 4], 0xffffffff
jmp 0x406119
fld dword [0x424328]
xor edx, edx
fsub qword [0x41f748]
mov ebx, edi
shr ebx, 0x10
movzx ecx, di
fstp dword [0x424328]
mov esi, dword [ebp]
mov eax, esi
div ebx
mov edx, eax
imul edx, ebx
sub esi, edx
movzx edx, word [ebp - 2]
mov ebp, eax
imul ebp, ecx
shl esi, 0x10
or esi, edx
movzx edx, word [0x423158]
add edx, 0x6a66376a
mov dword [esp + 0x38], eax
mov word [0x423158], dx
cmp esi, ebp
jae 0x405ff6
dec eax
add esi, edi
mov dword [esp + 0x38], eax
cmp esi, edi
jb 0x405ff6
cmp esi, ebp
jae 0x405ff2
add esi, edi
dec eax
cmp esi, edi
jae 0x405fe7
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fadd dword [esp + 0x34]
call fcn.0040aef0
mov dword [esp + 0x1c], eax
fld dword [0x424b60]
fsub qword [0x41f740]
sub esi, ebp
mov eax, esi
xor edx, edx
div ebx
fstp dword [0x424b60]
movzx ecx, word [esp + 0x20]
imul ecx, ecx, 0x4b0f102b
mov word [esp + 0x20], cx
mov edx, dword [0x424310]
mov ebp, eax
mov ecx, ebp
imul ecx, ebx
mov eax, 0xa7cd2ff5
sub eax, edx
mov edx, dword [esp + 0x14]
mov word [0x42477c], ax
movzx eax, word [edx - 4]
fld qword [0x424738]
fsub qword [0x41f738]
sub esi, ecx
shl esi, 0x10
or esi, eax
fstp qword [0x424738]
movzx ecx, di
mov eax, ebp
imul eax, ecx
cmp esi, eax
jae 0x4060a0
mov ecx, dword [esp + 0x28]
imul ecx, ecx, 0xa127d62f
add esi, edi
dec ebp
mov dword [esp + 0x28], ecx
cmp esi, edi
jb 0x4060a0
cmp esi, eax
jae 0x4060a0
add esi, edi
dec ebp
cmp esi, edi
jae 0x406095
fld dword [0x425e24]
fadd st(1)
fstp dword [0x425e24]
mov dx, word [0x4242cc]
movsx eax, dx
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fsub dword [0x425e24]
fcomp qword [0x41f730]
fnstsw ax
test ah, 5
jp 0x406104
mov cx, word [0x424664]
movsx edx, cx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fadd qword [0x424b38]
call fcn.0040aef0
mov word [0x424664], ax
fld qword [0x424b38]
fsub st(1)
fstp qword [0x424b38]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x78]
shl eax, 0x10
or eax, ebp
mov dword [edx + ecx - 4], eax
fld dword [esp + 0x24]
mov eax, dword [0x423164]
fsub qword [0x41f728]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fmulp st(1)
call fcn.0040aef0
mov edi, dword [esp + 0x78]
mov dword [0x423164], eax
fadd dword [esp + 0x24]
mov eax, dword [esp + 0x74]
mov ebp, 1
add dword [edi + eax - 4], ebp
fstp dword [esp + 0x24]
or ebx, 0xffffffff
jmp 0x406160
fld dword [esp + 0x5c]
mov eax, dword [esp + 0x74]
fsub qword [0x41f720]
add dword [edi + eax - 4], ebx
lea edx, [esp + 0x50]
xor ecx, ecx
fstp dword [esp + 0x5c]
push ebp
fldz
push edx
fstp dword [esp + 0x1c]
mov word [esp + 0x40], cx
call fcn.00401d90
mov esi, eax
add esp, 8
test esi, esi
jne 0x4065d2
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
lea ecx, [eax*4]
push ecx
push esi
push edx
call fcn.0040ae70
mov eax, dword [esp + 0x64]
add esp, 0xc
mov dword [eax], esi
mov dword [esp + 0x50], ebp
test esi, esi
jne 0x4065d2
mov ecx, dword [esp + 0x7c]
cmp ecx, ebp
jge 0x4061d3
xor eax, eax
jmp 0x4061db
mov edx, dword [esp + 0x68]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x58]
mov dword [edx], eax
movzx eax, word [esp + 0x40]
movsx edx, ax
movzx eax, word [esp + 0x20]
cwde
lea edx, [edx + eax + 0x38c09f2d]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmul qword [esp + 0x90]
fstp qword [esp + 0x90]
add dword [esp + 0x40], ebp
mov eax, dword [esp + 0x68]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x58]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x74]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x54]
push edx
mov eax, edx
push eax
call fcn.00404870
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4065d2
fldz
lea edx, [esp + 0x84]
xor ecx, ecx
fstp dword [esp + 0x14]
push ebp
push edx
mov word [esp + 0x40], cx
call fcn.00401d90
mov esi, eax
add esp, 8
test esi, esi
jne 0x4065d2
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x8c]
lea ecx, [eax*4]
push ecx
push esi
push edx
call fcn.0040ae70
mov eax, dword [esp + 0x98]
add esp, 0xc
mov dword [eax], esi
mov dword [esp + 0x84], ebp
test esi, esi
jne 0x4065d2
mov eax, dword [esp + 0x30]
cmp eax, 2
jge 0x4062ae
xor ecx, ecx
jmp 0x4062b6
mov ecx, dword [esp + 0x4c]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, ebp
mov edx, dword [esp + 0x8c]
mov dword [edx], ecx
jge 0x4062c7
xor ecx, ecx
jmp 0x4062cf
mov ecx, dword [esp + 0x4c]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x8c]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x4c]
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 + 0x54]
push edx
call fcn.004025d0
add esp, 8
test eax, eax
jg 0x406160
mov eax, dword [esp + 0x74]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x58]
push eax
call fcn.00404870
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4065d2
mov ebx, dword [esp + 0x10]
lea ecx, [esp + 0x50]
push ebx
push ecx
call fcn.004034a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4065d2
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x48]
push eax
mov ecx, eax
push ecx
call fcn.00404de0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4065d2
push eax
lea edx, [esp + 0x48]
push edx
call fcn.004032b0
add esp, 8
test eax, eax
jge 0x40644f
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00402c20
mov esi, eax
add esp, 8
test esi, esi
jne 0x4065d2
mov dx, word [esp + 0x20]
movsx eax, dx
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fsub dword [esp + 0x5c]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
fisub dword [esp + 0x14]
call fcn.0040aef0
lea edx, [esp + 0x50]
push ebx
push edx
mov dword [esp + 0x30], eax
call fcn.004034a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4065d2
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x48]
push ecx
mov edx, ecx
push edx
call fcn.00404780
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4065d2
fld dword [esp + 0x5c]
mov eax, dword [0x424b2c]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fcompp
fnstsw ax
test ah, 5
jp 0x406447
dec dword [esp + 0x3c]
mov cx, word [esp + 0x3c]
movsx edx, cx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fsub qword [esp + 0x90]
mov eax, dword [0x424628]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
faddp st(1)
call fcn.0040aef0
mov dword [0x424628], eax
mov eax, dword [esp + 0x74]
dec dword [edi + eax - 4]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fld dword [0x42445c]
fadd qword [0x41f718]
fsub qword [0x41f710]
fsubp st(1)
call fcn.0040aef0
mov dword [esp + 0x28], eax
fld dword [0x42445c]
fld1
mov eax, dword [esp + 0x30]
fsub st(1), st(0)
sub eax, ebp
sub ebx, 0x20
fxch st(1)
sub edi, 4
cmp eax, dword [esp + 0x7c]
fstp dword [0x42445c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x78], edi
jg 0x405f54
mov edi, dword [esp + 0xac]
test edi, edi
je 0x4064e8
lea edx, [esp + 0x6c]
fstp st(0)
push edx
push edi
call fcn.00402c20
fld1
add dword [0x4250dc], 0xb6e64c79
mov eax, dword [esp + 0xbc]
mov ecx, dword [eax]
mov edx, dword [esp + 0xc0]
add esp, 8
imul ecx, dword [edx]
mov dword [edi], ecx
mov ax, word [0x424b08]
mov cx, word [esp + 0x20]
inc word [0x424b08]
cmp cx, ax
jne 0x406536
fld dword [esp + 0x34]
mov dx, word [0x423da8]
fadd qword [0x41f708]
movsx eax, dx
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
faddp st(1)
fadd dword [esp + 0x24]
fstp dword [esp + 0x24]
dec word [0x423da8]
fld dword [esp + 0x34]
fadd st(1)
fstp dword [esp + 0x34]
mov edi, dword [esp + 0xb0]
test edi, edi
je 0x406582
mov ecx, dword [esp + 0x80]
fstp st(0)
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.00401aa0
lea eax, [esp + 0x4c]
push eax
push edi
call fcn.00402c20
mov ecx, dword [esp + 0xc4]
mov edx, dword [ecx]
push 0
push edi
mov dword [edi], edx
call fcn.004032b0
fld1
add esp, 0x18
test eax, eax
jne 0x406582
mov dword [edi], 1
fld dword [esp + 0x24]
fsubr qword [0x41f700]
fcomp qword [0x41f6f8]
fnstsw ax
test ah, 0x44
jnp 0x4065d0
fld qword [0x4242e0]
mov eax, dword [esp + 0x2c]
fadd qword [0x41f6f0]
mov dword [esp + 0x14], eax
fsubr qword [0x41f6e8]
fild dword [esp + 0x14]
faddp st(1)
call fcn.0040aef0
mov dword [esp + 0x2c], eax
fadd qword [0x4242e0]
fstp qword [0x4242e0]
jmp 0x4065d2
fstp st(0)
xor ebp, ebp
push ebp
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.004010c0
mov eax, dword [esp + 0x44]
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
add esp, 0x18
fld dword [esp + 0x34]
fsub qword [0x41f6e0]
fucompp
fnstsw ax
fld dword [esp + 0x34]
fsub qword [0x41f348]
fstp dword [esp + 0x34]
test ah, 0x44
jnp 0x406657
dec dword [esp + 0x20]
mov cx, word [esp + 0x40]
mov ax, word [esp + 0x20]
movsx edx, cx
movsx ecx, ax
mov eax, dword [0x4245b0]
add edx, ecx
imul edx, eax
pop ebx
pop edi
mov eax, esi
pop esi
mov dword [0x4245b0], edx
pop ebp
add esp, 0x98
ret
mov cx, word [esp + 0x40]
movsx edx, cx
mov dword [esp + 0x14], edx
pop ebx
pop edi
fild dword [esp + 0xc]
mov eax, esi
pop esi
pop ebp
fadd qword [0x4242b0]
fstp qword [0x4242b0]
add esp, 0x98
ret