Function at 0x51e1c0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x54
call fcn.0059eec0
mov eax, dword [0x66ea60]
xor eax, esp
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x70]
push ebx
mov ebx, dword [esp + 0x60]
push ebp
mov ebp, dword [esp + 0x60]
push esi
mov esi, dword [esp + 0x74]
push edi
mov edi, dword [esp + 0x70]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ebx
lea eax, [edi - 1]
cmp eax, 0x7f
ja 0x51e5c9
movups xmm0, xmmword [esi]
push ecx
push esi
push esi
movups xmmword [esp + 0x48], xmm0
call edx
lea eax, [edi + 7]
add esp, 0xc
cdq
and edx, 7
lea edi, [edx + eax]
sar edi, 3
cmp dword [esp + 0x7c], 0
mov dword [esp + 0x38], edi
je 0x51e402
xor ecx, ecx
mov dword [esp + 0x10], ecx
test edi, edi
jle 0x51e527
cmp edi, 8
jb 0x51e3cf
lea eax, [esp + 0x4b]
mov dword [esp + 0x10], ecx
lea edx, [ebx - 1]
add eax, edi
add edx, edi
cmp ebx, eax
ja 0x51e267
lea eax, [esp + 0x4c]
cmp edx, eax
jae 0x51e3cf
lea eax, [ebp - 1]
add eax, edi
cmp ebx, eax
ja 0x51e278
cmp edx, ebp
jae 0x51e3cf
lea eax, [esi - 1]
add eax, edi
cmp ebx, eax
ja 0x51e289
cmp edx, esi
jae 0x51e3cf
lea edx, [esp + 0x4c]
cmp edx, eax
ja 0x51e29f
lea eax, [esp + 0x4b]
add eax, edi
cmp eax, esi
jae 0x51e3cf
mov eax, edi
and eax, reloc.WS2_32.dll_getsockopt
jns 0x51e2ad
dec eax
or eax, 0xfffffff8
inc eax
mov ecx, esi
mov dword [esp + 0x1c], ebx
sub ecx, ebp
mov edx, edi
mov dword [esp + 0x24], ecx
sub edx, eax
mov ecx, ebx
mov dword [esp + 0x20], edx
sub ecx, ebp
lea eax, [ebp + 4]
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x48]
sub ecx, ebp
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x4c]
mov edi, dword [esp + 0x28]
sub ecx, ebp
mov dword [esp + 0x2c], ecx
mov ecx, esi
mov esi, dword [esp + 0x24]
sub ecx, ebx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x10]
nop dword [eax + eax]
mov edx, dword [esp + 0x1c]
lea eax, [eax + 8]
mov ebp, dword [esp + 0x30]
xorps xmm0, xmm0
movd xmm1, dword [eax - 0xc]
add ecx, 8
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
movd xmm2, dword [edx + ebp]
mov ebp, edx
punpcklbw xmm2, xmm0
punpcklwd xmm2, xmm0
xorps xmm2, xmm1
add dword [esp + 0x1c], 8
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x5fffe0]
packuswb xmm0, xmm0
movd dword [ebp], xmm0
movd xmm2, dword [esi + eax - 8]
movd xmm1, dword [eax - 8]
mov ebp, dword [esp + 0x34]
movd dword [edi + eax - 8], xmm0
xorps xmm0, xmm0
punpcklbw xmm2, xmm0
punpcklbw xmm1, xmm0
punpcklwd xmm2, xmm0
punpcklwd xmm1, xmm0
xorps xmm2, xmm1
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x5fffe0]
packuswb xmm0, xmm0
movd dword [ebx + eax - 8], xmm0
movd dword [eax + ebp - 8], xmm0
cmp ecx, dword [esp + 0x20]
jl 0x51e300
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x68]
mov esi, dword [esp + 0x14]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x10], ecx
cmp ecx, edi
jge 0x51e527
lea eax, [esp + 0x4c]
mov edx, esi
sub eax, ebp
add ecx, ebp
sub edx, ebp
mov dword [esp + 0x18], eax
sub ebx, ebp
sub edi, dword [esp + 0x10]
mov ebp, eax
mov al, byte [ecx + edx]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
mov byte [ecx + ebp - 1], al
mov byte [ecx + ebx - 1], al
sub edi, 1
jne 0x51e3e7
jmp 0x51e527
xor eax, eax
test edi, edi
jle 0x51e527
cmp edi, 8
jb 0x51e4f3
lea edx, [esi - 1]
lea ecx, [esp + 0x4b]
add edx, edi
lea ebp, [esp + 0x4c]
add ecx, edi
cmp ebp, edx
mov ebp, dword [esp + 0x68]
ja 0x51e434
cmp ecx, esi
jae 0x51e4f3
lea edx, [ebx - 1]
lea ebp, [esp + 0x4c]
add edx, edi
cmp ebp, edx
mov ebp, dword [esp + 0x68]
ja 0x51e44d
cmp ecx, ebx
jae 0x51e4f3
lea ecx, [esi - 1]
add ecx, edi
cmp ebx, ecx
ja 0x51e45e
cmp edx, esi
jae 0x51e4f3
lea ecx, [ebp - 1]
add ecx, edi
cmp ebx, ecx
ja 0x51e46f
cmp edx, ebp
jae 0x51e4f3
cmp edi, 0x10
jb 0x51e4b5
mov ecx, edi
and ecx, reloc.WS2_32.dll_ntohs
jns 0x51e483
dec ecx
or ecx, 0xfffffff0
inc ecx
mov edx, edi
sub edx, ecx
nop word [eax + eax]
movups xmm1, xmmword [eax + ebp]
movups xmm0, xmmword [esi + eax]
movups xmmword [esp + eax + 0x4c], xmm1
xorps xmm0, xmm1
movups xmmword [ebx + eax], xmm0
add eax, 0x10
cmp eax, edx
jl 0x51e490
mov ecx, edi
and cl, 0xf
cmp cl, 8
jb 0x51e4ef
mov ecx, edi
and ecx, reloc.WS2_32.dll_getsockopt
jns 0x51e4c4
dec ecx
or ecx, 0xfffffff8
inc ecx
mov edx, edi
sub edx, ecx
mov ecx, ebp
nop word [eax + eax]
movq xmm1, qword [ecx + eax]
movq xmm0, qword [esi + eax]
xorps xmm0, xmm1
movq qword [esp + eax + 0x4c], xmm1
movq qword [ebx + eax], xmm0
add eax, 8
cmp eax, edx
jl 0x51e4d0
cmp eax, edi
jge 0x51e527
lea ecx, [esp + 0x4c]
sub ebp, ecx
lea edx, [esp + 0x4c]
mov ecx, esi
sub ecx, edx
sub ebx, edx
mov dword [esp + 0x18], ecx
lea esi, [esp + 0x4c]
add esi, eax
inc eax
mov dl, byte [esi + ebp]
mov cl, byte [ecx + esi]
xor cl, dl
mov byte [esi], dl
mov byte [ebx + esi], cl
mov ecx, dword [esp + 0x18]
cmp eax, edi
jl 0x51e507
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x70]
mov ecx, 8
cdq
idiv ecx
mov ecx, edx
mov edx, eax
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x51e55a
movups xmm0, xmmword [esp + edx + 0x3c]
pop edi
movups xmmword [esi], xmm0
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0059e5bd
add esp, 0x54
ret
lea edi, [esi + 2]
mov dword [esp + 0x14], 4
mov ah, 8
lea esi, [esp + 0x3c]
sub ah, cl
add esi, edx
mov bl, byte [esi]
mov dl, byte [esi + 1]
lea esi, [esi + 4]
mov ebp, dword [esp + 0x10]
lea edi, [edi + 4]
shl bl, cl
mov al, dl
mov cl, ah
shr al, cl
mov ecx, ebp
or bl, al
shl dl, cl
mov byte [edi - 6], bl
mov cl, ah
mov bl, byte [esi - 2]
mov al, bl
shr al, cl
mov ecx, ebp
or dl, al
shl bl, cl
mov byte [edi - 5], dl
mov cl, ah
mov dl, byte [esi - 1]
mov al, dl
shr al, cl
mov ecx, ebp
or bl, al
shl dl, cl
mov byte [edi - 4], bl
mov cl, ah
mov bl, byte [esi]
mov al, bl
shr al, cl
mov ecx, ebp
or dl, al
sub dword [esp + 0x14], 1
mov byte [edi - 3], dl
jne 0x51e571
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0059e5bd
add esp, 0x54
ret