Function at 0x4c8970
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov dword [ebp - 0x128], ecx
mov eax, dword [ebp + 0x14]
mov byte [eax], 0
cmp dword [ebp + 0x10], 0
je 0x4c89bf
push 0x78
push 0
mov ecx, dword [ebp + 0x10]
call fcn.0044ef90
mov ecx, dword [ebp + 0x10]
call fcn.0044ebe0
movzx ecx, al
test ecx, ecx
je 0x4c89bf
push str.Wait_for_data_aborted_by_app
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x14]
call edx
xor al, al
jmp 0x4c8ba7
mov eax, dword [ebp - 0x128]
cmp dword [eax + 0xa4], 0xffffffff
jne 0x4c89ed
push str.Wait_for_data_passed_invalid_socket.
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 0x14]
mov byte [ecx], 1
xor al, al
jmp 0x4c8ba7
movzx edx, byte [ebp + 0xc]
test edx, edx
jne 0x4c8a02
cmp dword [ebp + 8], 0
jne 0x4c8a02
mov dword [ebp + 8], 0x14
mov eax, dword [ebp + 8]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
imul edx, edx, 0x3e8
mov eax, dword [ebp + 8]
sub eax, edx
mov dword [ebp + 8], eax
cmp dword [ebp + 8], 0x7a120
jbe 0x4c8a32
mov dword [ebp + 8], 0x7a120
mov ecx, dword [ebp + 8]
imul ecx, ecx, 0x3e8
mov dword [ebp - 0xc], ecx
movzx edx, byte [ebp + 0xc]
test edx, edx
jne 0x4c8a59
cmp dword [ebp - 0x10], 0
jne 0x4c8a59
cmp dword [ebp - 0xc], 0
jne 0x4c8a59
mov dword [ebp - 0xc], 0x3e8
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x120], eax
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x11c], ecx
mov dword [ebp - 0x118], 0
mov dword [ebp - 0x124], 0
jmp 0x4c8a90
mov edx, dword [ebp - 0x124]
add edx, 1
mov dword [ebp - 0x124], edx
mov eax, dword [ebp - 0x124]
cmp eax, dword [ebp - 0x118]
jae 0x4c8abd
mov ecx, dword [ebp - 0x124]
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp + ecx*4 - 0x114]
cmp eax, dword [edx + 0xa4]
jne 0x4c8abb
jmp 0x4c8abd
jmp 0x4c8a81
mov ecx, dword [ebp - 0x124]
cmp ecx, dword [ebp - 0x118]
jne 0x4c8afc
cmp dword [ebp - 0x118], 0x40
jae 0x4c8afc
mov edx, dword [ebp - 0x124]
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0xa4]
mov dword [ebp + edx*4 - 0x114], ecx
mov edx, dword [ebp - 0x118]
add edx, 1
mov dword [ebp - 0x118], edx
xor eax, eax
jne 0x4c8a75
mov dword [ebp - 8], 0
lea ecx, [ebp - 0x120]
push ecx
push 0
push 0
lea edx, [ebp - 0x118]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x4c8b36
cmp dword [ebp - 4], 0
jge 0x4c8b99
mov ecx, dword [ebp + 0x14]
mov byte [ecx], 1
push 0x638c28
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x14]
call edx
push 2
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.WS2_32.dll_shutdown]
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0xa4]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x128]
mov dword [ecx + 0xa4], 0xffffffff
mov edx, dword [ebp - 0x128]
mov byte [edx + 0xa0], 0
xor al, al
jmp 0x4c8ba7
cmp dword [ebp - 4], 0
jne 0x4c8ba5
xor al, al
jmp 0x4c8ba7
mov al, 1
mov esp, ebp
pop ebp
ret 0x18