Function at 0x14013b0f0
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 [0x140431b28], 0
je 0x14013b121
xor al, al
jmp 0x14013b6c6
lea rcx, [0x140353ae8]
call fcn.140100af0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
mov dword [rbp + 0x77], eax
lea rax, [0x14034d1a0]
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 0x14013b183
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.1402bd818
jmp 0x14013b6a2
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x41]
lea r8, [rbp - 0x29]
lea rdx, [rbp + 0x67]
mov ecx, ebx
call fcn.14013afa0
test al, al
je 0x14013b6a2
mov esi, 0x100
mov eax, 4
mul rsi
mov r14, 0xffffffffffffffff
cmovo rax, r14
mov rcx, rax
call fcn.1402b7fa4
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 0x14013b69a
nop word [rax + rax]
mov edi, dword [rbp + 0x67]
cmp edi, ebx
jb 0x14013b23f
mov rcx, r12
call fcn.1402bcebc
add esi, esi
mov eax, 4
mul rsi
cmovo rax, r14
mov rcx, rax
call fcn.1402b7fa4
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 0x14013b1f0
jmp 0x14013b69a
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.1402028a0
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.1402c06dc
lea edx, [r13 + 0x39]
lea rcx, [rbp - 0x79]
call fcn.140203bb0
nop
xor r8d, r8d
movzx edx, r13b
lea rcx, [rbp - 0x79]
call fcn.1400ed8e0
mov rsi, rax
mov qword [rbp - 0x11], rax
cmp dword [rbp - 0x71], 0
jle 0x14013b2b0
mov rcx, qword [rbp - 0x79]
call fcn.1402bd0e0
test rsi, rsi
je 0x14013b32e
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 0x14013b63d
mov r15, r12
mov r13d, edi
mov r12d, dword [rbp + 0x77]
mov r14d, dword [r15]
cmp r14d, 4
jbe 0x14013b61e
cmp r14d, r12d
je 0x14013b61e
mov rdi, qword [0x14041eee8]
test rdi, rdi
jne 0x14013b36d
xor esi, esi
mov ebx, esi
mov qword [rsp + 0x48], rsi
jmp 0x14013b386
or rbx, 0xffffffffffffffff
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x14013b371
xor esi, esi
mov qword [rsp + 0x48], rsi
test ebx, ebx
jne 0x14013b394
lea rax, [0x14034d1a0]
mov qword [rsp + 0x40], rax
jmp 0x14013b3b9
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.1402028a0
movsxd r9, ebx
mov eax, dword [rsp + 0x48]
inc eax
movsxd rdx, eax
mov r8, rdi
mov rcx, qword [rsp + 0x40]
call fcn.1402c06dc
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.140203bb0
nop
mov rdi, qword [0x14041eee8]
test rdi, rdi
jne 0x14013b3db
mov ebx, esi
mov qword [rsp + 0x38], rdi
jmp 0x14013b3f7
or rbx, 0xffffffffffffffff
nop
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x14013b3e0
mov qword [rsp + 0x38], 0
test ebx, ebx
jne 0x14013b405
lea rax, [0x14034d1a0]
mov qword [rsp + 0x30], rax
jmp 0x14013b42a
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.1402028a0
movsxd r9, ebx
mov eax, dword [rsp + 0x38]
inc eax
movsxd rdx, eax
mov r8, rdi
mov rcx, qword [rsp + 0x30]
call fcn.1402c06dc
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.140203bb0
nop
mov r8d, r14d
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
test rax, rax
jne 0x14013b469
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.1402bd818
jmp 0x14013b5fb
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x40]
lea rdx, [rbp + 0x7f]
mov ecx, r14d
call fcn.14013afa0
test al, al
je 0x14013b5fb
cmp dword [rbp - 0x7d], 0
je 0x14013b5fb
xor r8d, r8d
lea rdx, str.NT_AUTHORITY_
lea rcx, [rsp + 0x40]
call fcn.140205020
test al, al
jne 0x14013b5fb
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x51]
call fcn.1400d5970
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.140205020
movzx ebx, bl
test al, al
cmovne ebx, r12d
inc edi
lea rsi, [rsi + 8]
movsxd rax, edi
cmp rax, 7
jb 0x14013b4e0
test bl, bl
mov r12d, dword [rbp + 0x77]
jne 0x14013b5eb
mov r8d, r14d
xor edx, edx
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x14013b5eb
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x14013b549
lea rcx, str._5d__s_failed_to_terminate_r_n
jmp 0x14013b5d5
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 0x14013b56e
lea rax, [0x14034d1a0]
mov qword [rbp - 0x69], rax
jmp 0x14013b596
lea rcx, [rbp - 0x69]
call fcn.1402028a0
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.1402c06dc
mov edx, dword [rsp + 0x3c]
lea rcx, [rbp - 0x69]
call fcn.140203bb0
mov qword [rbp - 0x59], rbx
lea rdx, [rbp - 0x69]
call fcn.14013bc70
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 1]
call fcn.14013bd10
nop
cmp dword [rbp - 0x61], 0
jle 0x14013b5ce
mov rcx, qword [rbp - 0x69]
call fcn.1402bd0e0
lea rcx, str._5d__s_terminated_r_n
mov r8, qword [rbp - 0x51]
mov edx, r14d
call fcn.1402bf378
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp dword [rbp - 0x49], 0
jle 0x14013b5fb
mov rcx, qword [rbp - 0x51]
call fcn.1402bd0e0
nop
cmp dword [rsp + 0x38], 0
jle 0x14013b60d
mov rcx, qword [rsp + 0x30]
call fcn.1402bd0e0
nop
cmp dword [rsp + 0x48], 0
jle 0x14013b61e
mov rcx, qword [rsp + 0x40]
call fcn.1402bd0e0
add r15, 4
dec r13
jne 0x14013b340
mov r12, qword [rbp - 0x31]
mov rsi, qword [rbp - 0x11]
mov r14d, dword [rbp + 0x6f]
mov r13d, 1
mov rcx, r12
call fcn.1402bcebc
test rsi, rsi
je 0x14013b68f
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 [0x140431b28], 1
mov bl, 1
jmp 0x14013b6a4
mov rcx, r12
call fcn.1402bcebc
xor bl, bl
cmp dword [rbp - 0x39], 0
jle 0x14013b6b4
mov rcx, qword [rbp - 0x41]
call fcn.1402bd0e0
nop
cmp dword [rbp - 0x21], 0
jle 0x14013b6c3
mov rcx, qword [rbp - 0x29]
call fcn.1402bd0e0
movzx eax, bl
add rsp, 0xe8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret