Function at 0x140128e30
Capabilities:
Create process on windows
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
mov eax, 0x2170
call fcn.14036a3f0
sub rsp, rax
mov rax, qword [0x14041ae40]
xor rax, rsp
mov qword [rsp + 0x2160], rax
mov rbx, rdx
mov rdi, rcx
xor ebp, ebp
mov dword [rsp + 0x20], ebp
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.User_Agent
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rsi, rax
test rax, rax
jne 0x140128ea0
lea rdx, str.Failed_to_open_WinHTTP.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14012ab70
mov rcx, rax
call fcn.14012ad40
jmp 0x1401290a7
cmp qword [rdi + 0x18], 7
jbe 0x140128eaa
mov rdi, qword [rdi]
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rbp
xor r9d, r9d
mov r8, rdi
lea rdx, [0x14040f428]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rdi, rax
test rax, rax
je 0x14012905b
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], ebp
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140129035
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140129035
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
mov rdx, rbx
cmp qword [rbx + 0x18], 7
jbe 0x140128f36
mov rdx, qword [rbx]
lea rcx, [rsp + 0x50]
call fcn.14012a950
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x4c], edx
cmp qword [rsp + 0xd8], 0
je 0x140129004
lea r9, [rsp + 0x40]
mov r8d, 0x2000
lea rdx, [rsp + 0x160]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140128fd5
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x140128fd5
mov r8d, eax
lea rdx, [rsp + 0x160]
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
lea r9, [rsp + 0x40]
mov r8d, 0x2000
lea rdx, [rsp + 0x160]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x140128f97
lea rcx, [rsp + 0x58]
call fcn.14012a890
test rax, rax
jne 0x140129020
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
jmp 0x140129020
lea rdx, str.Failed_to_open_output_file.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14012ab70
mov rcx, rax
call fcn.14012ad40
nop
lea rcx, [rsp + 0x50]
call fcn.1401290d0
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x140129076
lea rdx, str.Failed_to_send_WinHTTP_request_or_receive_response.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14012ab70
mov rcx, rax
call fcn.14012ad40
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x140129076
lea rdx, str.Failed_to_open_WinHTTP_request.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14012ab70
mov rcx, rax
call fcn.14012ad40
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rbx + 0x18], 7
jbe 0x140129089
mov rbx, qword [rbx]
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rbp
xor r9d, r9d
mov r8, rbx
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
mov rcx, qword [rsp + 0x2160]
xor rcx, rsp
call fcn.14036a060
mov rbx, qword [rsp + 0x21a0]
add rsp, 0x2170
pop rdi
pop rsi
pop rbp
ret