Function at 0x140085bf0
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x9920
call fcn.1400a3300
sub rsp, rax
mov rax, qword [0x140144038]
xor rax, rsp
mov qword [rsp + 0x9910], rax
mov r12, r9
mov r13, rdx
mov rbx, rcx
xor eax, eax
mov r14d, eax
mov qword [rsp + 0x40], rax
mov edi, eax
mov qword [rsp + 0x48], rax
mov r15d, eax
mov qword [rsp + 0x50], rax
mov esi, eax
mov qword [rsp + 0x58], rax
xor edx, edx
mov r8d, 0x8000
lea rcx, [rsp + 0x1910]
call fcn.1400a5140
xor edx, edx
mov r8d, 0x1800
lea rcx, [rsp + 0x110]
call fcn.1400a5140
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
movups xmmword [rsp + 0xa0], xmm0
movups xmmword [rsp + 0xb0], xmm0
mov qword [rsp + 0xc0], rax
mov dword [rsp + 0x60], 0x68
lea rax, [rsp + 0x1510]
mov qword [rsp + 0xb8], rax
lea rax, [rsp + 0x510]
mov qword [rsp + 0x78], rax
lea rax, [rsp + 0xd10]
mov qword [rsp + 0x98], rax
lea rax, [rsp + 0x110]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x1110]
mov qword [rsp + 0xa8], rax
lea rax, [rsp + 0x910]
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x90], 0x200
mov dword [rsp + 0xb0], 0x200
mov dword [rsp + 0x70], 0x200
mov dword [rsp + 0xa0], 0x200
mov dword [rsp + 0x80], 0x200
mov dword [rsp + 0xc0], 0x200
lea r9, [rsp + 0x60]
xor edx, edx
mov r8d, 0x80000000
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x140085d79
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.cant_set_WinHttpCrackUrl__d_n
call fcn.1400862b0
jmp 0x140086229
xorps xmm0, xmm0
movups xmmword [rsp + 0xd0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0xe0], xmm1
mov rdx, qword [rsp + 0xa8]
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp word [rdx + r8*2], 0
jne 0x140085da2
lea rcx, [rsp + 0xd0]
call fcn.1400049c0
nop
mov rdx, qword [rsp + 0xb8]
inc rbx
cmp word [rdx + rbx*2], 0
jne 0x140085dc3
mov r8, rbx
lea rcx, [rsp + 0xd0]
call fcn.140008c60
xor ebx, ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
lea edx, [rbx + 1]
xor ecx, ecx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r14, rax
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x140085e6b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.cant_set_WinHttpOpen__d_n
mov edx, eax
call fcn.1400862b0
nop
mov rdx, qword [rsp + 0xe8]
cmp rdx, 8
jb 0x140085e5e
mov rcx, qword [rsp + 0xd0]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140085e59
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14008629a
call fcn.1400a2410
mov word [rsp + 0xd0], bx
jmp 0x140086218
mov dword [rsp + 0x100], 0x800
mov r9d, 4
lea r8, [rsp + 0x100]
lea edx, [r9 + 0x50]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x140085ea7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.cant_set_secure_protocols__d_n
jmp 0x140085e0e
mov dword [rsp + 0x108], 4
mov dword [rsp + 0xfc], ebx
mov dword [rsp + 0x104], ebx
xor r9d, r9d
movzx r8d, word [rsp + 0x84]
mov rdx, qword [rsp + 0x78]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r15, rax
mov qword [rsp + 0x50], rax
test rax, rax
jne 0x140085ef9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.cant_set_WinHttpConnect__d_n
jmp 0x140085e0e
lea r8, [rsp + 0xd0]
cmp qword [rsp + 0xe8], 8
cmovae r8, qword [rsp + 0xd0]
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea rdx, str.HEAD
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
xor eax, eax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
lea rax, [rsp + 0x104]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x108]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xfc]
xor r8d, r8d
mov edx, 0x20000005
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea r8, [rsp + 0xd0]
cmp qword [rsp + 0xe8], 8
cmovae r8, qword [rsp + 0xd0]
mov dword [rsp + 0x30], 0x800000
xor ebx, ebx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea rdx, [0x140125fa8]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rdi, rax
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x140086002
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.cant_set_WinHttpOpenRequest__d_n
jmp 0x140085e0e
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x140086036
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.cant_set_WinHttpSendRequest__d_n
jmp 0x140085e0e
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x140086057
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.cant_set_WinHttpReceiveResponse__d_n
jmp 0x140085e0e
mov dword [rsp + 0xf0], ebx
mov dword [rsp + 0x10c], 4
mov qword [rsp + 0x28], rbx
lea rax, [rsp + 0x10c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xf0]
xor r8d, r8d
mov edx, 0x20000013
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, dword [rsp + 0xf0]
lea rcx, str._WinHttpQueryHeaders_dwStatusCode:__d__code_:_d_n
call fcn.1400862b0
cmp dword [rsp + 0xf0], 0xc8
je 0x1400860cf
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.cant_set_WinHttpQueryDataAvailable__d_n
jmp 0x140085e0e
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 1]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
mov qword [rsp + 0x58], rax
mov dword [rsp + 0xf4], ebx
mov dword [rsp + 0xf8], ebx
xor r13d, r13d
lea rdx, [rsp + 0xf8]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x14008617e
cmp dword [rsp + 0xf8], r13d
je 0x14008617e
xor edx, edx
mov r8d, 0x8000
lea rcx, [rsp + 0x1910]
call fcn.1400a5140
lea r9, [rsp + 0xf4]
mov r8d, 0x8000
lea rdx, [rsp + 0x1910]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x1400861c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.cant_set_WinHttpReadData__d_n
call fcn.1400862b0
nop
mov rdx, qword [rsp + 0xe8]
cmp rdx, 8
jb 0x14008620f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0xd0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008620a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14008629a
jmp 0x14008620a
mov r8d, dword [rsp + 0xf4]
add ebx, r8d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0xf4]
lea rdx, [rsp + 0x1910]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r8, r12
mov edx, dword [rsp + 0xfc]
mov ecx, ebx
lea rax, [0x140003960]
call rax
jmp 0x140086112
call fcn.1400a2410
mov word [rsp + 0xd0], r13w
movdqa xmm0, xmmword [0x140128f10]
movdqu xmmword [rsp + 0xe0], xmm0
jmp 0x14008623f
test rsi, rsi
je 0x14008624d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x14008625b
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r15, r15
je 0x140086269
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r14, r14
je 0x140086277
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x9910]
xor rcx, rsp
call fcn.1400a23f0
add rsp, 0x9920
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
call fcn.1400a92b0
nop
int3