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

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push r14
lea rbp, [rsp - 0x3f]
sub rsp, 0x98
movsxd r14, edx
mov rsi, rcx
lea rbx, [r14 + r14*8]
shl rbx, 5
add rbx, rcx
mov qword [rbp + 0x7f], rbx
cmp qword [rbx + 0x40], 0
jne 0x1403979c5
xor eax, eax
add rsp, 0x98
pop r14
pop rsi
pop rbx
pop rbp
ret
mov qword [rsp + 0x90], rdi
mov edx, r14d
mov qword [rsp + 0x88], r12
mov qword [rsp + 0x80], r13
mov qword [rsp + 0x78], r15
call fcn.140398af0
xor r12d, r12d
mov qword [rbp - 0x19], rax
cmp dword [rbx + 0x20], 4
lea r8, [0x140398480]
mov rdx, r8
mov dword [rbp - 9], r12d
mov qword [rbp - 1], rdx
mov rdi, rax
lea r13, [r12 - 1]
mov qword [rbp + 7], rsi
mov dword [rbp + 0xf], r14d
jne 0x140397b69
mov r15d, r13d
mov r14, r13
inc r14
cmp byte [rax + r14], r12b
jne 0x140397a23
mov eax, r14d
add rax, rdi
mov qword [rbp - 0x11], rax
nop word [rax + rax]
movzx eax, byte [rdi]
mov rsi, rdi
test al, al
je 0x140397b42
nop
cmp al, 0xa
je 0x140397a6e
movzx eax, byte [rdi + 1]
inc rdi
test al, al
jne 0x140397a50
mov rdi, qword [rbp - 0x19]
mov r15d, 2
jmp 0x140398294
cmp byte [rdi], r12b
je 0x140397b42
inc rdi
mov rbx, rdi
mov rax, rdi
sub rbx, rsi
sub rax, rsi
cmp rax, 0x10
jle 0x140397ace
mov r8d, reloc.WSOCK32.dll_recv
lea rdx, str.Content_Length:
mov rcx, rsi
call fcn.14001d5e0
test eax, eax
jne 0x140397a40
call fcn.140013154
xor edx, edx
lea rcx, [rsi + 0x10]
mov dword [rax], r12d
lea r8d, [rdx + 0xa]
call fcn.140014460
mov r15d, eax
call fcn.140013154
cmp dword [rax], 0x22
je 0x140397b26
test r15d, r15d
js 0x140397b26
cmp rbx, 2
jne 0x140397a40
cmp byte [rsi], 0xd
jne 0x140397a40
cmp byte [rsi + 1], 0xa
jne 0x140397a40
cmp r15d, r13d
jne 0x140397b32
mov rdi, qword [rbp - 0x19]
mov r15d, r12d
mov r8, rdi
mov rsi, qword [rbp + 0x67]
test r15d, r15d
jne 0x1403981f1
mov rbx, qword [rbp + 0x7f]
lea rdx, str.Decoding_failed___discarding_input
mov rcx, rsi
call fcn.140151b80
mov qword [rbx + 0x88], r12
jmp 0x14039822c
mov rdi, qword [rbp - 0x19]
mov r15d, r12d
mov r8d, edi
jmp 0x140397afa
mov r9d, dword [rbp - 0x19]
sub edi, r9d
lea eax, [rdi + r15]
cmp r14d, eax
jae 0x140397b51
mov rdi, qword [rbp - 0x19]
mov r15d, 2
jmp 0x140398294
add dword [rbp - 9], edi
lea r8, [0x140398480]
mov rdi, qword [rbp - 0x19]
mov rdx, qword [rbp - 1]
mov rbx, qword [rbp + 0x7f]
jmp 0x140397b6c
mov r9, rdi
inc dword [0x14045b404]
mov r15d, r12d
cmp dword [rbx + 0x20], 3
mov rax, r13
sete r15b
inc rax
cmp byte [rdi + rax], r12b
jne 0x140397b80
add rax, rdi
mov qword [rbp - 0x11], rax
movsxd rax, dword [rbp - 9]
movzx ecx, byte [rax + rdi]
test rdx, rdx
je 0x140397cbc
test cl, cl
jne 0x140397cc0
cmp rdx, r8
jne 0x140397c8d
movsxd rax, dword [rbp + 0xf]
lea r8, [rax + rax*8]
shl r8, 5
add r8, qword [rbp + 7]
mov rcx, qword [r8 + 0x40]
test rcx, rcx
je 0x140397ce6
mov rax, qword [rcx + 0x10]
mov rdi, qword [rcx]
mov qword [r8 + 0x40], rax
mov rax, qword [rcx + 0x10]
test rax, rax
jne 0x140397be9
mov qword [r8 + 0x48], r12
jmp 0x140397bed
mov qword [rax + 0x18], r12
cmp dword [0x14045b3f8], r12d
jne 0x140397bfb
call fcn.140005660
test rdi, rdi
je 0x140397cde
mov ebx, dword [rbp - 0x11]
sub ebx, dword [rbp - 0x19]
test ebx, ebx
jle 0x140397c70
mov rsi, r13
inc rsi
cmp byte [rdi + rsi], r12b
jne 0x140397c11
lea eax, [rbx + 1]
mov edx, 1
add eax, esi
movsxd rcx, eax
call fcn.140032b90
mov r14, rax
test rax, rax
je 0x140397ccd
mov rdx, qword [rbp - 0x19]
mov rcx, rax
movsxd rbx, ebx
mov r8, rbx
call fcn.140003740
lea eax, [rsi + 1]
mov rdx, rdi
movsxd r8, eax
lea rcx, [rbx + r14]
call fcn.140003740
cmp dword [0x14045b3f8], r12d
jne 0x140397c6d
mov rcx, rdi
call fcn.140005660
mov rdi, r14
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x140397c87
cmp dword [0x14045b3f8], r12d
jne 0x140397c87
call fcn.140005660
mov qword [rbp - 0x19], rdi
jmp 0x140397c9b
lea rcx, [rbp - 0x19]
call rdx
test eax, eax
je 0x140397cde
mov rdi, qword [rbp - 0x19]
mov rax, r13
nop
inc rax
cmp byte [rdi + rax], r12b
jne 0x140397ca0
mov rdx, qword [rbp - 1]
lea r8, [0x140398480]
mov r9d, edi
jmp 0x140397b89
test cl, cl
je 0x140397ce6
cmp cl, 0x20
ja 0x140397ce6
inc dword [rbp - 9]
jmp 0x140397b90
cmp dword [0x14045b3f8], r12d
jne 0x140397cde
mov rcx, rdi
call fcn.140005660
mov r9d, dword [rbp - 0x19]
mov rdx, qword [rbp - 1]
test rdx, rdx
je 0x140397e20
mov eax, dword [rbp - 0x11]
sub eax, r9d
sub eax, dword [rbp - 9]
cmp eax, 0x41
jge 0x140397e20
lea rax, [0x140398480]
cmp rdx, rax
jne 0x140397dff
movsxd rax, dword [rbp + 0xf]
lea rdx, [rax + rax*8]
shl rdx, 5
add rdx, qword [rbp + 7]
mov rcx, qword [rdx + 0x40]
test rcx, rcx
je 0x140397e20
mov rax, qword [rcx + 0x10]
mov rdi, qword [rcx]
mov qword [rdx + 0x40], rax
mov rax, qword [rcx + 0x10]
test rax, rax
jne 0x140397d48
mov qword [rdx + 0x48], r12
jmp 0x140397d4c
mov qword [rax + 0x18], r12
cmp dword [0x14045b3f8], r12d
jne 0x140397d5a
call fcn.140005660
test rdi, rdi
je 0x140397e20
mov ebx, dword [rbp - 0x11]
sub ebx, dword [rbp - 0x19]
test ebx, ebx
jle 0x140397de2
mov rsi, r13
inc rsi
cmp byte [rdi + rsi], r12b
jne 0x140397d70
lea eax, [rbx + 1]
mov edx, 1
add eax, esi
movsxd rcx, eax
call fcn.140032b90
mov r14, rax
test rax, rax
jne 0x140397daa
cmp dword [0x14045b3f8], r12d
jne 0x140397e20
mov rcx, rdi
call fcn.140005660
jmp 0x140397e20
mov rdx, qword [rbp - 0x19]
mov rcx, r14
movsxd rbx, ebx
mov r8, rbx
call fcn.140003740
lea eax, [rsi + 1]
mov rdx, rdi
movsxd r8, eax
lea rcx, [rbx + r14]
call fcn.140003740
cmp dword [0x14045b3f8], r12d
jne 0x140397ddf
mov rcx, rdi
call fcn.140005660
mov rdi, r14
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x140397df9
cmp dword [0x14045b3f8], r12d
jne 0x140397df9
call fcn.140005660
mov qword [rbp - 0x19], rdi
jmp 0x140397e0d
lea rcx, [rbp - 0x19]
call rdx
test eax, eax
je 0x140397e20
mov rdi, qword [rbp - 0x19]
mov rax, r13
inc rax
cmp byte [rdi + rax], r12b
jne 0x140397e10
add rax, rdi
mov qword [rbp - 0x11], rax
mov r8d, r15d
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 0x19]
call fcn.140146ed0
mov rdi, qword [rbp - 0x19]
mov r15d, eax
mov rdx, qword [rbp - 1]
nop dword [rax + rax]
movsxd rax, dword [rbp - 9]
movzx ecx, byte [rax + rdi]
test rdx, rdx
je 0x140397f76
test cl, cl
jne 0x140397f7a
lea rbx, [0x140398480]
cmp rdx, rbx
jne 0x140397f4c
movsxd rax, dword [rbp + 0xf]
lea r8, [rax + rax*8]
shl r8, 5
add r8, qword [rbp + 7]
mov rcx, qword [r8 + 0x40]
test rcx, rcx
je 0x140397fa7
mov rax, qword [rcx + 0x10]
mov rdi, qword [rcx]
mov qword [r8 + 0x40], rax
mov rax, qword [rcx + 0x10]
test rax, rax
jne 0x140397ea0
mov qword [r8 + 0x48], r12
jmp 0x140397ea4
mov qword [rax + 0x18], r12
cmp dword [0x14045b3f8], r12d
jne 0x140397eb2
call fcn.140005660
test rdi, rdi
je 0x140398004
mov ebx, dword [rbp - 0x11]
sub ebx, dword [rbp - 0x19]
test ebx, ebx
jle 0x140397f2f
mov rsi, r13
nop dword [rax + rax]
inc rsi
cmp byte [rdi + rsi], r12b
jne 0x140397ed0
lea eax, [rbx + 1]
mov edx, 1
add eax, esi
movsxd rcx, eax
call fcn.140032b90
mov r14, rax
test rax, rax
je 0x140397f87
mov rdx, qword [rbp - 0x19]
mov rcx, rax
movsxd rbx, ebx
mov r8, rbx
call fcn.140003740
lea eax, [rsi + 1]
mov rdx, rdi
movsxd r8, eax
lea rcx, [r14 + rbx]
call fcn.140003740
cmp dword [0x14045b3f8], r12d
jne 0x140397f2c
mov rcx, rdi
call fcn.140005660
mov rdi, r14
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x140397f46
cmp dword [0x14045b3f8], r12d
jne 0x140397f46
call fcn.140005660
mov qword [rbp - 0x19], rdi
jmp 0x140397f5e
lea rcx, [rbp - 0x19]
call rdx
mov rdi, qword [rbp - 0x19]
test eax, eax
je 0x14039800e
mov rax, r13
inc rax
cmp byte [rdi + rax], r12b
jne 0x140397f61
add rax, rdi
mov qword [rbp - 0x11], rax
jmp 0x140397e37
test cl, cl
je 0x140397fa0
cmp cl, 0x20
ja 0x140397fa0
inc dword [rbp - 9]
jmp 0x140397e40
cmp dword [0x14045b3f8], r12d
jne 0x140397f98
mov rcx, rdi
call fcn.140005660
mov rdx, qword [rbp - 1]
mov rdi, qword [rbp - 0x19]
lea rbx, [0x140398480]
mov r8d, edi
test rdx, rdx
je 0x1403980f6
mov eax, dword [rbp - 0x11]
sub eax, edi
sub eax, dword [rbp - 9]
cmp eax, 0x41
jge 0x1403980f6
cmp rdx, rbx
jne 0x1403980cf
movsxd rax, dword [rbp + 0xf]
lea rdx, [rax + rax*8]
shl rdx, 5
add rdx, qword [rbp + 7]
mov rcx, qword [rdx + 0x40]
test rcx, rcx
je 0x1403980f6
mov rax, qword [rcx + 0x10]
mov rdi, qword [rcx]
mov qword [rdx + 0x40], rax
mov rax, qword [rcx + 0x10]
test rax, rax
jne 0x140398014
mov qword [rdx + 0x48], r12
jmp 0x140398018
mov rdx, qword [rbp - 1]
mov rdi, qword [rbp - 0x19]
jmp 0x140397fa7
mov rdx, qword [rbp - 1]
jmp 0x140397fa7
mov qword [rax + 0x18], r12
cmp dword [0x14045b3f8], r12d
jne 0x140398026
call fcn.140005660
test rdi, rdi
je 0x140398074
mov ebx, dword [rbp - 0x11]
sub ebx, dword [rbp - 0x19]
test ebx, ebx
jle 0x1403980b2
mov rsi, r13
nop dword [rax + rax]
inc rsi
cmp byte [rdi + rsi], r12b
jne 0x140398040
lea eax, [rbx + 1]
mov edx, 1
add eax, esi
movsxd rcx, eax
call fcn.140032b90
mov r14, rax
test rax, rax
jne 0x14039807a
cmp dword [0x14045b3f8], r12d
jne 0x140398074
mov rcx, rdi
call fcn.140005660
mov rdi, qword [rbp - 0x19]
jmp 0x1403980f3
mov rdx, qword [rbp - 0x19]
mov rcx, r14
movsxd rbx, ebx
mov r8, rbx
call fcn.140003740
lea eax, [rsi + 1]
mov rdx, rdi
movsxd r8, eax
lea rcx, [r14 + rbx]
call fcn.140003740
cmp dword [0x14045b3f8], r12d
jne 0x1403980af
mov rcx, rdi
call fcn.140005660
mov rdi, r14
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x1403980c9
cmp dword [0x14045b3f8], r12d
jne 0x1403980c9
call fcn.140005660
mov qword [rbp - 0x19], rdi
jmp 0x1403980dd
lea rcx, [rbp - 0x19]
call rdx
mov rdi, qword [rbp - 0x19]
test eax, eax
je 0x1403980f3
mov rax, r13
inc rax
cmp byte [rdi + rax], r12b
jne 0x1403980e0
add rax, rdi
mov qword [rbp - 0x11], rax
mov dword [rbp - 0x11], eax
mov r8d, edi
dec dword [0x14045b404]
mov eax, r15d
cmp r15d, 1
jne 0x14039828b
mov rdi, qword [rbp + 0x7f]
cmp dword [rdi + 0x20], 4
jne 0x140398131
cmp dword [rbp - 0x29], 0xc
je 0x14039815e
mov rsi, qword [rbp + 0x67]
lea rdx, str.Did_not_receive_a_LSP_dict__discarding
mov rcx, rsi
call fcn.140151b80
jmp 0x1403981da
cmp dword [rbp - 0x29], 0xb
jne 0x140398273
mov rax, qword [rbp - 0x21]
mov r8d, dword [rax + 0x4c]
cmp r8d, 2
jge 0x14039815e
mov rsi, qword [rbp + 0x67]
lea rdx, str.Expected_list_with_two_items__got__d
mov rcx, rsi
call fcn.140151b80
jmp 0x1403981da
mov edx, 1
lea ecx, [rdx + 0x1f]
call fcn.140032b90
mov rbx, rax
test rax, rax
je 0x1403981d6
mov edx, 1
mov dword [rax + 0x18], r12d
lea ecx, [rdx + 0xf]
call fcn.140032b90
test rax, rax
je 0x1403981c2
mov rsi, qword [rbp + 0x67]
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rbx], rax
movups xmm0, xmmword [rbp - 0x29]
movups xmmword [rax], xmm0
mov rax, qword [rdi + 0x60]
mov qword [rbx + 0x10], rax
mov qword [rdi + 0x60], rbx
mov rax, qword [rbx + 0x10]
mov qword [rbx + 8], r12
test rax, rax
jne 0x1403981bc
mov qword [rdi + 0x58], rbx
jmp 0x1403981e3
mov qword [rax + 8], rbx
jmp 0x1403981e3
cmp dword [0x14045b3f8], r12d
mov qword [rbx], rax
jne 0x1403981d6
mov rcx, rbx
call fcn.140005660
mov rsi, qword [rbp + 0x67]
lea rcx, [rbp - 0x29]
call fcn.1402c4e50
mov qword [rdi + 0x88], r12
mov rdi, qword [rbp - 0x19]
mov r8d, edi
movsxd rcx, dword [rbp - 9]
cmp byte [rdi + rcx], r12b
lea rdx, [rdi + rcx]
je 0x140398230
mov r9d, dword [rbp - 0x11]
sub r9d, r8d
mov qword [rsp + 0x28], r12
sub r9d, ecx
mov dword [rsp + 0x20], 1
mov r8, rdx
mov rcx, rsi
mov edx, dword [rbp + 0x6f]
call fcn.1403985b0
cmp r15d, 2
setne r12b
mov rdi, qword [rbp - 0x19]
mov r15, qword [rsp + 0x78]
mov r13, qword [rsp + 0x80]
test rdi, rdi
je 0x140398253
cmp dword [0x14045b3f8], 0
jne 0x140398253
mov rcx, rdi
call fcn.140005660
mov rdi, qword [rsp + 0x90]
mov eax, r12d
mov r12, qword [rsp + 0x88]
add rsp, 0x98
pop r14
pop rsi
pop rbx
pop rbp
ret
mov rsi, qword [rbp + 0x67]
lea rdx, str.Did_not_receive_a_list__discarding
mov rcx, rsi
call fcn.140151b80
jmp 0x1403981da
cmp eax, 2
jne 0x140397afa
inc r13
cmp byte [rdi + r13], r12b
jne 0x140398294
mov rbx, qword [rbp + 0x7f]
cmp qword [rbx + 0x88], r13
jae 0x1403982df
mov rsi, qword [rbp + 0x67]
lea rdx, str.Incomplete_message___d_bytes____wait_100_msec_for_more
mov rcx, rsi
mov r8d, r13d
call fcn.1401522a0
mov dword [rbp - 9], r12d
mov qword [rbx + 0x88], r13
call qword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x64
mov dword [rbx + 0x90], eax
jmp 0x1403981ea
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rsi, qword [rbp + 0x67]
mov rcx, rsi
cmp eax, dword [rbx + 0x90]
jbe 0x14039830c
lea rdx, str.timed_out
mov qword [rbx + 0x88], r12
call fcn.1401522a0
jmp 0x140397b0b
lea rdx, str.still_waiting_on_incomplete_message
mov dword [rbp - 9], r12d
call fcn.1401522a0
jmp 0x1403981ea