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

Disassembly:
sub esp, 0x854
push ebx
push ebp
push esi
mov esi, dword [esp + 0x868]
mov ebp, dword [esp + 0x864]
xor ebx, ebx
mov ecx, dword [esi + 0x1cc]
xor eax, eax
neg ecx
mov word [esp + 0xc], ax
push edi
sbb cl, cl
mov byte [esp + 0x12], al
mov eax, dword [ebp]
and cl, 0xfe
push ebx
lea edx, [esp + 0x14]
push 3
add cl, 2
push edx
push eax
mov byte [esp + 0x20], 5
mov byte [esp + 0x21], 1
mov byte [esp + 0x22], cl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x402fc3
movsx ecx, word [esi + 0x84]
lea eax, [esi + 4]
push ecx
push eax
push 0x4426d4
mov dword [esp + 0x2c], eax
call fcn.004081f0
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x71]
mov byte [esp + 0x70], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
add esp, 0xc
lea edx, [esp + 0x64]
stosb byte es:[edi], al
mov eax, dword [ebp]
push ebx
push 0x400
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 2
jge 0x402cc1
push 0x4f9
push str.D:QLiveQ_3_27QLiveQ_3_32QLiveQSocket5Proxy.h
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
movsx ecx, word [esi + 0x84]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
push 0x442694
call fcn.004081f0
add esp, 0x1c
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x854
ret
lea eax, [esp + 0x64]
test eax, eax
je 0x402f9e
cmp dword [esi + 0x1cc], ebx
je 0x402cdf
mov cl, byte [esp + 0x65]
xor eax, eax
cmp cl, bl
jmp 0x402ce8
mov cl, byte [esp + 0x65]
xor eax, eax
cmp cl, 2
sete al
cmp eax, ebx
je 0x402f9e
movsx ecx, word [esi + 0x84]
mov edx, dword [esp + 0x20]
push eax
push ecx
push edx
push 0x442664
call fcn.004081f0
mov eax, dword [esi + 0x1cc]
add esp, 0x10
cmp eax, ebx
je 0x402f69
mov ax, word [esi + 0x1c6]
lea edi, [esi + 0x146]
push eax
lea ecx, [esp + 0x3c]
push edi
push ecx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], edi
call fcn.00409020
add esp, 0xc
test eax, eax
jne 0x402f5a
movsx edx, word [esi + 0x1c6]
mov eax, dword [esp + 0x3a]
push edx
push edi
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
push eax
call edi
mov ecx, dword [esp + 0x44]
and eax, 0xffff
push eax
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x442638
call fcn.004081f0
mov eax, dword [esp + 0x88c]
add esp, 0x14
cmp eax, ebx
je 0x402dca
mov eax, dword [esp + 0x3c]
xor edx, edx
mov cx, word [esp + 0x3a]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x28], eax
mov eax, dword [ebp]
mov word [esp + 0x2c], dx
push ebx
lea edx, [esp + 0x28]
push 0xa
push edx
mov byte [esp + 0x30], 5
mov byte [esp + 0x31], 1
mov byte [esp + 0x32], bl
mov byte [esp + 0x33], 1
mov word [esp + 0x38], cx
push eax
jmp 0x402e1b
mov ecx, dword [esp + 0x87c]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
xor edx, edx
mov ecx, dword [ebp]
mov dword [esp + 0x14], edx
push ebx
mov dword [esp + 0x1c], edx
push 0xa
mov word [esp + 0x24], dx
mov word [esp + 0x24], ax
lea eax, [esp + 0x1c]
mov byte [esp + 0x1c], 5
push eax
mov byte [esp + 0x21], 3
mov byte [esp + 0x22], bl
mov byte [esp + 0x23], 1
mov byte [esp + 0x24], bl
mov byte [esp + 0x25], bl
mov byte [esp + 0x26], bl
mov byte [esp + 0x27], bl
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, ebx
jle 0x402f5a
mov eax, dword [ebp]
push ebx
lea edx, [esp + 0x468]
push 0x400
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov edx, eax
cmp edx, 9
jge 0x402e8f
push 0x4a1
push str.D:QLiveQ_3_27QLiveQ_3_32QLiveQSocket5Proxy.h
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x46]
push eax
push ecx
call edi
mov edx, dword [esp + 0x4c]
and eax, 0xffff
push eax
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x4425f0
call fcn.004081f0
mov eax, dword [esp + 0x4c]
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x854
ret
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x48]
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x468]
lea ecx, [esp + 0x4c]
push eax
call fcn.00402fd0
test eax, eax
je 0x402f29
movsx ecx, word [esi + 0x1c6]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x54]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [esp + 0x5e]
and eax, 0xffff
push eax
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x4425cc
call fcn.004081f0
mov eax, dword [esp + 0x88c]
add esp, 0x14
cmp eax, ebx
mov dword [esp + 0x30], 1
jne 0x402f5a
mov edx, dword [esp + 0x874]
mov ax, word [esp + 0x54]
mov ecx, dword [esp + 0x870]
pop edi
mov word [edx], ax
mov edx, dword [esp + 0x52]
mov eax, dword [esp + 0x2c]
pop esi
pop ebp
mov dword [ecx], edx
pop ebx
add esp, 0x854
ret
movsx eax, word [esi + 0x1c6]
movsx edx, word [esi + 0x84]
mov ecx, dword [esp + 0x34]
push 0x4b7
push str.D:QLiveQ_3_27QLiveQ_3_32QLiveQSocket5Proxy.h
push eax
mov eax, dword [esp + 0x2c]
push ecx
push edx
push eax
push 0x4425a0
call fcn.004081f0
add esp, 0x1c
mov eax, dword [esp + 0x30]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x854
ret
mov ecx, dword [esp + 0x87c]
mov edx, dword [esp + 0x878]
mov eax, dword [esp + 0x874]
push ecx
mov ecx, dword [esp + 0x874]
push edx
push eax
push ecx
push esi
push ebp
call fcn.00403020
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x854
ret
movsx edx, word [esi + 0x84]
mov eax, dword [esp + 0x20]
push 0x50d
push str.D:QLiveQ_3_27QLiveQ_3_32QLiveQSocket5Proxy.h
push ebx
push edx
push eax
push 0x44256c
call fcn.004081f0
add esp, 0x18
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x854
ret