Function at 0x1002c590
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov eax, 0x12b8
call fcn.10052b40
mov ecx, dword [esp + 0x12bc]
test byte [ecx + 0x5a], 0x10
je 0x1002c5b0
xor al, al
add esp, 0x12b8
ret
movzx eax, word [ecx + 0x56]
push ebp
xor ebp, ebp
test ax, ax
mov dword [esp + 8], ebp
mov dword [esp + 0xc], ebp
jne 0x1002c5d5
mov eax, dword [ecx + 0x5c]
lea edx, [esp + 4]
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
jmp 0x1002c5ee
cmp ax, 8
jb 0x1002c5ee
mov eax, dword [ecx + 0x60]
test eax, eax
jle 0x1002c5ee
mov dword [esp + 4], eax
lea eax, [esp + 4]
mov dword [esp + 0xc], eax
mov ecx, dword [ecx + 0x6c]
push ebx
mov ebx, dword [esp + 8]
push edi
push 0x290
lea edx, [esp + 0x20]
push 0
push edx
mov dword [esp + 0x24], ecx
call sub.MSVCR80.dll_memset
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
add esp, 0xc
push esi
jmp 0x1002c620
mov eax, dword [esp + 0x12cc]
test byte [eax + 0x5a], 4
jne 0x1002c774
xor esi, esi
push 0x1004
lea ecx, [esp + 0x2c4]
push esi
push ecx
mov dword [esp + 0x2bc], esi
mov dword [esp + 0x2c0], esi
mov dword [esp + 0x2c4], esi
mov dword [esp + 0x2c8], esi
call sub.MSVCR80.dll_memset
mov ecx, dword [esp + 0x2cc]
mov edx, dword [esp + 0x28]
add esp, 0xc
xor eax, eax
cmp ecx, esi
jbe 0x1002c686
cmp dword [esp + eax*4 + 0x2c4], edx
je 0x1002c686
add eax, 1
cmp eax, ecx
jb 0x1002c676
cmp eax, ecx
jne 0x1002c6a1
cmp ecx, 0x400
jae 0x1002c6a1
mov dword [esp + eax*4 + 0x2c4], edx
add dword [esp + 0x2c0], 1
mov edx, dword [esp + 0x18]
add dword [esp + 0x2bc], 1
push edx
push esi
push esi
lea eax, [esp + 0x2cc]
push eax
push 0x400
call dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x2b8], eax
mov esi, eax
call edi
cmp esi, 0xffffffff
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebp
jne 0x1002c72b
jmp 0x1002c6e0
cmp eax, 4
je 0x1002c6ec
cmp eax, 0x2714
jne 0x1002c722
mov ecx, dword [esp + 0x18]
push ecx
push 0
push 0
lea edx, [esp + 0x2cc]
push edx
push 0x400
call dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x2b8], eax
mov esi, eax
call edi
cmp esi, 0xffffffff
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebp
je 0x1002c6e0
jmp 0x1002c72b
cmp esi, 0xffffffff
je 0x1002c7b7
test esi, esi
jne 0x1002c774
mov ecx, dword [esp + 0x12cc]
movzx eax, word [ecx + 0x56]
cmp ax, 8
jb 0x1002c76b
lea eax, [esp + 0x20]
push eax
push ecx
mov dword [esp + 0x28], 0x47
call fcn.1002c480
add esp, 8
test eax, eax
jne 0x1002c620
pop esi
pop edi
pop ebx
xor al, al
pop ebp
add esp, 0x12b8
ret
test ax, ax
je 0x1002c821
movsx ecx, word [esp + 0x12d4]
mov edx, dword [esp + 0x12d0]
mov eax, dword [esp + 0x12cc]
push 0
push ecx
mov ecx, dword [eax + 0x6c]
push edx
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
call edi
cmp esi, 0xffffffff
jne 0x1002c7cb
cmp eax, 4
je 0x1002c620
cmp eax, 0x2714
je 0x1002c620
jmp 0x1002c7cf
mov edx, dword [esp + 0x12cc]
test byte [edx + 0x5a], 0x10
jne 0x1002c809
push str.select_in_packet_receive
jmp 0x1002c7fa
test esi, esi
jg 0x1002c7e9
mov edx, dword [esp + 0x12cc]
test byte [edx + 0x5a], 0x10
je 0x1002c7f0
pop esi
pop edi
pop ebx
xor al, al
pop ebp
add esp, 0x12b8
ret
mov edx, dword [esp + 0x12cc]
cmp esi, 0xffffffff
jne 0x1002c816
push str.read
mov ecx, eax
mov ebx, 0x14000196
call fcn.1002b2f0
add esp, 4
pop esi
pop edi
pop ebx
xor al, al
pop ebp
add esp, 0x12b8
ret
test esi, esi
jne 0x1002c82e
mov dword [edx + 0x38], 1
pop esi
pop edi
pop ebx
xor al, al
pop ebp
add esp, 0x12b8
ret
mov edx, dword [esp + 0x12d8]
mov word [edx], si
pop esi
pop edi
pop ebx
mov al, 1
pop ebp
add esp, 0x12b8
ret