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

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x208]
sub rsp, 0x2e0
movaps xmmword [rax - 0x38], xmm6
mov rax, qword [0x140137040]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
mov rbx, rcx
mov qword [rsp + 0x40], rcx
xor r15d, r15d
movabs rdi, 0x7fffffffffffffff
mov rax, rdi
mov rcx, qword [0x1401a9c90]
sub rax, rcx
cmp rax, 0x12
jb 0x14000aada
lea r9, [0x1401a9c80]
cmp qword [0x1401a9c98], 0xf
cmova r9, qword [0x1401a9c80]
mov qword [rsp + 0x30], socket
lea rax, str._authdiscord.gpv3
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rbp + 0x60]
call fcn.140026c20
nop
lea rdx, [rbp + 0x60]
cmp qword [rbp + 0x78], 0xf
cmova rdx, qword [rbp + 0x60]
mov r8d, 0x20
lea rcx, [rsp + 0x50]
call fcn.140012e80
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x4c], edx
lea rcx, [rbp + 0x60]
call fcn.140013930
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::good_void_const___ptr64]
mov r12d, 0x1000
test al, al
je 0x14000a219
lea rcx, [rbp + 0x80]
call fcn.140009d20
cmp qword [rbp + 0x90], r15
je 0x14000a1dc
movups xmm0, xmmword [rbp + 0x80]
movups xmmword [rbx], xmm0
movups xmm1, xmmword [rbp + 0x90]
movups xmmword [rbx + 0x10], xmm1
jmp 0x14000a94f
mov rdx, qword [rbp + 0x98]
cmp rdx, 0xf
jbe 0x14000a219
inc rdx
mov rcx, qword [rbp + 0x80]
mov rax, rcx
cmp rdx, r12
jb 0x14000a214
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000aacd
call fcn.1400f4414
mov rcx, qword [0x1401a9c70]
sub rdi, rcx
cmp rdi, 0xa
jb 0x14000aad4
lea rax, [0x1401a9c60]
cmp qword [0x1401a9c78], 0xf
cmova rax, qword [0x1401a9c60]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0xa
lea r9, str.client_id
lea rcx, [rbp + 0x140]
call fcn.140026c20
nop
mov r8d, recv
lea rdx, str.client_secret
lea rcx, [rbp + 0x140]
call fcn.140013b90
xorps xmm0, xmm0
movups xmmword [rbp + 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x90], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x80], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x90], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], recv
mov byte [rax], 0
lea rdx, [0x1401a9c20]
cmp qword [0x1401a9c38], 0xf
cmova rdx, qword [0x1401a9c20]
mov r8, qword [0x1401a9c30]
lea rcx, [rbp + 0x80]
call fcn.140013b90
xorps xmm0, xmm0
movups xmmword [rbp + 0xe0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0xf0], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0xe0], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0xf0], xmm1
mov qword [rax + 0x18], recv
mov qword [rax + 0x10], r15
mov byte [rax], 0
mov r8d, 0x24
lea rdx, str.grant_typeauthorization_codecode
lea rcx, [rbp + 0xe0]
call fcn.140013b90
xorps xmm0, xmm0
movups xmmword [rbp + 0x120], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x130], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x120], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x130], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], recv
mov byte [rax], 0
lea rdx, [0x140162498]
cmp qword [0x1401624b0], 0xf
cmova rdx, qword [0x140162498]
mov r8, qword [0x1401624a8]
lea rcx, [rbp + 0x120]
call fcn.140013b90
xorps xmm0, xmm0
movups xmmword [rbp + 0xc0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0xd0], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0xc0], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0xd0], xmm1
mov qword [rax + 0x18], recv
mov qword [rax + 0x10], r15
mov byte [rax], 0
mov r8d, 0x2b
lea rdx, str.redirect_urihttp:__localhost:9970_rizzmas
lea rcx, [rbp + 0xc0]
call fcn.140013b90
xorps xmm0, xmm0
movups xmmword [rbp + 0xa0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0xb0], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0xa0], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0xb0], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], recv
mov byte [rax], 0
mov rdx, qword [rbp + 0xd8]
cmp rdx, 0xf
jbe 0x14000a467
inc rdx
mov rcx, qword [rbp + 0xc0]
mov rax, rcx
cmp rdx, r12
jb 0x14000a462
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000a462
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400f4414
movdqa xmm6, xmmword [0x140112440]
movdqu xmmword [rbp + 0xd0], xmm6
mov byte [rbp + 0xc0], 0
lea rcx, [rbp + 0x120]
call fcn.140013930
nop
mov rdx, qword [rbp + 0xf8]
cmp rdx, 0xf
jbe 0x14000a4cb
inc rdx
mov rcx, qword [rbp + 0xe0]
mov rax, rcx
cmp rdx, r12
jb 0x14000a4c6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000a4c6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400f4414
movdqu xmmword [rbp + 0xf0], xmm6
mov byte [rbp + 0xe0], 0
mov rdx, qword [rbp + 0x98]
cmp rdx, 0xf
jbe 0x14000a51a
inc rdx
mov rcx, qword [rbp + 0x80]
mov rax, rcx
cmp rdx, r12
jb 0x14000a515
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000a515
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400f4414
movdqu xmmword [rbp + 0x90], xmm6
mov byte [rbp + 0x80], 0
lea rcx, [rbp + 0x140]
call fcn.140013930
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.A_User_Agent
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rsi, rax
mov r8d, 0x1bb
xor r9d, r9d
lea rdx, str.discord.com
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r14, rax
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea r8, str._api_oauth2_token
lea rdx, str.POST
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rdi, rax
mov r9d, 0x20000000
mov r8d, 0x2f
lea rdx, str.Content_Type:_application_x_www_form_urlencoded
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
lea r9, [rbp + 0xa0]
cmp qword [rbp + 0xb8], 0xf
cmova r9, qword [rbp + 0xa0]
mov qword [rsp + 0x30], r15
mov ecx, dword [rbp + 0xb0]
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], ecx
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x14000a98c
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x14000a98c
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov edx, dword [rsp + 0x40]
xor r8d, r8d
lea rcx, [rbp + 0x100]
call fcn.1400121d0
nop
lea rdx, [rbp + 0x100]
cmp qword [rbp + 0x118], 0xf
cmova rdx, qword [rbp + 0x100]
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea rcx, [rbp + 0x160]
call fcn.14000e310
nop
lea rax, [rbp + 0x100]
cmp qword [rbp + 0x118], 0xf
cmova rax, qword [rbp + 0x100]
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x68], rax
lea rdx, [rbp + 0x60]
lea rcx, [rbp + 0x160]
call fcn.140035180
lea rdx, str.access_token
lea rcx, [rbp + 0x160]
call fcn.14000e410
test al, al
je 0x14000a7e0
lea rdx, str.access_token
lea rcx, [rbp + 0x160]
call fcn.14001cae0
movzx ecx, word [rax + 0xe]
shr cx, 0xa
test cl, 1
je 0x14000a7e0
lea rdx, str.access_token
lea rcx, [rbp + 0x160]
call fcn.14001cae0
test word [rax + 0xe], r12w
jne 0x14000a719
mov rax, qword [rax + 8]
movabs rcx, 0xffffffffffff
and rax, rcx
xorps xmm0, xmm0
movups xmmword [rbp + 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x90], xmm1
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x14000a735
mov rdx, rax
lea rcx, [rbp + 0x80]
call fcn.140008640
nop
lea rcx, [rbp + 0x80]
call fcn.1400098b0
movups xmm0, xmmword [rbp + 0x80]
movups xmmword [rbx], xmm0
movups xmm1, xmmword [rbp + 0x90]
movups xmmword [rbx + 0x10], xmm1
movdqu xmmword [rbp + 0x90], xmm6
mov byte [rbp + 0x80], 0
lea rcx, [rbp + 0x160]
call fcn.14000e230
nop
lea rcx, [rbp + 0x100]
call fcn.140013930
nop
mov rdx, qword [rbp + 0xb8]
cmp rdx, 0xf
jbe 0x14000a940
inc rdx
mov rcx, qword [rbp + 0xa0]
mov rax, rcx
cmp rdx, r12
jb 0x14000a93b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000a93b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0x60], xmm0
mov qword [rbp + 0x70], r15
mov qword [rbp + 0x78], r15
mov ecx, 0x30
call fcn.1400f40c0
mov rdx, rax
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x70], 0x27
mov qword [rbp + 0x78], 0x2f
movups xmm0, xmmword [str.Access_token_not_found_in_the_response.]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x140101d00]
movups xmmword [rax + 0x10], xmm1
mov eax, dword [0x140101d10]
mov dword [rdx + 0x20], eax
movzx eax, word [0x140101d14]
mov word [rdx + 0x24], ax
movzx eax, byte [0x140101d16]
mov byte [rdx + 0x26], al
mov byte [rdx + 0x27], 0
mov r9d, reloc.WS2_32.dll_recv
lea r8, str.Error
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
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.14001b810
lea rdx, [rbp + 0x60]
cmp qword [rbp + 0x78], 0xf
cmova rdx, qword [rbp + 0x60]
mov r8, qword [rbp + 0x70]
mov rcx, rax
call fcn.140027e40
lea rdx, [0x14001b9f0]
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]
nop
mov rdx, qword [rbp + 0x78]
cmp rdx, 0xf
jbe 0x14000a8d4
inc rdx
mov rcx, qword [rbp + 0x60]
mov rax, rcx
cmp rdx, r12
jb 0x14000a8cf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000a8cf
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400f4414
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], recv
mov byte [rbx], 0
lea rcx, [rbp + 0x160]
call fcn.14000e230
nop
lea rcx, [rbp + 0x100]
call fcn.140013930
nop
mov rdx, qword [rbp + 0xb8]
cmp rdx, 0xf
jbe 0x14000a940
inc rdx
mov rcx, qword [rbp + 0xa0]
mov rax, rcx
cmp rdx, r12
jb 0x14000a93b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000aacd
call fcn.1400f4414
mov byte [rbp + 0xa0], 0
movdqu xmmword [rbp + 0xb0], xmm6
lea rcx, [rsp + 0x50]
call fcn.140009fe0
mov rax, rbx
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.1400f3ce0
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
xorps xmm0, xmm0
movups xmmword [rbp + 0x60], xmm0
mov qword [rbp + 0x70], r15
mov qword [rbp + 0x78], r15
mov ecx, 0x30
call fcn.1400f40c0
mov rdx, rax
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x70], 0x2c
mov qword [rbp + 0x78], 0x2f
movups xmm0, xmmword [str.Failed_to_receive_response_for_access_token.]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x140101cc0]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x140101cd0]
movsd qword [rax + 0x20], xmm0
mov eax, dword [0x140101cd8]
mov dword [rdx + 0x28], eax
mov byte [rdx + 0x2c], 0
mov r9d, reloc.WS2_32.dll_recv
lea r8, str.Error
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
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.14001b810
lea rdx, [rbp + 0x60]
cmp qword [rbp + 0x78], 0xf
cmova rdx, qword [rbp + 0x60]
mov r8, qword [rbp + 0x70]
mov rcx, rax
call fcn.140027e40
lea rdx, [0x14001b9f0]
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]
nop
mov rdx, qword [rbp + 0x78]
cmp rdx, 0xf
jbe 0x14000aa78
inc rdx
mov rcx, qword [rbp + 0x60]
mov rax, rcx
cmp rdx, r12
jb 0x14000aa73
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000aa73
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400f4414
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], recv
mov byte [rbx], 0
mov rdx, qword [rbp + 0xb8]
cmp rdx, 0xf
jbe 0x14000a940
inc rdx
mov rcx, qword [rbp + 0xa0]
mov rax, rcx
cmp rdx, r12
jb 0x14000a93b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000a93b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140004260
nop
call fcn.140004260
int3