Function at 0x1400018e0
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Set http header

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x430]
sub rsp, 0x530
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x420], rax
mov r14, r8
mov rbx, rdx
mov rsi, rcx
mov qword [rsp + 0x40], rcx
xor r13d, r13d
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.A_WinHTTP_Example_Program_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rdi, rax
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x1400019a4
lea rdx, str.WinHttpOpen_failed_with_error:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a70
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]
lea rdx, [0x140002c40]
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]
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], r13
mov qword [rsi + 0x18], r13
xor r8d, r8d
lea rdx, [0x14000564d]
mov rcx, rsi
call fcn.140003030
jmp 0x140001e47
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
mov qword [rbp - 0x40], rax
mov dword [rsp + 0x60], 0x68
lea rax, [rbp + 0x20]
mov qword [rsp + 0x78], rax
mov dword [rbp - 0x80], 0x100
lea rax, [rbp + 0x220]
mov qword [rbp - 0x58], rax
mov dword [rbp - 0x50], 0x100
mov edx, dword [rbx + 0x10]
cmp qword [rbx + 0x18], 7
jbe 0x1400019fe
mov rbx, qword [rbx]
lea r9, [rsp + 0x60]
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x140001a58
lea rdx, str.WinHttpCrackUrl_failed_with_error:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a70
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]
lea rdx, [0x140002c40]
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, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x14000197f
xor r9d, r9d
movzx r8d, word [rbp - 0x7c]
mov rdx, qword [rsp + 0x78]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r15, rax
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x140001a84
lea rdx, str.WinHttpConnect_failed_with_error:
jmp 0x140001a1a
mov edx, 0x1bb
mov eax, r13d
mov ecx, 0x800000
cmp word [rbp - 0x7c], dx
cmove eax, ecx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
xor r9d, r9d
mov r8, qword [rbp - 0x58]
lea rdx, str.POST
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov r12, rax
test rax, rax
jne 0x140001b13
lea rdx, str.WinHttpOpenRequest_failed_with_error:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a70
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]
lea rdx, [0x140002c40]
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, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x14000197f
mov r15, qword [r14 + 0x10]
movabs rcx, 0x7ffffffffffffffe
mov rax, rcx
sub rax, r15
cmp rax, 0xf
jb 0x140002058
cmp qword [r14 + 0x18], 7
jbe 0x140001b3b
mov r14, qword [r14]
xorps xmm0, xmm0
movups xmmword [rbp - 0x30], xmm0
mov qword [rbp - 0x20], r13
mov qword [rbp - 0x18], r13
lea r13, [r15 + 0xf]
mov edi, 7
lea rbx, [rbp - 0x30]
cmp r13, rdi
jbe 0x140001bf2
mov rdi, r13
or rdi, 7
cmp rdi, rcx
jbe 0x140001b7f
mov rdi, rcx
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x140001bae
mov eax, 0xa
cmp rdi, rax
cmovb rdi, rax
lea rcx, [rdi + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140002052
add rcx, rcx
cmp rcx, 0x1000
jb 0x140001bdd
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140002052
mov rcx, rax
call fcn.140003548
test rax, rax
je 0x140001bd6
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x140001bee
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
test rcx, rcx
je 0x140001bec
call fcn.140003548
mov rbx, rax
jmp 0x140001bee
xor ebx, ebx
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x20], r13
mov qword [rbp - 0x18], rdi
movups xmm0, xmmword [str.Authorization:]
movups xmmword [rbx], xmm0
movsd xmm0, qword [0x1400057f0]
movsd qword [rbx + 0x10], xmm0
mov eax, dword [0x1400057f8]
mov dword [rbx + 0x18], eax
movzx eax, word [0x1400057fc]
mov word [rbx + 0x1c], ax
lea rcx, [rbx + 0x1e]
lea r8, [r15 + r15]
mov rdx, r14
call sub.VCRUNTIME140.dll_memcpy
xor edi, edi
mov word [rbx + r13*2], di
mov rdx, qword [rbp - 0x20]
mov r8, qword [rbp - 0x18]
mov rax, r8
sub rax, rdx
lea rcx, [rbp - 0x30]
cmp rax, 2
jb 0x140001c79
lea rax, [rdx + 2]
mov qword [rbp - 0x20], rax
cmp r8, 7
cmova rcx, qword [rbp - 0x30]
mov eax, dword [0x1400057d8]
mov dword [rcx + rdx*2], eax
mov word [rcx + rdx*2 + 4], di
lea rax, [rbp - 0x30]
jmp 0x140001c8c
mov qword [rsp + 0x20], 2
mov edx, 2
call fcn.140003130
xorps xmm0, xmm0
movups xmmword [rbp - 8], xmm0
mov qword [rbp + 8], rdi
mov qword [rbp + 0x10], rdi
movups xmm0, xmmword [rax]
movups xmmword [rbp - 8], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 8], xmm1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], 7
mov word [rax], di
mov rdx, qword [rbp - 0x18]
cmp rdx, 7
jbe 0x140001cfc
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001cf7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001cf7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003540
mov qword [rbp - 0x20], rdi
mov qword [rbp - 0x18], 7
mov word [rbp - 0x30], di
lea rdx, [rbp - 8]
cmp qword [rbp + 0x10], 7
cmova rdx, qword [rbp - 8]
mov r9d, 0x20000000
mov r8d, 0xffffffff
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x140001d6a
lea rdx, str.WinHttpAddRequestHeaders_failed_with_error:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a70
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]
lea rdx, [0x140002c40]
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 qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x140001e74
lea rdx, str.WinHttpSendRequest_failed_with_error:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a70
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]
lea rdx, [0x140002c40]
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, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], rdi
mov qword [rsi + 0x18], rdi
xor r8d, r8d
lea rdx, [0x14000564d]
mov rcx, rsi
call fcn.140003030
nop
mov rdx, qword [rbp + 0x10]
cmp rdx, 7
jbe 0x140001e47
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001e42
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000204b
call fcn.140003540
mov rax, rsi
mov rcx, qword [rbp + 0x420]
xor rcx, rsp
call fcn.140003520
mov rbx, qword [rsp + 0x588]
add rsp, 0x530
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
xor edx, edx
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x140001e8f
lea rdx, str.WinHttpReceiveResponse_failed_with_error:
jmp 0x140001d97
mov dword [rbp - 0x10], edi
xorps xmm0, xmm0
movups xmmword [rbp - 0x30], xmm0
mov qword [rbp - 0x20], rdi
mov r15d, 0xf
mov qword [rbp - 0x18], r15
mov byte [rbp - 0x30], 0
nop dword [rax + rax]
mov dword [rsp + 0x54], edi
lea rdx, [rsp + 0x54]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x140001efd
lea rdx, str.WinHttpQueryDataAvailable_failed_with_error:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a70
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]
lea rdx, [0x140002c40]
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 ecx, dword [rsp + 0x54]
inc ecx
call fcn.14000358c
mov r14, rax
mov r8d, dword [rsp + 0x54]
inc r8d
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
lea r9, [rbp - 0x10]
mov r8d, dword [rsp + 0x54]
mov rdx, r14
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x140001f6f
lea rdx, str.WinHttpReadData_failed_with_error:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002a70
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]
lea rdx, [0x140002c40]
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 0x140001fc7
mov edi, dword [rbp - 0x10]
mov rcx, qword [rbp - 0x20]
mov rax, r15
sub rax, rcx
cmp rdi, rax
ja 0x140001fad
lea rax, [rdi + rcx]
mov qword [rbp - 0x20], rax
lea rbx, [rbp - 0x30]
cmp r15, 0xf
cmova rbx, qword [rbp - 0x30]
add rbx, rcx
mov r8d, edi
mov rdx, r14
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rdi], 0
jmp 0x140001fc1
mov qword [rsp + 0x20], rdi
mov r9, r14
mov rdx, rdi
lea rcx, [rbp - 0x30]
call fcn.140002ea0
xor edi, edi
mov r15, qword [rbp - 0x18]
mov rcx, r14
call fcn.140003540
cmp dword [rsp + 0x54], 0
ja 0x140001eb0
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
movups xmm0, xmmword [rbp - 0x30]
movups xmmword [rsi], xmm0
movups xmm1, xmmword [rbp - 0x20]
movups xmmword [rsi + 0x10], xmm1
mov rdx, qword [rbp + 0x10]
cmp rdx, 7
jbe 0x140001e47
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001e42
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001e42
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140001820
int3
call fcn.1400018c0
int3