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

Disassembly:
sub esp, 0xc50
push ebx
push ebp
mov ebp, dword [esp + 0xc60]
push esi
push edi
mov ecx, 0x101
lea esi, [ebp + 0x86]
xor eax, eax
lea edi, [esp + 0x5c]
xor edx, edx
xor ebx, ebx
rep stosd dword es:[edi], eax
test esi, esi
mov byte [esp + 0x5c], 5
je 0x403073
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x5e]
mov edx, ecx
mov eax, ecx
shr ecx, 2
mov byte [esp + 0x5d], dl
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [ebp + 0x106]
test esi, esi
je 0x4030a1
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + edx + 0x5f]
mov ebx, ecx
mov eax, ecx
shr ecx, 2
mov byte [esp + edx + 0x5e], bl
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0xc64]
lea edx, [ebx + edx + 3]
push 0
mov dword [esp + 0x460], edx
push edx
mov edx, dword [esi]
lea ecx, [esp + 0x64]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x4033e0
movsx eax, word [ebp + 0x84]
lea ebx, [ebp + 4]
push eax
push ebx
push 0x44276c
mov dword [esp + 0x38], ebx
call fcn.004081f0
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x46d]
mov byte [esp + 0x46c], 0
rep stosd dword es:[edi], eax
mov edx, dword [esi]
add esp, 0xc
stosw word es:[edi], ax
push 0
lea ecx, [esp + 0x464]
push 0x400
push ecx
push edx
stosb byte es:[edi], al
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 2
jge 0x403156
push 0x4d4
push str.D:QLiveQ_3_27QLiveQ_3_32QLiveQSocket5Proxy.h
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
movsx eax, word [ebp + 0x84]
push eax
push ebx
push str._error_
call fcn.004081f0
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc50
ret
lea ecx, [esp + 0x460]
test ecx, ecx
je 0x4033be
mov dl, byte [esp + 0x461]
xor eax, eax
test dl, dl
sete al
test eax, eax
je 0x4033be
mov dx, word [ebp + 0x1c6]
lea ebx, [ebp + 0x146]
push edx
lea eax, [esp + 0x34]
push ebx
push eax
mov dword [esp + 0x34], 0
call fcn.00409020
add esp, 0xc
test eax, eax
jne 0x4033af
movsx ecx, word [ebp + 0x1c6]
mov edx, dword [esp + 0x32]
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
push ecx
push ebx
push edx
call edi
and eax, 0xffff
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x442638
call fcn.004081f0
mov eax, dword [esp + 0xc88]
add esp, 0x14
test eax, eax
je 0x403228
mov edx, dword [esp + 0x34]
xor ecx, ecx
mov ax, word [esp + 0x32]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x20], edx
mov edx, dword [esi]
mov word [esp + 0x24], cx
mov byte [esp + 0x1e], cl
push ecx
lea ecx, [esp + 0x20]
push 0xa
push ecx
mov byte [esp + 0x28], 5
mov byte [esp + 0x29], 1
mov byte [esp + 0x2b], 1
mov word [esp + 0x30], ax
push edx
jmp 0x403278
mov eax, dword [esp + 0xc78]
push eax
call dword [sym.imp.WS2_32.dll_htons]
xor ecx, ecx
lea edx, [esp + 0x10]
mov dword [esp + 0x10], ecx
mov byte [esp + 0x10], 5
mov dword [esp + 0x14], ecx
mov byte [esp + 0x11], 3
mov word [esp + 0x18], cx
mov word [esp + 0x18], ax
mov eax, dword [esi]
push ecx
push 0xa
push edx
mov byte [esp + 0x1e], cl
mov byte [esp + 0x1f], 1
mov byte [esp + 0x20], cl
mov byte [esp + 0x21], cl
mov byte [esp + 0x22], cl
mov byte [esp + 0x23], cl
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x4033af
mov edx, dword [esi]
push 0
lea ecx, [esp + 0x864]
push 0x400
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov edx, eax
cmp edx, 9
jge 0x4032ec
push 0x4a1
push str.D:QLiveQ_3_27QLiveQ_3_32QLiveQSocket5Proxy.h
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [esp + 0x42]
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 0x4425f0
call fcn.004081f0
mov eax, dword [esp + 0x44]
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc50
ret
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x40]
push edx
rep stosd dword es:[edi], eax
lea edx, [esp + 0x864]
lea ecx, [esp + 0x44]
push edx
stosw word es:[edi], ax
call fcn.00402fd0
test eax, eax
je 0x403382
movsx eax, word [ebp + 0x1c6]
mov ecx, dword [esp + 0x4c]
push eax
push ebx
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [esp + 0x56]
and eax, 0xffff
push eax
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x4425cc
call fcn.004081f0
mov eax, dword [esp + 0xc88]
add esp, 0x14
test eax, eax
mov dword [esp + 0x28], 1
jne 0x4033af
mov eax, dword [esp + 0xc70]
mov cx, word [esp + 0x4c]
mov edx, dword [esp + 0xc6c]
pop edi
mov word [eax], cx
mov eax, dword [esp + 0x4a]
pop esi
mov dword [edx], eax
mov eax, dword [esp + 0x20]
pop ebp
pop ebx
add esp, 0xc50
ret
movsx ecx, word [ebp + 0x1c6]
movsx edx, word [ebp + 0x84]
mov eax, dword [esp + 0x2c]
push 0x4b7
push str.D:QLiveQ_3_27QLiveQ_3_32QLiveQSocket5Proxy.h
push ecx
push ebx
push edx
push eax
push 0x4425a0
call fcn.004081f0
add esp, 0x1c
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc50
ret
movsx ecx, word [ebp + 0x84]
push 0x4e1
push str.D:QLiveQ_3_27QLiveQ_3_32QLiveQSocket5Proxy.h
push 0
push ecx
push ebx
push 0x4426f4
call fcn.004081f0
add esp, 0x18
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc50
ret