Function at 0x1400395c0
Capabilities:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x470
mov rax, qword [0x14004f040]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rbx, r8
mov rsi, rdx
mov rdi, rcx
mov qword [rsp + 0x40], rbx
xor r14d, r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
lea edx, [r14 + 1]
lea rcx, str.FileDownloader
call qword [sym.imp.WININET.dll_InternetOpenW]
mov rbp, rax
test rax, rax
je 0x140039900
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], 0x4000000
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov rdi, rax
test rax, rax
jne 0x1400396b6
mov rax, qword [0x14004f128]
cmp rax, 0x32
jb 0x140039690
lea rdi, [0x14004f110]
cmp rax, 0xf
cmova rdi, qword [0x14004f110]
mov qword [0x14004f120], 0x32
lea r8d, [r14 + 0x32]
lea rdx, str.Download_Failed:_unable_to_connect_to_the_internet
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + 0x32], r14b
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140039900
lea r9, str.Download_Failed:_unable_to_connect_to_the_internet
mov edx, 0x32
lea rcx, [0x14004f110]
call fcn.140035f40
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140039900
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
mov rcx, rdi
cmp rax, 0xffffffffffffffff
jne 0x1400396ff
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140039900
mov dword [rsp + 0x4c], r14d
mov dword [rsp + 0x50], 4
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x4c]
mov edx, 0x20000013
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
mov rcx, rdi
test eax, eax
jne 0x140039741
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140039900
lea r9, [rsp + 0x48]
mov r8d, 0x400
lea rdx, [rsp + 0x60]
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x1400397df
nop
mov r8d, dword [rsp + 0x48]
test r8d, r8d
je 0x1400397df
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x54]
lea rdx, [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x48], eax
jne 0x140039852
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x1400397c2
xorps xmm1, xmm1
cvtsi2ss xmm1, rax
mov eax, dword [rsp + 0x4c]
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
divss xmm1, xmm0
movss dword [rsp + 0x58], xmm1
mov rax, qword [rcx]
lea rdx, [rsp + 0x58]
call qword [rax + 0x10]
lea r9, [rsp + 0x48]
mov r8d, 0x400
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x140039760
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [rsp + 0x4c]
add eax, 0xffffff38
cmp eax, 0x63
mov rax, qword [0x14004f128]
ja 0x1400398a8
cmp rax, 0x12
jb 0x140039872
lea rdi, [0x14004f110]
cmp rax, 0xf
cmova rdi, qword [0x14004f110]
mov qword [0x14004f120], 0x12
mov r8d, 0x12
lea rdx, str.Download_Completed
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + 0x12], r14b
jmp 0x14003988b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbp
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140039900
lea r9, str.Download_Completed
mov edx, 0x12
lea rcx, [0x14004f110]
call fcn.140035f40
nop
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x1400398a4
mov rax, qword [rcx]
cmp rcx, rbx
setne dl
call qword [rax + 0x20]
mov qword [rbx + 0x38], r14
mov al, 1
jmp 0x14003991b
cmp rax, 0x23
jb 0x1400398e7
lea rdi, [0x14004f110]
cmp rax, 0xf
cmova rdi, qword [0x14004f110]
mov qword [0x14004f120], 0x23
mov r8d, 0x23
lea rdx, str.Download_Failed:_Unable_to_download
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + 0x23], r14b
jmp 0x140039900
lea r9, str.Download_Failed:_Unable_to_download
mov edx, 0x23
lea rcx, [0x14004f110]
call fcn.140035f40
nop
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x140039919
cmp rcx, rbx
mov rax, qword [rcx]
setne dl
call qword [rax + 0x20]
mov qword [rbx + 0x38], r14
xor al, al
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.14003c2e0
add rsp, 0x470
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret