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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa78
mov rdi, qword [rcx + 0x128]
mov edx, 0xa
mov rbx, rcx
mov rcx, rdi
call sub.msvcrt.dll_strchr
test rax, rax
je 0x407950
mov rcx, rdi
call sub.msvcrt.dll_strlen
lea rdx, [0x0065cb46]
mov rcx, rdi
mov rbp, rax
call sub.msvcrt.dll_strtok
test rax, rax
je 0x407b61
mov rcx, rax
call sub.msvcrt.dll__strdup_1
mov rsi, rax
mov r9, rax
mov ecx, dword [r9]
add r9, 4
lea edx, [rcx - 0x1010101]
not ecx
and edx, ecx
and edx, 0x80808080
je 0x4078a4
mov eax, edx
shr eax, 0x10
test edx, 0x8080
cmove edx, eax
lea rax, [r9 + 2]
cmove r9, rax
add dl, dl
sbb r9, 3
sub r9, rsi
lea rdx, [r9 + 1]
cmp rbp, rdx
jg 0x407930
mov rax, qword [rbx + 0x128]
mov byte [rax], 0
test rsi, rsi
je 0x407911
cmp byte [0x007ef090], 0
je 0x407911
lea rdx, str.___s
mov r8, rsi
mov ecx, 4
call fcn.004060f0
mov rax, rsi
add rsp, 0xa78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rbx + 0x128]
sub rbp, r9
lea r8, [rbp + 1]
add rdx, rcx
call sub.msvcrt.dll_memmove
jmp 0x4078ef
lea rcx, [rsp + 0x40]
mov rbp, qword [sym.imp.msvcrt.dll__time64]
lea rsi, [rsp + 0x270]
call rbp
mov rcx, qword [rbx + 0x118]
lea rax, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x270], 1
mov dword [rsp + 0x60], 0x3c
mov dword [rsp + 0x64], 0
mov qword [rsp + 0x30], rax
mov rdx, rsi
mov qword [rsp + 0x278], rcx
mov qword [rsp + 0x20], rax
add ecx, 1
mov r15, qword [sym.imp.WS2_32.dll_select]
call r15
test eax, eax
mov r12, qword [sym.imp.WS2_32.dll_recv]
jle 0x407b40
lea rax, [rsp + 0x50]
xor r13d, r13d
mov qword [rsp + 0x38], rax
jmp 0x407aa1
mov rdi, qword [rbx + 0x128]
mov rcx, rdi
call sub.msvcrt.dll_strlen
mov r8, rsi
mov r14, rax
mov r9d, dword [r8]
add r8, 4
lea edx, [r9 - 0x1010101]
not r9d
and edx, r9d
and edx, 0x80808080
je 0x4079f5
mov eax, edx
shr eax, 0x10
test edx, 0x8080
cmove edx, eax
lea rax, [r8 + 2]
cmove r8, rax
add dl, dl
sbb r8, 3
sub r8, rsi
lea rdx, [r8 + r14 + 1]
cmp rdx, qword [rbx + 0x120]
jb 0x407a65
and rdx, 0xfffffffffffff800
mov rcx, rdi
add rdx, 0x800
mov qword [rbx + 0x120], rdx
call sub.msvcrt.dll_realloc
mov qword [rbx + 0x128], rax
mov rdi, rax
lea rcx, [rdi + r14]
mov rdx, rsi
call sub.msvcrt.dll_strcpy
xor ecx, ecx
call rbp
sub rax, qword [rsp + 0x40]
cmp rax, 0x3b
jg 0x407b55
mov rdi, qword [rbx + 0x128]
mov edx, 0xa
mov rcx, rdi
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x407873
mov rax, r13
mov ecx, 0x100
mov rdi, rsi
rep stosq qword [rdi], rax
xor r9d, r9d
mov rcx, qword [rbx + 0x118]
mov r8d, 0x7fc
mov rdx, rsi
call r12
cdqe
test rax, rax
je 0x407b29
jns 0x4079e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
nop dword [rax]
jne 0x407b29
mov rcx, qword [rbx + 0x118]
mov rax, qword [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x60], 1
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x54], 0
mov rdx, qword [rsp + 0x30]
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x20], rax
add ecx, 1
call r15
test eax, eax
jg 0x407a71
lea rdx, str.stratum_recv_line_failed
xor ecx, ecx
call fcn.004060f0
xor esi, esi
jmp 0x407911
lea rdx, str.stratum_recv_line_timed_out
xor ecx, ecx
xor esi, esi
call fcn.004060f0
jmp 0x407911
mov rdi, qword [rbx + 0x128]
jmp 0x407873
lea rdx, str.stratum_recv_line_failed_to_parse_a_newline_terminated_string
xor ecx, ecx
call fcn.004060f0
jmp 0x407b37