Function at 0x14000bc00
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x14002b040]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rdi, rdx
mov rbx, rcx
xor r13d, r13d
mov dword [rsp + 0x48], r13d
mov dword [rsp + 0x4c], r13d
mov r15d, r13d
mov r14d, r13d
mov esi, r13d
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.A_WinHTTP_Example_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r12, rax
test rax, rax
je 0x14000bf2c
lea r8d, [r13 + 0x50]
xor r9d, r9d
lea rdx, str.103.113.157.20
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r14, rax
test rax, rax
je 0x14000bf2c
cmp qword [rbx + 0x18], 7
jbe 0x14000bc99
mov rbx, qword [rbx]
mov dword [rsp + 0x30], r13d
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
xor r9d, r9d
mov r8, rbx
lea rdx, [0x140021ea0]
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rsi, rax
test rax, rax
je 0x14000bf2c
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov r15d, eax
test eax, eax
je 0x14000bf2c
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov r15d, eax
test eax, eax
je 0x14000bf2c
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
cmp qword [rdi + 0x18], 7
jbe 0x14000bd27
mov rdi, qword [rdi]
mov rdx, rdi
lea rcx, [rsp + 0x50]
call fcn.14000f610
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rbx, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rbx
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x4c], edx
cmp qword [rbp - 0x28], 0
jne 0x14000bdd0
lea rdx, str.Failed_to_open_the_file_for_writing.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
call fcn.140012a20
lea rdx, [0x140012c00]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
nop
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x50], rbx
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x4c], edx
lea rcx, [rsp + 0x58]
call fcn.14000e730
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
xor al, al
jmp 0x14000bf92
mov dword [rsp + 0x48], r13d
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x14000be1d
lea rdx, str.Error
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14000fc30
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
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__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, str._in_WinHttpQueryDataAvailable._n
call fcn.14000fc30
mov ecx, dword [rsp + 0x48]
inc ecx
call fcn.14001e99c
mov rdi, rax
mov r8d, dword [rsp + 0x48]
inc r8d
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x4c]
mov r8d, dword [rsp + 0x48]
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x14000be8f
lea rdx, str.Error
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14000fc30
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
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__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, str._in_WinHttpReadData._n
call fcn.14000fc30
jmp 0x14000bea2
mov r8d, dword [rsp + 0x4c]
mov rdx, rdi
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]
mov rcx, rdi
call fcn.14001e5f0
cmp dword [rsp + 0x48], 0
ja 0x14000bdd0
lea rcx, [rsp + 0x58]
call fcn.14000f980
test rax, rax
jne 0x14000bee3
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]
nop
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
lea rcx, [rsp + 0x58]
call fcn.14000e730
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
jmp 0x14000bf67
lea rdx, str.Error
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.14000fc30
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
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__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, str._has_occurred._n
call fcn.14000fc30
test rsi, rsi
je 0x14000bf70
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r14, r14
je 0x14000bf7e
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r12, r12
je 0x14000bf8c
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r15d, r15d
setne al
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.14001e5d0
mov rbx, qword [rsp + 0x1c0]
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret