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

Disassembly:
sub esp, 0xd8
mov eax, dword [0x68f500]
xor eax, esp
mov dword [esp + 0xd4], eax
push ebx
mov ebx, dword [esp + 0xf0]
xor ecx, ecx
push ebp
push esi
mov esi, dword [esp + 0xfc]
mov eax, ebx
push edi
mov edi, dword [esp + 0xf8]
shl eax, 0x10
mov dword [esp + 0x20], 0
mov dword [esp + 0x48], ecx
mov dword [esp + 0x3c], eax
test edi, edi
je 0x5133d5
test esi, esi
je 0x5133d5
lea eax, [ebx - 2]
cmp eax, 0x1e
ja 0x5133d5
mov ebx, dword [edi]
mov dword [esp + 0x38], ebx
test ebx, ebx
jne 0x512b4e
mov dword [esp + 0x20], 6
mov ecx, ebx
push dword [esp + 0x48]
push ecx
call fcn.004bb3b0
mov ecx, dword [esp + 0xec]
add esp, 8
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005ab3d6
add esp, 0xd8
ret
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi]
imul eax, dword [esi + 4]
lea eax, [eax + eax*2]
shl eax, 2
push eax
push ebx
call fcn.004bb350
add esp, 0xc
mov ecx, eax
cmp dword [esp + 0x20], 0
mov dword [esp + 0x48], ecx
jne 0x512b22
mov edx, dword [edi + 4]
mov edi, dword [esi + 4]
mov eax, dword [esi]
mov ebp, dword [esi + 0xc]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ebp
test edi, edi
je 0x5133c8
test eax, eax
je 0x5133c8
test edx, edx
je 0x513242
movq xmm1, qword [0x60c1d8]
mov esi, dword [edx + 8]
mov dword [esp + 0x34], esi
test esi, esi
je 0x513227
movups xmm0, xmmword [esi]
xor ecx, ecx
mov byte [esp + 0x13], 0
xor ebx, ebx
mov dword [esp + 0x28], 0
movups xmmword [esp + 0x98], xmm0
xor ebp, ebp
xor edi, edi
movups xmm0, xmmword [esi + 0x10]
xor edx, edx
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], ecx
movups xmmword [esp + 0xa8], xmm0
movq xmm0, qword [esi + 0x20]
movq qword [esp + 0xb8], xmm0
mov eax, dword [esp + 0xb8]
sub eax, 1
je 0x512ca0
sub eax, 1
je 0x512c40
sub eax, 1
jne 0x512d14
mov ecx, dword [esp + 0xb4]
mov al, 1
mov ebp, dword [esp + 0xb0]
mov byte [esp + 0x13], al
mov dword [esp + 0x28], ecx
jmp 0x512c44
mov al, cl
mov ebp, ecx
mov ebx, ecx
mov ecx, ebp
test al, al
je 0x512c82
mov eax, dword [esp + 0xa8]
mov edx, ecx
cmp eax, ebp
mov edi, ebx
cmovl edx, eax
cmp eax, ecx
mov dword [esp + 0x24], edx
cmovg ecx, eax
mov eax, dword [esp + 0xac]
cmp eax, dword [esp + 0x28]
cmovl edi, eax
cmp eax, ebx
mov dword [esp + 0x1c], edi
cmovg ebx, eax
mov al, byte [esp + 0x13]
jmp 0x512ca6
mov edx, dword [esp + 0xa8]
mov al, 1
mov edi, dword [esp + 0xac]
mov ecx, edx
mov dword [esp + 0x24], edx
mov ebx, edi
mov dword [esp + 0x1c], edi
jmp 0x512ca6
xor edx, edx
mov al, cl
xor edi, edi
mov dword [esp + 0x14], ecx
mov ebp, ebx
test al, al
je 0x512cde
mov eax, dword [esp + 0x98]
cmp eax, dword [esp + 0x24]
cmovl edx, eax
cmp eax, ecx
cmovg ecx, eax
mov eax, dword [esp + 0x9c]
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
cmovl edi, eax
cmp eax, ebx
mov ebx, ecx
cmovg ebp, eax
jmp 0x512cf0
mov edx, dword [esp + 0x98]
mov ebx, edx
mov edi, dword [esp + 0x9c]
mov ebp, edi
mov ecx, dword [esp + 0xa4]
cmp ecx, ebp
mov eax, dword [esp + 0xa0]
cmovg ebp, ecx
cmp eax, ebx
cmovg ebx, eax
cmp ecx, edi
cmovl edi, ecx
cmp eax, edx
cmovl edx, eax
jmp 0x512d16
mov ebx, ecx
lea eax, [edx - 0x3f]
cdq
lea ecx, [ebp + 0x3f]
and edx, 0x3f
add eax, edx
sar eax, 6
sub eax, dword [esp + 0xfc]
mov dword [esp + 0x4c], eax
lea eax, [ebx + 0x3f]
mov ebx, dword [esp + 0xfc]
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
add eax, ebx
mov dword [esp + 0x6c], eax
lea eax, [edi - 0x3f]
cdq
and edx, 0x3f
add edx, eax
sar edx, 6
sub edx, ebx
mov dword [esp + 0x1c], edx
mov ecx, ecx
test ecx, ecx
jns 0x512d64
add ecx, 0x3f
sar ecx, 6
mov edi, dword [esp + 0x18]
lea eax, [ecx + ebx]
mov dword [esp + 0x8c], eax
cmp edx, eax
jge 0x513214
mov ecx, dword [esp + 0x6c]
mov eax, edx
mov ebp, dword [esp + 0x4c]
mov esi, edx
imul eax, edi
shl esi, 6
add esi, 0x20
mov dword [esp + 0x14], esi
mov dword [esp + 0x30], eax
nop word [eax + eax]
mov ebx, ebp
mov dword [esp + 0x70], ebx
cmp ebp, ecx
jge 0x5131f1
mov eax, dword [0x60c194]
shl ebp, 6
add ebp, 0x20
mov dword [esp + 0x28], ebp
nop dword [eax]
mov ecx, dword [0x60c190]
mov dword [esp + 0x84], ecx
mov ecx, dword [0x60c1e0]
movq qword [esp + 0xc0], xmm1
mov dword [esp + 0xc8], ecx
test ebx, ebx
js 0x5131cd
cmp ebx, edi
jge 0x5131cd
cmp esi, 0x20
jl 0x5131cd
cmp edx, dword [esp + 0x40]
jge 0x5131cd
mov ecx, dword [esp + 0x34]
xor edi, edi
mov dword [esp + 0x84], edi
mov eax, dword [ecx + 0x20]
sub eax, 1
je 0x512e74
sub eax, 1
je 0x512e55
sub eax, 1
je 0x512e36
mov esi, dword [esp + 0xc0]
mov edi, 6
jmp 0x5130cd
lea eax, [esp + 0xc0]
push eax
push esi
push ebp
push ecx
call fcn.00512380
mov esi, dword [esp + 0xd0]
add esp, 0x10
jmp 0x5130c1
lea eax, [esp + 0xc0]
push eax
push esi
push ebp
push ecx
call fcn.00511eb0
mov esi, dword [esp + 0xd0]
add esp, 0x10
jmp 0x5130c1
mov ebp, dword [ecx + 4]
mov edi, dword [ecx + 0xc]
mov ebx, dword [ecx]
sub edi, ebp
mov esi, dword [ecx + 8]
mov eax, edi
imul eax, edi
sub esi, ebx
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], edi
cdq
and edx, 0x3f
lea ecx, [edx + eax]
mov eax, esi
imul eax, esi
sar ecx, 6
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
add ecx, eax
mov eax, dword [esp + 0x28]
sub eax, ebx
imul eax, esi
mov esi, dword [esp + 0x14]
push ecx
cdq
and edx, 0x3f
lea ecx, [edx + eax]
mov eax, esi
sub eax, ebp
sar ecx, 6
imul eax, edi
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
add ecx, eax
push ecx
call fcn.004b52a0
mov edi, eax
mov dword [esp + 0x64], esi
mov eax, dword [esp + 0x30]
add esp, 8
mov dword [esp + 0x24], edi
mov ecx, eax
mov dword [esp + 0x58], ecx
mov edx, esi
cmp edi, 0x10000
jle 0x512f0c
mov edi, 0x10000
mov dword [esp + 0x58], eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x5c], esi
test edi, edi
jns 0x512f1e
xor edi, edi
mov dword [esp + 0x58], ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0x5c], edx
mov eax, dword [esp + 0x50]
shl eax, 0xa
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x24]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x54]
mov esi, dword [esp + 0x90]
shl eax, 0xa
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x24]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x94], eax
sub ebx, dword [esp + 0x58]
sub ebp, dword [esp + 0x5c]
shl ebx, 0xa
shl ebp, 0xa
add ebx, esi
add ebp, dword [esp + 0x94]
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebp
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x54]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x74], eax
mov esi, dword [esp + 0x74]
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x50]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x78], eax
sub esi, dword [esp + 0x78]
sets al
lea eax, [eax*2 - 1]
mov byte [esp + 0xc8], al
lea eax, [esp + 0x64]
push eax
call fcn.004b9aa0
add esp, 4
mov esi, eax
mov dword [esp + 0xc0], esi
test edi, edi
je 0x51303a
cmp edi, 0x10000
je 0x51303a
mov edi, 0x10000
jmp 0x5130ab
lea eax, [esp + 0x50]
push eax
call fcn.004b9b20
lea eax, [esp + 0x68]
push eax
call fcn.004b9b20
add esp, 8
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x68]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x7c], eax
mov edi, dword [esp + 0x7c]
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x64]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x80], eax
sub edi, dword [esp + 0x80]
mov ebx, dword [esp + 0x70]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0xc4], edi
mov edi, dword [esp + 0x84]
movq xmm1, qword [0x60c1d8]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x20], edi
test edi, edi
jne 0x5133bf
cmp dword [esp + 0xec], 1
jne 0x5130ea
neg byte [esp + 0xc8]
cmp esi, dword [esp + 0x3c]
jg 0x5131c0
cmp byte [esp + 0xf1], 0
je 0x513104
mov eax, dword [esp + 0x30]
jmp 0x513110
mov eax, dword [esp + 0x40]
sub eax, edx
dec eax
imul eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x48]
add eax, ebx
lea eax, [eax + eax*2]
cmp byte [ecx + eax*4 + 8], 0
lea edi, [ecx + eax*4]
je 0x5131a9
mov ecx, dword [edi]
mov eax, ecx
sub eax, esi
jns 0x513133
mov eax, esi
sub eax, ecx
cmp eax, 0x20
jg 0x5131a5
mov eax, dword [esp + 0xc8]
lea ecx, [esp + 0xd8]
movq xmm0, qword [esp + 0xc0]
mov dword [esp + 0xe0], eax
mov eax, dword [edi + 8]
mov dword [esp + 0xd4], eax
mov eax, dword [esp + 0xc4]
cdq
mov esi, eax
movq qword [esp + 0xd8], xmm0
movq xmm0, qword [edi]
xor esi, edx
movq qword [esp + 0xcc], xmm0
sub esi, edx
mov eax, dword [esp + 0xd0]
cdq
xor eax, edx
sub eax, edx
lea edx, [esp + 0xcc]
cmp eax, esi
cmovg ecx, edx
movq xmm0, qword [ecx]
mov eax, dword [ecx + 8]
jmp 0x5131b9
cmp ecx, esi
jle 0x5131c0
movq xmm0, qword [esp + 0xc0]
mov eax, dword [esp + 0xc8]
movq qword [edi], xmm0
mov dword [edi + 8], eax
mov edi, dword [esp + 0x18]
mov eax, dword [0x60c194]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x6c]
inc ebx
mov edx, dword [esp + 0x1c]
add ebp, 0x40
mov dword [esp + 0x70], ebx
mov dword [esp + 0x28], ebp
cmp ebx, ecx
jl 0x512dc0
mov eax, dword [esp + 0x30]
mov ebp, dword [esp + 0x4c]
inc edx
add esi, 0x40
add eax, edi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x30], eax
cmp edx, dword [esp + 0x8c]
jl 0x512da0
mov esi, dword [esp + 0x34]
mov esi, dword [esi + 0x24]
mov dword [esp + 0x34], esi
test esi, esi
jne 0x512bc0
mov edx, dword [esp + 0x2c]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x2c], edx
test edx, edx
jne 0x512bb1
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
mov ebp, dword [esp + 0x44]
test eax, eax
jle 0x5133bf
lea eax, [edi + edi*2]
shl eax, 2
mov dword [esp + 0x34], eax
mov eax, ecx
mov ecx, dword [esp + 0xf4]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x30], eax
or bl, 0xff
test ecx, ecx
je 0x513276
setns bl
lea ebx, [ebx*2 - 1]
test edi, edi
jle 0x5133a8
cmp byte [esp + 0xf0], 0
mov esi, eax
je 0x513313
mov dword [esp + 0x2c], edi
mov al, byte [esi + 8]
mov edx, dword [esp + 0x3c]
test al, al
jne 0x5132a1
mov dword [esi], edx
jmp 0x5132a3
mov bl, al
mov ecx, dword [esi]
cmp ecx, edx
movsx eax, bl
cmovg ecx, edx
imul eax, ecx
push edx
neg eax
push eax
mov dword [esi], eax
call fcn.004b52a0
mov edi, eax
add esp, 8
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
sar ecx, 9
test edi, edi
jle 0x5132db
cmp ecx, 0x7f
mov eax, 0x7f
cmovg ecx, eax
test edi, edi
jns 0x5132eb
cmp ecx, 0x80
mov eax, 0x80
cmovg ecx, eax
mov al, 0x80
lea edx, [ecx + 0x80]
sub al, cl
test edi, edi
movzx ecx, al
movzx eax, dl
cmovns ecx, eax
add esi, 0xc
mov byte [ebp], cl
inc ebp
sub dword [esp + 0x2c], 1
jne 0x513292
jmp 0x513391
mov dword [esp + 0x2c], edi
mov al, byte [esi + 8]
mov edx, dword [esp + 0x3c]
test al, al
jne 0x513326
mov dword [esi], edx
jmp 0x513328
mov bl, al
mov ecx, dword [esi]
cmp ecx, edx
movsx eax, bl
cmovg ecx, edx
imul eax, ecx
push edx
push eax
mov dword [esi], eax
call fcn.004b52a0
mov edi, eax
add esp, 8
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
sar ecx, 9
test edi, edi
jle 0x51335e
cmp ecx, 0x7f
mov eax, 0x7f
cmovg ecx, eax
test edi, edi
jns 0x51336e
cmp ecx, 0x80
mov eax, 0x80
cmovg ecx, eax
mov al, 0x80
lea edx, [ecx + 0x80]
sub al, cl
test edi, edi
movzx ecx, al
movzx eax, dl
cmovns ecx, eax
add esi, 0xc
mov byte [ebp], cl
inc ebp
sub dword [esp + 0x2c], 1
jne 0x513317
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0xf4]
mov eax, dword [esp + 0x30]
add ebp, edi
add eax, edx
sub dword [esp + 0x40], 1
mov dword [esp + 0x44], ebp
mov dword [esp + 0x30], eax
jne 0x513265
mov ecx, dword [esp + 0x38]
jmp 0x512b24
mov dword [esp + 0x20], 0x13
jmp 0x512b22
mov dword [esp + 0x20], 6
jmp 0x512b24