Function at 0x5168bb
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov dword [ebp - 0x13c], ecx
mov eax, dword [ebp + 0x1c]
and byte [eax], 0
cmp dword [ebp + 8], 0
je 0x5168e3
cmp dword [ebp + 8], 0x32
jae 0x5168e3
mov dword [ebp + 8], 0x32
cmp dword [ebp + 0x10], 0
jne 0x5168f0
mov dword [ebp + 0x10], 0x1499700
cmp dword [ebp + 0x18], 0
je 0x5168fc
cmp dword [ebp + 8], 0
jne 0x516912
push dword [ebp + 0x14]
push dword [ebp + 0x10]
mov ecx, dword [ebp - 0x13c]
call fcn.0051675a
jmp 0x516b6d
mov eax, dword [ebp - 0x13c]
cmp dword [eax + 0x4c], 0xffffffff
jne 0x516935
push str.invalid_socket__not_ready_for_writing.
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x14]
call dword [eax + 0x10]
xor al, al
jmp 0x516b6d
and dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0
je 0x5169b2
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x5169b2
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 8]
jbe 0x51695f
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp + 0x18], 0
je 0x5169a7
push 0x71
push dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
call fcn.004f20f4
mov ecx, dword [ebp + 0x18]
call fcn.004f1f9a
movzx eax, al
test eax, eax
je 0x5169a7
mov eax, dword [ebp + 0x1c]
mov byte [eax], 1
push str.socket_operation_aborted_by_application_callback..
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x14]
call dword [eax + 0x10]
xor al, al
jmp 0x516b6d
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
jmp 0x516945
cmp dword [ebp + 0x10], 0
je 0x5169c4
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x10]
jae 0x516b5b
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 0x10], 0
je 0x5169f5
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 4]
jbe 0x5169f5
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 4]
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 8], 0
je 0x5169f5
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 8]
jbe 0x5169f5
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x3e8
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x14]
imul eax, eax, 0x3e8
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x12c]
mov dword [ebp - 0x130], eax
and dword [ebp - 0x128], 0
and dword [ebp - 0x138], 0
jmp 0x516a56
mov eax, dword [ebp - 0x138]
inc eax
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x138]
cmp eax, dword [ebp - 0x128]
jae 0x516a80
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x13c]
mov eax, dword [ebp + eax*4 - 0x124]
cmp eax, dword [ecx + 0x4c]
jne 0x516a7e
jmp 0x516a80
jmp 0x516a49
mov eax, dword [ebp - 0x138]
cmp eax, dword [ebp - 0x128]
jne 0x516aba
cmp dword [ebp - 0x128], 0x40
jae 0x516aba
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x13c]
mov ecx, dword [ecx + 0x4c]
mov dword [ebp + eax*4 - 0x124], ecx
mov eax, dword [ebp - 0x128]
inc eax
mov dword [ebp - 0x128], eax
xor eax, eax
test eax, eax
jne 0x516a40
lea eax, [ebp - 0x134]
push eax
push 0
lea eax, [ebp - 0x128]
push eax
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x516af7
push str.select_returned_a_socket_error
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x14]
call dword [eax + 0x10]
xor al, al
jmp 0x516b6d
cmp dword [ebp - 0x10], 1
jne 0x516b01
mov al, 1
jmp 0x516b6d
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x1c]
mov dword [ebp - 4], eax
cmp dword [ebp + 0x10], 0
je 0x516b1a
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x10]
jb 0x516b1a
jmp 0x516b5b
cmp dword [ebp + 0x18], 0
je 0x516b56
push 0x72
push dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
call fcn.004f20f4
mov ecx, dword [ebp + 0x18]
call fcn.004f1f9a
movzx eax, al
test eax, eax
je 0x516b56
mov eax, dword [ebp + 0x1c]
mov byte [eax], 1
push str.socket_operation_aborted_by_application_callback
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x14]
call dword [eax + 0x10]
xor al, al
jmp 0x516b6d
jmp 0x5169b2
push str.socket_is_not_ready_for_writing_
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x14]
call dword [eax + 0x10]
xor al, al
leave
ret 0x18