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

Disassembly:
mov eax, dword [0x5afc18]
sub esp, 0x3e8
push ebx
push ebp
push esi
xor ebx, ebx
cmp eax, ebx
push edi
mov esi, ecx
je 0x516e05
cmp eax, esi
je 0x516e2a
mov eax, dword [eax + 0x3cc]
cmp eax, ebx
jne 0x516df7
mov eax, dword [esi + 0x378]
xor edx, edx
cmp eax, 3
mov ecx, esi
jne 0x51710b
call fcn.005152b0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e8
ret
cmp dword [esi + 0x378], ebx
je 0x516e05
mov edi, dword [esi + 0x3c8]
mov ecx, edi
call fcn.004e2760
test eax, eax
je 0x516e05
mov eax, dword [esi + 0x378]
cmp eax, 1
mov dword [esi + 0x33c], 1
mov dword [esi + 0x39c], ebx
jne 0x516eed
mov ecx, dword [esi + 0x364]
mov dword [esi + 0x378], 2
mov edx, dword [edi + 0xf28]
imul edx, edx, 0x64
lea eax, [esi + 0x234]
push eax
push ecx
lea eax, [edx + edi + 0xdfc]
push eax
lea ecx, [esp + 0x1c]
push str.120__s__lu__s_n
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x24]
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x516ea5
sub eax, edx
push ebx
push eax
mov eax, dword [esi + 0x3c4]
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.WSOCK32.dll_send]
mov ecx, dword [0x5b4314]
mov edx, dword [esi + 0x3c4]
push 0x21
push 0x8014
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3e8
ret
cmp eax, 2
je 0x516efb
cmp eax, 3
jne 0x516e05
mov eax, dword [0x5b4314]
mov ecx, dword [esi + 0x3c4]
push ebx
push ebx
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov eax, dword [esi + 0x3c4]
push ebx
push 0x3e6
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
je 0x516e05
cmp eax, ebx
jle 0x516e05
lea ecx, [esp + 0x10]
mov byte [esp + eax + 0x10], bl
call fcn.004e14e0
test eax, eax
je 0x516e05
cmp byte [esp + 0x10], 0x20
lea ebp, [esp + 0x10]
jne 0x516f68
lea esp, [esp]
mov al, byte [ebp + 1]
inc ebp
cmp al, 0x20
je 0x516f60
cmp byte [ebp], bl
je 0x516e05
push 0x20
push ebp
call fcn.00570260
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x516e05
mov byte [edi], bl
mov al, byte [edi + 1]
inc edi
cmp al, 0x20
jne 0x516f98
mov al, byte [edi + 1]
inc edi
cmp al, 0x20
je 0x516f90
cmp byte [edi], bl
je 0x516e05
push 0x20
push edi
call fcn.00570260
add esp, 8
cmp eax, ebx
je 0x516fdf
mov byte [eax], bl
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
jne 0x516fc9
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
je 0x516fc0
cmp byte [eax], bl
je 0x516fdf
push 0xa
push ebx
push eax
call fcn.0057052c
add esp, 0xc
mov dword [esi + 0x368], eax
mov ecx, edi
call fcn.004e1520
test eax, eax
je 0x516e05
push ebp
call fcn.005705cb
mov ecx, dword [esi + 0x378]
add esp, 4
cmp ecx, 3
mov dword [esi + 0x37c], eax
jne 0x517077
cmp eax, 0x84
jne 0x516e05
lea ecx, [esi + 0x234]
push ecx
lea edx, [esi + 4]
push edx
lea eax, [esp + 0x18]
push str.Send__s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [0x5b01f0]
add esp, 0x10
mov dword [0x5b4350], ecx
mov edx, dword [esi + 0x3c8]
push edx
push 1
push 1
mov edx, 3
lea ecx, [esp + 0x1c]
call fcn.00548f10
cmp eax, ebx
mov dword [esi], eax
je 0x516e05
mov ecx, esi
call fcn.00516a90
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3e8
ret
cmp eax, 0x79
jne 0x516e05
lea ebp, [esi + 4]
mov edx, ebp
mov eax, edi
sub edx, edi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x517090
mov ecx, dword [esi]
call fcn.00542c90
cmp eax, ebx
je 0x5170dd
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea edi, [esi + 0x234]
push edi
push ebp
add eax, 8
push str.Send__s__s
push eax
call ebx
push edi
push ebp
lea eax, [esp + 0x28]
push str.Send__s__s
push eax
call ebx
mov edx, dword [esi]
add esp, 0x20
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [0x5b430c]
call fcn.0051fdb0
xor ecx, ecx
mov dword [0x5b430c], eax
call fcn.00527d80
mov ecx, esi
call fcn.00516a90
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3e8
ret
push 0x583b74
call fcn.00515c80
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e8
ret