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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xcc
fldz
push ebx
mov ebx, dword [ebp + 0x14]
xor eax, eax
mov word [esp + 0x20], ax
fst qword [esp + 0x68]
fst qword [esp + 0x60]
push esi
xor esi, esi
xor ecx, ecx
mov word [esp + 0x48], cx
mov dword [esp + 8], esi
mov dword [esp + 0x28], esi
fst qword [esp + 0x84]
fldz
mov dword [esp + 0x8c], esi
xor edx, edx
mov word [esp + 0x20], dx
mov dword [esp + 0x80], esi
fst dword [esp + 0x18]
mov eax, 1
fstp dword [esp + 0xc]
push edi
lea ecx, [esp + 0xb4]
fstp qword [esp + 0x10]
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], eax
push ecx
lea eax, [esp + 0xa4]
push ebx
mov dword [esp + 0xa8], esi
mov dword [esp + 0xc4], eax
call fcn.004028f0
add esp, 8
test eax, eax
jne 0x404fa5
lea eax, [esi - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
lea edx, [esp + 0x98]
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.004012a0
mov edi, dword [ebp + 0x10]
push ebx
push edi
call fcn.004011d0
add esp, 0x20
test eax, eax
jge 0x40501a
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x404ff6
push esi
push eax
call fcn.00401440
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
mov eax, dword [ebp + 0xc]
cmp eax, esi
je 0x405011
push edi
push eax
call fcn.00402830
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x30]
push edi
push ecx
call fcn.00402830
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
lea edx, [esp + 0x3c]
push ebx
push edx
call fcn.00402830
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
fld dword [esp + 0x1c]
mov eax, 1
fadd qword [0x41f688]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x78]
fmul dword [str.x_n]
fstp dword [str.x_n]
fld dword [esp + 0x1c]
mov eax, dword [edi + 4]
fadd qword [0x41f358]
add eax, 2
push eax
push ecx
fstp dword [esp + 0x24]
call fcn.004010c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
push eax
lea edx, [esp + 0x7c]
push edx
call fcn.00401440
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x48], eax
fild dword [esp + 0x48]
lea ecx, [esp + 0x50]
push 2
push ecx
fadd dword [0x424798]
fstp dword [0x425db0]
dec dword [esp + 0x34]
call fcn.004010c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
lea edx, [esp + 0x94]
push 3
push edx
call fcn.004010c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
lea eax, [esp + 0x3c]
push eax
call fcn.004014e0
add esp, 4
and eax, 0x8000001f
jns 0x40511b
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x405171
mov cx, word [0x423ac8]
movsx edx, cx
mov edi, 0x1f
sub edi, eax
lea eax, [esp + 0x30]
add edx, 0xa84d86b
push edi
push eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x50], edi
call fcn.00402130
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
lea ecx, [esp + 0x3c]
push edi
push ecx
call fcn.00402130
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
jmp 0x405179
mov dword [esp + 0x48], 0
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x40]
dec edi
dec eax
mov dword [esp + 0x60], edi
sub edi, eax
mov ebx, edi
shl ebx, 5
lea edx, [esp + 0x3c]
push ebx
push edx
mov dword [esp + 0x6c], eax
call fcn.00402130
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004028f0
add esp, 0x10
test eax, eax
jl 0x4051f2
jmp 0x4051c0
mov eax, dword [esp + 0x80]
inc dword [eax + edi*4]
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, eax
push ecx
call fcn.00404360
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.004028f0
add esp, 0x14
test eax, eax
jge 0x4051c0
lea ecx, [esp + 0x3c]
push ebx
push ecx
call fcn.004015b0
mov eax, dword [esp + 0x68]
add esp, 8
cmp eax, dword [esp + 0x64]
mov dword [esp + 0x5c], eax
jle 0x405801
lea edx, [edi*4]
add ebx, 0xffffffe0
mov dword [esp + 0x24], edx
mov dword [esp + 0x60], ebx
jmp 0x405234
mov edx, dword [esp + 0x24]
mov ax, word [esp + 0x4c]
movsx ecx, ax
mov eax, dword [0x4231c4]
sub ecx, eax
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fcomp qword [esp + 0x70]
fnstsw ax
test ah, 0x41
jne 0x40526c
mov ecx, dword [esp + 0x2c]
mov eax, 0x56ddb5dc
sub eax, ecx
mov ecx, dword [esp + 0xc]
imul eax, ecx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x5c]
mov edi, dword [esp + 0x64]
mov esi, dword [eax + ecx*4]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x44]
lea eax, [eax + edi*4]
mov dword [esp + 0x10], ecx
cmp esi, dword [eax]
jb 0x4052ab
mov ecx, dword [esp + 0x80]
or ebx, 0xffffffff
mov dword [edx + ecx - 4], ebx
mov eax, dword [esp + 0x80]
inc dword [edx + eax - 4]
jmp 0x4054a4
mov esi, dword [esp + 0xc]
mov dx, word [0x42472c]
movsx edi, dx
mov edx, 1
add dword [esp + 0xc], edx
add word [0x42472c], dx
sub esi, 0x194f0f08
cmp edi, esi
jge 0x4052ef
fld dword [0x425e70]
fadd qword [0x41f680]
fadd qword [0x41f678]
fmul qword [esp + 0x70]
fstp qword [esp + 0x70]
jmp 0x405301
fld dword [0x425c78]
fsub qword [0x41f670]
fstp dword [0x425c78]
mov edi, dword [eax]
mov ax, word [esp + 0x28]
mov esi, dword [esp + 0x84]
cwde
imul eax, esi
mov dword [esp + 0x84], eax
add dword [esp + 0x28], edx
mov esi, dword [ecx]
xor edx, edx
mov ebx, edi
shr ebx, 0x10
mov eax, esi
div ebx
mov dx, word [esp + 0x28]
mov dword [esp + 0x1c], eax
imul eax, ebx
sub esi, eax
movsx eax, dx
mov dword [esp + 0x20], eax
shl esi, 0x10
fild dword [esp + 0x20]
fmul qword [esp + 0x88]
fstp qword [esp + 0x88]
dec dword [esp + 0x28]
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0xc]
dec dword [esp + 0xc]
sub edx, 0x506b1683
sub eax, 0xa533679
cmp eax, edx
jg 0x405382
mov dword [esp + 0x90], 0xa7ea8fee
movzx edx, word [ecx - 2]
mov eax, dword [esp + 0x1c]
or esi, edx
movzx edx, di
imul eax, edx
mov dword [esp + 0x20], eax
cmp esi, eax
jae 0x4053fe
fld dword [0x4255a8]
dec dword [esp + 0x1c]
fld qword [0x425cb0]
add esi, edi
fsub qword [0x41f668]
fadd qword [0x41f660]
fsubp st(1)
fstp dword [0x4255a8]
fld qword [esp + 0x68]
fsub qword [0x41f658]
call fcn.0040b1c0
mov dword [0x425e9c], eax
fld qword [esp + 0x68]
fadd qword [0x41f358]
fstp qword [esp + 0x68]
cmp esi, edi
jb 0x4053f6
cmp esi, dword [esp + 0x20]
jae 0x4053f6
dec dword [esp + 0x1c]
add esi, edi
cmp esi, edi
jae 0x4053e6
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
sub esi, eax
mov eax, esi
xor edx, edx
div ebx
mov dword [esp + 0x20], eax
imul eax, ebx
sub esi, eax
movzx eax, word [ecx - 4]
mov cx, word [0x425d84]
movsx edx, cx
mov dword [esp + 0x10], edx
shl esi, 0x10
or esi, eax
fild dword [esp + 0x10]
fsub qword [0x423ab0]
mov ax, word [0x425d6c]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fmulp st(1)
call fcn.0040b1c0
mov ecx, dword [esp + 0x20]
mov word [0x425d6c], ax
movzx edx, di
mov eax, ecx
imul eax, edx
cmp esi, eax
jae 0x405470
add esi, edi
dec ecx
cmp esi, edi
jb 0x405470
cmp esi, eax
jae 0x405470
add esi, edi
dec ecx
cmp esi, edi
jae 0x405465
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x80]
mov edi, dword [esp + 0x64]
shl eax, 0x10
or eax, ecx
mov ecx, dword [esp + 0x24]
mov dword [ecx + edx - 4], eax
mov eax, dword [esp + 0x80]
mov edx, ecx
or ebx, 0xffffffff
inc dword [edx + eax - 4]
jmp 0x4054a4
mov edx, dword [esp + 0x24]
mov ax, word [0x425e88]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fld dword [0x424730]
fsubr qword [0x41f650]
fucompp
fnstsw ax
fld dword [0x424730]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x424730]
test ah, 0x44
jnp 0x4054fe
fld qword [esp + 0x88]
fsub qword [0x425630]
fstp qword [esp + 0x88]
fsubr qword [0x425630]
fstp qword [0x425630]
jmp 0x40550a
add dword [0x425dd8], 0x2554ae82
fstp st(0)
mov eax, dword [esp + 0x80]
add dword [edx + eax - 4], ebx
lea edx, [esp + 0x50]
push 0
push edx
call fcn.00401440
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
cmp edi, 1
jl 0x40553b
mov eax, dword [esp + 0x44]
mov eax, dword [eax + edi*4 - 4]
mov edx, dword [esp + 0x90]
mov ecx, dword [esp + 0x58]
mov dword [ecx], eax
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fadd dword [0x425c28]
fstp dword [esp + 0x1c]
fld dword [0x425c28]
mov eax, dword [esp + 0x44]
fadd qword [0x41f358]
mov edx, dword [esp + 0x58]
fstp dword [0x425c28]
mov ecx, dword [eax + edi*4]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax - 4]
push edx
lea eax, [esp + 0x54]
push eax
mov ecx, eax
push ecx
call fcn.00404e00
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4059fd
push eax
lea edx, [esp + 0x98]
push edx
call fcn.00401440
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
mov eax, dword [esp + 0x5c]
cmp eax, 2
jge 0x4055cc
xor ecx, ecx
jmp 0x4055d4
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, 1
mov edx, dword [esp + 0x9c]
mov dword [edx], ecx
jge 0x4055e6
xor ecx, ecx
jmp 0x4055ee
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x9c]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x9c]
mov dword [eax + 8], edx
add word [0x42472c], bx
fld qword [esp + 0x68]
mov cx, word [0x42472c]
movsx edx, cx
mov dword [esp + 0x10], edx
lea eax, [esp + 0x94]
push eax
fild dword [esp + 0x14]
lea ecx, [esp + 0x54]
push ecx
fsubp st(1)
fstp qword [esp + 0x70]
call fcn.004028f0
add esp, 8
test eax, eax
jg 0x4054a0
fld dword [0x424730]
mov edx, dword [esp + 0x80]
fmul qword [0x41f648]
mov edi, dword [esp + 0x24]
lea ecx, [esp + 0x3c]
fstp dword [0x424730]
mov eax, dword [edi + edx - 4]
push eax
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.00404e00
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4059fd
mov ebx, dword [esp + 0x60]
lea eax, [esp + 0x50]
push ebx
push eax
call fcn.00402130
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x34]
push edx
mov eax, edx
push eax
call fcn.00404360
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4059fd
fldz
lea edx, [esp + 0xc0]
fstp dword [esp + 0x10]
push edx
fldz
lea ecx, [esp + 0xac]
fstp qword [esp + 0xac]
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xac], eax
mov eax, 1
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], eax
lea eax, [esp + 0x34]
push eax
call fcn.004028f0
add esp, 8
test eax, eax
jge 0x4057e0
movzx ecx, word [esp + 0x4c]
movzx edx, word [esp + 0x28]
sub edx, ecx
lea eax, [esp + 0x3c]
add edx, 0x1e9ae98f
push eax
lea ecx, [esp + 0x54]
mov word [esp + 0x2c], dx
inc dword [esp + 0x50]
push ecx
call fcn.00402830
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
fld qword [0x41f640]
lea edx, [esp + 0x50]
push ebx
fstp qword [esp + 0x74]
push edx
call fcn.00402130
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059fd
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x34]
push ecx
mov edx, ecx
push edx
call fcn.00404470
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4059fd
mov eax, dword [esp + 0x80]
dec dword [edi + eax - 4]
mov ecx, 1
add dword [esp + 0xc], ecx
mov eax, dword [0x425de0]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsub qword [0x425bf8]
mov edx, dword [esp + 0xc]
add dword [0x425de0], ecx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fsubp st(1)
fcomp qword [0x41f638]
fnstsw ax
test cl, ah
jne 0x4057e0
mov dword [esp + 0x90], 0x6d7bc17f
mov eax, dword [esp + 0x5c]
dec eax
sub ebx, 0x20
sub edi, 4
cmp eax, dword [esp + 0x64]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ebx
mov dword [esp + 0x24], edi
jg 0x405230
mov edi, dword [ebp + 8]
test edi, edi
je 0x4058eb
lea eax, [esp + 0x78]
push eax
push edi
call fcn.00402830
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp + 0x14]
imul edx, dword [eax]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], ecx
mov dword [edi], edx
add esp, 8
fild dword [esp + 0x10]
mov ebx, 1
fadd qword [0x425680]
fcomp qword [0x41f630]
fnstsw ax
fld qword [0x425680]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [0x425680]
dec dword [esp + 0xc]
test ah, 0x41
jp 0x405891
add dword [esp + 0xc], ebx
mov edx, dword [0x4246d8]
mov eax, dword [esp + 0xc]
sub edx, eax
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fsub qword [esp + 0x68]
fstp dword [esp + 0x1c]
fsubr qword [esp + 0x68]
fstp qword [esp + 0x68]
add dword [0x4246d8], ebx
jmp 0x4058f0
fld dword [0x4230d0]
fsub st(1)
fstp dword [0x4230d0]
fld dword [esp + 0x1c]
fsub qword [0x41f628]
fld dword [0x4230d0]
fsubr qword [0x41f620]
fcompp
fnstsw ax
test ah, 0x41
jp 0x4058e7
fld qword [esp + 0x88]
fstp st(0)
fld qword [esp + 0x70]
fstp st(0)
fld qword [esp + 0x88]
fadd st(1)
fstp qword [esp + 0x88]
fsubr qword [esp + 0x70]
fstp qword [esp + 0x70]
jmp 0x4058f0
fstp st(0)
jmp 0x4058f0
mov ebx, 1
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x4059fd
mov ecx, dword [esp + 0x48]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.004015b0
fld qword [0x424648]
fadd qword [0x425ca0]
mov eax, dword [0x4247a8]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
add esp, 8
fcompp
fnstsw ax
fld qword [0x424648]
fsub qword [0x41f358]
fstp qword [0x424648]
test ah, 5
jp 0x405967
fld dword [0x42479c]
mov ecx, dword [0x4231c4]
fsub qword [0x41f618]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
faddp st(1)
call fcn.0040b1c0
mov dword [0x4231c4], eax
lea edx, [esp + 0x30]
push edx
push edi
call fcn.00402830
mov eax, dword [esp + 0x34]
mov ecx, dword [ebp + 0x10]
add eax, 0x3d204f38
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fadd qword [0x4259b0]
fadd dword [0x4230e8]
fstp dword [0x4230e8]
add dword [esp + 0x34], ebx
mov edx, dword [ecx]
fldz
mov dword [edi], edx
mov eax, dword [0x4247c8]
imul eax, eax, 0xb450e40c
mov dword [0x4247c8], eax
lea edx, [esp + 0xd4]
fstp dword [esp + 0x18]
push edx
fldz
lea ecx, [esp + 0xb0]
push edi
fstp qword [esp + 0x80]
mov dword [esp + 0xb4], 0
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xe0], ebx
mov dword [esp + 0xe4], ecx
call fcn.004028f0
add esp, 0x10
test eax, eax
jne 0x4059fd
mov dword [edi], ebx
push 0
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.004031f0
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret