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

Disassembly:
sub esp, 0xd8
mov eax, dword [0x68e500]
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 0x512505
test esi, esi
je 0x512505
lea eax, [ebx - 2]
cmp eax, 0x1e
ja 0x512505
mov ebx, dword [edi]
mov dword [esp + 0x38], ebx
test ebx, ebx
jne 0x511c7e
mov dword [esp + 0x20], 6
mov ecx, ebx
push dword [esp + 0x48]
push ecx
call fcn.004ba4e0
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.005aa453
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.004ba480
add esp, 0xc
mov ecx, eax
cmp dword [esp + 0x20], 0
mov dword [esp + 0x48], ecx
jne 0x511c52
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 0x5124f8
test eax, eax
je 0x5124f8
test edx, edx
je 0x512372
movq xmm1, qword [0x60b1d8]
mov esi, dword [edx + 8]
mov dword [esp + 0x34], esi
test esi, esi
je 0x512357
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 0x511dd0
sub eax, 1
je 0x511d70
sub eax, 1
jne 0x511e44
mov ecx, dword [esp + 0xb4]
mov al, 1
mov ebp, dword [esp + 0xb0]
mov byte [esp + 0x13], al
mov dword [esp + 0x28], ecx
jmp 0x511d74
mov al, cl
mov ebp, ecx
mov ebx, ecx
mov ecx, ebp
test al, al
je 0x511db2
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 0x511dd6
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 0x511dd6
xor edx, edx
mov al, cl
xor edi, edi
mov dword [esp + 0x14], ecx
mov ebp, ebx
test al, al
je 0x511e0e
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 0x511e20
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 0x511e46
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 0x511e94
add ecx, 0x3f
sar ecx, 6
mov edi, dword [esp + 0x18]
lea eax, [ecx + ebx]
mov dword [esp + 0x8c], eax
cmp edx, eax
jge 0x512344
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 0x512321
mov eax, dword [0x60b194]
shl ebp, 6
add ebp, 0x20
mov dword [esp + 0x28], ebp
nop dword [eax]
mov ecx, dword [0x60b190]
mov dword [esp + 0x84], ecx
mov ecx, dword [0x60b1e0]
movq qword [esp + 0xc0], xmm1
mov dword [esp + 0xc8], ecx
test ebx, ebx
js 0x5122fd
cmp ebx, edi
jge 0x5122fd
cmp esi, 0x20
jl 0x5122fd
cmp edx, dword [esp + 0x40]
jge 0x5122fd
mov ecx, dword [esp + 0x34]
xor edi, edi
mov dword [esp + 0x84], edi
mov eax, dword [ecx + 0x20]
sub eax, 1
je 0x511fa4
sub eax, 1
je 0x511f85
sub eax, 1
je 0x511f66
mov esi, dword [esp + 0xc0]
mov edi, 6
jmp 0x5121fd
lea eax, [esp + 0xc0]
push eax
push esi
push ebp
push ecx
call fcn.005114b0
mov esi, dword [esp + 0xd0]
add esp, 0x10
jmp 0x5121f1
lea eax, [esp + 0xc0]
push eax
push esi
push ebp
push ecx
call fcn.00510fe0
mov esi, dword [esp + 0xd0]
add esp, 0x10
jmp 0x5121f1
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.004b43d0
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 0x51203c
mov edi, 0x10000
mov dword [esp + 0x58], eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x5c], esi
test edi, edi
jns 0x51204e
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.004b8bd0
add esp, 4
mov esi, eax
mov dword [esp + 0xc0], esi
test edi, edi
je 0x51216a
cmp edi, 0x10000
je 0x51216a
mov edi, 0x10000
jmp 0x5121db
lea eax, [esp + 0x50]
push eax
call fcn.004b8c50
lea eax, [esp + 0x68]
push eax
call fcn.004b8c50
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 [0x60b1d8]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x20], edi
test edi, edi
jne 0x5124ef
cmp dword [esp + 0xec], 1
jne 0x51221a
neg byte [esp + 0xc8]
cmp esi, dword [esp + 0x3c]
jg 0x5122f0
cmp byte [esp + 0xf1], 0
je 0x512234
mov eax, dword [esp + 0x30]
jmp 0x512240
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 0x5122d9
mov ecx, dword [edi]
mov eax, ecx
sub eax, esi
jns 0x512263
mov eax, esi
sub eax, ecx
cmp eax, 0x20
jg 0x5122d5
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 0x5122e9
cmp ecx, esi
jle 0x5122f0
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 [0x60b194]
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 0x511ef0
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 0x511ed0
mov esi, dword [esp + 0x34]
mov esi, dword [esi + 0x24]
mov dword [esp + 0x34], esi
test esi, esi
jne 0x511cf0
mov edx, dword [esp + 0x2c]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x2c], edx
test edx, edx
jne 0x511ce1
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
mov ebp, dword [esp + 0x44]
test eax, eax
jle 0x5124ef
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 0x5123a6
setns bl
lea ebx, [ebx*2 - 1]
test edi, edi
jle 0x5124d8
cmp byte [esp + 0xf0], 0
mov esi, eax
je 0x512443
mov dword [esp + 0x2c], edi
mov al, byte [esi + 8]
mov edx, dword [esp + 0x3c]
test al, al
jne 0x5123d1
mov dword [esi], edx
jmp 0x5123d3
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.004b43d0
mov edi, eax
add esp, 8
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
sar ecx, 9
test edi, edi
jle 0x51240b
cmp ecx, 0x7f
mov eax, 0x7f
cmovg ecx, eax
test edi, edi
jns 0x51241b
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 0x5123c2
jmp 0x5124c1
mov dword [esp + 0x2c], edi
mov al, byte [esi + 8]
mov edx, dword [esp + 0x3c]
test al, al
jne 0x512456
mov dword [esi], edx
jmp 0x512458
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.004b43d0
mov edi, eax
add esp, 8
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
sar ecx, 9
test edi, edi
jle 0x51248e
cmp ecx, 0x7f
mov eax, 0x7f
cmovg ecx, eax
test edi, edi
jns 0x51249e
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 0x512447
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 0x512395
mov ecx, dword [esp + 0x38]
jmp 0x511c54
mov dword [esp + 0x20], 0x13
jmp 0x511c52
mov dword [esp + 0x20], 6
jmp 0x511c54