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

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x530
mov rax, qword [0x140064010]
xor rax, rsp
mov qword [rsp + 0x520], rax
mov r15, r9
mov r13, r8
mov r12, rdx
mov rdi, rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x108], rdx
mov qword [rsp + 0x100], r8
mov qword [rsp + 0x110], r9
xor r14d, r14d
mov dword [rsp + 0x40], r14d
xorps xmm0, xmm0
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], r14
mov qword [rcx + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rcx], r14b
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x58], rax
test rax, rax
je 0x140029d06
mov rdx, r12
cmp qword [r12 + 0x18], 8
jb 0x140029a15
mov rdx, qword [r12]
mov r8d, 0x1bb
xor r9d, r9d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140029d28
mov r8, r15
cmp qword [r15 + 0x18], 8
jb 0x140029a42
mov r8, qword [r15]
mov rdx, r13
cmp qword [r13 + 0x18], 8
jb 0x140029a50
mov rdx, qword [r13]
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
xor r9d, r9d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
mov qword [rsp + 0xf8], rax
test rax, rax
je 0x140029e05
mov dword [rsp + 0x11c], 0x3300
mov r9d, 4
lea r8, [rsp + 0x11c]
lea edx, [r9 + 0x1b]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x140029e2d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140029e55
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140029e7d
mov dword [rsp + 0x118], r14d
nop dword [rax]
nop word [rax + rax]
lea r9, [rsp + 0x118]
mov r8d, 0x400
lea rdx, [rsp + 0x120]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140029b99
mov eax, dword [rsp + 0x118]
test eax, eax
je 0x140029b99
mov esi, eax
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rdi + 0x18]
mov rax, rdx
sub rax, rcx
cmp rsi, rax
ja 0x140029b7c
lea rax, [rcx + rsi]
mov qword [rdi + 0x10], rax
mov rax, rdi
cmp rdx, 0x10
jb 0x140029b57
mov rax, qword [rdi]
lea rbx, [rax + rcx]
mov r8, rsi
lea rdx, [rsp + 0x120]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rsi + rbx], 0
mov rbx, qword [rsp + 0xf8]
jmp 0x140029b00
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x120]
mov rdx, rsi
mov rcx, rdi
call fcn.14000c3b0
jmp 0x140029b00
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
jmp 0x140029bdb
mov rdx, qword [r12 + 0x18]
cmp rdx, 8
jb 0x140029c1c
mov rcx, qword [r12]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x140029c17
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140029cf1
mov rcx, r8
call fcn.140048f98
mov qword [r12 + 0x10], r14
mov qword [r12 + 0x18], 7
mov word [r12], r14w
mov rdx, qword [r13 + 0x18]
cmp rdx, 8
jb 0x140029c6f
mov rcx, qword [r13]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x140029c6a
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140029cf8
mov rcx, r8
call fcn.140048f98
mov qword [r13 + 0x10], r14
mov qword [r13 + 0x18], 7
mov word [r13], r14w
mov rdx, qword [r15 + 0x18]
cmp rdx, 8
jb 0x140029cbb
lea rdx, [rdx*2 + 2]
mov rcx, qword [r15]
cmp rdx, 0x1000
jb 0x140029cb6
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140029cff
mov rcx, r8
call fcn.140048f98
mov qword [r15 + 0x10], r14
mov qword [r15 + 0x18], 7
mov word [r15], r14w
mov rax, rdi
mov rcx, qword [rsp + 0x520]
xor rcx, rsp
call fcn.140048a50
add rsp, 0x530
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
lea rdx, str.Failed_to_initialize_WinHTTP.
lea rcx, [rsp + 0x68]
call fcn.1400027d0
lea rdx, [0x140060240]
lea rcx, [rsp + 0x68]
call sub.VCRUNTIME140.dll__CxxThrowException
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov qword [rsp + 0xf8], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
lea rax, [rsp + 0xf8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, ebx
xor edx, edx
mov ecx, 0x1100
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
lea rdx, str.Failed_to_connect_to_host._Error_code:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14000b180
mov edx, ebx
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, [0x14000b570]
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 qword [rsp + 0xf8], 0
je 0x140029ddd
lea rdx, str.Error_message:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.14000b180
mov rdx, qword [rsp + 0xf8]
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___void_const____ptr64____ptr64]
lea rdx, [0x14000b570]
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]
mov rcx, qword [rsp + 0xf8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rdx, str.Failed_to_connect_to_host.
lea rcx, [rsp + 0x80]
call fcn.1400027d0
lea rdx, [0x140060240]
lea rcx, [rsp + 0x80]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rdx, str.Failed_to_open_HTTP_request.
lea rcx, [rsp + 0x98]
call fcn.1400027d0
lea rdx, [0x140060240]
lea rcx, [rsp + 0x98]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rdx, str.Failed_to_set_security_options.
lea rcx, [rsp + 0xb0]
call fcn.1400027d0
lea rdx, [0x140060240]
lea rcx, [rsp + 0xb0]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rdx, str.Failed_to_send_HTTP_request.
lea rcx, [rsp + 0xc8]
call fcn.1400027d0
lea rdx, [0x140060240]
lea rcx, [rsp + 0xc8]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rdx, str.Failed_to_receive_HTTP_response.
lea rcx, [rsp + 0xe0]
call fcn.1400027d0
lea rdx, [0x140060240]
lea rcx, [rsp + 0xe0]
call sub.VCRUNTIME140.dll__CxxThrowException
int3