Function at 0x50b290
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x14]
push ebx
xor ebx, ebx
push ebp
push esi
cmp eax, ebx
push edi
mov esi, ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
je 0x50b5ec
mov ecx, dword [esi + 4]
or ebp, 0xffffffff
cmp ecx, ebp
je 0x50b5ec
mov dword [eax], ebx
lea eax, [esp + 0x18]
push 4
push eax
mov ecx, esi
call fcn.0050aca0
cmp eax, 1
jne 0x50b373
xor eax, eax
mov ecx, dword [esi + 0x1b0]
mov edx, ecx
and edx, 0xf
mov dl, byte [edx + esi + 0x18c]
add dl, byte [esi + 0x1ac]
xor byte [esp + eax + 0x18], dl
inc ecx
movsx edx, byte [esp + eax + 0x18]
inc eax
mov dword [esi + 0x1ac], edx
cmp eax, 4
mov dword [esi + 0x1b0], ecx
jl 0x50b2d8
mov eax, dword [esp + 0x18]
cmp eax, ebx
jl 0x50b5bf
mov edi, dword [esp + 0x28]
cmp eax, edi
jg 0x50b5bf
cmp eax, ebx
je 0x50b38e
lea ecx, [esp + 0x1c]
push 4
push ecx
mov ecx, esi
call fcn.0050aca0
cmp eax, 1
jne 0x50b39f
xor eax, eax
mov ecx, dword [esi + 0x1b0]
mov edx, ecx
and edx, 0xf
mov dl, byte [edx + esi + 0x18c]
add dl, byte [esi + 0x1ac]
xor byte [esp + eax + 0x1c], dl
inc ecx
movsx edx, byte [esp + eax + 0x1c]
inc eax
mov dword [esi + 0x1ac], edx
cmp eax, 4
mov dword [esi + 0x1b0], ecx
jl 0x50b33d
jmp 0x50b3a8
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x50b38e
push 2
push eax
call sub.WS2_32.dll_shutdown
mov eax, dword [esi + 4]
push eax
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], ebp
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x50b5ec
jmp 0x50b5e2
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x50b38e
jmp 0x50b37a
mov eax, dword [esp + 0x1c]
cmp eax, 1
jl 0x50b5a3
lea ecx, [edi + edi]
cmp eax, ecx
jg 0x50b5a3
mov edx, eax
add edx, 0x10
push edx
call fcn.004c2e90
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x50b40a
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x50b3ef
push 2
push eax
call sub.WS2_32.dll_shutdown
mov eax, dword [esi + 4]
push eax
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], ebp
mov ecx, dword [esp + 0x1c]
push ecx
push str.ReadCompressed:_not_enough_memory___d_bytes_
push 1
push 0x596558
call fcn.004aa400
add esp, 0x10
jmp 0x50b38e
mov ebx, dword [esp + 0x1c]
mov ecx, esi
mov edx, ebx
push edx
push edi
call fcn.0050aca0
cmp eax, 1
jne 0x50b4d1
xor eax, eax
test ebx, ebx
jle 0x50b463
mov ecx, dword [esi + 0x1b0]
and ecx, 0xf
mov dl, byte [ecx + esi + 0x18c]
mov cl, byte [esi + 0x1ac]
add dl, cl
mov cl, byte [eax + edi]
xor cl, dl
mov byte [eax + edi], cl
movsx ecx, cl
mov dword [esi + 0x1ac], ecx
mov ecx, dword [esi + 0x1b0]
inc ecx
inc eax
cmp eax, ebx
mov dword [esi + 0x1b0], ecx
jl 0x50b428
mov eax, dword [esp + 0x18]
add eax, 0x800
push eax
call fcn.004c2e90
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x50b500
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x50b49a
push 2
push eax
call sub.WS2_32.dll_shutdown
mov ecx, dword [esi + 4]
push ecx
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], ebp
push edi
call fcn.004c2eb0
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
push str.ReadCompressed:_not_enough_memory___d_bytes_
push 1
push 0x596558
call fcn.004aa400
add esp, 0x10
lea ecx, [esp + 0x10]
call fcn.0050b270
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
push edi
call fcn.004c2eb0
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebp
je 0x50b4f5
push 2
push eax
call sub.WS2_32.dll_shutdown
mov edx, dword [esi + 4]
push edx
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], ebp
mov eax, dword [esp + 0x10]
test eax, eax
jmp 0x50b394
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
add eax, 0x800
push ecx
push ebx
push edx
push edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x24], eax
call fcn.0042c520
test eax, eax
je 0x50b55a
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jne 0x50b55a
push edi
call fcn.004c2eb0
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
add esp, 4
mov dword [edx], ecx
lea ecx, [esp + 0x10]
call fcn.0050b270
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x10
ret 8
push edi
call fcn.004c2eb0
push ebx
call fcn.004c2eb0
add esp, 8
mov ecx, esi
call fcn.00508240
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push str.ReadCompressed:_decoding_failed___d_____d_bytes_
push 1
push 0x596558
call fcn.004aa400
add esp, 0x14
lea ecx, [esp + 0x10]
call fcn.0050b270
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x50b38e
push 2
push eax
call sub.WS2_32.dll_shutdown
mov edx, dword [esi + 4]
push edx
jmp 0x50b386
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x50b5da
push 2
push eax
call sub.WS2_32.dll_shutdown
mov eax, dword [esi + 4]
push eax
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], ebp
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x50b5ec
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8