Function at 0x4b6f90
Capabilities:
Encode data using xor
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push ebp
push esi
mov eax, dword [ebx + 0x88]
push edi
lea ecx, [esp + 0x10]
xor edi, edi
push ecx
push edi
lea edx, [esp + 0x20]
push edi
push edx
push 0x40
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], 1
call sub.wsock32.dll_select
test eax, eax
jg 0x4b6fe1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret
mov eax, dword [0x58047c]
mov ecx, 0x7ff
sub ecx, eax
push edi
lea edx, [eax + 0x57fc28]
mov eax, dword [ebx + 0x88]
push ecx
push edx
push eax
call sub.wsock32.dll_recv
mov esi, eax
or ebp, 0xffffffff
cmp esi, ebp
je 0x4b725d
cmp esi, edi
je 0x4b725d
cmp dword [ebx + 0x55c], ebp
je 0x4b703c
mov ecx, dword [0x58047c]
push esi
lea eax, [ebx + 0x9c]
lea edx, [ecx + 0x57fc28]
push edx
push eax
call fcn.004c20b0
add esp, 0xc
mov eax, dword [0x58047c]
add eax, esi
mov esi, 0x57fc28
mov dword [0x58047c], eax
mov ecx, dword [ebx + 0x55c]
cmp ecx, ebp
jne 0x4b70f2
movsx ecx, byte [0x57fc28]
xor ecx, 0xec
cmp eax, ecx
jle 0x4b70e6
mov al, byte [0x57fc28]
lea esi, [ebx + 0x2c]
xor al, 0xec
mov edi, esi
mov byte [0x57fc28], al
mov ecx, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
test edi, edi
jle 0x4b70a2
mov dl, byte [esi + eax]
mov cl, byte [eax + 0x57fc29]
xor cl, dl
mov byte [eax + 0x57fc29], cl
inc eax
cmp eax, edi
jl 0x4b708c
movsx eax, byte [0x57fc28]
lea edi, [ebx + 0x9c]
push edi
push eax
push 0x57fc29
call fcn.004c1ff0
movsx esi, byte [0x57fc28]
mov ecx, dword [0x58047c]
add esi, 0x57fc29
sub ecx, esi
add ecx, 0x57fc28
push ecx
push esi
push edi
call fcn.004c20b0
mov eax, dword [0x58047c]
add esp, 0x18
cmp dword [ebx + 0x55c], ebp
je 0x4b7232
mov edx, esi
lea ecx, [eax - 6]
sub edx, 0x57fc28
cmp edx, ecx
jg 0x4b7232
jmp 0x4b710a
or ebp, 0xffffffff
push 7
push 0x57c5ac
push esi
call dword [sym.imp.msvcrt.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x4b71d1
mov eax, dword [ebx + 0x74]
test eax, eax
jne 0x4b71d1
mov eax, dword [0x58047c]
cmp eax, 6
jl 0x4b7232
mov ecx, dword [ebx + 0x90]
cmp ecx, 6
je 0x4b7194
cmp ecx, 7
je 0x4b7194
mov edi, dword [esi]
mov edx, dword [ebx + 0x98]
mov bp, word [esi + 4]
add esi, 4
push edx
push ebp
add esi, 2
call sub.wsock32.dll_htons
and eax, 0xffff
push eax
push edi
push ebx
call fcn.004b6d00
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4b71b7
mov eax, dword [ebx + 0x90]
push eax
push ebp
call sub.wsock32.dll_htons
push eax
push edi
push ebx
call fcn.004b6c80
add esp, 0x10
jmp 0x4b71b7
sub eax, esi
add eax, 0x57fc28
push eax
push esi
push ebx
call fcn.004b72a0
add esp, 0xc
test eax, eax
jge 0x4b71b3
mov dword [ebx + 0x74], 1
jmp 0x4b71b7
je 0x4b722d
add esi, eax
mov eax, dword [0x58047c]
mov ecx, esi
sub ecx, 0x57fc28
lea edx, [eax - 6]
cmp ecx, edx
jle 0x4b7107
jmp 0x4b7232
mov eax, dword [ebx + 0x88]
push eax
call sub.wsock32.dll_closesocket
mov dword [ebx + 0x88], ebp
mov dword [0x58047c], 0
mov eax, dword [ebx + 0x90]
cmp eax, 6
je 0x4b7215
cmp eax, 7
je 0x4b7215
push 3
push ebx
call fcn.004b6c60
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
push 0
push ebx
call fcn.004b6c60
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
mov eax, dword [0x58047c]
mov ecx, 0x57fc28
sub ecx, esi
add eax, ecx
push eax
push esi
push 0x57fc28
mov dword [0x58047c], eax
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
mov edx, dword [ebx + 0x88]
push edx
call sub.wsock32.dll_closesocket
mov dword [ebx + 0x88], ebp
push ebx
mov dword [0x58047c], edi
call fcn.004b7860
push 3
push ebx
call fcn.004b6c60
add esp, 0xc
mov eax, 3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret