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

Disassembly:
mov eax, dword [0x59e068]
sub esp, 0x3e8
push ebx
push ebp
push esi
xor ebx, ebx
cmp eax, ebx
push edi
mov esi, ecx
je 0x50f4a5
cmp eax, esi
je 0x50f4ca
mov eax, dword [eax + 0x3cc]
cmp eax, ebx
jne 0x50f497
mov eax, dword [esi + 0x378]
xor edx, edx
cmp eax, 3
mov ecx, esi
jne 0x50f78d
call fcn.0050d9a0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e8
ret
cmp dword [esi + 0x378], ebx
je 0x50f4a5
mov ecx, dword [esi]
call fcn.004dbfb0
cmp eax, ebx
je 0x50f4a5
mov ecx, dword [esi + 0x378]
cmp ecx, 1
mov dword [esi + 0x33c], 1
mov dword [esi + 0x39c], ebx
jne 0x50f587
mov edx, dword [esi + 0x364]
lea ecx, [esi + 0x234]
push ecx
mov dword [esi + 0x378], 2
mov ecx, dword [eax + 0xf28]
imul ecx, ecx, 0x64
push edx
lea edx, [ecx + eax + 0xdfc]
push edx
lea eax, [esp + 0x1c]
push str.120__s__lu__s_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x24]
add esp, 0x14
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x50f540
push ebx
sub eax, edx
mov edx, dword [esi + 0x3c4]
push eax
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_send]
mov eax, dword [0x5a1b00]
mov ecx, dword [esi + 0x3c4]
push 0x21
push 0x8014
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3e8
ret
cmp ecx, 2
je 0x50f595
cmp ecx, 3
jne 0x50f4a5
mov edx, dword [0x5a1b00]
mov eax, dword [esi + 0x3c4]
push ebx
push ebx
push edx
push eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov edx, dword [esi + 0x3c4]
push ebx
push 0x3e6
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
je 0x50f4a5
cmp eax, ebx
jle 0x50f4a5
lea ecx, [esp + 0x10]
mov byte [esp + eax + 0x10], bl
call fcn.004dac20
test eax, eax
je 0x50f4a5
cmp byte [esp + 0x10], 0x20
lea ebp, [esp + 0x10]
jne 0x50f5fc
mov al, byte [ebp + 1]
inc ebp
cmp al, 0x20
je 0x50f5f4
cmp byte [ebp], bl
je 0x50f4a5
push 0x20
push ebp
call fcn.00563730
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x50f4a5
mov byte [edi], bl
mov al, byte [edi + 1]
inc edi
cmp al, 0x20
jne 0x50f62c
mov al, byte [edi + 1]
inc edi
cmp al, 0x20
je 0x50f624
cmp byte [edi], bl
je 0x50f4a5
push 0x20
push edi
call fcn.00563730
add esp, 8
cmp eax, ebx
je 0x50f66f
mov byte [eax], bl
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
jne 0x50f659
mov edi, edi
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
je 0x50f650
cmp byte [eax], bl
je 0x50f66f
push 0xa
push ebx
push eax
call fcn.005639fd
add esp, 0xc
mov dword [esi + 0x368], eax
mov ecx, edi
call fcn.004dac60
test eax, eax
je 0x50f4a5
push ebp
call fcn.00563a6c
mov ecx, dword [esi + 0x378]
add esp, 4
cmp ecx, 3
mov dword [esi + 0x37c], eax
jne 0x50f705
cmp eax, 0x84
jne 0x50f4a5
lea eax, [esi + 0x234]
push eax
lea ecx, [esi + 4]
push ecx
lea edx, [esp + 0x18]
push str.Send__s__s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x59e640]
add esp, 0x10
mov dword [0x5a1b3c], eax
mov ecx, dword [esi + 0x3c8]
push ecx
push 1
push 1
mov edx, 3
lea ecx, [esp + 0x1c]
call fcn.0053c810
cmp eax, ebx
mov dword [esi], eax
je 0x50f4a5
mov ecx, esi
call fcn.0050f130
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3e8
ret
cmp eax, 0x79
jne 0x50f4a5
lea ebp, [esi + 4]
mov edx, ebp
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x50f717
mov ecx, dword [esi]
call fcn.005366c0
mov edi, eax
cmp edi, ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
je 0x50f74a
lea edx, [esi + 0x234]
push edx
push ebp
lea eax, [edi + 8]
push str.Send__s__s
push eax
call ebx
add esp, 0x10
lea ecx, [esi + 0x234]
push ecx
push ebp
lea edx, [esp + 0x18]
push str.Send__s__s
push edx
call ebx
mov ecx, dword [esi]
add esp, 0x10
lea eax, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, edi
call fcn.0051c6d0
mov ecx, esi
call fcn.0050f130
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3e8
ret
push 0x574b10
call fcn.0050e340
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e8
ret