Function at 0x4c8c00
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov dword [ebp - 0x13c], ecx
mov eax, dword [ebp + 0x18]
mov byte [eax], 0
mov ecx, dword [ebp + 0x14]
mov byte [ecx], 0
mov edx, dword [ebp + 0x1c]
mov byte [edx], 0
cmp dword [ebp + 8], 0
je 0x4c8c34
cmp dword [ebp + 8], 0x32
jae 0x4c8c34
mov dword [ebp + 8], 0x32
cmp dword [ebp + 0xc], 0
jne 0x4c8c41
mov dword [ebp + 0xc], 0x1499700
mov eax, dword [ebp - 0x13c]
cmp dword [eax + 0xa4], 0xffffffff
jne 0x4c8c6f
push str.Invalid_socket.
mov ecx, dword [ebp + 0x20]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x20]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 0x14]
mov byte [ecx], 1
xor al, al
jmp 0x4c8f06
mov dword [ebp - 8], 0
mov byte [ebp - 1], 1
cmp dword [ebp + 0xc], 0
je 0x4c8c8c
mov edx, dword [ebp - 8]
cmp edx, dword [ebp + 0xc]
jae 0x4c8edb
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4c8c9e
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp + 0xc], 0
je 0x4c8cc9
mov edx, dword [ebp + 0xc]
cmp edx, dword [ebp - 8]
jbe 0x4c8cc9
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 8], 0
je 0x4c8cc9
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp + 8]
jbe 0x4c8cc9
mov edx, dword [ebp + 8]
mov dword [ebp - 0x1c], edx
movzx eax, byte [ebp - 1]
test eax, eax
je 0x4c8ce6
mov ecx, dword [ebp - 0x1c]
shr ecx, 1
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0x32
jae 0x4c8ce6
mov dword [ebp - 0x1c], 0x32
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
imul edx, edx, 0x3e8
mov eax, dword [ebp - 0x1c]
sub eax, edx
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
imul ecx, ecx, 0x3e8
mov dword [ebp - 0x12c], ecx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x134], edx
mov eax, dword [ebp - 0x12c]
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x138], 0
jmp 0x4c8d4f
mov ecx, dword [ebp - 0x138]
add ecx, 1
mov dword [ebp - 0x138], ecx
mov edx, dword [ebp - 0x138]
cmp edx, dword [ebp - 0x128]
jae 0x4c8d7c
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x13c]
mov edx, dword [ebp + eax*4 - 0x124]
cmp edx, dword [ecx + 0xa4]
jne 0x4c8d7a
jmp 0x4c8d7c
jmp 0x4c8d40
mov eax, dword [ebp - 0x138]
cmp eax, dword [ebp - 0x128]
jne 0x4c8dbb
cmp dword [ebp - 0x128], 0x40
jae 0x4c8dbb
mov ecx, dword [ebp - 0x138]
mov edx, dword [ebp - 0x13c]
mov eax, dword [edx + 0xa4]
mov dword [ebp + ecx*4 - 0x124], eax
mov ecx, dword [ebp - 0x128]
add ecx, 1
mov dword [ebp - 0x128], ecx
xor edx, edx
jne 0x4c8d34
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x134]
push eax
push 0
push 0
lea ecx, [ebp - 0x128]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x4c8df5
cmp dword [ebp - 0xc], 0
jge 0x4c8e67
mov eax, dword [ebp + 0x20]
push eax
call fcn.004c35c0
add esp, 4
mov ecx, dword [ebp + 0x14]
mov byte [ecx], 1
push str.Error_waiting_for_socket_to_become_ready_for_reading.
mov edx, dword [ebp + 0x20]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x20]
mov edx, dword [eax + 0x14]
call edx
push 2
mov eax, dword [ebp - 0x13c]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.WS2_32.dll_shutdown]
mov edx, dword [ebp - 0x13c]
mov eax, dword [edx + 0xa4]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x13c]
mov dword [ecx + 0xa4], 0xffffffff
mov edx, dword [ebp - 0x13c]
mov byte [edx + 0xa0], 0
xor al, al
jmp 0x4c8f06
cmp dword [ebp - 0xc], 0
je 0x4c8e74
mov al, 1
jmp 0x4c8f06
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
cmp dword [ebp + 0xc], 0
je 0x4c8e8d
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp + 0xc]
jb 0x4c8e8d
jmp 0x4c8edb
cmp dword [ebp + 0x10], 0
je 0x4c8ed2
cmp dword [ebp + 8], 0
je 0x4c8ed2
push 0x73
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp + 0x10]
call fcn.0044f010
mov ecx, dword [ebp + 0x10]
call fcn.0044ed00
movzx eax, al
test eax, eax
je 0x4c8ed2
mov ecx, dword [ebp + 0x18]
mov byte [ecx], 1
push str.socket_operation_aborted_by_application_callback
mov edx, dword [ebp + 0x20]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x20]
mov edx, dword [eax + 0x14]
call edx
xor al, al
jmp 0x4c8f06
mov byte [ebp - 1], 0
jmp 0x4c8c7a
push str.Timeout_waiting_to_read_socket_or_accept_connection
mov eax, dword [ebp + 0x20]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x20]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0x66ade8
mov ecx, dword [ebp + 0x20]
call fcn.00435700
mov edx, dword [ebp + 0x1c]
mov byte [edx], 1
xor al, al
mov esp, ebp
pop ebp
ret 0x1c