Function at 0x1400849d0
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, 0x5ad0
call fcn.1400a3420
sub rsp, rax
mov rax, qword [0x140148020]
xor rax, rsp
mov qword [rsp + 0x5ac0], rax
mov rsi, r8
mov rbx, rdx
mov rdi, rcx
mov qword [rsp + 0x70], rcx
mov r13, qword [rsp + 0x5b30]
xor r14d, r14d
mov dword [rsp + 0x78], r14d
xorps xmm0, xmm0
movups xmmword [rcx], xmm0
movups xmmword [rcx + 0x10], xmm0
movups xmmword [rcx + 0x20], xmm0
mov byte [rcx], 1
movups xmmword [rcx + 8], xmm0
mov qword [rcx + 0x18], r14
mov qword [rcx + 0x20], 7
mov word [rcx + 8], r14w
mov dword [rcx + 0x28], r14d
mov dword [rsp + 0x78], 1
mov qword [rsp + 0x80], r14
mov qword [rsp + 0x88], r14
mov qword [rsp + 0x90], r14
mov qword [rsp + 0x98], r14
xor edx, edx
mov r8d, 0x4000
lea rcx, [rsp + 0x1ac0]
call fcn.1400a5270
xor edx, edx
mov r8d, 0x1800
lea rcx, [rsp + 0x2c0]
call fcn.1400a5270
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x210], xmm0
movups xmmword [rsp + 0x220], xmm0
movups xmmword [rsp + 0x230], xmm0
movups xmmword [rsp + 0x240], xmm0
movups xmmword [rsp + 0x250], xmm0
movups xmmword [rsp + 0x260], xmm0
mov qword [rsp + 0x270], rax
mov dword [rsp + 0x210], 0x68
lea rax, [rsp + 0x16c0]
mov qword [rsp + 0x268], rax
lea rax, [rsp + 0x6c0]
mov qword [rsp + 0x228], rax
lea rax, [rsp + 0xec0]
mov qword [rsp + 0x248], rax
lea rax, [rsp + 0x2c0]
mov qword [rsp + 0x218], rax
lea rax, [rsp + 0x12c0]
mov qword [rsp + 0x258], rax
lea rax, [rsp + 0xac0]
mov qword [rsp + 0x238], rax
mov dword [rsp + 0x240], 0x200
mov dword [rsp + 0x260], 0x200
mov dword [rsp + 0x220], 0x200
mov dword [rsp + 0x250], 0x200
mov dword [rsp + 0x230], 0x200
mov dword [rsp + 0x270], 0x200
lea r9, [rsp + 0x210]
xor edx, edx
mov r8d, 0x80000000
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x140084fbd
xorps xmm0, xmm0
movups xmmword [rsp + 0x2a0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x2b0], xmm1
mov rdx, qword [rsp + 0x258]
mov rbx, 0xffffffffffffffff
mov r8, rbx
nop dword [rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x140084bd0
lea rcx, [rsp + 0x2a0]
call fcn.140004fe0
nop
mov rdx, qword [rsp + 0x268]
inc rbx
cmp word [rdx + rbx*2], 0
jne 0x140084bf1
mov r8, rbx
lea rcx, [rsp + 0x2a0]
call fcn.140008370
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r15, rax
mov qword [rsp + 0x80], rax
test rax, rax
je 0x140085001
mov dword [rsp + 0x290], 0x800
mov r9d, 4
lea r8, [rsp + 0x290]
lea edx, [r9 + 0x50]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x140085045
mov dword [rsp + 0x28c], r14d
mov dword [rsp + 0x294], r14d
mov dword [rsp + 0x298], 4
xor r9d, r9d
movzx r8d, word [rsp + 0x234]
mov rdx, qword [rsp + 0x228]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r12, rax
mov qword [rsp + 0x90], rax
test rax, rax
je 0x140085089
lea r8, [rsp + 0x2a0]
cmp qword [rsp + 0x2b8], 8
cmovae r8, qword [rsp + 0x2a0]
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
xor r9d, r9d
lea rdx, str.HEAD
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
lea rax, [rsp + 0x294]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x298]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x28c]
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 + 0x2a0]
cmp qword [rsp + 0x2b8], 8
cmovae r8, qword [rsp + 0x2a0]
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
xor r9d, r9d
lea rdx, [0x140125f28]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
mov qword [rsp + 0x88], rax
test rax, rax
je 0x1400850cd
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140085111
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140085155
mov dword [rsp + 0x284], r14d
mov dword [rsp + 0x29c], 4
mov qword [rsp + 0x28], r14
lea rax, [rsp + 0x29c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x284]
xor r8d, r8d
mov edx, 0x20000013
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp dword [rsp + 0x284], 0xc8
jne 0x140085199
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 1]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
mov qword [rsp + 0x98], rax
xor eax, eax
mov dword [rsp + 0x280], eax
mov dword [rsp + 0x288], eax
mov esi, eax
nop dword [rax]
lea rdx, [rsp + 0x288]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x140084f2a
cmp dword [rsp + 0x288], 0
je 0x140084f2a
xor edx, edx
mov r8d, 0x4000
lea rcx, [rsp + 0x1ac0]
call fcn.1400a5270
lea r9, [rsp + 0x280]
mov r8d, 0x4000
lea rdx, [rsp + 0x1ac0]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x1400851dd
mov r8d, dword [rsp + 0x280]
add esi, r8d
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x280]
lea rdx, [rsp + 0x1ac0]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r8, r13
mov edx, dword [rsp + 0x28c]
mov ecx, esi
lea rax, [0x140003ed0]
call rax
jmp 0x140084e80
lea rcx, [rsp + 0x2a0]
call fcn.1400053f0
nop
jmp 0x140084f5f
test r14, r14
je 0x140084f6d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x140084f7b
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r12, r12
je 0x140084f89
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r15, r15
je 0x140084f97
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rax, rdi
mov rcx, qword [rsp + 0x5ac0]
xor rcx, rsp
call fcn.1400a24f0
add rsp, 0x5ad0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, [0x140125e98]
lea rcx, [rsp + 0x40]
call fcn.1400050a0
nop
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xa8]
call fcn.1400849a0
lea rdx, [0x1401440a0]
lea rcx, [rsp + 0xa8]
call fcn.1400a4ae8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, [0x140125eb8]
lea rcx, [rsp + 0x40]
call fcn.1400050a0
nop
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xd0]
call fcn.1400849a0
lea rdx, [0x1401440a0]
lea rcx, [rsp + 0xd0]
call fcn.1400a4ae8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, [0x140125ed0]
lea rcx, [rsp + 0x40]
call fcn.1400050a0
nop
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xf8]
call fcn.1400849a0
lea rdx, [0x1401440a0]
lea rcx, [rsp + 0xf8]
call fcn.1400a4ae8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, [0x140125ef8]
lea rcx, [rsp + 0x40]
call fcn.1400050a0
nop
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x120]
call fcn.1400849a0
lea rdx, [0x1401440a0]
lea rcx, [rsp + 0x120]
call fcn.1400a4ae8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, [0x140125f30]
lea rcx, [rsp + 0x40]
call fcn.1400050a0
nop
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x148]
call fcn.1400849a0
lea rdx, [0x1401440a0]
lea rcx, [rsp + 0x148]
call fcn.1400a4ae8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, [0x140125f58]
lea rcx, [rsp + 0x40]
call fcn.1400050a0
nop
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x170]
call fcn.1400849a0
lea rdx, [0x1401440a0]
lea rcx, [rsp + 0x170]
call fcn.1400a4ae8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, [0x140125f80]
lea rcx, [rsp + 0x40]
call fcn.1400050a0
nop
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x198]
call fcn.1400849a0
lea rdx, [0x1401440a0]
lea rcx, [rsp + 0x198]
call fcn.1400a4ae8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, [0x140125fb0]
lea rcx, [rsp + 0x40]
call fcn.1400050a0
nop
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x1c0]
call fcn.1400849a0
lea rdx, [0x1401440a0]
lea rcx, [rsp + 0x1c0]
call fcn.1400a4ae8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, [0x140125fd8]
lea rcx, [rsp + 0x40]
call fcn.1400050a0
nop
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x1e8]
call fcn.1400849a0
lea rdx, [0x1401440a0]
lea rcx, [rsp + 0x1e8]
call fcn.1400a4ae8
int3