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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 0x18]
fldz
sub esp, 0x8c
cmp dword [ebp + 0x14], 3
push ebx
push esi
push edi
mov edi, dword [ebp + 0x20]
je 0x4b692d
mov edx, dword [ebp + 0x14]
fld qword [0x50dde8]
mov ebx, dword [ebp + 0x1c]
fstp qword [esp + 0x50]
mov ecx, dword [esp + 0x10]
xor edi, edi
test edx, edx
jle 0x4b6332
test edi, edi
lea eax, [edx - 1]
je 0x4b61b9
lea eax, [edi - 1]
mov dword [esp + 0xc], eax
lea eax, [edx - 1]
cmp edi, eax
jne 0x4b61ce
mov dword [esp + 0x18], 0
jmp 0x4b61d5
lea eax, [edi + 1]
mov dword [esp + 0x18], eax
mov eax, edi
shl eax, 4
fld qword [eax + ebx]
lea esi, [eax + ebx]
mov eax, dword [esp + 0xc]
shl eax, 4
fsub qword [eax + ebx]
add eax, ebx
fst qword [esp + 0x28]
fld qword [esi + 8]
fsub qword [eax + 8]
fst qword [esp + 0x30]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fcom st(3)
fnstsw ax
test ah, 0x41
jp 0x4b6217
fstp st(0)
fld st(2)
fst qword [esp + 0x40]
jmp 0x4b6239
fstp st(3)
fstp st(1)
fstp st(0)
call fcn.00417560
fst qword [esp + 0x40]
fld qword [esp + 0x28]
mov edx, dword [ebp + 0x14]
fld qword [esp + 0x30]
mov ecx, dword [esp + 0x10]
fldz
fxch st(3)
fdiv st(2), st(0)
mov eax, dword [esp + 0x18]
shl eax, 4
add eax, ebx
fxch st(2)
fst qword [esp + 0x28]
fxch st(1)
fdivrp st(2)
fxch st(1)
fstp qword [esp + 0x30]
fld qword [eax]
fsub qword [esi]
fst qword [esp + 0x58]
fld qword [eax + 8]
fsub qword [esi + 8]
fst qword [esp + 0x60]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fcom st(4)
fnstsw ax
test ah, 0x41
jp 0x4b627f
fstp st(0)
fld st(3)
jmp 0x4b62a3
fstp st(2)
fstp st(3)
fstp st(2)
fstp st(0)
call fcn.00417560
fld qword [esp + 0x28]
fld qword [esp + 0x58]
mov edx, dword [ebp + 0x14]
fld qword [esp + 0x60]
mov ecx, dword [esp + 0x10]
fldz
fxch st(4)
fdiv st(2), st(0)
fdiv st(1), st(0)
fld st(1)
fmul qword [esp + 0x30]
fld st(3)
fmul st(5)
faddp st(1)
fld st(0)
fabs
fld qword [esp + 0x50]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x4b631b
fstp qword [esp + 0x50]
fcomp st(5)
fnstsw ax
test ah, 5
jp 0x4b6305
fxch st(1)
fmulp st(3)
fxch st(1)
fmul qword [esp + 0x30]
fsubp st(2)
fxch st(1)
fcomp st(2)
fnstsw ax
test ah, 1
jne 0x4b630b
fcomp qword [esp + 0x40]
mov ecx, dword [esp + 0xc]
fnstsw ax
test ah, 5
jnp 0x4b62fb
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x3c], edi
jmp 0x4b6327
fstp st(2)
fstp st(0)
fstp st(0)
mov ecx, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x3c], 0xffffffff
jmp 0x4b6325
fstp st(0)
fstp st(0)
fstp st(2)
fstp st(0)
fstp st(0)
fstp st(0)
add edi, 1
cmp edi, edx
jl 0x4b61af
add edx, 0xffffffff
mov dword [esp + 0x1c], edx
test ecx, ecx
mov eax, edx
je 0x4b6342
lea eax, [ecx - 1]
cmp ecx, edx
jne 0x4b634a
xor edi, edi
jmp 0x4b634d
lea edi, [ecx + 1]
shl ecx, 4
fld qword [ecx + ebx]
lea esi, [ecx + ebx]
shl eax, 4
fsub qword [eax + ebx]
add eax, ebx
mov dword [esp + 0x4c], 0xffffffff
mov dword [esp + 0x84], esi
fst qword [esp + 0x28]
fld qword [esi + 8]
fsub qword [eax + 8]
fst qword [esp + 0x30]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fcom st(3)
fnstsw ax
test ah, 0x41
jp 0x4b6394
fstp st(0)
fld st(2)
jmp 0x4b63ab
fstp st(3)
fstp st(1)
fstp st(0)
call fcn.00417560
fld qword [esp + 0x28]
fld qword [esp + 0x30]
fldz
fxch st(3)
fdiv st(2), st(0)
shl edi, 4
lea eax, [edi + ebx]
fxch st(2)
fstp qword [esp + 0x28]
fdivrp st(1)
fstp qword [esp + 0x30]
fld qword [eax]
fsub qword [esi]
fst qword [esp + 0x58]
fld qword [eax + 8]
fsub qword [esi + 8]
fst qword [esp + 0x60]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fcom st(3)
fnstsw ax
test ah, 0x41
jp 0x4b63ea
fstp st(0)
fld st(2)
jmp 0x4b6401
fstp st(2)
fstp st(2)
fstp st(1)
call fcn.00417560
fld qword [esp + 0x58]
fld qword [esp + 0x60]
fldz
fxch st(3)
fdiv st(2), st(0)
fdivp st(1)
fxch st(1)
fadd qword [esp + 0x28]
fst qword [esp + 0x28]
fxch st(1)
fadd qword [esp + 0x30]
fst qword [esp + 0x30]
fmul st(0), st(0)
fld st(1)
fmulp st(2)
faddp st(1)
fcom st(1)
fnstsw ax
test ah, 0x41
jnp 0x4b67d3
fstp st(1)
call fcn.00417560
fldz
fcom st(1)
fnstsw ax
test ah, 5
jp 0x4b67cf
cmp dword [ebp + 0x14], 0
fld qword [esp + 0x28]
fdiv st(2)
mov dword [esp + 0x18], 0
fstp qword [esp + 0x28]
fld qword [esp + 0x30]
fdivrp st(2)
fxch st(1)
fstp qword [esp + 0x30]
fld qword [0x510f90]
fstp qword [esp + 0x50]
fld qword [0x510fb8]
fstp qword [esp + 0x40]
jle 0x4b67d5
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 0x1c]
neg eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x38]
cdq
xor eax, edx
sub eax, edx
cmp eax, 1
jle 0x4b6790
cmp eax, dword [esp + 0x1c]
jge 0x4b6790
mov eax, dword [esp + 0x24]
fld qword [eax]
mov ecx, dword [esp + 0x84]
fsub qword [ecx]
fst qword [esp + 0x58]
fld qword [eax + 8]
fsub qword [ecx + 8]
fst qword [esp + 0x60]
fmul st(0), st(0)
fld st(1)
fmulp st(2)
faddp st(1)
fcom st(1)
fnstsw ax
test ah, 0x41
jnp 0x4b678a
fstp st(1)
call fcn.00417560
fst qword [esp + 0x88]
fldz
fld st(0)
fucomp st(2)
fnstsw ax
test ah, 0x44
jnp 0x4b678e
fld qword [esp + 0x58]
fdiv st(2)
fld qword [esp + 0x60]
fdiv st(3)
fmul qword [esp + 0x30]
fxch st(1)
fmul qword [esp + 0x28]
faddp st(1)
fld1
fcomp st(1)
fnstsw ax
test ah, 0x41
jp 0x4b652b
fstp st(0)
fld st(0)
fst qword [esp + 0x68]
jmp 0x4b6560
fld qword [0x50de40]
fcomp st(1)
fnstsw ax
test ah, 1
jne 0x4b6548
fstp st(0)
fld qword [0x510fa0]
fst qword [esp + 0x68]
jmp 0x4b6560
fstp st(1)
fstp st(1)
call fcn.005005e0
fst qword [esp + 0x68]
fldz
fld qword [esp + 0x88]
fxch st(2)
fld qword [0x510f70]
fsubr st(1)
fabs
fst qword [esp + 0x90]
fld qword [esp + 0x40]
fld qword [0x511338]
fsub st(1), st(0)
fxch st(2)
fcompp
fnstsw ax
test ah, 5
jnp 0x4b65b2
fxch st(1)
fsub qword [esp + 0x50]
fabs
fcompp
fnstsw ax
test ah, 5
jp 0x4b678e
fld qword [esp + 0x70]
fcomp st(2)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x4b6790
jmp 0x4b65b8
fstp st(2)
fstp st(2)
fstp st(1)
mov eax, dword [esp + 0x10]
fstp st(0)
mov ecx, dword [esp + 0x18]
cmp eax, ecx
jge 0x4b65d2
mov esi, eax
mov dword [esp + 0x48], esi
mov dword [esp + 0xc], ecx
jmp 0x4b65dc
mov esi, ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0xc], eax
mov ecx, dword [ebp + 0x1c]
mov edx, dword [esp + 0xc]
shl edx, 4
lea ebx, [edx + ecx]
lea eax, [esi + 1]
mov dword [esp + 0x14], eax
mov edx, esi
shl edx, 4
shl eax, 4
add eax, ecx
lea edi, [edx + ecx]
mov ecx, ebx
mov edx, edi
mov dword [esp + 0x20], eax
call fcn.004b5f80
cmp eax, 1
je 0x4b664d
test esi, esi
mov eax, dword [esp + 0x1c]
je 0x4b661a
lea eax, [esi - 1]
mov ecx, dword [ebp + 0x1c]
shl eax, 4
lea esi, [eax + ecx]
mov eax, esi
mov ecx, ebx
mov edx, edi
call fcn.004b5f80
cmp eax, 0xffffffff
jne 0x4b6786
mov eax, dword [esp + 0x20]
mov ecx, edi
mov edx, esi
call fcn.004b5f80
cmp eax, 1
jne 0x4b6786
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, dword [esp + 0xc]
mov dword [esp + 0x14], eax
jge 0x4b66ab
mov esi, dword [esp + 0x20]
mov ecx, eax
shl ecx, 4
add ecx, dword [ebp + 0x1c]
mov dword [esp + 0x20], esi
mov edi, edi
mov edx, ebx
call fcn.004b6000
cmp eax, 2
jg 0x4b669d
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
add eax, 1
add esi, 0x10
add ecx, 0x10
cmp eax, dword [esp + 0xc]
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], eax
jl 0x4b6670
jmp 0x4b66ab
mov edx, dword [esp + 0xc]
cmp dword [esp + 0x14], edx
jl 0x4b6786
mov eax, dword [esp + 0xc]
cmp eax, dword [esp + 0x1c]
jne 0x4b66b9
xor esi, esi
jmp 0x4b66bc
lea esi, [eax + 1]
mov ecx, dword [ebp + 0x1c]
mov eax, esi
shl eax, 4
add eax, ecx
mov ecx, ebx
mov edx, edi
mov dword [esp + 0x20], eax
call fcn.004b5f80
cmp eax, 0xffffffff
je 0x4b6700
lea eax, [ebx - 0x10]
call fcn.004b5f80
cmp eax, 1
jne 0x4b6786
mov eax, dword [esp + 0x20]
lea ecx, [ebx - 0x10]
mov edx, ebx
call fcn.004b5f80
cmp eax, 0xffffffff
jne 0x4b6786
cmp esi, dword [esp + 0x1c]
jne 0x4b670a
xor eax, eax
jmp 0x4b670d
lea eax, [esi + 1]
cmp eax, dword [esp + 0x48]
mov dword [esp + 0x14], eax
je 0x4b6738
mov ecx, eax
mov eax, dword [ebp + 0x1c]
shl ecx, 4
shl esi, 4
add ecx, eax
add esi, eax
mov edx, ebx
call fcn.004b6000
cmp eax, 2
jg 0x4b6786
mov esi, dword [esp + 0x14]
jmp 0x4b6700
fld qword [esp + 0x40]
fld qword [esp + 0x90]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x4b6771
fld qword [esp + 0x68]
mov edx, dword [esp + 0x18]
fstp qword [esp + 0x50]
mov dword [esp + 0x4c], edx
fstp qword [esp + 0x40]
fld qword [esp + 0x88]
fstp qword [esp + 0x70]
fldz
jmp 0x4b6790
mov edx, dword [esp + 0x18]
fstp st(0)
fld qword [esp + 0x88]
mov dword [esp + 0x4c], edx
fstp qword [esp + 0x70]
fldz
jmp 0x4b6790
fstp st(0)
jmp 0x4b6790
fstp st(1)
mov eax, dword [esp + 0x18]
add dword [esp + 0x38], 1
add dword [esp + 0x24], 0x10
add eax, 1
cmp eax, dword [ebp + 0x14]
mov dword [esp + 0x18], eax
jl 0x4b6491
mov eax, dword [esp + 0x4c]
test eax, eax
jl 0x4b67d5
mov ecx, dword [esp + 0x10]
fstp st(0)
cmp ecx, eax
jge 0x4b6878
mov ebx, ecx
mov dword [esp + 0xc], eax
jmp 0x4b687e
fstp st(1)
jmp 0x4b67d5
fstp st(0)
mov eax, dword [esp + 0x3c]
test eax, eax
jl 0x4b67f7
mov edx, dword [esp + 0x1c]
mov ebx, dword [ebp + 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x3c], 0xfffffffe
mov ecx, eax
jmp 0x4b6339
cmp eax, 0xffffffff
jne 0x4b6817
mov ecx, dword [esp + 0x10]
fstp st(0)
lea eax, [ecx + 1]
cmp eax, dword [ebp + 0x14]
jne 0x4b680c
xor eax, eax
sub ecx, 1
jns 0x4b67bc
mov ecx, dword [esp + 0x1c]
jmp 0x4b67bc
test dword [ebp + 0xc], 0x100
je 0x4b6a81
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 0x18]
lea esi, [edx + ecx*4]
mov edx, dword [ebp + 0x1c]
mov eax, ebx
sub eax, ecx
shl ecx, 4
add ecx, edx
test eax, eax
mov dword [ebp + 0x14], ebx
lea edi, [esi + 4]
lea edx, [ecx + 0x10]
je 0x4b691e
fld qword [edx]
mov ebx, dword [edi]
fstp qword [ecx]
sub eax, 1
fld qword [edx + 8]
mov dword [esi], ebx
fstp qword [ecx + 8]
add esi, 4
add edi, 4
add ecx, 0x10
add edx, 0x10
test eax, eax
jne 0x4b684f
mov ebx, dword [ebp + 0x14]
jmp 0x4b691e
mov ebx, eax
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp + 0x24]
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x20]
push ecx
mov ecx, dword [ebp + 0x10]
push edx
mov edx, dword [ebp + 0xc]
lea edi, [eax + ebx*4]
mov eax, dword [esp + 0x14]
mov esi, ebx
shl esi, 4
add esi, dword [ebp + 0x1c]
sub eax, ebx
push esi
push edi
add eax, 1
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
call fcn.004b6170
add esp, 0x20
test dword [ebp + 0xc], 0x100
mov dword [esp + 0x10], eax
jne 0x4b68c9
test eax, eax
jne 0x4b6a83
mov eax, dword [esp + 0xc]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
sub ecx, eax
lea edx, [edx + eax*4]
shl eax, 4
add eax, dword [ebp + 0x1c]
test ecx, ecx
mov dword [esp + 0x24], edx
je 0x4b690e
fld qword [eax]
mov edx, dword [esp + 0x24]
mov edx, dword [edx]
fstp qword [esi + 0x10]
fld qword [eax + 8]
add dword [esp + 0x24], 4
add esi, 0x10
sub ecx, 1
fstp qword [esi + 8]
add edi, 4
add eax, 0x10
test ecx, ecx
mov dword [edi], edx
jne 0x4b68e6
sub ebx, dword [esp + 0xc]
fldz
mov eax, dword [ebp + 0x14]
lea ebx, [eax + ebx + 1]
mov dword [ebp + 0x14], ebx
cmp ebx, 3
jne 0x4b6191
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp + 0x20]
mov ebx, dword [ebp + 0xc]
fstp st(0)
test bl, 4
je 0x4b6957
mov esi, dword [eax + 4]
mov ecx, dword [eax]
cmp ecx, esi
je 0x4b6a78
mov edx, dword [eax + 8]
cmp ecx, edx
je 0x4b6a78
cmp esi, edx
je 0x4b6a78
test bl, 1
je 0x4b69c1
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 4]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
add edx, 8
push edx
mov edx, dword [ecx + 4]
mov ecx, dword [eax + 4]
add edx, 8
push edx
add ecx, 8
push ecx
lea edx, [esp + 0x7c]
push edx
call fcn.0045b9e0
add esp, 0x10
test edi, edi
je 0x4b6a78
fld dword [esp + 0x74]
fmul qword [edi + 8]
fld dword [esp + 0x70]
fmul qword [edi]
faddp st(1)
fld dword [esp + 0x78]
fmul qword [edi + 0x10]
faddp st(1)
fcomp qword [0x50c4e8]
fnstsw ax
test ah, 0x41
jp 0x4b6a78
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test bl, 2
je 0x4b69ce
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
jmp 0x4b69d4
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
push ecx
mov ecx, dword [ebp + 0x10]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call fcn.004b5130
mov ecx, eax
add esp, 0x14
test ecx, ecx
jne 0x4b69fb
test ebx, 0x100
je 0x4b6a83
mov edx, dword [ebp + 0x24]
test edx, edx
je 0x4b6a09
mov eax, dword [edx]
mov dword [ecx + 8], eax
mov dword [edx], ecx
test edi, edi
je 0x4b6a78
test ebx, 0x100
je 0x4b6a56
test ebx, 0x400
je 0x4b6a78
fld dword [ecx + 0x24]
fmul qword [edi + 8]
fld dword [ecx + 0x20]
fmul qword [edi]
faddp st(1)
fld dword [ecx + 0x28]
fmul qword [edi + 0x10]
faddp st(1)
fcomp qword [0x50c4e8]
fnstsw ax
test ah, 0x41
jp 0x4b6a78
mov eax, dword [ecx + 8]
push ecx
mov dword [edx], eax
call fcn.0045be20
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fld dword [ecx + 0x24]
fmul qword [edi + 8]
fld dword [ecx + 0x20]
fmul qword [edi]
faddp st(1)
fld dword [ecx + 0x28]
fmul qword [edi + 0x10]
faddp st(1)
fcomp qword [0x50c4e8]
fnstsw ax
test ah, 0x41
jnp 0x4b6a83
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fstp st(0)
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret