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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xcc
push ebx
push esi
push edi
fldz
xor eax, eax
mov word [esp + 0x20], ax
fst qword [esp + 0x80]
fldz
fst dword [esp + 0x38]
xor ebx, ebx
xor ecx, ecx
fxch st(1)
mov dword [esp + 0x18], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x2c], ebx
mov word [esp + 0x64], cx
fstp qword [esp + 0x88]
xor edx, edx
mov word [esp + 0x5c], dx
mov word [esp + 0x1c], ax
or esi, 0xffffffff
add word [0x4220e0], si
mov cx, word [0x4220e0]
movsx edx, cx
mov dword [esp + 0x34], edx
mov edi, dword [ebp + 0x14]
fild dword [esp + 0x34]
mov eax, 1
lea ecx, [esp + 0xb4]
push ecx
fmul qword [0x424ce8]
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], eax
lea eax, [esp + 0xb4]
fstp qword [0x424ce8]
push edi
mov dword [esp + 0xb8], ebx
fstp dword [esp + 0x18]
mov dword [esp + 0x18], ebx
mov dword [esp + 0xc4], eax
call fcn.00402410
add esp, 8
test eax, eax
jne 0x405bb0
lea eax, [ebx - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
lea edx, [esp + 0x9c]
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x58]
push eax
call fcn.00401380
mov ecx, dword [ebp + 0x10]
push edi
push ecx
call fcn.00401ef0
add esp, 0x20
test eax, eax
jge 0x405c89
mov edi, dword [ebp + 8]
cmp edi, ebx
je 0x405c3e
fldz
xor edx, edx
push 1
mov word [esp + 0x60], dx
fstp qword [esp + 0x84]
push edi
call fcn.00402540
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
add eax, eax
add eax, eax
push eax
push ebx
push ecx
call fcn.0040aab0
mov edx, dword [edi + 8]
add esp, 0xc
mov dword [edx], ebx
mov dword [edi], 1
cmp esi, ebx
jne 0x40670d
fld qword [0x4249f8]
mov eax, dword [ebp + 0xc]
fsub dword [esp + 0x38]
fmul qword [0x4247f8]
fstp qword [0x4247f8]
fld dword [esp + 0x38]
fsub qword [0x41e350]
fstp dword [esp + 0x38]
cmp eax, ebx
je 0x405c80
mov ecx, dword [ebp + 0x10]
push ecx
push eax
call fcn.00402950
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x40]
add dword [esp + 0x40], esi
add edx, 0x5613408b
cmp edx, 0x1dfde09f
jge 0x405ccb
fld qword [0x424768]
fld dword [0x424a68]
fsubr qword [0x41e7d0]
fsubp st(1)
fstp qword [0x424768]
fld dword [0x424a68]
fadd qword [0x41e350]
fstp dword [0x424a68]
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.00402950
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
lea edx, [esp + 0x68]
push edi
push edx
call fcn.00402950
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
fld qword [0x4226a8]
mov eax, dword [ebp + 0x10]
fsub qword [0x41e7c8]
mov edi, 1
mov dword [esp + 0x68], edi
mov dword [esp + 0x44], edi
fstp qword [0x4226a8]
mov ecx, dword [eax + 4]
add ecx, 2
push ecx
lea edx, [esp + 0x78]
push edx
call fcn.00402540
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
fldz
xor eax, eax
lea ecx, [esp + 0x74]
push edi
mov word [esp + 0x28], ax
fstp qword [esp + 0x14]
push ecx
call fcn.00402540
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
lea eax, [edx*4]
push eax
push ebx
push ecx
call fcn.0040aab0
mov edx, dword [esp + 0x88]
add esp, 0xc
mov dword [edx], ebx
mov dword [esp + 0x74], edi
cmp esi, ebx
jne 0x40670d
fld qword [esp + 0x80]
fsub qword [0x424820]
mov ax, word [esp + 0x1c]
movsx ecx, ax
mov dword [esp + 0x34], ecx
fsub qword [0x41e7c0]
fild dword [esp + 0x34]
faddp st(1)
call fcn.0040ac50
mov word [esp + 0x1c], ax
fld qword [esp + 0x80]
fsub qword [0x41e350]
lea edx, [esp + 0x50]
push 2
push edx
fstp qword [esp + 0x88]
call fcn.00402540
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
lea eax, [esp + 0x98]
push 3
push eax
call fcn.00402540
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
lea ecx, [esp + 0x68]
push ecx
call fcn.00402790
add esp, 4
and eax, 0x8000001f
jns 0x405e23
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x405e95
mov edi, 0x1f
sub edi, eax
lea edx, [esp + 0x44]
push edi
push edx
mov dword [esp + 0x3c], edi
call fcn.00404000
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
or eax, 0xffffffff
add dword [esp + 0x1c], eax
mov cx, word [esp + 0x1c]
movsx edx, cx
mov ecx, 0x31c0baa5
sub ecx, edx
cmp ecx, 0x9a13481c
jge 0x405e7b
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x2c]
sub edx, ecx
mov dword [esp + 0x2c], edx
add dword [esp + 0x2c], eax
lea edx, [esp + 0x68]
push edi
push edx
call fcn.00404000
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40670d
jmp 0x405e99
mov dword [esp + 0x34], ebx
mov edi, dword [esp + 0x48]
mov eax, dword [esp + 0x6c]
dec dword [esp + 0x18]
fld qword [esp + 0x88]
mov ecx, dword [esp + 0x18]
fsub qword [0x41e7b8]
mov dword [esp + 0x30], ecx
fild dword [esp + 0x30]
dec edi
dec eax
mov dword [esp + 0x3c], edi
faddp st(1)
sub edi, eax
mov ebx, edi
shl ebx, 5
fadd qword [esp + 0x80]
lea edx, [esp + 0x68]
push ebx
push edx
fstp qword [esp + 0x88]
mov dword [esp + 0x9c], eax
fld qword [esp + 0x90]
fadd qword [0x41e350]
fstp qword [esp + 0x90]
call fcn.00404000
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x50]
push ecx
call fcn.00402410
add esp, 0x10
test eax, eax
jl 0x405f89
jmp 0x405f20
fld qword [esp + 0x88]
mov eax, dword [esp + 0x7c]
inc dword [eax + edi*4]
fadd qword [0x41e350]
lea ecx, [esp + 0x68]
push ecx
fstp qword [esp + 0x8c]
mov dx, word [esp + 0x20]
movsx eax, dx
add eax, dword [esp + 0x1c]
lea edx, [esp + 0x48]
mov dword [esp + 0x34], eax
push edx
mov eax, edx
fild dword [esp + 0x38]
push eax
fadd qword [esp + 0x94]
fstp qword [esp + 0x94]
inc dword [esp + 0x24]
call fcn.00404940
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00402410
add esp, 0x14
test eax, eax
jge 0x405f20
lea eax, [esp + 0x68]
push ebx
push eax
call fcn.00401b80
mov eax, dword [esp + 0x44]
add esp, 8
cmp eax, dword [esp + 0x94]
mov dword [esp + 0x3c], eax
jle 0x4065cf
lea ecx, [edi*4]
add ebx, 0xffffffe0
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], ebx
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x70]
lea ebx, [edx + eax*4]
mov edx, dword [esp + 0x94]
lea eax, [ecx + edx*4]
mov ecx, dword [ebx]
mov dword [esp + 0x10], ebx
cmp ecx, dword [eax]
jb 0x405ff6
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x28]
mov dword [eax + edx - 4], 0xffffffff
jmp 0x4061f8
fld qword [esp + 0x88]
fstp dword [0x424ef8]
fld qword [esp + 0x88]
mov esi, dword [eax]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x88]
fld dword [0x4247f0]
fcomp qword [0x41e7b0]
fnstsw ax
test ah, 1
jne 0x40604c
fld dword [0x422144]
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x24], eax
fisub dword [esp + 0x24]
call fcn.0040ac50
mov word [0x42490c], ax
mov ecx, dword [ebx]
mov eax, ecx
mov edi, esi
shr edi, 0x10
xor edx, edx
div edi
mov edx, eax
imul eax, edi
sub ecx, eax
movzx eax, word [ebx - 2]
shl ecx, 0x10
or ecx, eax
movzx ebx, si
mov eax, edx
imul eax, ebx
mov dword [esp + 0x24], edx
cmp ecx, eax
jae 0x406093
dec edx
add ecx, esi
mov dword [esp + 0x24], edx
cmp ecx, esi
jb 0x406093
cmp ecx, eax
jae 0x40608f
add ecx, esi
dec edx
cmp ecx, esi
jae 0x406084
mov dword [esp + 0x24], edx
sub ecx, eax
fld qword [0x424738]
fadd qword [0x41e7a8]
xor edx, edx
mov eax, ecx
fld dword [0x424988]
div edi
fsub qword [0x41e7a0]
fcompp
mov ebx, eax
fnstsw ax
fld qword [0x424738]
fsub st(1)
fstp qword [0x424738]
test ah, 0x41
jne 0x406111
fld qword [esp + 0x80]
fsub qword [0x41e798]
fsub qword [0x41e790]
fcomp qword [0x41e788]
fnstsw ax
test ah, 5
jp 0x406111
dec dword [esp + 0x20]
fld dword [0x424c0c]
mov dx, word [esp + 0x20]
movsx eax, dx
add eax, 0x7e57bec1
mov dword [esp + 0x60], eax
fisub dword [esp + 0x60]
fstp dword [0x424c0c]
mov edx, dword [0x4226cc]
mov dword [esp + 0x60], edx
fild dword [esp + 0x60]
mov edx, dword [esp + 0x10]
mov eax, ebx
imul eax, edi
fadd dword [0x4226c0]
fmul qword [0x4247d8]
fstp qword [0x4247d8]
inc dword [0x4226cc]
sub ecx, eax
movzx eax, word [edx - 4]
shl ecx, 0x10
or ecx, eax
mov edi, ecx
movzx eax, si
mov ecx, ebx
imul ecx, eax
mov dword [esp + 0x60], ecx
cmp edi, ecx
jae 0x4061c5
mov dx, word [esp + 0x1c]
movsx eax, dx
mov dword [esp + 0x10], eax
dec ebx
add edi, esi
fild dword [esp + 0x10]
fld dword [esp + 0x38]
fcompp
fnstsw ax
test ah, 0x41
jne 0x4061b2
fld qword [0x422128]
mov ecx, dword [esp + 0x40]
fsub qword [0x41e780]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
faddp st(1)
call fcn.0040ac50
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x40], eax
fsubr qword [0x422128]
fstp qword [0x422128]
jmp 0x4061b4
fstp st(0)
cmp edi, esi
jb 0x4061c7
cmp edi, ecx
jae 0x4061c7
add edi, esi
dec ebx
cmp edi, esi
jae 0x4061b8
jmp 0x4061c7
fstp st(0)
fld dword [esp + 0x38]
mov eax, dword [esp + 0x24]
fmul qword [0x41e778]
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x28]
shl eax, 0x10
fstp dword [esp + 0x38]
or eax, ebx
fld qword [0x41e770]
mov dword [ecx + edx - 4], eax
fstp qword [0x424ea0]
mov eax, ecx
mov ecx, dword [esp + 0x7c]
inc dword [eax + ecx - 4]
mov dx, word [esp + 0x20]
movsx ecx, dx
add ecx, 0x30c0c149
cmp ecx, 0xa02f1486
jge 0x406228
movzx edx, word [esp + 0x64]
add edx, 0x61ec54c7
mov word [esp + 0x64], dx
jmp 0x406244
movzx ecx, word [esp + 0x1c]
movzx edx, word [esp + 0x20]
sub edx, ecx
mov word [esp + 0x20], dx
jmp 0x406244
mov eax, dword [esp + 0x28]
add dword [esp + 0x18], 0xb5782d5
fldz
mov ecx, dword [esp + 0x7c]
dec dword [eax + ecx - 4]
xor eax, eax
lea ecx, [esp + 0x50]
push 1
mov word [esp + 0x28], ax
fstp qword [esp + 0x14]
push ecx
call fcn.00402540
mov esi, eax
add esp, 8
test esi, esi
jne 0x40670d
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
lea eax, [edx*4]
push eax
push esi
push ecx
call fcn.0040aab0
mov edx, dword [esp + 0x64]
add esp, 0xc
mov dword [edx], esi
mov dword [esp + 0x50], 1
test esi, esi
jne 0x40670d
mov ecx, dword [esp + 0x94]
cmp ecx, 1
jge 0x4062ba
xor eax, eax
jmp 0x4062c2
mov eax, dword [esp + 0x70]
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [esp + 0x58]
mov dword [edx], eax
mov eax, dword [esp + 0x70]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x58]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + eax - 4]
push edx
lea eax, [esp + 0x54]
push eax
mov ecx, eax
push ecx
call fcn.004048b0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40670d
fldz
xor edx, edx
lea eax, [esp + 0x98]
push 1
mov word [esp + 0x28], dx
fstp qword [esp + 0x14]
push eax
call fcn.00402540
mov esi, eax
add esp, 8
test esi, esi
jne 0x40670d
mov ecx, dword [esp + 0x9c]
lea edx, [ecx*4]
push edx
push eax
mov eax, dword [esp + 0xa8]
push eax
call fcn.0040aab0
mov ecx, dword [esp + 0xac]
add esp, 0xc
mov dword [ecx], esi
mov dword [esp + 0x98], 1
test esi, esi
jne 0x40670d
mov eax, dword [esp + 0x3c]
cmp eax, 2
jge 0x40636f
xor ecx, ecx
jmp 0x406377
mov edx, dword [esp + 0x4c]
mov ecx, dword [edx + eax*4 - 8]
cmp eax, 1
mov edx, dword [esp + 0xa0]
mov dword [edx], ecx
jge 0x406389
xor ecx, ecx
jmp 0x406391
mov ecx, dword [esp + 0x4c]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0xa0]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x4c]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0xa0]
lea ecx, [esp + 0x98]
mov dword [eax + 8], edx
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00402410
add esp, 8
test eax, eax
jg 0x406240
mov eax, dword [esp + 0x7c]
fld qword [0x41e768]
mov ecx, dword [esp + 0x28]
fstp qword [0x424948]
mov edx, dword [ecx + eax - 4]
push edx
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.004048b0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40670d
or ecx, 0xffffffff
add dword [esp + 0x18], ecx
fld qword [esp + 0x80]
fsubr qword [0x41e760]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fsubp st(1)
fld qword [0x424c58]
fcompp
fnstsw ax
fld qword [0x424c58]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [0x424c58]
fsubr qword [esp + 0x80]
fstp qword [esp + 0x80]
test ah, 5
jp 0x406495
mov ax, word [esp + 0x5c]
movsx edx, ax
cmp edx, 0xdaf4e8c8
je 0x406495
add dword [0x4236e0], ecx
mov eax, dword [0x4236e0]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fadd qword [0x424a10]
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
faddp st(1)
call fcn.0040ac50
mov dword [esp + 0xa4], eax
mov edx, dword [esp + 0x30]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.00404000
mov esi, eax
add esp, 8
test esi, esi
jne 0x40670d
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x48]
push edx
mov eax, edx
push eax
call fcn.00404940
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40670d
fldz
mov eax, 1
lea edx, [esp + 0xc0]
fstp dword [esp + 0x10]
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
xor edi, edi
push edx
lea eax, [esp + 0x48]
lea ecx, [esp + 0xb0]
mov dword [esp + 0xb0], edi
push eax
mov dword [esp + 0xb4], edi
mov dword [esp + 0xd0], ecx
call fcn.00402410
add esp, 8
test eax, eax
jge 0x4065af
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00402950
mov esi, eax
add esp, 8
cmp esi, edi
jne 0x40670d
mov eax, dword [esp + 0x30]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00404000
mov esi, eax
add esp, 8
test esi, esi
jne 0x40670d
fld dword [0x424924]
lea edx, [esp + 0x50]
fadd qword [0x41e758]
push edx
lea eax, [esp + 0x48]
push eax
mov ecx, eax
fstp dword [0x424924]
push ecx
call fcn.004047e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40670d
mov dx, word [esp + 0x1c]
mov ecx, dword [esp + 0x28]
movsx eax, dx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x7c]
fild dword [esp + 0x10]
fstp dword [0x424a98]
dec dword [ecx + eax - 4]
mov eax, dword [esp + 0x3c]
sub dword [esp + 0x30], 0x20
sub dword [esp + 0x28], 4
dec eax
cmp eax, dword [esp + 0x94]
mov dword [esp + 0x3c], eax
jg 0x405fbe
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
je 0x406605
fld dword [0x424730]
lea ecx, [esp + 0x74]
fsub qword [0x41e750]
push ecx
push edi
fstp dword [0x424730]
call fcn.00402950
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]
cmp edi, ebx
je 0x4066ab
mov edx, dword [esp + 0x34]
push edx
lea eax, [esp + 0x48]
push eax
call fcn.00401b80
dec dword [0x424944]
movzx ecx, word [esp + 0x24]
mov edx, dword [0x424944]
movsx eax, cx
movzx ecx, word [0x4220d0]
sub eax, edx
add eax, 0xf2b4e768
imul ecx, eax
lea edx, [esp + 0x4c]
push edx
mov word [0x4220d0], cx
push edi
call fcn.00402950
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
fldz
mov dword [edi], ecx
fstp dword [esp + 0x20]
mov dword [esp + 0xb8], ebx
lea eax, [esp + 0xdc]
mov dword [esp + 0xb8], ebx
push eax
mov ebx, 1
lea edx, [esp + 0xbc]
push edi
mov dword [esp + 0xe4], ebx
mov dword [esp + 0xe8], ebx
mov dword [esp + 0xec], edx
call fcn.00402410
add esp, 0x18
test eax, eax
jne 0x4066b0
mov dword [edi], ebx
jmp 0x4066b0
mov ebx, 1
mov ecx, dword [esp + 0x2c]
mov eax, dword [0x4236c0]
mov edx, 0x3bf73548
sub edx, ecx
mov ecx, dword [esp + 0x40]
dec dword [esp + 0x2c]
add dword [0x4236c0], ebx
add eax, edx
cmp ecx, eax
je 0x406701
fld qword [0x424a60]
mov dx, word [0x424788]
fsub qword [0x41e748]
movsx eax, dx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fmulp st(1)
call fcn.0040ac50
mov word [0x424788], ax
jmp 0x40670d
fld qword [0x41e740]
fstp qword [0x424238]
push 0
lea ecx, [esp + 0x9c]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.00401a50
add esp, 0x18
inc dword [esp + 0x20]
fld qword [0x424b58]
mov ax, word [esp + 0x20]
movsx ecx, ax
mov dword [esp + 0x10], ecx
pop edi
mov eax, esi
fild dword [esp + 0xc]
pop esi
pop ebx
fsubp st(1)
fsub qword [0x41e738]
fadd qword [0x424f48]
fstp qword [0x424f48]
mov esp, ebp
pop ebp
ret