Function at 0x50bb60
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x596048
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
push ebx
push esi
push edi
mov edi, 7
xor ebx, ebx
xor eax, eax
mov esi, ecx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], ax
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], ebx
mov ecx, esi
call fcn.0050aad0
test eax, eax
jne 0x50bbcf
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x24], edi
pop edi
xor edx, edx
pop esi
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], dx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
cmp byte [esi + 0x2afa], bl
je 0x50bbde
mov ecx, esi
call fcn.0050b540
mov ecx, dword [esi + 0x3c]
mov edi, dword [ebp + 8]
push ebx
push 0xa
lea eax, [ebp - 0x18]
push eax
push ecx
mov dword [ebp - 0x12], ebx
mov word [ebp - 0x18], 0x124
mov dword [ebp - 0x16], edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x50bc2f
mov dword [ebp - 4], 0xffffffff
pop edi
xor edx, edx
pop esi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], 7
mov word [ebp - 0x38], dx
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 0x3c]
push ebx
push 0xff
lea eax, [ebp - 0x138]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x50bc03
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x134]
mov dx, word [ebp - 0x130]
mov dword [ebp - 0x18], eax
mov eax, dword [0x5f5774]
mov dword [ebp - 0x14], ecx
mov word [ebp - 0x10], dx
mov edx, dword [eax + 0xc]
mov ecx, 0x5f5774
call edx
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x12]
mov ecx, dword [ebp - 0x16]
movzx edx, byte [ebp - 0x18]
push eax
push ecx
push edx
push edi
lea eax, [ebp - 0x1c]
push str.Request:__Xh._Receive_START:__2.2Xh__TYPE:__Xh__Length:__u_
push eax
call fcn.004060d0
add esp, 0x18
cmp byte [ebp - 0x18], 0x24
jne 0x50bce6
cmp dword [ebp - 0x16], edi
je 0x50bd15
mov edx, dword [0x5f5774]
mov eax, dword [edx + 0xc]
mov ecx, 0x5f5774
call eax
add eax, 0x10
mov dword [ebp + 0xc], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x16]
push ecx
lea edx, [ebp + 0xc]
push str.Bad_data_type._Received_type__04Xh
push edx
call fcn.004060d0
add esp, 0xc
mov byte [ebp - 4], 2
lea ecx, [ebp + 0xc]
call fcn.00404d60
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x1c]
call fcn.00404d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.00405c10
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
cmp dword [ebp - 0x12], 4
jne 0x50bce6
mov eax, dword [ebp - 0x12e]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov edx, dword [esi + 0x3c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or edi, 0xffffffff
mov dword [esi + 0x3c], edi
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x1c]
call fcn.00404d60
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x38]
call fcn.00405c10
mov ecx, dword [ebp - 0xc]
lea eax, [edi + 2]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8