Function at 0x5012c0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x10
call fcn.005cf470
push ebx
mov ebx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x2c]
lea ebx, [ebx - 1]
mov ecx, dword [ebp + 4]
shr ebx, 0x1f
dec ebx
mov eax, dword [edi + 4]
xor eax, ecx
mov dword [esp + 0x24], ebx
and eax, ebx
xor ecx, eax
movd xmm0, ebx
mov dword [ebp + 4], ecx
xor dword [edi + 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi + 0xc]
xor eax, ecx
pshufd xmm3, xmm0, 0
and eax, ebx
xor ecx, eax
mov dword [ebp + 0xc], ecx
xor dword [edi + 0xc], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [edi + 0x10]
xor eax, ecx
and eax, ebx
and eax, 4
xor ecx, eax
mov dword [ebp + 0x10], ecx
xor dword [edi + 0x10], eax
mov eax, dword [esp + 0x30]
lea ecx, [eax - 1]
mov dword [esp + 0x28], ecx
cmp ecx, 9
ja case.default.0x501337
jmp dword [ecx*4 + 0x50153c]
mov ebx, 0xa
lea edx, [eax - 0xa]
cmp eax, ebx
jle 0x501438
cmp edx, 4
jb 0x501414
mov esi, dword [edi]
mov ecx, dword [ebp]
mov dword [esp + 0x1c], ecx
lea eax, [esi + 0x28]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
lea eax, [esi + eax*4]
mov dword [esp + 0x10], eax
lea eax, [ecx + 0x28]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
lea ecx, [ecx + eax*4]
lea eax, [esi + 0x28]
mov dword [esp + 0x28], ecx
cmp eax, ecx
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
ja 0x501399
cmp ecx, dword [esp + 0x18]
jae 0x501414
cmp dword [esp + 0x14], edi
ja 0x5013a3
cmp ecx, edi
jae 0x501414
cmp dword [esp + 0x14], ebp
ja 0x5013ad
cmp ecx, ebp
jae 0x501414
mov ecx, dword [esp + 0x18]
cmp ecx, edi
ja 0x5013bb
cmp dword [esp + 0x28], edi
jae 0x501414
cmp ecx, ebp
ja 0x5013c5
cmp dword [esp + 0x28], ebp
jae 0x501414
and edx, reloc.WS2_32.dll_closesocket
jns 0x5013d2
dec edx
or edx, 0xfffffffc
inc edx
mov edi, dword [esp + 0x1c]
mov ecx, eax
sub ecx, edx
nop word [eax + eax]
movups xmm2, xmmword [esi + ebx*4]
movups xmm1, xmmword [edi + ebx*4]
movaps xmm0, xmm2
pxor xmm0, xmm1
pand xmm0, xmm3
pxor xmm1, xmm0
pxor xmm2, xmm0
movups xmmword [edi + ebx*4], xmm1
movups xmmword [esi + ebx*4], xmm2
add ebx, 4
mov edx, ebx
cmp ebx, ecx
jl 0x5013e0
mov edi, dword [esp + 0x2c]
cmp edx, eax
jge 0x501438
mov eax, dword [ebp]
mov ecx, dword [eax + ebx*4]
lea edx, [eax + ebx*4]
mov eax, dword [edi]
mov esi, dword [eax + ebx*4]
xor esi, ecx
and esi, dword [esp + 0x24]
xor ecx, esi
mov dword [edx], ecx
mov eax, dword [edi]
xor dword [eax + ebx*4], esi
inc ebx
cmp ebx, dword [esp + 0x30]
jl 0x501414
mov ebx, dword [esp + 0x24]
mov eax, dword [edi]
mov esi, dword [ebp]
mov edx, dword [eax + 0x24]
mov ecx, dword [esi + 0x24]
xor edx, ecx
and edx, ebx
xor ecx, edx
mov dword [esi + 0x24], ecx
mov eax, dword [edi]
xor dword [eax + 0x24], edx
mov eax, dword [edi]
mov esi, dword [ebp]
mov edx, dword [eax + 0x20]
mov ecx, dword [esi + 0x20]
xor edx, ecx
and edx, ebx
xor ecx, edx
mov dword [esi + 0x20], ecx
mov eax, dword [edi]
xor dword [eax + 0x20], edx
mov eax, dword [edi]
mov esi, dword [ebp]
mov edx, dword [eax + 0x1c]
mov ecx, dword [esi + 0x1c]
xor edx, ecx
and edx, ebx
xor ecx, edx
mov dword [esi + 0x1c], ecx
mov eax, dword [edi]
xor dword [eax + 0x1c], edx
mov eax, dword [edi]
mov esi, dword [ebp]
mov edx, dword [eax + 0x18]
mov ecx, dword [esi + 0x18]
xor edx, ecx
and edx, ebx
xor ecx, edx
mov dword [esi + 0x18], ecx
mov eax, dword [edi]
xor dword [eax + 0x18], edx
mov eax, dword [edi]
mov esi, dword [ebp]
mov edx, dword [eax + 0x14]
mov ecx, dword [esi + 0x14]
xor edx, ecx
and edx, ebx
xor ecx, edx
mov dword [esi + 0x14], ecx
mov eax, dword [edi]
xor dword [eax + 0x14], edx
mov eax, dword [edi]
mov esi, dword [ebp]
mov edx, dword [eax + 0x10]
mov ecx, dword [esi + 0x10]
xor edx, ecx
and edx, ebx
xor ecx, edx
mov dword [esi + 0x10], ecx
mov eax, dword [edi]
xor dword [eax + 0x10], edx
mov eax, dword [edi]
mov esi, dword [ebp]
mov edx, dword [eax + 0xc]
mov ecx, dword [esi + 0xc]
xor edx, ecx
and edx, ebx
xor ecx, edx
mov dword [esi + 0xc], ecx
mov eax, dword [edi]
xor dword [eax + 0xc], edx
mov eax, dword [edi]
mov esi, dword [ebp]
mov edx, dword [eax + 8]
mov ecx, dword [esi + 8]
xor edx, ecx
and edx, ebx
xor ecx, edx
mov dword [esi + 8], ecx
mov eax, dword [edi]
xor dword [eax + 8], edx
mov eax, dword [edi]
mov esi, dword [ebp]
mov edx, dword [eax + 4]
mov ecx, dword [esi + 4]
xor edx, ecx
and edx, ebx
xor ecx, edx
mov dword [esi + 4], ecx
mov eax, dword [edi]
xor dword [eax + 4], edx
mov eax, dword [edi]
mov esi, dword [ebp]
mov ecx, dword [eax]
mov edx, dword [esi]
xor ecx, edx
and ecx, ebx
xor edx, ecx
mov dword [esi], edx
mov eax, dword [edi]
pop edi
pop esi
pop ebp
xor dword [eax], ecx
pop ebx
add esp, 0x10
ret