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

Disassembly:
mov eax, 0x24f4
call fcn.005cd210
mov al, byte [0x637c2d]
test al, al
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], 0
je 0x513e09
mov eax, dword [0x75e028]
cmp ax, 0xffff
mov esi, eax
je 0x5137d9
call fcn.005136e0
test al, al
jne 0x5137de
mov esi, 1
mov ebp, dword [0x815cb0]
or edx, 0xffffffff
mov edi, ebp
call fcn.004d3a30
mov edi, eax
cmp edi, 0xffffffff
je 0x513e09
movsx eax, si
mov dword [esp + 0x14], eax
mov ecx, dword [ebp + 0x34]
mov eax, dword [esp + 0x14]
mov edx, edi
and edx, 0xffff
imul edx, edx, 0x70
movsx esi, word [edx + ecx + 0x2c]
add edx, ecx
movzx ecx, byte [edx + 0xf]
cmp ecx, eax
sete al
mov ecx, esi
and ecx, 0x1f
mov ebx, 1
shl ebx, cl
sar esi, 5
test dword [esi*4 + 0x75e270], ebx
je 0x51388c
mov cx, word [edx + 2]
test cl, 0x10
je 0x513847
test al, al
jne 0x51388c
test cl, 0x20
je 0x513850
test al, al
je 0x51388c
mov esi, dword [esp + 0x10]
movsx ecx, si
inc esi
test al, al
lea ecx, [esp + ecx*8 + 0x500]
mov dword [esp + 0x10], esi
mov word [ecx], di
mov si, word [edx + 4]
mov word [ecx + 2], si
mov si, word [edx + 0x2c]
mov word [ecx + 4], si
je 0x513887
test byte [edx + 2], 0x20
je 0x513887
mov eax, 1
jmp 0x513889
xor eax, eax
mov byte [ecx + 6], al
lea ecx, [edi + 1]
or esi, 0xffffffff
test cx, cx
jl 0x5138cb
mov di, word [ebp + 0x2e]
cmp cx, di
jge 0x5138cb
movsx edx, word [ebp + 0x22]
mov ebx, dword [ebp + 0x34]
movsx eax, cx
imul eax, edx
add eax, ebx
nop
cmp word [eax], 0
jne 0x5138c0
inc ecx
add eax, edx
cmp cx, di
jl 0x5138b0
jmp 0x5138cb
movsx esi, word [eax]
movsx edx, cx
shl esi, 0x10
or esi, edx
cmp esi, 0xffffffff
mov edi, esi
jne 0x513800
mov eax, dword [esp + 0x10]
test ax, ax
jle 0x513e09
mov ecx, dword [esp + 0x14]
movsx eax, ax
push ecx
lea eax, [esp + eax*8 + 0x504]
lea ecx, [esp + 0x504]
mov edx, eax
sub edx, ecx
sar edx, 3
push edx
push eax
mov edx, ecx
push edx
xor esi, esi
call fcn.00513e20
or ebp, edi
or edx, edi
mov edi, dword [esp + 0x24]
add esp, 0x10
xor bl, bl
lea eax, [esp + 0x504]
dec dword [esp + 0x10]
mov cx, word [eax - 2]
cmp cx, bp
jne 0x51393c
cmp word [eax], dx
jne 0x51393c
cmp byte [eax + 2], bl
jne 0x51393c
inc word [edi]
jmp 0x51395b
cmp si, 0x200
jge 0x513966
mov dx, word [eax]
mov bl, byte [eax + 2]
movsx edi, si
lea edi, [esp + edi*2 + 0x100]
inc esi
mov word [edi], 1
mov ebp, ecx
add eax, 8
cmp word [esp + 0x10], 0
jg 0x513920
xor edi, edi
cmp si, di
lea eax, [esp + 0x500]
mov dword [esp + 0x10], eax
jle 0x513e09
movzx edx, si
lea ecx, [esp + 0x100]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], edx
mov edi, edi
mov ecx, dword [esp + 0x10]
movzx eax, word [ecx + 2]
mov edx, dword [0x816d04]
mov cl, byte [ecx + 6]
shl eax, 5
mov ebp, dword [eax + edx + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [esp + 0x24]
mov ax, word [eax]
mov dword [esp + 0x58], edx
neg cl
lea edx, [ebp + 0xb0]
mov dword [esp + 0x60], edx
mov edx, dword [0x631ce8]
mov esi, dword [edx]
mov dword [esp + 0x6c], esi
mov esi, dword [edx + 4]
mov edx, dword [edx + 8]
sbb ecx, ecx
and ecx, 2
or ecx, 4
cmp ax, di
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], 0
mov dword [esp + 0x2c], edi
mov word [esp + 0x78], di
mov word [esp + 0x64], di
mov word [esp + 0x5c], ax
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], edx
mov dword [esp + 0x68], ecx
jle 0x513dd6
movzx eax, ax
mov dword [esp + 0x20], eax
jmp 0x513a20
mov ecx, dword [esp + 0x10]
mov di, word [ecx]
mov eax, dword [0x815cb0]
mov ecx, dword [eax + 0x34]
movzx edx, di
imul edx, edx, 0x70
fld dword [edx + ecx + 0x14]
fdiv dword [edx + ecx + 0x18]
lea esi, [edx + ecx]
mov edx, dword [esi + 4]
mov eax, dword [0x816d04]
and edx, 0xffff
shl edx, 5
mov eax, dword [edx + eax + 0x14]
fld dword [eax + 0x78]
fsub dword [eax + 0x74]
fmulp st(1)
fadd dword [eax + 0x74]
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
fmul dword [esi + 0x5c]
fstp dword [esp + 0x30]
je 0x513bfd
test byte [esi + 2], 0x40
je 0x513a9d
movzx ecx, byte [esi + 0xf]
movsx edx, word [esi + 0xc]
imul ecx, ecx, 0x1ea0
mov eax, dword [0x64dc00]
imul edx, edx, 0x34
add ecx, eax
lea eax, [edx + ecx + 0x108c]
jmp 0x513b2c
mov ecx, eax
sar ecx, 0x10
test ax, ax
mov dword [esp + 0x18], ecx
jl 0x513beb
mov ecx, dword [0x7fb2d0]
cmp ax, word [ecx + 0x20]
jge 0x513beb
mov ebx, dword [ecx + 0x34]
movsx edx, word [ecx + 0x22]
movsx ecx, ax
imul edx, ecx
mov cx, word [edx + ebx]
add edx, ebx
test cx, cx
je 0x513beb
mov ebp, dword [esp + 0x18]
test bp, bp
je 0x513aed
cmp cx, bp
jne 0x513be7
mov cl, byte [edx + 3]
mov ebp, 1
shl ebp, cl
test ebp, ebp
je 0x513be7
mov ecx, dword [edx + 8]
test ecx, ecx
mov ebp, dword [esp + 0x38]
je 0x513beb
and eax, 0xffff
lea edx, [eax + eax*2]
mov ecx, dword [ebx + edx*4 + 8]
movsx edx, word [esi + 0xc]
movsx eax, word [ecx + 0x1f2]
imul edx, edx, 0x34
add edx, ecx
add eax, edx
mov ecx, dword [eax]
fld dword [esi + 0x30]
cmp ecx, 0x3f800000
fld dword [esi + 0x34]
fld dword [esi + 0x38]
je 0x513b4d
fxch st(2)
fmul dword [eax]
fxch st(2)
fxch st(1)
fmul dword [eax]
fxch st(1)
fmul dword [eax]
fld st(0)
fmul dword [eax + 0x1c]
fld st(2)
fmul dword [eax + 0x10]
faddp st(1)
fld st(3)
fmul dword [eax + 4]
faddp st(1)
fadd dword [eax + 0x28]
fstp dword [esp + 0x40]
fld st(2)
fmul dword [eax + 8]
fld st(1)
fmul dword [eax + 0x20]
faddp st(1)
fld st(2)
fmul dword [eax + 0x14]
faddp st(1)
fadd dword [eax + 0x2c]
fstp dword [esp + 0x44]
fmul dword [eax + 0x24]
fxch st(1)
fmul dword [eax + 0x18]
faddp st(1)
fxch st(1)
fmul dword [eax + 0xc]
faddp st(1)
fadd dword [eax + 0x30]
fstp dword [esp + 0x48]
fld dword [esi + 0x3c]
fld dword [esi + 0x40]
fld dword [esi + 0x44]
fld st(0)
fmul dword [eax + 0x1c]
fld st(2)
fmul dword [eax + 0x10]
faddp st(1)
fld st(3)
fmul dword [eax + 4]
faddp st(1)
fstp dword [esp + 0x4c]
fld st(0)
fmul dword [eax + 0x20]
fld st(2)
fmul dword [eax + 0x14]
faddp st(1)
fld st(3)
fmul dword [eax + 8]
faddp st(1)
fstp dword [esp + 0x50]
fmul dword [eax + 0x24]
fxch st(1)
fmul dword [eax + 0x18]
faddp st(1)
fxch st(1)
fmul dword [eax + 0xc]
faddp st(1)
fstp dword [esp + 0x54]
jmp 0x513c32
mov ebp, dword [esp + 0x38]
mov eax, dword [0x815cb0]
movsx edx, di
call fcn.004d3910
jmp 0x513dab
lea eax, [esi + 0x30]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x40], ecx
lea ecx, [esi + 0x3c]
mov dword [esp + 0x44], edx
mov edx, dword [ecx]
mov dword [esp + 0x48], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ecx
mov dword [esi + 8], 0xffffffff
fld dword [esp + 0x48]
fmul dword [0x75e0bc]
fld dword [esp + 0x44]
fmul dword [0x75e0b0]
faddp st(1)
fld dword [esp + 0x40]
fmul dword [0x75e0a4]
faddp st(1)
fadd dword [0x75e0c8]
fcom dword [0x612220]
fnstsw ax
test ah, 1
je 0x513c69
fchs
fcom dword [0x61230c]
fnstsw ax
test ah, 0x41
je 0x513c7e
fstp st(0)
fld dword [0x61230c]
fld dword [0x75e210]
fdiv st(1)
fmul dword [esp + 0x30]
fadd st(0), st(0)
fstp dword [esp + 0x34]
fstp st(0)
fld dword [esp + 0x34]
fcomp dword [ebp + 0x90]
fnstsw ax
test ah, 0x41
jne 0x513dab
fld dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
fadd st(0), st(0)
inc eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], 0x3f800000
fmul dword [ebp + 0xa8]
fstp dword [esp + 0x28]
fld dword [esi + 0x18]
fsub dword [esi + 0x14]
fstp dword [esp + 0x18]
fld dword [esp + 0x30]
fadd dword [esp + 0x3c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x34]
fcomp dword [ebp + 0x68]
fnstsw ax
test ah, 5
jp 0x513cfb
fld dword [ebp + 0x68]
fdiv dword [esp + 0x34]
fmul dword [esp + 0x28]
fstp dword [esp + 0x28]
fld dword [ebp + 0x40]
fcomp dword [0x612220]
fnstsw ax
test ah, 0x41
jne 0x513d22
fld dword [esi + 0x14]
fcomp dword [ebp + 0x40]
fnstsw ax
test ah, 5
jp 0x513d22
fld dword [esi + 0x14]
fdiv dword [ebp + 0x40]
fstp dword [esp + 0x1c]
fld dword [ebp + 0x44]
fcomp dword [0x612220]
fnstsw ax
test ah, 0x41
jne 0x513d4f
fld dword [esp + 0x18]
fcomp dword [ebp + 0x44]
fnstsw ax
test ah, 5
jp 0x513d4f
fld dword [esp + 0x18]
fdiv dword [ebp + 0x44]
fmul dword [esp + 0x1c]
fstp dword [esp + 0x1c]
mov cx, word [esi + 2]
movzx eax, cl
shr eax, 1
and eax, 2
test cl, 8
je 0x513d65
or eax, 4
jmp 0x513d68
and eax, 0xfffffffb
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
push eax
push edx
mov edx, dword [esi + 0x54]
lea eax, [esi + 0x60]
push eax
push ecx
push edx
xor edx, edx
mov dx, word [ebp + 0xac]
lea eax, [esp + 0x60]
push eax
mov ax, word [esi + 0x24]
lea ecx, [esp + 0x58]
push ecx
mov cx, word [esi + 0x26]
push edx
lea ebx, [esp + 0x78]
call fcn.00515110
mov eax, dword [0x75e020]
add esp, 0x20
mov dword [esi + 0x10], eax
add dword [esp + 0x10], 8
dec dword [esp + 0x20]
jne 0x513a20
mov eax, dword [esp + 0x2c]
xor edi, edi
cmp ax, di
je 0x513dd6
movsx ecx, ax
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fdivr dword [esp + 0x3c]
jmp 0x513ddc
fld dword [0x612220]
mov edx, dword [esp + 0x60]
lea esi, [esp + 0x58]
fstp dword [edx + 0x98]
call fcn.00515030
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
add ecx, 2
dec eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], eax
jne 0x513990
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24f4
ret