Function at 0x180019680
Capabilities:
Check for time delay via gettickcount
Check http status code
Get http content length
Read data from internet
Receive data

Disassembly:
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0xb0], rbx
mov r15, r9
mov rbx, r8
mov rdi, rdx
mov rbp, rcx
mov esi, dword [rsp + 0xc0]
bts esi, 0x1a
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r14d, eax
mov dword [rsp + 0x34], eax
cmp qword [rdi + 0x20], 8
jb 0x1800196d6
mov rdx, qword [rdi + 8]
jmp 0x1800196da
lea rdx, [rdi + 8]
xor r13d, r13d
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], esi
or r9d, 0xffffffff
xor r8d, r8d
mov rcx, qword [rbp]
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov rbp, rax
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x180019713
jmp 0x180019abd
mov dword [rsp + 0xa0], 4
mov dword [rsp + 0xa8], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0xa0]
lea r8, [rsp + 0xa8]
mov edx, 0x20000013
mov rcx, rax
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
mov ecx, dword [rsp + 0xa8]
cmp ecx, 0xc8
je 0x180019792
mov rax, qword [rsp + 0xd8]
test rax, rax
je 0x180019767
mov dword [rax], ecx
test ecx, ecx
je 0x180019772
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x180019abd
xor r12b, r12b
mov dword [rsp + 0xa0], 4
mov dword [rsp + 0xc0], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0xa0]
lea r8, [rsp + 0xc0]
mov edx, 0x20000005
mov rcx, rbp
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
setne al
test al, al
jne 0x180019815
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
jne 0x1800197f5
mov r12b, 1
mov eax, 0xa00000
mov dword [rsp + 0xc0], eax
jmp 0x1800198a7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x180019abd
mov eax, dword [rsp + 0xc0]
test eax, eax
jne 0x1800198a7
cmp qword [rbx + 8], 1
je 0x180019879
lea ecx, [rax + 1]
call fcn.180097720
mov rdi, rax
cmp qword [rbx + 8], 0
jbe 0x18001985f
mov rdx, qword [rbx + 0x10]
test rdx, rdx
je 0x18001985f
mov rcx, qword [rbx + 8]
mov r8d, 1
cmp rcx, r8
cmovb r8, rcx
mov rcx, rax
call fcn.1800999d0
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x18001986d
call fcn.180099070
mov qword [rbx + 0x10], rdi
mov qword [rbx + 8], 1
mov rax, qword [rbx + 0x10]
mov byte [rax], 0
mov qword [rbx + 0x18], r13
mov dword [r15], r13d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov al, 1
jmp 0x180019abd
mov r13d, dword [rsp + 0xd0]
test r13d, r13d
je 0x1800198e9
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, r14d
cmp eax, r13d
jbe 0x1800198e2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x180019abd
mov eax, dword [rsp + 0xc0]
add eax, 1
mov edi, eax
cmp rdi, qword [rbx + 8]
je 0x180019941
xor esi, esi
test eax, eax
je 0x18001992b
mov rcx, rdi
call fcn.180097720
mov rsi, rax
cmp qword [rbx + 8], 0
jbe 0x18001992b
mov rdx, qword [rbx + 0x10]
test rdx, rdx
je 0x18001992b
mov rcx, qword [rbx + 8]
mov r8, rdi
cmp rcx, rdi
cmovb r8, rcx
mov rcx, rax
call fcn.1800999d0
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x180019939
call fcn.180099070
mov qword [rbx + 0x10], rsi
mov qword [rbx + 8], rdi
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x30], eax
xor r14d, r14d
mov r8d, dword [rsp + 0xc0]
add r8d, 1
xor edx, edx
mov rcx, qword [rbx + 0x10]
call fcn.180099ff0
xor esi, esi
cmp dword [rsp + 0xc0], esi
jbe 0x180019a51
mov r15, qword [rsp + 0xc8]
nop
test r15, r15
je 0x180019998
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x180019a49
test r13d, r13d
je 0x1800199b0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rsp + 0x34]
cmp eax, r13d
ja 0x180019a49
mov r8d, 0x1000
test r12b, r12b
jne 0x1800199cb
mov eax, dword [rsp + 0xc0]
sub eax, edi
cmp eax, r8d
cmovb r8d, eax
mov dword [rsp + 0xa0], 0
mov edx, edi
add rdx, qword [rbx + 0x10]
lea r9, [rsp + 0xa0]
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x180019a49
add edi, dword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, dword [rsp + 0x30]
je 0x180019a17
mov ecx, eax
sub ecx, r14d
cmp ecx, 0x3e8
cmova r14d, eax
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0xa0]
cmp eax, 0xffffffff
je 0x180019a49
test eax, eax
jne 0x180019a3c
test r12b, r12b
jne 0x180019a49
lea ecx, [rax + 0xa]
call sub.KERNEL32.dll_Sleep
add esi, 1
cmp esi, 3
ja 0x180019a49
cmp edi, dword [rsp + 0xc0]
jb 0x180019980
mov r15, qword [rsp + 0xb8]
cmp edi, dword [rsp + 0xc0]
je 0x180019a7c
test r12b, r12b
jne 0x180019a81
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x180019abd
test r12b, r12b
je 0x180019a98
mov dword [r15], edi
cmp edi, 0xa00000
jae 0x180019aa2
mov eax, edi
add rax, qword [rbx + 0x10]
xor ecx, ecx
mov byte [rax], cl
jmp 0x180019aa2
mov eax, dword [rsp + 0xc0]
mov dword [r15], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov al, 1
mov rbx, qword [rsp + 0xb0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret