Function at 0x140001060
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Set http header
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x250
mov rsi, rcx
xor r15d, r15d
mov qword [rsp + 0x30], r15
lea rcx, str.output.txt
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 4
mov edx, 4
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140001303
mov rdi, qword [rsi + 0x18]
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x288], r15d
xor edx, edx
mov rcx, rax
add rdi, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x1400012fa
lea r9, [rsp + 0x288]
mov qword [rsp + 0x20], r15
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400012fa
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x288]
cmp rax, rdi
jne 0x140001303
xor r9d, r9d
mov dword [rsp + 0x20], r15d
xor r8d, r8d
lea rcx, str.Program
mov edx, 1
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rsi, rax
test rax, rax
je 0x140001303
mov r8d, 0x1bb
lea rdx, str.discord.com
xor r9d, r9d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov rbp, rax
test rax, rax
je 0x1400012f2
mov dword [rsp + 0x30], 0x800000
lea r9, str.HTTP_1.1
mov qword [rsp + 0x28], r15
lea r8, str._api_webhooks_1298033137682616481_kHgzsifcaFzKgC1wWPVwDPWbzZatLubz3OAXtSQ75TXInSJrSY6Hr68qX6USCRVn3Qk7
lea rdx, str.POST
mov qword [rsp + 0x20], r15
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
je 0x140001303
lea rdx, str.Hello_World_2_
lea rcx, str._content_:__1_
call fcn.140001000
mov rcx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov r8d, eax
lea rdx, str.Content_Length:__d_nContent_Type:_application_json
lea rcx, [rsp + 0x50]
mov r14d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
mov r9d, 0x20000000
lea rdx, [rsp + 0x50]
mov r8d, 0xffffffff
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x140001303
mov qword [rsp + 0x30], r15
mov r9, rdi
mov dword [rsp + 0x28], r15d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r14d
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x1400012f2
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140001303
lea rax, [rsp + 0x290]
mov qword [rsp + 0x28], r15
lea r9, [rsp + 0x298]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x290], 4
mov edx, 0x20000013
mov dword [rsp + 0x298], r15d
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x140001303
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x186a0
mov rcx, rax
mov r14, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x140001303
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], r15d
mov r8d, 0x186a0
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140001303
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov r8, rdi
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov al, 1
jmp 0x140001305
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001303
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov rbx, qword [rsp + 0x280]
add rsp, 0x250
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret