Function at 0x140059980
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r14
sub rsp, 0x30
mov rdi, qword [rcx]
mov ebp, dword [rcx + 0x7a8]
xor r14d, r14d
lea rbx, [rdi + 0x90]
mov rsi, rcx
mov dword [rcx + 0x7a8], r14d
mov ecx, dword [rbx + 0x138]
or r8, 0xffffffffffffffff
mov r12, rdx
mov eax, ecx
mov dword [rsp + 0x60], r14d
and al, 0x15
cmp al, 1
jne 0x1400599d0
mov rax, qword [rsi + 0x338]
jmp 0x1400599d3
mov rax, r8
and cl, 0x2a
cmp cl, 2
jne 0x1400599e2
mov r8, qword [rsi + 0x340]
test ebp, ebp
jne 0x1400599f3
xor r9d, r9d
mov rcx, rax
call fcn.140052450
mov ebp, eax
cmp ebp, 4
jne 0x140059a1b
lea rdx, str.select_poll_returned_error
mov rcx, rdi
call fcn.140052c80
lea eax, [rbp + 0x33]
mov rbx, qword [rsp + 0x78]
add rsp, 0x30
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret
test byte [rbx + 0x138], 1
je 0x140059a5d
test bpl, 1
jne 0x140059a33
cmp dword [rsi + 0x2fc], r14d
je 0x140059a5d
lea r9, [rsp + 0x60]
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
mov qword [rsp + 0x20], r12
call fcn.140058df0
test eax, eax
jne 0x140059d8f
cmp dword [r12], r14d
jne 0x140059d8f
test byte [rbx + 0x138], 2
je 0x140059a87
test bpl, 2
je 0x140059a87
lea r9, [rsp + 0x60]
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.140059620
test eax, eax
jne 0x140059d8f
mov qword [rsp + 0x68], r15
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea r15, [rbx + 0x40]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
mov r9d, edx
shr r9d, 6
mov dword [rsp + 0x70], r9d
imul ecx, r9d, 0x3e8
sub r8d, ecx
imul eax, r8d, 0x3e8
mov dword [rsp + 0x74], eax
mov r8, qword [rsp + 0x70]
mov qword [r15], r8
cmp dword [rsp + 0x60], r14d
je 0x140059af3
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140059ae1
mov rax, qword [rbx + 0x20]
mov qword [rcx], rax
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140059b54
mov rax, qword [rbx + 0x28]
mov qword [rcx], rax
jmp 0x140059b54
cmp dword [rbx + 0xa4], 1
jne 0x140059b54
mov rcx, qword [rbx + 0x9c]
shr r8, 0x20
sub r9d, ecx
mov rax, rcx
shr rax, 0x20
sub r8d, eax
mov eax, 0x10624dd3
imul r8d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, r9d, 0x3e8
add edx, eax
cmp edx, dword [rdi + 0x700]
jl 0x140059b54
or dword [rbx + 0x138], 2
lea rdx, str.Done_waiting_for_100_continue_n
mov rcx, rdi
mov dword [rbx + 0xa4], r14d
call fcn.140052ba0
mov rcx, rsi
call fcn.14005fd00
test eax, eax
jne 0x140059d6e
mov rdx, qword [r15]
mov rcx, rdi
call fcn.140060370
test eax, eax
jne 0x140059d8a
cmp dword [rbx + 0x138], r14d
je 0x140059cfb
mov edx, dword [rdi + 0x338]
mov ecx, r14d
mov eax, 1
test edx, edx
mov r9, r15
cmovg ecx, eax
dec ecx
je 0x140059bbf
dec ecx
je 0x140059bb7
dec ecx
jne 0x140059d75
mov esi, dword [rdi + 0x33c]
cmp edx, esi
cmovl esi, edx
jmp 0x140059bc1
mov esi, dword [rdi + 0x33c]
jmp 0x140059bc1
mov esi, edx
test r15, r15
jne 0x140059c01
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea r9, [rsp + 0x60]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
shr edx, 6
mov dword [rsp + 0x60], edx
imul ecx, edx, 0x3e8
sub r8d, ecx
imul eax, r8d, 0x3e8
mov dword [rsp + 0x64], eax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x60], rax
mov r8, qword [rdi + 0x7d8]
mov rcx, qword [r9]
mov rax, r8
sub r8d, ecx
mov rdx, rcx
shr rax, 0x20
shr rdx, 0x20
sub edx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, r8d, 0x3e8
sub eax, edx
add esi, eax
test esi, esi
jg 0x140059d75
mov r9, qword [rbx]
mov rcx, qword [rdi + 0x7d0]
cmp r9, 0xffffffffffffffff
je 0x140059caa
mov r10, qword [r15]
mov rdx, rcx
mov eax, 0x10624dd3
shr rdx, 0x20
mov r8, r10
sub r10d, ecx
shr r8, 0x20
mov qword [rsp + 0x20], r9
mov r9, qword [rbx + 0x20]
sub r8d, edx
mov rcx, rdi
imul r8d
imul eax, r10d, 0x3e8
sar edx, 6
mov r8d, edx
shr r8d, 0x1f
add r8d, edx
lea rdx, str.Operation_timed_out_after__ld_milliseconds_with__lld_out_of__lld_bytes_received
add r8d, eax
call fcn.140052c80
mov eax, 0x1c
jmp 0x140059d8a
mov r9, qword [r15]
mov rax, rcx
shr rax, 0x20
mov rdx, r9
sub r9d, ecx
shr rdx, 0x20
mov rcx, rdi
sub edx, eax
mov eax, 0x10624dd3
imul edx
imul eax, r9d, 0x3e8
mov r9, qword [rbx + 0x20]
sar edx, 6
mov r8d, edx
shr r8d, 0x1f
add r8d, edx
lea rdx, str.Operation_timed_out_after__ld_milliseconds_with__lld_bytes_received
add r8d, eax
call fcn.140052c80
mov eax, 0x1c
jmp 0x140059d8a
mov eax, dword [rdi + 0x4e4]
test eax, eax
jne 0x140059d62
mov r8, qword [rbx]
cmp r8, 0xffffffffffffffff
je 0x140059d39
mov rcx, qword [rbx + 0x20]
cmp rcx, r8
je 0x140059d39
cmp qword [rdi + 0x1e0], r14
jne 0x140059d39
sub r8, rcx
lea rdx, str.transfer_closed_with__lld_bytes_remaining_to_read
mov rcx, rdi
call fcn.140052c80
mov eax, reloc.WS2_32.dll_select
jmp 0x140059d8a
test eax, eax
jne 0x140059d62
cmp dword [rbx + 0x168], r14d
je 0x140059d62
cmp dword [rsi + 0x20], 4
je 0x140059d62
lea rdx, str.transfer_closed_with_outstanding_read_data_remaining
mov rcx, rdi
call fcn.140052c80
mov eax, reloc.WS2_32.dll_select
jmp 0x140059d8a
mov rcx, rsi
call fcn.14005fd00
test eax, eax
je 0x140059d75
mov eax, 0x2a
jmp 0x140059d8a
mov eax, dword [rbx + 0x138]
and eax, 0x33
test al, al
sete r14b
xor eax, eax
mov dword [r12], r14d
mov r15, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x78]
add rsp, 0x30
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret