Function at 0x429f50
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x4fe080]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
cmp dword [edi + 0x2c], 1
jne 0x429fc1
test esi, esi
jle 0x42a1c1
mov eax, 0x10624dd3
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0xc], eax
imul eax, eax, 0x3e8
sub esi, eax
imul eax, esi, 0x3e8
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047b06c
mov esp, ebp
pop ebp
ret 4
test esi, esi
je 0x42a049
mov eax, 0x10624dd3
mov dword [ebp - 0x110], 0
imul esi
mov ecx, esi
mov dword [ebp - 0x214], 1
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0xc], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov ecx, dword [edi + 0x28]
mov dword [ebp - 0x210], ecx
mov dword [ebp - 8], eax
mov eax, dword [edi + 0x14]
sub eax, dword [edi + 0x10]
je 0x42a025
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 0x110], 1
xor edx, edx
lea eax, [ebp - 0xc]
test esi, esi
cmovle eax, edx
push eax
push edx
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ecx + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
push ebx
lea ebx, [ebx]
mov ebx, dword [edi + 8]
lea ecx, [edi + 4]
sub ebx, dword [edi + 4]
lea eax, [ebx + 0x5dc]
push eax
call fcn.0040337b
mov eax, dword [edi + 4]
push 0
push 0x5dc
add eax, ebx
push eax
push dword [edi + 0x28]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 8], eax
test eax, eax
jns 0x42a0a1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x42a0b0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x42a0b0
mov eax, dword [ebp - 8]
test eax, eax
lea ecx, [edi + 4]
jle 0x42a0bb
add eax, ebx
push eax
call fcn.0040337b
jmp 0x42a050
push ebx
lea ecx, [edi + 4]
call fcn.0040337b
jmp 0x42a0f4
push ebx
call fcn.0040337b
push dword [edi + 0x28]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x2c], 1
call fcn.0047c808
add eax, 0x40
mov ecx, str.Connection_closed__n
cmp dword [ebp - 8], 0
push eax
mov eax, str.Connection_error__n
cmovge eax, ecx
push eax
call fcn.0047e1b0
add esp, 8
mov eax, dword [edi + 0x14]
sub eax, dword [edi + 0x10]
je 0x42a1a2
mov eax, dword [edi + 0x14]
sub eax, dword [edi + 0x10]
push 0
push eax
push dword [edi + 0x10]
push dword [edi + 0x28]
call dword [sym.imp.WS2_32.dll_send]
mov ebx, eax
test ebx, ebx
jns 0x42a135
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x2733
je 0x42a1a2
call esi
cmp eax, 0x2734
je 0x42a1a2
test ebx, ebx
jle 0x42a171
mov esi, dword [edi + 0x10]
mov ecx, esi
lea eax, [esi + ebx]
cmp esi, ecx
jne 0x42a14d
cmp eax, dword [edi + 0x14]
jne 0x42a14d
mov dword [edi + 0x14], ecx
jmp 0x42a167
cmp esi, eax
je 0x42a167
mov ebx, dword [edi + 0x14]
sub ebx, eax
push ebx
push eax
push esi
call fcn.0047a6a0
lea eax, [ebx + esi]
add esp, 0xc
mov dword [edi + 0x14], eax
mov eax, dword [edi + 0x14]
sub eax, dword [edi + 0x10]
jne 0x42a100
jmp 0x42a1a2
push dword [edi + 0x28]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x2c], 1
call fcn.0047c808
add eax, 0x40
mov ecx, str.Connection_closed__n
push eax
test ebx, ebx
mov eax, str.Connection_error__n
cmovns eax, ecx
push eax
call fcn.0047e1b0
add esp, 8
mov eax, dword [edi + 0x14]
pop ebx
sub eax, dword [edi + 0x10]
jne 0x42a1c1
cmp dword [edi + 0x2c], 0
jne 0x42a1c1
push dword [edi + 0x28]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x2c], 1
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0047b06c
mov esp, ebp
pop ebp
ret 4