Function at 0x14000264c
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Terminate process

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x118
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x120]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsp + 0x60], eax
movsxd rax, dword [rsp + 0x60]
mov qword [rsp + 0xc0], rax
mov eax, 2
mov rcx, qword [rsp + 0xc0]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1400037a8
mov qword [rsp + 0xc8], rax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0xa8], rax
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x120]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x130]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsp + 0x64], eax
movsxd rax, dword [rsp + 0x64]
mov qword [rsp + 0xd0], rax
mov eax, 2
mov rcx, qword [rsp + 0xd0]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1400037a8
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0xb0], rax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x130]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.WinHTTP_Example_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
jne 0x14000283d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x90], eax
lea rdx, str.Error:Open_session_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400010b8
mov ecx, dword [rsp + 0x90]
mov edx, ecx
mov rcx, rax
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]
lea rdx, [0x140001cdc]
mov rcx, rax
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
xor r9d, r9d
movzx r8d, word [rsp + 0x128]
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
jne 0x1400028b6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x94], eax
lea rdx, str.Error:Connect_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400010b8
mov ecx, dword [rsp + 0x94]
mov edx, ecx
mov rcx, rax
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]
lea rdx, [0x140001cdc]
mov rcx, rax
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rsp + 0xb0]
lea rdx, [0x1400054c0]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x140002944
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x98], eax
lea rdx, str.Error:OpenRequest_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400010b8
mov ecx, dword [rsp + 0x98]
mov edx, ecx
mov rcx, rax
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]
lea rdx, [0x140001cdc]
mov rcx, rax
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x1400029c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x9c], eax
lea rdx, str.Error:SendRequest_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400010b8
mov ecx, dword [rsp + 0x9c]
mov edx, ecx
mov rcx, rax
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]
lea rdx, [0x140001cdc]
mov rcx, rax
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
jmp 0x1400029d8
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [rsp + 0x50], eax
mov qword [rsp + 0x100], 0
mov dword [rsp + 0x40], 0
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x68], 0
mov qword [rsp + 0x88], 0
cmp dword [rsp + 0x50], 0
je 0x140002c00
mov dword [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x140002a77
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xa0], eax
lea rdx, str.Error:WinHttpQueryDataAvailable_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400010b8
mov ecx, dword [rsp + 0xa0]
mov edx, ecx
mov rcx, rax
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]
lea rdx, [0x140001cdc]
mov rcx, rax
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140002b62
cmp dword [rsp + 0x40], 0
jne 0x140002a83
jmp 0x140002b62
mov eax, dword [rsp + 0x40]
inc eax
mov eax, eax
mov ecx, eax
call fcn.1400037a8
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140002ad7
lea rdx, str.Out_of_memory.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400010b8
lea rdx, [0x140001cdc]
mov rcx, rax
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140002b62
mov eax, dword [rsp + 0x40]
inc eax
mov eax, eax
mov r8d, eax
xor edx, edx
mov rcx, qword [rsp + 0x58]
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x68]
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x140002b4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xa4], eax
lea rdx, str.Error:WinHttpReadData_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400010b8
mov ecx, dword [rsp + 0xa4]
mov edx, ecx
mov rcx, rax
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]
lea rdx, [0x140001cdc]
mov rcx, rax
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___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
cmp dword [rsp + 0x68], 0
jne 0x140002b57
jmp 0x140002b62
cmp dword [rsp + 0x40], 0
ja 0x140002a14
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x58]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x6c]
mov qword [rsp + 0xe8], rax
mov eax, 2
mov rcx, qword [rsp + 0xe8]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1400037a8
mov qword [rsp + 0xf0], rax
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0x88], rax
mov eax, dword [rsp + 0x6c]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x58]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp qword [rsp + 0x48], 0
je 0x140002c13
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x78], 0
je 0x140002c26
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x80], 0
je 0x140002c3f
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x88]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [rsp + 0x70], eax
movsxd rax, dword [rsp + 0x70]
mov rcx, rax
call fcn.1400037a8
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, qword [rsp + 0x88]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rax, qword [rsp + 0xb8]
add rsp, 0x118
ret