Function at 0x18003a650
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r13
push r14
lea rbp, [rsp - 0xde0]
sub rsp, 0xee0
mov rax, qword [0x180113040]
xor rax, rsp
mov qword [rbp + 0xdc0], rax
xorps xmm0, xmm0
xor eax, eax
xor r13d, r13d
mov qword [rbp - 0x60], rax
lea rax, [rbp - 0x40]
mov dword [rbp - 0x50], r13d
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x58], rax
xor r14b, r14b
cmp qword [rcx + 0x18], 7
lea rax, [rbp + 0x5c0]
mov rsi, rdx
mov dword [rbp - 0x4c], r13d
mov edx, dword [rcx + 0x10]
mov rdi, 0xffffffffffffffff
movups xmmword [rsp + 0x40], xmm0
mov dword [rsp + 0x40], 0x68
movups xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x60], 0x100
movups xmmword [rbp - 0x80], xmm0
mov qword [rbp - 0x78], rax
movups xmmword [rbp - 0x70], xmm0
mov dword [rbp - 0x70], 0x400
movups xmmword [rsp + 0x70], xmm0
jbe 0x18003a6ed
mov rcx, qword [rcx]
lea r9, [rsp + 0x40]
mov qword [rsp + 0xed0], r15
xor r8d, r8d
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x18003a8b9
xor r9d, r9d
mov dword [rsp + 0x20], r13d
xor r8d, r8d
lea rcx, [0x180104bc8]
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r15, rax
test rax, rax
je 0x18003a8b9
movzx r8d, word [rsp + 0x64]
xor r9d, r9d
mov rdx, qword [rsp + 0x58]
mov rcx, rax
mov qword [rsp + 0xed8], r12
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r12, rax
test rax, rax
je 0x18003a893
mov r8, qword [rbp - 0x78]
mov edx, 0x1bb
cmp word [rsp + 0x64], dx
mov eax, r13d
mov ecx, 0x800000
mov qword [rsp + 0xf20], rbx
cmove eax, ecx
lea rdx, [0x180104be0]
mov dword [rsp + 0x30], eax
xor r9d, r9d
mov qword [rsp + 0x28], r13
mov rcx, r12
mov qword [rsp + 0x20], r13
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
je 0x18003a882
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov dword [rsp + 0x28], r13d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r13d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x18003a879
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x18003a879
cmp qword [rsi + 0x18], 7
jbe 0x18003a7ef
mov rsi, qword [rsi]
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x18003a879
lea rdx, [rbp - 0x50]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x18003a876
mov r8d, dword [rbp - 0x50]
test r8d, r8d
je 0x18003a876
lea r9, [rbp - 0x4c]
mov rcx, rbx
lea rdx, [rbp + 0x1c0]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x18003a876
mov r8d, dword [rbp - 0x4c]
lea r9, [rbp - 0x48]
lea rdx, [rbp + 0x1c0]
mov qword [rsp + 0x20], r13
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rbp - 0x50], r13d
ja 0x18003a821
mov r14b, 1
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rbx, qword [rsp + 0xf20]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov r12, qword [rsp + 0xed8]
cmp rdi, 0xffffffffffffffff
je 0x18003a8b3
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, r14b
jmp 0x18003a8bb
xor al, al
mov r15, qword [rsp + 0xed0]
mov rcx, qword [rbp + 0xdc0]
xor rcx, rsp
call fcn.1800a3a80
add rsp, 0xee0
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret