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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x61c218
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
push ebx
push esi
push edi
mov eax, dword [0x67dc50]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
xor edi, edi
cmp eax, edi
jle 0x515af4
call fcn.00513f80
mov eax, dword [ebx + 0x3c]
push eax
mov ecx, ebx
call fcn.00515010
test eax, eax
jne 0x515b1d
xor eax, eax
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 0xc]
cmp eax, edi
jne 0x515b35
movzx eax, word [ebx + 0x38]
push eax
call fcn.00525810
mov ecx, eax
call fcn.005259e0
mov dword [esp + 0x28], eax
cmp eax, edi
je 0x515b03
mov eax, dword [ebx + 0x3c]
mov dword [esp + 0x58], eax
cmp eax, edi
je 0x515b5f
lea edx, [eax + 1]
jmp 0x515b50
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x515b50
sub eax, edx
mov dword [esp + 0x48], eax
jmp 0x515b63
mov dword [esp + 0x48], edi
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
mov dword [esp + 0x18], edx
mov edx, dword [ebx]
mov edx, dword [edx + 0x78]
fst qword [esp + 0x4c]
mov ecx, ebx
fild dword [esp + 0x18]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x74]
push eax
fstp qword [esp + 0x90]
fadd st(0), st(0)
fstp qword [esp + 0xa0]
fild dword [esp + 0x1c]
fstp qword [esp + 0x88]
call edx
mov ecx, ebx
call fcn.004762e0
mov ecx, dword [eax]
mov dword [esp + 0x60], ecx
mov edx, dword [eax + 4]
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
mov dword [esp + 0x64], edx
fstp qword [esp + 0x94]
fld qword [ebx + 0x18]
fst qword [esp + 0x3c]
fldz
fucompp
fnstsw ax
test ah, 0x44
jp 0x515be9
xor esi, esi
jmp 0x515bee
mov esi, 1
lea ecx, [esp + 0xa4]
push ecx
mov ecx, ebx
call fcn.005145b0
push eax
lea ecx, [esp + 0x6c]
call fcn.0051f0c0
mov dl, byte [ebx + 0x2b]
mov dword [esp + 0xb8], edi
mov byte [esp + 0x1f], dl
cmp esi, edi
je 0x515c38
fld qword [esp + 0x3c]
lea eax, [esp + 0x60]
push eax
fchs
sub esp, 8
mov eax, esp
lea ecx, [esp + 0x74]
fstp qword [eax]
mov dword [esp + 0x20], esp
call fcn.00520630
test byte [esp + 0x1f], 1
je 0x515c4d
lea ecx, [esp + 0x60]
push ecx
lea ecx, [esp + 0x6c]
call fcn.00520b60
test byte [esp + 0x1f], 2
je 0x515c62
lea edx, [esp + 0x60]
push edx
lea ecx, [esp + 0x6c]
call fcn.00520bb0
lea eax, [esp + 0x7c]
push eax
lea ecx, [esp + 0x6c]
call fcn.0051f160
mov ecx, dword [eax + 4]
lea edx, [esp + 0x7c]
mov dword [esp + 0x78], ecx
push edx
lea ecx, [esp + 0x6c]
call fcn.0051f160
mov eax, dword [eax]
mov dword [esp + 0x18], eax
movzx eax, word [ebx + 0x38]
fild dword [esp + 0x18]
movzx ecx, ax
fst qword [esp + 0x7c]
fst qword [esp + 0x34]
cmp cx, 2
je 0x515cce
movzx ecx, ax
cmp cx, 4
je 0x515cce
movzx ecx, ax
cmp cx, 6
je 0x515cce
movzx ecx, ax
cmp cx, 8
je 0x515cce
movzx eax, ax
cmp ax, 0xa
je 0x515cce
fild dword [esp + 0x78]
jmp 0x515d15
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + 8]
cmp eax, edi
je 0x515cde
mov ecx, dword [eax + 0x38]
jmp 0x515ce0
xor ecx, ecx
mov dword [esp + 0x18], ecx
cmp eax, edi
je 0x515cf1
mov edx, dword [eax + 0x34]
mov dword [esp + 0x24], edx
jmp 0x515cf5
mov dword [esp + 0x24], edi
fild dword [esp + 0x18]
fmul qword [esp + 0x84]
fidiv dword [esp + 0x24]
call fcn.005f6310
fild dword [esp + 0x78]
mov dword [esp + 0x18], eax
fisub dword [esp + 0x18]
xor esi, esi
fstp qword [esp + 0x3c]
cmp dword [esp + 0x48], esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x20], esi
jg 0x515d74
fstp st(0)
lea ecx, [esp + 0x68]
mov dword [esp + 0xb8], 0xffffffff
call fcn.0051f120
mov eax, 1
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
fld qword [esp + 0x7c]
mov eax, dword [esp + 0x58]
mov al, byte [esi + eax]
cmp al, 0xa
jne 0x515d9f
fstp qword [esp + 0x34]
inc esi
fld qword [esp + 0x94]
fadd qword [esp + 0x84]
fsubr qword [esp + 0x3c]
fstp qword [esp + 0x3c]
jmp 0x516064
movsx eax, al
fstp st(0)
mov dword [esp + 0x14], eax
shr eax, 7
not al
and al, 1
je 0x51604a
mov ecx, dword [esp + 0x28]
call fcn.00513ff0
test eax, 0x20000
je 0x515e2d
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
call fcn.00524230
cmp dword [esp + 0x5c], 0
jle 0x515e1e
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fimul dword [esp + 0x5c]
fstp qword [esp + 0x4c]
call fcn.00514010
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fldz
fld st(0)
fucomp st(2)
fnstsw ax
test ah, 0x44
jnp 0x515e31
fld qword [esp + 0x4c]
fdivrp st(2)
fxch st(1)
fstp qword [esp + 0x4c]
jmp 0x515e33
mov ecx, dword [ebx + 4]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fstp qword [esp + 0x4c]
fldz
jmp 0x515e33
fstp st(1)
fld qword [esp + 0x4c]
mov edx, 1
fld st(0)
cmp dword [esp + 0x24], edx
jne 0x515e59
fstp st(0)
add esi, edx
fstp st(1)
mov dword [esp + 0x24], 0
add edi, edx
jmp 0x516055
mov eax, dword [esp + 0x58]
fstp st(1)
mov al, byte [esi + eax]
cmp al, 0x5c
jne 0x515e75
fstp st(0)
mov dword [esp + 0x24], edx
fstp st(0)
add esi, edx
jmp 0x516064
cmp al, 0x28
je 0x515e85
cmp al, 0x3c
je 0x515e85
cmp al, 0x5b
je 0x515e85
cmp al, 0x7b
jne 0x515eed
push eax
fstp st(0)
call fcn.00514e80
fld qword [esp + 0x38]
fcom st(1)
mov dword [esp + 0x1c], eax
add esp, 4
fnstsw ax
fld qword [0x62ebc8]
test ah, 1
jne 0x515eab
fadd st(1), st(0)
jmp 0x515ead
fsub st(1), st(0)
fxch st(1)
call fcn.005f6310
fld qword [esp + 0x3c]
fcom st(2)
mov dword [esp + 0x2c], eax
fnstsw ax
fstp st(2)
test ah, 1
jne 0x515eda
faddp st(1)
call fcn.005f6310
xor edi, edi
mov dword [esp + 0x30], eax
inc esi
jmp 0x516064
fsubp st(1)
call fcn.005f6310
xor edi, edi
mov dword [esp + 0x30], eax
inc esi
jmp 0x516064
push eax
call fcn.00514e60
add esp, 4
test eax, eax
je 0x516042
fstp st(0)
fld qword [esp + 0x34]
fcom st(1)
fnstsw ax
fld qword [0x62ebc8]
test ah, 1
jne 0x515f17
fadd st(1), st(0)
jmp 0x515f19
fsub st(1), st(0)
fxch st(1)
call fcn.005f6310
fld qword [esp + 0x3c]
fcom st(2)
mov esi, eax
fnstsw ax
fstp st(2)
test ah, 1
jne 0x515f35
faddp st(1)
jmp 0x515f37
fsubp st(1)
call fcn.005f6310
mov ecx, dword [esp + 0x18]
cmp ecx, 1
jne 0x515f82
mov edx, dword [esp + 0x30]
push edi
sub esp, 8
mov ecx, esp
mov dword [ecx + 4], eax
mov dword [esp + 0x20], esp
mov dword [ecx], esi
mov ecx, dword [esp + 0x38]
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [ebp + 8]
mov dword [esp + 0x28], esp
push eax
mov ecx, ebx
call fcn.005151b0
inc dword [esp + 0x20]
mov esi, dword [esp + 0x20]
jmp 0x516068
cmp ecx, 2
jne 0x515fc4
mov edx, dword [esp + 0x30]
push edi
sub esp, 8
mov ecx, esp
mov dword [ecx + 4], eax
mov dword [esp + 0x20], esp
mov dword [ecx], esi
mov ecx, dword [esp + 0x38]
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [ebp + 8]
mov dword [esp + 0x28], esp
push eax
mov ecx, ebx
call fcn.00515340
inc dword [esp + 0x20]
mov esi, dword [esp + 0x20]
jmp 0x516068
cmp ecx, 3
jne 0x516003
mov edx, dword [esp + 0x30]
push edi
sub esp, 8
mov ecx, esp
mov dword [ecx + 4], eax
mov dword [esp + 0x20], esp
mov dword [ecx], esi
mov ecx, dword [esp + 0x38]
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [ebp + 8]
mov dword [esp + 0x28], esp
push eax
mov ecx, ebx
call fcn.00515530
inc dword [esp + 0x20]
mov esi, dword [esp + 0x20]
jmp 0x516068
cmp ecx, 4
jne 0x516038
mov edx, dword [esp + 0x30]
push edi
sub esp, 8
mov ecx, esp
mov dword [ecx + 4], eax
mov dword [esp + 0x20], esp
mov dword [ecx], esi
mov ecx, dword [esp + 0x38]
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [ebp + 8]
mov dword [esp + 0x28], esp
push eax
mov ecx, ebx
call fcn.00515740
inc dword [esp + 0x20]
mov esi, dword [esp + 0x20]
jmp 0x516068
add esi, edx
fstp st(1)
add edi, edx
jmp 0x516055
fld qword [esp + 0x9c]
add esi, 2
inc edi
fadd qword [esp + 0x8c]
fadd qword [esp + 0x34]
fstp qword [esp + 0x34]
mov dword [esp + 0x20], esi
cmp esi, dword [esp + 0x48]
jl 0x515d70
jmp 0x515d37