Function at 0x140001ea0
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, 0xe8
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 + 0xf0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsp + 0x60], eax
movsxd rax, dword [rsp + 0x60]
shl rax, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
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 + 0xf0]
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 + 0x100]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsp + 0x64], eax
movsxd rax, dword [rsp + 0x64]
shl rax, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
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 + 0x100]
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, [0x140004430]
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
jne 0x140002033
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.140001040
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, [0x14000167c]
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 + 0xf8]
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 0x1400020ac
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.140001040
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, [0x14000167c]
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, [0x140004490]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x14000213a
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.140001040
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, [0x14000167c]
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 0x1400021bd
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.140001040
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, [0x14000167c]
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 0x1400021ce
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [rsp + 0x50], eax
mov qword [rsp + 0xd8], 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 0x1400023f6
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 0x14000226d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xa0], eax
lea rdx, [0x1400044d8]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001040
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, [0x14000167c]
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 0x140002358
cmp dword [rsp + 0x40], 0
jne 0x140002279
jmp 0x140002358
mov eax, dword [rsp + 0x40]
inc eax
mov eax, eax
mov ecx, eax
call fcn.140002e70
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x1400022cd
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.140001040
lea rdx, [0x14000167c]
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 0x140002358
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 0x140002344
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0xa4], eax
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.140001040
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, [0x14000167c]
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 0x14000234d
jmp 0x140002358
cmp dword [rsp + 0x40], 0
ja 0x14000220a
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 + 0xc8], rax
mov eax, 2
mov rcx, qword [rsp + 0xc8]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140002e70
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0xd0]
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 0x140002409
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x78], 0
je 0x14000241c
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x80], 0
je 0x140002435
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 qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
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, 0xe8
ret