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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94
fldz
push ebx
fst qword [esp + 0x90]
push esi
xor esi, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x70], esi
fstp qword [esp + 0x74]
fldz
mov dword [esp + 0x30], esi
fst dword [esp + 0x90]
push edi
mov edi, dword [ebp + 0x14]
xor eax, eax
mov word [esp + 0xc], ax
mov dword [esp + 0x50], esi
xor ecx, ecx
mov word [esp + 0x14], cx
xor edx, edx
push esi
mov word [esp + 0x14], dx
fstp dword [esp + 0x20]
push edi
call fcn.00403450
add esp, 8
test eax, eax
jne 0x4055fb
lea eax, [esi - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fld dword [esp + 0x94]
mov ax, word [esp + 0xc]
movsx ecx, ax
mov edx, 0x71a1be7b
sub edx, ecx
add edx, dword [esp + 0x50]
push esi
mov dword [esp + 0x1c], edx
lea eax, [esp + 0x8c]
push eax
fisub dword [esp + 0x20]
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x4c]
fstp dword [esp + 0xa8]
push ecx
call fcn.00401d90
mov ebx, dword [ebp + 0x10]
mov edx, 0xffffaaad
push edi
push ebx
mov word [esp + 0x30], dx
call fcn.00401700
add esp, 0x20
test eax, eax
jge 0x4056d9
mov edi, dword [ebp + 8]
cmp edi, esi
je 0x4056b5
fldz
xor eax, eax
push 1
mov word [esp + 0x14], ax
fstp qword [esp + 0x9c]
push edi
call fcn.004024d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
add ecx, ecx
add ecx, ecx
push ecx
push eax
push edx
call fcn.0040af50
mov eax, dword [edi + 8]
add esp, 0xc
mov dword [eax], esi
mov dword [edi], 1
test esi, esi
jne 0x405fd8
mov eax, dword [ebp + 0xc]
cmp eax, esi
je 0x4056d0
push ebx
push eax
call fcn.00403f50
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fld qword [esp + 0x78]
lea ecx, [esp + 0x38]
fsub qword [0x41e368]
push ebx
push ecx
fstp qword [esp + 0x80]
fld qword [esp + 0x80]
fsub qword [0x41e6c0]
fmul qword [0x423d00]
fstp qword [0x423d00]
call fcn.00403f50
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
fld qword [0x422ef8]
mov edx, dword [0x423c94]
fsub qword [0x41e6b8]
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fmulp st(1)
call fcn.0040a9e0
mov dword [0x423c94], eax
lea eax, [esp + 0x60]
push edi
push eax
call fcn.00403f50
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
mov ecx, dword [ebx + 4]
add ecx, 2
push ecx
lea edx, [esp + 0x58]
mov edi, 1
push edx
mov dword [esp + 0x68], edi
mov dword [esp + 0x40], edi
call fcn.004024d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
mov ax, word [0x4221a0]
fldz
movsx ecx, ax
mov eax, 0x302e0b7
sub eax, ecx
add dword [0x422da8], eax
xor edx, edx
lea eax, [esp + 0x54]
push edi
mov word [esp + 0x24], dx
push eax
fstp qword [esp + 0x30]
call fcn.004024d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
mov ecx, dword [esp + 0x58]
lea edx, [ecx*4]
push edx
push eax
mov eax, dword [esp + 0x64]
push eax
call fcn.0040af50
mov ecx, dword [esp + 0x68]
add esp, 0xc
mov dword [ecx], esi
mov dword [esp + 0x54], edi
test esi, esi
jne 0x405fd8
mov dx, word [esp + 0xc]
movsx eax, dx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fld dword [0x423b4c]
fadd qword [0x41e6b0]
fsubp st(1)
call fcn.0040a9e0
mov word [esp + 0xc], ax
fld dword [0x423b4c]
fsub qword [0x41e368]
lea ecx, [esp + 0x44]
push 2
push ecx
fstp dword [0x423b4c]
call fcn.004024d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
mov edx, dword [0x422f10]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x50]
sub eax, edx
imul ecx, eax
lea edx, [esp + 0x88]
push 3
mov dword [esp + 0x54], ecx
dec dword [esp + 0x78]
push edx
call fcn.004024d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
mov eax, dword [0x422ee0]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fadd dword [0x422e54]
call fcn.0040a9e0
lea ecx, [esp + 0x60]
push ecx
mov dword [esp + 0x28], eax
call fcn.00401b00
add esp, 4
and eax, 0x8000001f
jns 0x4058aa
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x405914
mov edi, 0x1f
sub edi, eax
lea edx, [esp + 0x38]
push edi
push edx
mov dword [esp + 0x20], edi
call fcn.00402ce0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
fld dword [esp + 0x1c]
lea eax, [esp + 0x60]
fld dword [0x4241dc]
push edi
fsub qword [0x41e6a8]
push eax
fsubp st(1)
fstp dword [esp + 0x24]
fld dword [0x4241dc]
fadd qword [0x41e368]
fstp dword [0x4241dc]
call fcn.00402ce0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
jmp 0x40591c
mov dword [esp + 0x18], 0
fld qword [0x423f38]
fcomp qword [0x41e6a0]
fnstsw ax
fld qword [0x423f38]
fsub qword [0x41e368]
fstp qword [0x423f38]
test ah, 0x41
jne 0x405957
movzx ecx, word [esp + 0x10]
movzx edx, word [esp + 0xc]
lea eax, [ecx + edx - 0x562074e]
mov word [esp + 0x10], ax
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x64]
dec edi
dec eax
mov dword [esp + 0x24], edi
sub edi, eax
mov ebx, edi
shl ebx, 5
lea ecx, [esp + 0x60]
push ebx
push ecx
mov dword [esp + 0x78], eax
call fcn.00402ce0
lea edx, [esp + 0x68]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00401980
add esp, 0x10
test eax, eax
jl 0x4059c0
mov eax, dword [esp + 0x5c]
inc dword [eax + edi*4]
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x3c]
push edx
mov eax, edx
push eax
call fcn.00404dc0
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.00401980
add esp, 0x14
test eax, eax
jge 0x405991
dec dword [esp + 0xc]
inc dword [esp + 0x14]
movzx eax, word [esp + 0x14]
movzx ecx, word [esp + 0x14]
movzx edx, word [esp + 0xc]
sub eax, ecx
add eax, edx
mov word [esp + 0x14], ax
lea eax, [esp + 0x60]
push ebx
push eax
call fcn.00402620
mov eax, dword [esp + 0x2c]
add esp, 8
cmp eax, dword [esp + 0x70]
mov dword [esp + 0x6c], eax
jle 0x405f4d
add edi, edi
add edi, edi
add ebx, 0xffffffe0
mov dword [esp + 0x84], edi
mov dword [esp + 0x24], ebx
mov eax, dword [0x422e50]
mov ecx, dword [0x423d28]
add eax, 0x86ddf35d
imul ecx, eax
mov eax, dword [esp + 0x6c]
mov dword [0x423d28], ecx
inc dword [0x422e50]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x68]
lea ebx, [edx + eax*4]
mov edx, dword [esp + 0x70]
mov eax, dword [ebx]
lea esi, [ecx + edx*4]
mov dword [esp + 0x28], ebx
cmp eax, dword [esi]
jb 0x405a62
mov ecx, dword [esp + 0x5c]
mov dword [edi + ecx - 4], 0xffffffff
jmp 0x405c2c
fld dword [esp + 0x1c]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [esp + 0x1c]
mov dx, word [esp + 0x14]
movsx eax, dx
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fld dword [esp + 0x1c]
fsub qword [0x41e698]
fsubp st(1)
call fcn.0040a9e0
mov esi, dword [esi]
mov ecx, dword [ebx]
mov word [esp + 0x14], ax
mov eax, ecx
mov edi, esi
shr edi, 0x10
xor edx, edx
div edi
mov edx, eax
imul eax, edi
sub ecx, eax
mov eax, ecx
movzx ecx, word [esp + 0xc]
sub ecx, 0x7a00e485
mov word [esp + 0xc], cx
movzx ecx, word [esp + 0xc]
movsx ecx, cx
add ecx, dword [0x422184]
shl eax, 0x10
mov dword [esp + 0x10], ecx
mov dword [esp + 0x20], edx
fild dword [esp + 0x10]
fld qword [esp + 0x78]
fsubp st(1)
fsubr dword [esp + 0x1c]
fstp dword [esp + 0x1c]
fld qword [esp + 0x78]
movzx ecx, word [ebx - 2]
or ecx, eax
fsub st(1)
movzx ebx, si
fstp qword [esp + 0x78]
mov eax, edx
imul eax, ebx
cmp ecx, eax
jae 0x405b1f
dec edx
add ecx, esi
mov dword [esp + 0x20], edx
cmp ecx, esi
jb 0x405b1f
cmp ecx, eax
jae 0x405b1b
add ecx, esi
dec edx
cmp ecx, esi
jae 0x405b10
mov dword [esp + 0x20], edx
sub ecx, eax
xor edx, edx
mov eax, ecx
div edi
movzx edx, word [esp + 0x14]
sub edx, 0x2b9990cb
mov word [esp + 0x14], dx
fld qword [esp + 0x98]
fsub st(1)
fstp qword [esp + 0x98]
inc dword [esp + 0x34]
fld dword [0x423fc0]
mov ebx, eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsub qword [esp + 0x98]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
mov edx, ebx
imul edx, edi
faddp st(1)
fsubp st(1)
fstp dword [0x423fc0]
movzx eax, word [esp + 0x14]
add eax, 0x48711f78
mov word [esp + 0x10], ax
mov eax, dword [esp + 0x28]
sub ecx, edx
movzx edx, word [eax - 4]
shl ecx, 0x10
or ecx, edx
movzx edx, si
mov eax, ebx
imul eax, edx
cmp ecx, eax
jae 0x405c10
add ecx, esi
dec ebx
cmp ecx, esi
jb 0x405bbd
cmp ecx, eax
jae 0x405bbd
add ecx, esi
dec ebx
cmp ecx, esi
jae 0x405bb2
fld qword [esp + 0x98]
mov eax, dword [esp + 0x74]
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fsubp st(1)
fsub dword [0x422e68]
fcomp qword [0x41e690]
fnstsw ax
test ah, 1
jne 0x405c10
fsubr dword [0x4240c0]
fstp dword [0x4240c0]
fld dword [0x4240c0]
mov ecx, dword [0x423d24]
mov dword [esp + 0x28], ecx
fisub dword [esp + 0x28]
call fcn.0040a9e0
mov dword [esp + 0x50], eax
jmp 0x405c12
fstp st(0)
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x5c]
shl eax, 0x10
or eax, ebx
mov dword [ecx + edx - 4], eax
mov edi, ecx
mov eax, dword [esp + 0x5c]
mov ebx, 1
add dword [edi + eax - 4], ebx
mov dx, word [0x4221e4]
mov cx, word [esp + 0xc]
movsx eax, dx
movsx edx, cx
sub eax, edx
sub eax, 0x118e7c1a
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fmul dword [0x422ec8]
fstp dword [0x422ec8]
mov eax, dword [esp + 0x5c]
fldz
dec dword [edi + eax - 4]
xor eax, eax
lea ecx, [esp + 0x44]
push ebx
mov word [esp + 0x24], ax
fstp qword [esp + 0x2c]
push ecx
call fcn.004024d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
lea eax, [edx*4]
push eax
push esi
push ecx
call fcn.0040af50
mov edx, dword [esp + 0x58]
add esp, 0xc
mov dword [edx], esi
mov dword [esp + 0x44], ebx
test esi, esi
jne 0x405fd8
mov ecx, dword [esp + 0x70]
cmp ecx, ebx
jge 0x405ccb
xor eax, eax
jmp 0x405cd3
mov eax, dword [esp + 0x68]
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [esp + 0x4c]
mov dword [edx], eax
mov eax, dword [esp + 0x68]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x4c]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x5c]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x48]
push edx
mov eax, edx
push eax
call fcn.00404e60
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405fd8
fldz
mov dword [0x424604], 0x563a89a
xor ecx, ecx
lea edx, [esp + 0x88]
push ebx
mov word [esp + 0x24], cx
fstp qword [esp + 0x2c]
push edx
call fcn.004024d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
mov eax, dword [esp + 0x8c]
mov edx, dword [esp + 0x90]
lea ecx, [eax*4]
push ecx
push esi
push edx
call fcn.0040af50
mov eax, dword [esp + 0x9c]
add esp, 0xc
mov dword [eax], esi
mov dword [esp + 0x88], ebx
test esi, esi
jne 0x405fd8
mov eax, dword [esp + 0x6c]
cmp eax, 2
jge 0x405d81
xor ecx, ecx
jmp 0x405d89
mov ecx, dword [esp + 0x40]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, ebx
mov edx, dword [esp + 0x90]
mov dword [edx], ecx
jge 0x405d9a
xor ecx, ecx
jmp 0x405da2
mov ecx, dword [esp + 0x40]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x90]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x40]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x90]
lea ecx, [esp + 0x88]
mov dword [eax + 8], edx
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.00401980
add esp, 8
test eax, eax
jg 0x405c66
mov eax, dword [esp + 0x5c]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.00404e60
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405fd8
mov ebx, dword [esp + 0x24]
lea ecx, [esp + 0x44]
push ebx
push ecx
call fcn.00402ce0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x3c]
push eax
mov ecx, eax
push ecx
call fcn.00404dc0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405fd8
fld dword [esp + 0x1c]
mov edx, dword [0x424064]
fsub qword [0x41e688]
mov dword [esp + 0x28], edx
fiadd dword [esp + 0x28]
fld qword [0x422dd0]
fadd qword [0x41e680]
fcompp
fnstsw ax
fld qword [0x422dd0]
fsub qword [0x41e368]
fstp qword [0x422dd0]
dec dword [0x424064]
test ah, 5
jp 0x405e99
inc dword [esp + 0x34]
fld qword [esp + 0x78]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fsubp st(1)
fstp qword [esp + 0x78]
lea ecx, [esp + 0x38]
push 0
push ecx
call fcn.00403450
add esp, 8
test eax, eax
jge 0x405f07
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x48]
push eax
call fcn.00403f50
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
lea ecx, [esp + 0x44]
push ebx
push ecx
call fcn.00402ce0
mov esi, eax
add esp, 8
test esi, esi
jne 0x405fd8
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x3c]
push eax
mov ecx, eax
push ecx
call fcn.00405250
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405fd8
mov eax, dword [esp + 0x5c]
dec dword [edi + eax - 4]
mov dx, word [esp + 0xc]
mov ecx, dword [0x424604]
movsx eax, dx
mov edx, dword [0x422f68]
sub eax, ecx
add eax, 0xdb3e9402
add edx, eax
mov eax, dword [esp + 0x6c]
dec eax
sub ebx, 0x20
sub edi, 4
cmp eax, dword [esp + 0x70]
mov word [esp + 0xc], dx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x84], edi
jg 0x405a12
mov edi, dword [ebp + 8]
test edi, edi
je 0x405f9b
lea eax, [esp + 0x54]
push eax
push edi
call fcn.00403f50
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp + 0x14]
imul edx, dword [eax]
mov cx, word [esp + 0x18]
mov dword [edi], edx
movsx edx, cx
sub edx, 0x14055ce3
add esp, 8
cmp edx, 0xcd30bb1e
jge 0x405f9b
fld dword [esp + 0x94]
fsubr qword [0x41e678]
call fcn.0040a9e0
mov dword [esp + 0x24], eax
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x405fd8
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00402620
lea edx, [esp + 0x40]
push edx
push edi
call fcn.00403f50
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push 0
push edi
mov dword [edi], ecx
call fcn.00403450
add esp, 0x18
test eax, eax
jne 0x405fd8
mov dword [edi], 1
push 0
lea edx, [esp + 0x8c]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.00402ee0
fld dword [esp + 0x34]
fsub qword [0x41e670]
add esp, 0x18
pop edi
mov eax, esi
pop esi
fstp dword [esp + 0x14]
pop ebx
mov esp, ebp
pop ebp
ret