Function at 0x51a160
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x4c
call fcn.00655180
mov eax, dword [0x716f80]
xor eax, esp
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x68]
push ebx
mov ebx, dword [esp + 0x64]
push ebp
mov ebp, dword [esp + 0x58]
push esi
mov esi, dword [esp + 0x64]
push edi
mov edi, dword [esp + 0x64]
mov dword [esp + 0x18], ebx
lea eax, [esi - 1]
mov dword [esp + 0x30], edi
cmp eax, 0x7f
ja 0x51a52f
movups xmm0, xmmword [ebx]
push ecx
push ebx
push ebx
movups xmmword [esp + 0x40], xmm0
call edx
lea eax, [esi + 7]
add esp, 0xc
cdq
and edx, 7
lea esi, [edx + eax]
sar esi, 3
cmp dword [esp + 0x74], 0
mov dword [esp + 0x2c], esi
je 0x51a37b
xor ecx, ecx
mov dword [esp + 0x10], ecx
test esi, esi
jle 0x51a48d
cmp esi, 8
jb 0x51a340
lea eax, [esp + 0x43]
mov dword [esp + 0x10], ecx
lea edx, [edi - 1]
add eax, esi
add edx, esi
cmp edi, eax
ja 0x51a207
lea eax, [esp + 0x44]
cmp edx, eax
jae 0x51a340
lea eax, [ebp - 1]
add eax, esi
cmp edi, eax
ja 0x51a218
cmp edx, ebp
jae 0x51a340
lea eax, [ebx - 1]
add eax, esi
cmp edi, eax
ja 0x51a229
cmp edx, ebx
jae 0x51a340
lea edx, [esp + 0x44]
cmp edx, eax
ja 0x51a23f
lea eax, [esp + 0x43]
add eax, esi
cmp eax, ebx
jae 0x51a340
mov eax, esi
and eax, reloc.WS2_32.dll_getsockopt
jns 0x51a24d
dec eax
or eax, 0xfffffff8
inc eax
movups xmm3, xmmword [0x6a6540]
mov edx, esi
mov dword [esp + 0x10], edi
sub edx, eax
mov esi, edi
mov dword [esp + 0x28], edx
lea eax, [ebp + 4]
mov edx, ebx
sub esi, ebp
sub edx, ebp
mov dword [esp + 0x14], edx
lea edx, [esp + 0x40]
sub edx, ebp
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x44]
sub edx, ebp
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x24], edx
mov edx, ebx
sub edx, edi
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x20], edx
jmp 0x51a299
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
lea eax, [eax + 8]
movd xmm1, dword [eax - 0xc]
xorps xmm0, xmm0
add dword [esp + 0x10], 8
add ecx, 8
punpcklbw xmm1, xmm0
movd xmm2, dword [ebx + edx]
mov edx, ebx
punpcklbw xmm2, xmm0
mov ebx, dword [esp + 0x24]
punpcklwd xmm2, xmm0
punpcklwd xmm1, xmm0
xorps xmm2, xmm1
andps xmm2, xmm3
packuswb xmm2, xmm2
packuswb xmm2, xmm2
movd dword [edx], xmm2
mov edx, ecx
movd xmm1, dword [eax - 8]
movd dword [eax + edi - 8], xmm2
movd xmm2, dword [eax + ebp - 8]
punpcklbw xmm2, xmm0
punpcklwd xmm2, xmm0
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
xorps xmm2, xmm1
andps xmm2, xmm3
packuswb xmm2, xmm2
packuswb xmm2, xmm2
movd dword [eax + ebx - 8], xmm2
movd dword [eax + esi - 8], xmm2
cmp ecx, dword [esp + 0x28]
jl 0x51a295
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x60]
mov dword [esp + 0x10], ecx
cmp edx, esi
jge 0x51a48d
lea eax, [esp + 0x44]
mov edx, ebx
sub eax, ebp
add ecx, ebp
sub edx, ebp
mov dword [esp + 0x18], eax
sub edi, ebp
sub esi, dword [esp + 0x10]
mov ebp, eax
nop dword [eax + eax]
mov al, byte [ecx + edx]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
mov byte [ecx + ebp - 1], al
mov byte [edi + ecx - 1], al
sub esi, 1
jne 0x51a360
jmp 0x51a48d
xor eax, eax
test esi, esi
jle 0x51a48d
cmp esi, 8
jb 0x51a45f
lea edx, [ebx - 1]
lea ecx, [esp + 0x43]
add edx, esi
lea ebp, [esp + 0x44]
add ecx, esi
cmp ebp, edx
mov ebp, dword [esp + 0x60]
ja 0x51a3ad
cmp ecx, ebx
jae 0x51a45f
lea edx, [edi - 1]
lea ebp, [esp + 0x44]
add edx, esi
cmp ebp, edx
mov ebp, dword [esp + 0x60]
ja 0x51a3c6
cmp ecx, edi
jae 0x51a45f
lea ecx, [ebx - 1]
add ecx, esi
cmp edi, ecx
ja 0x51a3d7
cmp edx, ebx
jae 0x51a45f
lea ecx, [ebp - 1]
add ecx, esi
cmp edi, ecx
ja 0x51a3e4
cmp edx, ebp
jae 0x51a45f
cmp esi, 0x10
jb 0x51a425
mov ecx, esi
and ecx, reloc.WS2_32.dll_ntohs
jns 0x51a3f8
dec ecx
or ecx, 0xfffffff0
inc ecx
mov edx, esi
sub edx, ecx
nop dword [eax]
movups xmm1, xmmword [eax + ebp]
movups xmm0, xmmword [ebx + eax]
movups xmmword [esp + eax + 0x44], xmm1
xorps xmm0, xmm1
movups xmmword [edi + eax], xmm0
add eax, 0x10
cmp eax, edx
jl 0x51a400
mov ecx, esi
and cl, 0xf
cmp cl, 8
jb 0x51a45f
mov ecx, esi
and ecx, reloc.WS2_32.dll_getsockopt
jns 0x51a434
dec ecx
or ecx, 0xfffffff8
inc ecx
mov edx, esi
sub edx, ecx
mov ecx, ebp
nop word [eax + eax]
movq xmm1, qword [eax + ecx]
movq xmm0, qword [eax + ebx]
xorps xmm0, xmm1
movq qword [esp + eax + 0x44], xmm1
movq qword [eax + edi], xmm0
add eax, 8
cmp eax, edx
jl 0x51a440
cmp eax, esi
jge 0x51a48d
lea ecx, [esp + 0x44]
sub ebp, ecx
add ecx, eax
mov dword [esp + 0x10], ecx
nop
mov dl, byte [ecx + ebp]
mov cl, byte [eax + ebx]
xor cl, dl
mov byte [esp + eax + 0x44], dl
mov byte [eax + edi], cl
inc eax
mov ecx, dword [esp + 0x10]
inc ecx
mov dword [esp + 0x10], ecx
cmp eax, esi
jl 0x51a470
mov eax, dword [esp + 0x68]
mov ecx, 8
cdq
idiv ecx
mov ecx, edx
mov edx, eax
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x51a4c0
movups xmm0, xmmword [esp + edx + 0x34]
pop edi
pop esi
pop ebp
movups xmmword [ebx], xmm0
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0065469c
add esp, 0x4c
ret
mov ah, 8
mov dword [esp + 0x14], 4
lea esi, [esp + 0x34]
sub ah, cl
add esi, edx
lea edi, [ebx + 2]
mov bl, byte [esi]
mov dl, byte [esi + 1]
lea esi, [esi + 4]
mov al, dl
lea edi, [edi + 4]
mov cl, ah
shr al, cl
mov ecx, dword [esp + 0x10]
shl bl, cl
or al, bl
shl dl, cl
mov bl, byte [esi - 2]
mov cl, ah
mov byte [edi - 6], al
mov al, bl
shr al, cl
mov ecx, dword [esp + 0x10]
or dl, al
mov byte [edi - 5], dl
mov dl, byte [esi - 1]
shl bl, cl
mov al, dl
mov cl, ah
shr al, cl
mov ecx, dword [esp + 0x10]
or bl, al
mov byte [edi - 4], bl
mov bl, byte [esi]
shl dl, cl
mov al, bl
mov cl, ah
shr al, cl
or dl, al
sub dword [esp + 0x14], 1
mov byte [edi - 3], dl
jne 0x51a4d7
mov ecx, dword [esp + 0x58]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0065469c
add esp, 0x4c
ret