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

Disassembly:
mov rax, rsp
mov qword [rax + 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 [rax + 0x10], rbx
mov r12, r9
mov r14, r8
mov rsi, rdx
mov rbx, rcx
xor r13d, r13d
mov dword [rax + 0x38], r13d
mov edi, dword [rsp + 0xc0]
bts edi, 0x1a
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebp, eax
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0xd0], r13d
je 0x1800211a9
lea r9d, [r13 + 4]
lea r8, [rsp + 0xd0]
lea edx, [r13 + 5]
mov rcx, qword [rbx]
call qword [sym.imp.WININET.dll_InternetSetOptionA]
lea r9d, [r13 + 4]
lea r8, [rsp + 0xd0]
lea edx, [r13 + 6]
mov rcx, qword [rbx]
call qword [sym.imp.WININET.dll_InternetSetOptionA]
mov rbx, qword [rbx]
mov rcx, rsi
call fcn.180003110
mov r8, rax
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 0xffffffff
xor r9d, r9d
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.18003b200
nop
mov rcx, qword [rsp + 0x40]
test rcx, rcx
jne 0x18002123a
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x1800211f6
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x50]
test rax, rax
je 0x18002120e
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180021233
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsp + 0x40], r13
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x1800216a5
mov dword [rsp + 0xa0], 4
mov dword [rsp + 0x30], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0xa0]
lea r8, [rsp + 0x30]
mov edx, 0x20000013
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
mov ecx, dword [rsp + 0x30]
cmp ecx, 0xc8
je 0x1800212dc
mov rax, qword [rsp + 0xd8]
test rax, rax
je 0x180021282
mov dword [rax], ecx
test ecx, ecx
je 0x18002128d
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x18002129d
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1800212ad
call qword [sym.imp.WININET.dll_InternetCloseHandle]
cmp qword [rsp + 0x40], 0
je 0x1800212d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsp + 0x40], r13
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x1800216a5
xor sil, sil
mov dword [rsp + 0xa0], 4
mov dword [rsp + 0xc0], r13d
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1800213b1
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0xa0]
lea r8, [rsp + 0xc0]
mov edx, 0x20000005
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
setne al
test al, al
je 0x1800213b1
mov eax, dword [rsp + 0xc0]
test eax, eax
jne 0x1800213d1
lea edx, [rax + 1]
mov rcx, r14
call fcn.180003460
xor edx, edx
mov rcx, r14
call fcn.180003600
mov byte [rax], sil
xor edx, edx
mov rcx, r14
call fcn.1800035b0
mov dword [r12], r13d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x180021372
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x180021382
call qword [sym.imp.WININET.dll_InternetCloseHandle]
cmp qword [rsp + 0x40], 0
je 0x1800213aa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsp + 0x40], r13
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov al, 1
jmp 0x1800216a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
jne 0x18002165b
mov sil, 1
mov eax, 0xa00000
mov dword [rsp + 0xc0], eax
cmp dword [rsp + 0xd0], 0
je 0x180021442
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebp
cmp eax, dword [rsp + 0xd0]
jbe 0x18002143b
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1800213fc
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x18002140c
call qword [sym.imp.WININET.dll_InternetCloseHandle]
cmp qword [rsp + 0x40], 0
je 0x180021434
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsp + 0x40], r13
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x1800216a5
mov eax, dword [rsp + 0xc0]
lea edx, [rax + 1]
mov rcx, r14
call fcn.180003460
mov edi, r13d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r15d, eax
mov ebx, dword [rsp + 0xc0]
add ebx, 1
mov rcx, r14
call fcn.1800035a0
mov rcx, rax
mov r8, rbx
xor edx, edx
call sub.MSVCR80.dll_memset
xor ebp, ebp
cmp dword [rsp + 0xc0], r13d
jbe 0x180021579
mov r12, qword [rsp + 0xc8]
test r12, r12
je 0x1800214a8
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x180021571
cmp dword [rsp + 0xd0], 0
je 0x1800214c9
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rsp + 0x34]
cmp eax, dword [rsp + 0xd0]
ja 0x180021571
mov ebx, 0x1000
test sil, sil
jne 0x1800214e1
mov eax, dword [rsp + 0xc0]
sub eax, edi
cmp eax, ebx
cmovb ebx, eax
mov rcx, r14
call fcn.1800035a0
mov rdx, rax
mov eax, edi
add rdx, rax
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180021571
mov dword [rsp + 0xa0], 0
lea r9, [rsp + 0xa0]
mov r8d, ebx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x180021571
add edi, dword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, r15d
je 0x18002153f
mov ecx, eax
sub ecx, r13d
cmp ecx, 0x3e8
cmova r13d, eax
mov r15d, eax
mov eax, dword [rsp + 0xa0]
cmp eax, 0xffffffff
je 0x180021571
test eax, eax
jne 0x180021564
test sil, sil
jne 0x180021571
lea ecx, [rax + 0xa]
call sub.KERNEL32.dll_Sleep
add ebp, 1
cmp ebp, 3
ja 0x180021571
cmp edi, dword [rsp + 0xc0]
jb 0x180021490
mov r12, qword [rsp + 0xb8]
cmp edi, dword [rsp + 0xc0]
je 0x1800215da
test sil, sil
jne 0x1800215df
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x180021597
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1800215a7
call qword [sym.imp.WININET.dll_InternetCloseHandle]
cmp qword [rsp + 0x40], 0
je 0x1800215d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsp + 0x40], 0
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x1800216a5
test sil, sil
je 0x180021600
mov dword [r12], edi
cmp edi, 0xa00000
jae 0x18002160b
mov rcx, r14
call fcn.1800035a0
mov ecx, dword [r12]
add rax, rcx
xor ecx, ecx
mov byte [rax], cl
jmp 0x18002160b
mov eax, dword [rsp + 0xc0]
mov dword [r12], eax
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x18002161b
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x18002162b
call qword [sym.imp.WININET.dll_InternetCloseHandle]
cmp qword [rsp + 0x40], 0
je 0x180021657
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsp + 0x40], 0
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov al, 1
jmp 0x1800216a5
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x18002166b
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x18002167b
call qword [sym.imp.WININET.dll_InternetCloseHandle]
cmp qword [rsp + 0x40], 0
je 0x1800216a3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov qword [rsp + 0x40], r13
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret