Function at 0x140021d50
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x478]
sub rsp, 0x540
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rax, qword [0x140729900]
xor rax, rsp
mov qword [rbp + 0x430], rax
mov r14, r8
mov qword [rsp + 0x58], r8
mov r13, rdx
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x78], rdx
mov qword [rbp - 0x80], r8
xor esi, esi
mov byte [rsp + 0x30], sil
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 0x4fe
lea r9, str.NGUDCApp::CPortalHelper::DownloadFileFromFTP
lea r8, [0x140745760]
mov rdx, qword [0x1407453c0]
lea rcx, [rbp - 0x70]
call fcn.14000a880
nop
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.Ament_Help_Download
call qword [sym.imp.WININET.dll_InternetOpenW]
cmp qword [r13 + 0x18], 8
jb 0x140021dfb
mov rdx, qword [r13]
jmp 0x140021dfe
mov rdx, r13
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], 0x8000000
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140021fb0
cmp qword [r14 + 0x18], 8
jb 0x140021e34
mov r15, qword [r14]
jmp 0x140021e37
mov r15, r14
mov rdi, qword [str.Hq_]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x138]
mov rcx, rbx
call qword [fcn.140009df0]
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], 0x2000000
mov dword [rsp + 0x28], 2
mov qword [rsp + 0x20], rsi
xor r9d, r9d
mov r8d, 0xc0000000
mov rdx, r15
mov rcx, rdi
call rbx
cmp rax, 0xffffffffffffffff
je 0x140021fa8
mov r12d, esi
mov r15d, esi
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x44], esi
mov r13, rax
mov r14, qword [rsp + 0x50]
lea r9, [rsp + 0x40]
mov r8d, 0x400
lea rdx, [rbp + 0x30]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, 1
jne 0x140021f05
add r12d, dword [rsp + 0x40]
mov rdi, qword [0x14072a4e8]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.140009df0]
mov qword [rsp + 0x28], rsi
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x40]
lea r8, [rbp + 0x30]
mov rdx, r13
mov rcx, rdi
call rbx
cmp eax, 1
jne 0x140021f05
add r15d, dword [rsp + 0x44]
cmp dword [rsp + 0x40], esi
ja 0x140021e9c
test r12d, r12d
je 0x140021f59
cmp r12d, r15d
jne 0x140021f4a
mov rdi, qword [str.Hq_]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x130]
mov rcx, rbx
call qword [fcn.140009df0]
lea r8, [rsp + 0x70]
mov rdx, r13
mov rcx, rdi
call rbx
cmp eax, 1
je 0x140021f74
lea r9, str.Failed_to_get_file_size.
mov r8d, 0x53e
jmp 0x140021f66
lea r9, str.Amount_written_differs_from_amount_read.
mov r8d, 0x543
jmp 0x140021f66
lea r9, str.No_data_read.
mov r8d, 0x548
mov edx, 0x40
lea rcx, [rbp - 0x70]
call fcn.14000acc0
mov rdi, qword [str.Hq_]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x48]
mov rcx, rbx
call qword [fcn.140009df0]
mov rdx, r13
mov rcx, rdi
call rbx
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov r14, qword [rsp + 0x58]
mov r13, qword [rsp + 0x60]
jmp 0x140021fb0
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140021fb3
mov sil, 1
lea rcx, [rbp - 0x70]
call fcn.14000a9d0
nop
xor r8d, r8d
mov dl, 1
mov rcx, r13
call fcn.140009e10
nop
xor r8d, r8d
mov dl, 1
mov rcx, r14
call fcn.140009e10
mov al, sil
mov rcx, qword [rbp + 0x430]
xor rcx, rsp
call fcn.1402812e0
mov rbx, qword [rsp + 0x580]
add rsp, 0x540
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret