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

Disassembly:
mov eax, dword [0x5f4f78]
sub esp, 0x3e8
push ebx
push ebp
push esi
xor ebx, ebx
cmp eax, ebx
push edi
mov esi, ecx
je 0x528595
cmp eax, esi
je 0x5285ba
mov eax, dword [eax + 0x3d4]
cmp eax, ebx
jne 0x528587
mov eax, dword [esi + 0x378]
xor edx, edx
cmp eax, 3
mov ecx, esi
jne 0x52889b
call fcn.005269e0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e8
ret
cmp dword [esi + 0x3c8], ebx
jne 0x528884
cmp dword [esi + 0x378], ebx
je 0x528595
mov edi, dword [esi + 0x3d0]
mov ecx, edi
call fcn.004f0af0
test eax, eax
je 0x528595
mov eax, dword [esi + 0x378]
cmp eax, 1
mov dword [esi + 0x33c], 1
mov dword [esi + 0x39c], ebx
jne 0x528689
mov ecx, dword [esi + 0x364]
mov dword [esi + 0x378], 2
mov edx, dword [edi + 0xf2c]
imul edx, edx, 0x64
lea eax, [esi + 0x234]
push eax
push ecx
lea eax, [edx + edi + 0xe00]
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 0x528641
sub eax, edx
push ebx
push eax
mov eax, dword [esi + 0x3cc]
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.WSOCK32.dll_send]
mov ecx, dword [0x5f92ec]
mov edx, dword [esi + 0x3cc]
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 0x528697
cmp eax, 3
jne 0x528595
mov eax, dword [0x5f92ec]
mov ecx, dword [esi + 0x3cc]
push ebx
push ebx
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov eax, dword [esi + 0x3cc]
push ebx
push 0x3e6
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
je 0x528595
cmp eax, ebx
jle 0x528595
lea ecx, [esp + 0x10]
mov byte [esp + eax + 0x10], bl
call fcn.004ef800
test eax, eax
je 0x528595
cmp byte [esp + 0x10], 0x20
lea ebp, [esp + 0x10]
jne 0x5286fd
mov al, byte [ebp + 1]
inc ebp
cmp al, 0x20
je 0x5286f5
cmp byte [ebp], bl
je 0x528595
push 0x20
push ebp
call fcn.005912e0
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x528595
mov byte [edi], bl
mov al, byte [edi + 1]
inc edi
cmp al, 0x20
jne 0x52872d
mov al, byte [edi + 1]
inc edi
cmp al, 0x20
je 0x528725
cmp byte [edi], bl
je 0x528595
push 0x20
push edi
call fcn.005912e0
add esp, 8
cmp eax, ebx
je 0x52876f
mov byte [eax], bl
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
jne 0x528759
nop
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
je 0x528750
cmp byte [eax], bl
je 0x52876f
push 0xa
push ebx
push eax
call fcn.005915ac
add esp, 0xc
mov dword [esi + 0x368], eax
mov ecx, edi
call fcn.004ef840
test eax, eax
je 0x528595
push ebp
call fcn.0059164b
mov ecx, dword [esi + 0x378]
add esp, 4
cmp ecx, 3
mov dword [esi + 0x37c], eax
jne 0x528808
cmp eax, 0x84
jne 0x528595
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 [0x5f5550]
add esp, 0x10
mov dword [0x5f9328], ecx
mov edx, dword [esi + 0x3d0]
push esi
push edx
push 1
push 1
mov edx, 3
lea ecx, [esp + 0x20]
call fcn.005677e0
cmp eax, ebx
mov dword [esi], eax
je 0x528595
mov ecx, esi
call fcn.00528220
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3e8
ret
cmp eax, 0x79
jne 0x528595
lea ebp, [esi + 4]
mov edx, ebp
mov eax, edi
sub edx, edi
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x528820
mov ecx, dword [esi]
call fcn.00561000
cmp eax, ebx
je 0x52886d
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 [0x5f92e4]
call fcn.00531ff0
xor ecx, ecx
mov dword [0x5f92e4], eax
call fcn.0053b590
mov ecx, esi
call fcn.00528220
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3e8
ret
push 0x5a4bec
call fcn.005273e0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3e8
ret