Function at 0x100051a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x10163164]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, ecx
xor edx, edx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], ecx
nop
movzx eax, byte [ecx + edx]
mov byte [ebp + edx*4 - 0x14], al
movzx eax, byte [ecx + edx + 4]
mov byte [ebp + edx*4 - 0x13], al
movzx eax, byte [ecx + edx + 8]
mov byte [ebp + edx*4 - 0x12], al
movzx eax, byte [ecx + edx + 0xc]
mov byte [ebp + edx*4 - 0x11], al
inc edx
cmp edx, 4
jl 0x100051c0
lea ecx, [ebp - 0x10]
mov esi, 4
lea edx, [edi + 0x2a8]
nop word [eax + eax]
movzx eax, byte [edx - 4]
lea ecx, [ecx + 1]
xor byte [ecx - 5], al
lea edx, [edx + 1]
movzx eax, byte [edx - 1]
xor byte [ecx - 1], al
movzx eax, byte [edx + 3]
xor byte [ecx + 3], al
movzx eax, byte [edx + 7]
xor byte [ecx + 7], al
sub esi, 1
jne 0x10005200
add edi, 0x298
mov dword [ebp - 0x1c], 9
mov dword [ebp - 0x20], edi
push ebx
nop dword [eax + eax]
mov edi, 4
mov ecx, edi
mov dword [ebp - 0x18], ecx
nop word [eax + eax]
lea esi, [ecx - 1]
mov eax, esi
and eax, reloc.WS2_32.dll_closesocket
jns 0x10005261
dec eax
or eax, 0xfffffffc
inc eax
add eax, edi
mov bl, byte [ebp + eax - 0x14]
mov eax, ecx
and eax, 3
add eax, edi
mov dl, byte [ebp + eax - 0x14]
lea eax, [ecx + 1]
and eax, reloc.WS2_32.dll_closesocket
jns 0x10005281
dec eax
or eax, 0xfffffffc
inc eax
add eax, edi
mov cl, byte [ebp + eax - 0x14]
mov eax, dword [ebp - 0x18]
add eax, 2
and eax, reloc.WS2_32.dll_closesocket
jns 0x10005299
dec eax
or eax, 0xfffffffc
inc eax
add eax, edi
mov dword [ebp - 0x18], esi
mov al, byte [ebp + eax - 0x14]
mov byte [ebp + edi - 0x12], cl
mov ecx, esi
mov byte [ebp + edi - 0x14], bl
mov byte [ebp + edi - 0x13], dl
mov byte [ebp + edi - 0x11], al
add edi, 4
cmp ecx, 1
jg 0x10005250
mov edx, dword [ebp - 0x24]
lea ebx, [ebp - 0x14]
xor ecx, ecx
lea esi, [ebp - 0x12]
lea edi, [ebp - 0x11]
nop word [eax + eax]
movzx eax, byte [ebx + ecx*4]
movzx eax, byte [eax + edx + 0x104]
mov byte [ebx + ecx*4], al
movzx eax, byte [ebp + ecx*4 - 0x13]
movzx eax, byte [eax + edx + 0x104]
mov byte [ebp + ecx*4 - 0x13], al
movzx eax, byte [esi + ecx*4]
movzx eax, byte [eax + edx + 0x104]
mov byte [esi + ecx*4], al
movzx eax, byte [edi + ecx*4]
movzx eax, byte [eax + edx + 0x104]
mov byte [edi + ecx*4], al
inc ecx
cmp ecx, 4
jl 0x100052d0
mov esi, dword [ebp - 0x20]
xor edx, edx
mov eax, esi
nop dword [eax + eax]
movzx ecx, byte [eax - 4]
lea eax, [eax + 1]
xor byte [ebp + edx - 0x14], cl
movzx ecx, byte [eax - 1]
xor byte [ebp + edx - 0x10], cl
movzx ecx, byte [eax + 3]
xor byte [ebp + edx - 0xc], cl
movzx ecx, byte [eax + 7]
xor byte [ebp + edx - 8], cl
inc edx
cmp edx, 4
jl 0x10005320
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x10005359
lea eax, [ebp - 0x14]
push eax
call fcn.10005500
dec ebx
sub esi, 0x10
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], esi
test ebx, ebx
jns 0x10005240
mov esi, dword [ebp - 0x28]
xor edx, edx
pop ebx
movzx eax, byte [ebp + edx*4 - 0x14]
movzx ecx, byte [ebp + edx*4 - 0x12]
mov byte [esi + edx], al
movzx eax, byte [ebp + edx*4 - 0x13]
mov byte [esi + edx + 8], cl
movzx ecx, byte [ebp + edx*4 - 0x11]
mov byte [esi + edx + 4], al
mov byte [esi + edx + 0xc], cl
inc edx
cmp edx, 4
jl 0x10005371
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.100b8868
mov esp, ebp
pop ebp
ret 4