Function at 0x140004b20
Capabilities:
Get common file path
Query or enumerate registry value
Terminate process
Write file on windows

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x47]
sub rsp, 0xb0
xor edi, edi
mov qword [rbp + 0x7f], rdi
mov ebx, edi
mov qword [rbp - 1], rdi
mov qword [rbp + 0xf], rdi
mov qword [rbp + 0x17], 7
mov word [rbp - 1], di
mov dword [rbp + 0x6f], edi
lea r9, [rbp + 0x7f]
xor r8d, r8d
xor edx, edx
lea rcx, [0x1400b3970]
call sub.SHELL32.dll_SHGetKnownFolderPath
mov qword [rbp + 0x1f], rdi
mov qword [rbp + 0x2f], rdi
mov qword [rbp + 0x37], 7
mov word [rbp + 0x1f], di
mov rdx, qword [rbp + 0x7f]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rdx + r8*2], 0
jne 0x140004b83
lea rcx, [rbp + 0x1f]
call fcn.14000ad50
nop
mov r8d, 0xb
lea rdx, str.Temp1.txt
lea rcx, [rbp + 0x1f]
call fcn.1400272a0
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x21], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x11], xmm1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], 7
mov word [rax], di
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x140004c14
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004c07
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004dbc
call fcn.14007bbb4
movups xmm0, xmmword [rbp - 0x21]
movups xmm1, xmmword [rbp - 0x11]
movups xmmword [rbp - 1], xmm0
movups xmmword [rbp + 0xf], xmm1
mov rdx, qword [rbp + 0x37]
cmp rdx, 8
jb 0x140004c5c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x1f]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004c57
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004dc2
call fcn.14007bbb4
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov qword [rbp + 0x77], rdi
mov dword [rbp + 0x67], 8
lea r8, [rbp + 0x77]
lea rdx, str.SYSTEMCurrentControlSetControlWindows
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x140004d82
lea rax, [rbp + 0x67]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x29]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
mov r9d, 8
lea r8, str.ShutdownTime
xor edx, edx
mov rcx, qword [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x140004d82
mov rcx, qword [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rbp - 1]
cmp qword [rbp + 0x17], 8
cmovae rcx, qword [rbp - 1]
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x1f01ff
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140004d8c
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 0x6f]
mov r8d, 8
lea rdx, [rbp - 0x29]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140004d8c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x140004d77
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004d72
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004db6
call fcn.14007bbb4
add rsp, 0xb0
pop rdi
pop rbx
pop rbp
ret
mov rcx, qword [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, str.Log_file_can_not_be_created
lea rcx, [rbp + 0x1f]
call fcn.14000c190
mov rcx, rax
call fcn.14000a500
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.140082148
nop
call fcn.140082148
nop
call fcn.140082148
int3