Function at 0x14012b840
Capabilities:
Acquire debug privileges
Enumerate process modules
Persist via winlogon helper dll registry key
Query or enumerate registry value
Set registry value
Terminate process

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xe8
mov qword [rbp - 9], 0xfffffffffffffffe
cmp byte [0x1403fe640], 0
je 0x14012b871
xor al, al
jmp 0x14012be16
lea rcx, str.SeDebugPrivilege
call fcn.1400ffc40
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
mov dword [rbp + 0x77], eax
lea rax, [0x140323de0]
mov qword [rbp - 0x29], rax
xor r15d, r15d
mov qword [rbp - 0x21], r15
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x39], r15
mov r8d, ebx
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
test rax, rax
jne 0x14012b8d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, ebx
lea rcx, str._5d_OpenProcess_failed_with__d_r_n
call fcn.140298d38
jmp 0x14012bdf2
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x41]
lea r8, [rbp - 0x29]
lea rdx, [rbp + 0x67]
mov ecx, ebx
call fcn.14012b6f0
test al, al
je 0x14012bdf2
mov esi, 0x100
mov eax, 4
mul rsi
mov r14, 0xffffffffffffffff
cmovo rax, r14
mov rcx, rax
call fcn.140296f58
mov r12, rax
mov qword [rbp - 0x31], rax
mov ebx, 0x400
mov dword [rbp + 0x67], r15d
lea r8, [rbp + 0x67]
mov edx, ebx
mov rcx, rax
call qword [sym.imp.PSAPI.DLL_EnumProcesses]
test eax, eax
je 0x14012bdea
nop word [rax + rax]
mov edi, dword [rbp + 0x67]
cmp edi, ebx
jb 0x14012b98f
mov rcx, r12
call fcn.1402983dc
add esi, esi
mov eax, 4
mul rsi
cmovo rax, r14
mov rcx, rax
call fcn.140296f58
mov r12, rax
mov qword [rbp - 0x31], rax
lea ebx, [rsi*4]
mov dword [rbp + 0x67], r15d
lea r8, [rbp + 0x67]
mov edx, ebx
mov rcx, rax
call qword [sym.imp.PSAPI.DLL_EnumProcesses]
test eax, eax
jne 0x14012b940
jmp 0x14012bdea
shr edi, 2
mov r13d, 1
mov r14d, r13d
mov dword [rbp + 0x6f], r13d
mov qword [rbp - 0x71], r15
lea edx, [r13 + 0x39]
lea rcx, [rbp - 0x79]
call fcn.1401e9030
mov eax, dword [rbp - 0x71]
inc eax
movsxd rdx, eax
lea r9d, [r13 + 0x39]
lea r8, str.HKLMSOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
mov rcx, qword [rbp - 0x79]
call fcn.14029b4d8
lea edx, [r13 + 0x39]
lea rcx, [rbp - 0x79]
call fcn.1401ea290
nop
xor r8d, r8d
movzx edx, r13b
lea rcx, [rbp - 0x79]
call fcn.1400ecf50
mov rsi, rax
mov qword [rbp - 0x11], rax
cmp dword [rbp - 0x71], 0
jle 0x14012ba00
mov rcx, qword [rbp - 0x79]
call fcn.140298600
test rsi, rsi
je 0x14012ba7e
mov dword [rbp + 0x6f], r15d
mov dword [rbp + 0x7f], 4
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x19]
xor r8d, r8d
lea rdx, str.AutoRestartShell
mov rcx, qword [rsi + 8]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
cmove r14d, dword [rbp + 0x6f]
mov dword [rbp + 0x6f], r14d
mov dword [rbp + 0x7f], r15d
mov dword [rsp + 0x28], 4
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.AutoRestartShell
mov rcx, qword [rsi + 8]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test edi, edi
je 0x14012bd8d
mov r15, r12
mov r13d, edi
mov r12d, dword [rbp + 0x77]
mov r14d, dword [r15]
cmp r14d, 4
jbe 0x14012bd6e
cmp r14d, r12d
je 0x14012bd6e
mov rdi, qword [0x1403ec168]
test rdi, rdi
jne 0x14012babd
xor esi, esi
mov ebx, esi
mov qword [rsp + 0x48], rsi
jmp 0x14012bad6
or rbx, 0xffffffffffffffff
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x14012bac1
xor esi, esi
mov qword [rsp + 0x48], rsi
test ebx, ebx
jne 0x14012bae4
lea rax, [0x140323de0]
mov qword [rsp + 0x40], rax
jmp 0x14012bb09
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.1401e9030
movsxd r9, ebx
mov eax, dword [rsp + 0x48]
inc eax
movsxd rdx, eax
mov r8, rdi
mov rcx, qword [rsp + 0x40]
call fcn.14029b4d8
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.1401ea290
nop
mov rdi, qword [0x1403ec168]
test rdi, rdi
jne 0x14012bb2b
mov ebx, esi
mov qword [rsp + 0x38], rdi
jmp 0x14012bb47
or rbx, 0xffffffffffffffff
nop
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x14012bb30
mov qword [rsp + 0x38], 0
test ebx, ebx
jne 0x14012bb55
lea rax, [0x140323de0]
mov qword [rsp + 0x30], rax
jmp 0x14012bb7a
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.1401e9030
movsxd r9, ebx
mov eax, dword [rsp + 0x38]
inc eax
movsxd rdx, eax
mov r8, rdi
mov rcx, qword [rsp + 0x30]
call fcn.14029b4d8
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.1401ea290
nop
mov r8d, r14d
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
test rax, rax
jne 0x14012bbb9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, r14d
lea rcx, str._5d_OpenProcess_failed_with__d_r_n
call fcn.140298d38
jmp 0x14012bd4b
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x40]
lea rdx, [rbp + 0x7f]
mov ecx, r14d
call fcn.14012b6f0
test al, al
je 0x14012bd4b
cmp dword [rbp - 0x7d], 0
je 0x14012bd4b
xor r8d, r8d
lea rdx, str.NT_AUTHORITY_
lea rcx, [rsp + 0x40]
call fcn.1401eb700
test al, al
jne 0x14012bd4b
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x51]
call fcn.1400d2fb0
nop
xor bl, bl
mov edi, esi
lea rsi, str.dwm.exe
mov r12d, 1
nop dword [rax]
nop word [rax + rax]
xor r8d, r8d
mov rdx, qword [rsi]
lea rcx, [rbp - 0x51]
call fcn.1401eb700
movzx ebx, bl
test al, al
cmovne ebx, r12d
inc edi
lea rsi, [rsi + 8]
movsxd rax, edi
cmp rax, 6
jb 0x14012bc30
test bl, bl
mov r12d, dword [rbp + 0x77]
jne 0x14012bd3b
mov r8d, r14d
xor edx, edx
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x14012bd3b
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x14012bc99
lea rcx, str._5d__s_failed_to_terminate_r_n
jmp 0x14012bd25
mov ebx, dword [rbp + 0x7f]
shl rbx, 0x20
or rbx, r14
xor eax, eax
mov qword [rbp - 0x61], rax
mov edx, dword [rsp + 0x3c]
test edx, edx
jne 0x14012bcbe
lea rax, [0x140323de0]
mov qword [rbp - 0x69], rax
jmp 0x14012bce6
lea rcx, [rbp - 0x69]
call fcn.1401e9030
movsxd r9, dword [rsp + 0x3c]
mov eax, dword [rbp - 0x61]
inc eax
movsxd rdx, eax
mov r8, qword [rsp + 0x30]
mov rcx, qword [rbp - 0x69]
call fcn.14029b4d8
mov edx, dword [rsp + 0x3c]
lea rcx, [rbp - 0x69]
call fcn.1401ea290
mov qword [rbp - 0x59], rbx
lea rdx, [rbp - 0x69]
call fcn.14012c3c0
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 1]
call fcn.14012c460
nop
cmp dword [rbp - 0x61], 0
jle 0x14012bd1e
mov rcx, qword [rbp - 0x69]
call fcn.140298600
lea rcx, str._5d__s_terminated_r_n
mov r8, qword [rbp - 0x51]
mov edx, r14d
call fcn.14029a7e0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp dword [rbp - 0x49], 0
jle 0x14012bd4b
mov rcx, qword [rbp - 0x51]
call fcn.140298600
nop
cmp dword [rsp + 0x38], 0
jle 0x14012bd5d
mov rcx, qword [rsp + 0x30]
call fcn.140298600
nop
cmp dword [rsp + 0x48], 0
jle 0x14012bd6e
mov rcx, qword [rsp + 0x40]
call fcn.140298600
add r15, 4
dec r13
jne 0x14012ba90
mov r12, qword [rbp - 0x31]
mov rsi, qword [rbp - 0x11]
mov r14d, dword [rbp + 0x6f]
mov r13d, 1
mov rcx, r12
call fcn.1402983dc
test rsi, rsi
je 0x14012bddf
mov ecx, 0xd05
call qword [sym.imp.KERNEL32.dll_Sleep]
mov dword [rbp + 0x67], r14d
mov dword [rsp + 0x28], 4
lea rax, [rbp + 0x67]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.AutoRestartShell
mov rcx, qword [rsi + 8]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rax, qword [rsi]
mov edx, r13d
mov rcx, rsi
call qword [rax]
mov byte [0x1403fe640], 1
mov bl, 1
jmp 0x14012bdf4
mov rcx, r12
call fcn.1402983dc
xor bl, bl
cmp dword [rbp - 0x39], 0
jle 0x14012be04
mov rcx, qword [rbp - 0x41]
call fcn.140298600
nop
cmp dword [rbp - 0x21], 0
jle 0x14012be13
mov rcx, qword [rbp - 0x29]
call fcn.140298600
movzx eax, bl
add rsp, 0xe8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret