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

Disassembly:
sub esp, 0x808
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x81c]
mov ebx, ecx
push edi
call fcn.00473be0
test eax, eax
je 0x4743da
push 0x800
call fcn.0047e5c7
add esp, 4
mov ebp, eax
lea eax, [esp + 0x10]
mov byte [esp + 0x10], 5
push 0
push 4
push eax
push edi
mov byte [esp + 0x21], 2
mov byte [esp + 0x22], 0
mov byte [esp + 0x23], 2
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x4743d1
push 0
lea ecx, [esp + 0x1c]
push 0x800
push ecx
push edi
call sub.WS2_32.dll_recv
test eax, eax
je 0x4743d1
cmp eax, 0xffffffff
je 0x4743d1
cmp byte [esp + 0x18], 5
jne 0x4743d1
mov al, byte [esp + 0x19]
movsx edx, al
cmp edx, 0xff
je 0x4743d1
cmp al, 2
jne 0x4742f1
mov byte [ebp], 1
mov eax, dword [ebx + 0x24]
mov byte [ebp + 1], al
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x24]
test eax, eax
jne 0x47424e
mov eax, 0x4c7b1c
mov edx, ecx
mov esi, eax
lea edi, [ebp + 2]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x24]
mov eax, dword [ebx + 0x34]
mov byte [ecx + ebp + 2], al
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x34]
test eax, eax
jne 0x47427a
mov eax, 0x4c7b1c
mov edx, dword [ebx + 0x24]
mov esi, eax
mov eax, ecx
push 0
lea edi, [edx + ebp + 3]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x24]
mov ebx, dword [ebx + 0x34]
mov esi, dword [esp + 0x820]
lea ecx, [ebx + eax + 3]
push ecx
push ebp
push esi
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x4743d1
push 0
lea edx, [esp + 0x1c]
push 0x800
push edx
push esi
call sub.WS2_32.dll_recv
test eax, eax
je 0x4743d1
cmp eax, 0xffffffff
je 0x4743d1
cmp byte [esp + 0x18], 1
jne 0x4743d1
mov al, byte [esp + 0x19]
test al, al
jne 0x4743d1
mov edi, esi
mov ebx, dword [esp + 0x820]
mov eax, dword [ebx + 4]
test eax, eax
jne 0x474304
mov eax, 0x4c7b1c
push eax
call sub.WS2_32.dll_inet_addr
mov esi, eax
mov eax, dword [esp + 0x824]
push eax
call sub.WS2_32.dll_htons
cmp esi, 0xffffffff
mov byte [ebp], 5
mov byte [ebp + 1], 1
mov byte [ebp + 2], 0
jne 0x47436d
mov byte [ebp + 3], 3
mov ecx, dword [ebx + 8]
mov byte [ebp + 4], cl
mov edx, dword [ebx + 4]
mov ecx, dword [ebx + 8]
test edx, edx
jne 0x474343
mov edx, 0x4c7b1c
mov esi, edx
mov edx, ecx
lea edi, [ebp + 5]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 8]
mov edi, dword [esp + 0x81c]
mov word [ecx + ebp + 5], ax
mov eax, dword [ebx + 8]
add eax, 7
jmp 0x47437d
mov word [ebp + 8], ax
mov byte [ebp + 3], 1
mov dword [ebp + 4], esi
mov eax, 0xa
push 0
push eax
push ebp
push edi
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x4743d1
push 0
lea edx, [esp + 0x1c]
push 0x800
push edx
push edi
call sub.WS2_32.dll_recv
test eax, eax
je 0x4743d1
cmp eax, 0xffffffff
je 0x4743d1
cmp byte [esp + 0x18], 5
jne 0x4743d1
mov al, byte [esp + 0x19]
test al, al
jne 0x4743d1
push ebp
call fcn.0047e4de
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x808
ret 0xc
push ebp
call fcn.0047e4de
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x808
ret 0xc