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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov rax, qword [0x140087080]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rbx, rcx
xor r15d, r15d
mov dword [rsp + 0x20], r15d
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 r12, rax
mov qword [rbp - 9], rax
test rax, rax
jne 0x140002ec6
lea rdx, str.Failed_to_open_session.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140006450
mov rcx, rax
lea rdx, [0x140006630]
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 0x1400032f7
mov r8d, 0x1bb
xor r9d, r9d
lea rdx, str.discord.com
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r13, rax
test rax, rax
jne 0x140002f18
lea rdx, str.Failed_to_connect.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140006450
mov rcx, rax
lea rdx, [0x140006630]
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]
jmp 0x1400032f7
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea r8, str._api_v10_users__me
lea rdx, [0x14007b510]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov r14, rax
test rax, rax
jne 0x140002f86
lea rdx, str.Failed_to_open_request.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140006450
mov rcx, rax
lea rdx, [0x140006630]
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, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x1400032f7
mov r8, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x140002f93
mov r8, qword [rbx]
lea rdi, [rbx + 0x10]
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
mov r9d, dword [rdi]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rsi, eax
xorps xmm0, xmm0
movups xmmword [rbp - 0x29], xmm0
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov r8, rsi
lea rcx, [rbp - 0x29]
call fcn.140006dd0
lea rdx, [rbp - 0x29]
cmp qword [rbp - 0x11], 7
cmova rdx, qword [rbp - 0x29]
cmp qword [rbx + 0x18], 0xf
jbe 0x140002fe7
mov rbx, qword [rbx]
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rdx
mov r9d, dword [rdi]
mov r8, rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
nop
mov r8, qword [rbp - 0x19]
mov rcx, qword [rbp - 0x11]
mov rax, rcx
sub rax, r8
mov r15d, reloc.WLDAP32.dll_Ordinal_22
cmp rax, r15
jb 0x1400030b8
lea rax, [r8 + 0x16]
mov qword [rbp - 0x19], rax
lea rsi, [rbp - 0x29]
cmp rcx, 7
cmova rsi, qword [rbp - 0x29]
lea rax, [0x14007b55c]
lea rcx, str.Authorization:_Bearer
cmp rax, rsi
jbe 0x140003066
lea rax, [rsi + r8*2]
cmp rcx, rax
ja 0x140003066
cmp rsi, rcx
ja 0x14000305b
xor edi, edi
jmp 0x140003069
mov rdi, rsi
sub rdi, rcx
sar rdi, 1
jmp 0x140003069
mov rdi, r15
lea rcx, [rsi + 0x2c]
lea r8, [r8*2 + 2]
mov rdx, rsi
call sub.VCRUNTIME140.dll_memmove
lea rbx, [rdi + rdi]
mov r8, rbx
lea rdx, str.Authorization:_Bearer
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
lea rcx, [rbx + rsi]
sub r15, rdi
lea r8, [r15 + r15]
lea rdx, str.Authorization:_Bearer
lea rdx, [rdx + 0x2c]
lea rdx, [rdx + rdi*2]
call sub.VCRUNTIME140.dll_memcpy
lea rax, [rbp - 0x29]
jmp 0x1400030c9
mov qword [rsp + 0x28], r15
mov rdx, r15
lea rcx, [rbp - 0x29]
call fcn.140007890
xorps xmm0, xmm0
movups xmmword [rbp + 7], xmm0
xor ebx, ebx
mov qword [rbp + 0x17], rbx
mov qword [rbp + 0x1f], rbx
movups xmm0, xmmword [rax]
movups xmmword [rbp + 7], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x17], xmm1
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], 7
mov word [rax], bx
mov rdx, qword [rbp - 0x11]
cmp rdx, 7
jbe 0x14000313b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003136
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003136
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140068c80
mov qword [rbp - 0x19], rbx
mov qword [rbp - 0x11], 7
mov word [rbp - 0x29], bx
lea rdx, [rbp + 7]
cmp qword [rbp + 0x1f], 7
cmova rdx, qword [rbp + 7]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
mov r8d, dword [rbp + 0x17]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x14000319d
lea rdx, str.Failed_to_send_request.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140006450
mov rcx, rax
lea rdx, [0x140006630]
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 edx, edx
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x1400031cf
lea rdx, str.Failed_to_receive_response.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140006450
mov rcx, rax
lea rdx, [0x140006630]
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 r12d, r12d
mov dword [rbp + 3], r12d
nop word [rax + rax]
mov dword [rbp - 1], r12d
lea rdx, [rbp - 1]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x140003218
lea rdx, str.Error_in_WinHttpQueryDataAvailable.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140006450
mov rcx, rax
lea rdx, [0x140006630]
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 [rbp - 1]
inc ecx
call fcn.140068f04
mov rbx, rax
mov r8d, dword [rbp - 1]
inc r8d
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
lea r9, [rbp + 3]
mov r8d, dword [rbp - 1]
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
test eax, eax
jne 0x14000325e
lea rdx, str.Error_in_WinHttpReadData.
jmp 0x140003270
lea rdx, str.Response:
call fcn.140006450
mov rcx, rax
mov rdx, rbx
call fcn.140006450
lea rdx, [0x140006630]
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, rbx
call fcn.140068c80
cmp dword [rbp - 1], r12d
ja 0x1400031e0
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rbp - 9]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
mov rdx, qword [rbp + 0x1f]
cmp rdx, 7
jbe 0x1400032f7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 7]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400032f2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400032f2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140068c80
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140068c60
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret