Function at 0x140002d10
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 0x140002d96
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.140006320
mov rcx, rax
lea rdx, [0x140006500]
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 0x1400031c7
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 0x140002de8
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.140006320
mov rcx, rax
lea rdx, [0x140006500]
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 0x1400031c7
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 0x140002e56
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.140006320
mov rcx, rax
lea rdx, [0x140006500]
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 0x1400031c7
mov r8, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x140002e63
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.140006ca0
lea rdx, [rbp - 0x29]
cmp qword [rbp - 0x11], 7
cmova rdx, qword [rbp - 0x29]
cmp qword [rbx + 0x18], 0xf
jbe 0x140002eb7
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 0x140002f88
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 0x140002f36
lea rax, [rsi + r8*2]
cmp rcx, rax
ja 0x140002f36
cmp rsi, rcx
ja 0x140002f2b
xor edi, edi
jmp 0x140002f39
mov rdi, rsi
sub rdi, rcx
sar rdi, 1
jmp 0x140002f39
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 0x140002f99
mov qword [rsp + 0x28], r15
mov rdx, r15
lea rcx, [rbp - 0x29]
call fcn.140007760
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 0x14000300b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003006
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003006
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140068b50
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 0x14000306d
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.140006320
mov rcx, rax
lea rdx, [0x140006500]
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 0x14000309f
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.140006320
mov rcx, rax
lea rdx, [0x140006500]
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 0x1400030e8
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.140006320
mov rcx, rax
lea rdx, [0x140006500]
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.140068dd4
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 0x14000312e
lea rdx, str.Error_in_WinHttpReadData.
jmp 0x140003140
lea rdx, str.Response:
call fcn.140006320
mov rcx, rax
mov rdx, rbx
call fcn.140006320
lea rdx, [0x140006500]
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.140068b50
cmp dword [rbp - 1], r12d
ja 0x1400030b0
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 0x1400031c7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 7]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400031c2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400031c2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140068b50
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140068b30
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