Function at 0x140005690
Capabilities:
Get socket status
Receive data
Receive data on socket
Set socket configuration

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r15
sub rsp, 0x278
cmp qword [rcx + 8], 0xffffffffffffffff
mov r15, r9
mov ebp, r8d
mov r12, rdx
mov rdi, rcx
je 0x140005959
test rdx, rdx
je 0x140005959
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], r13
xor r13d, r13d
mov qword [rax - 0x28], r14
test r9, r9
je 0x1400056db
mov dword [r9], r13d
mov rbx, qword [rcx + 0x4e0]
mov r14d, r13d
mov dword [rsp + 0x44], r13d
mov esi, r13d
mov dword [rsp + 0x50], 1
mov qword [rsp + 0x58], r12
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
add rax, rbx
mov qword [rdi + 0x4e8], rax
cmp byte [rdi + 0x4c9], sil
jne 0x1400058af
nop word [rax + rax]
mov rcx, qword [rdi + 8]
mov eax, 1
mov dword [rsp + 0x2a0], eax
cmp rcx, 0xffffffffffffffff
je 0x14000584a
lea r8, [rsp + 0x2a0]
mov edx, 0x4004667f
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x1400057f1
mov rcx, rdi
call fcn.140003bf0
mov rcx, qword [rdi + 8]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], r13
lea r9, [rsp + 0x40]
mov qword [rsp + 0x28], r13
lea rdx, [rsp + 0x50]
mov r8d, 1
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x40], r13d
call qword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
jne 0x14000587d
cmp dword [rsp + 0x40], 1
jne 0x14000587d
mov rbx, qword [rdi + 0x4e0]
mov esi, r13d
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov rdx, qword [rsp + 0x58]
add rax, rbx
mov qword [rdi + 0x4e8], rax
movzx eax, byte [rdx]
cmp al, 0xd
je 0x1400058a2
cmp al, 0xa
je 0x14000593b
cmp ebp, 1
jbe 0x1400058a2
mov ecx, dword [rsp + 0x40]
add rdx, rcx
mov qword [rsp + 0x58], rdx
sub ebp, ecx
jmp 0x1400058a2
mov eax, dword [rsp + 0x2a0]
test eax, eax
jne 0x14000575d
mov rax, qword [rdi + 8]
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x68], rax
xor r9d, r9d
lea rax, [rsp + 0x48]
mov dword [rsp + 0x60], 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor ecx, ecx
mov dword [rsp + 0x48], r13d
mov dword [rsp + 0x4c], 0x3e8
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x14000575d
mov eax, dword [rsp + 0x2a0]
test eax, eax
jne 0x14000575d
cmp qword [rdi + 8], 0xffffffffffffffff
je 0x14000591a
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov rcx, rax
mov rax, qword [rdi + 0x4e8]
cmp rcx, rax
ja 0x140005912
mov ecx, 1
jmp 0x14000589c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, eax
cmp eax, 0x2733
jne 0x1400058af
inc esi
cmp esi, 0x7d0
je 0x1400058af
mov ecx, 5
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [rdi + 0x4c9], r13b
je 0x140005720
lea rcx, [rdi + 0x2ac]
mov r9, 0xffffffffffffffff
lea r8, str.raw___read_string_failed
mov edx, 0x100
call fcn.14003c5c8
test r15, r15
je 0x1400058d6
mov dword [r15], r14d
mov rcx, rdi
mov byte [r12], r13b
call fcn.140003bf0
xor al, al
mov r13, qword [rsp + 0x2b8]
mov rsi, qword [rsp + 0x2b0]
mov rbx, qword [rsp + 0x2a8]
mov r14, qword [rsp + 0x270]
add rsp, 0x278
pop r15
pop r12
pop rdi
pop rbp
ret
mov rcx, rdi
call fcn.140003bf0
lea rcx, [rdi + 0x2ac]
mov r9, 0xffffffffffffffff
lea r8, str.raw___read_string_timeout
mov edx, 0x100
call fcn.14003c5c8
jmp 0x1400058e2
mov byte [rdx], sil
mov rbx, qword [rdi + 0x4e0]
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
add rax, rbx
mov qword [rdi + 0x4e8], rax
mov al, 1
jmp 0x1400058e4
xor al, al
add rsp, 0x278
pop r15
pop r12
pop rdi
pop rbp
ret