Function at 0x140138480
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 [0x140429a58], 0
je 0x1401384b1
xor al, al
jmp 0x140138a56
lea rcx, [0x14034dd08]
call fcn.1400fe3d0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
mov dword [rbp + 0x77], eax
lea rax, [0x140346ce0]
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 0x140138513
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.1402b7a88
jmp 0x140138a32
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x41]
lea r8, [rbp - 0x29]
lea rdx, [rbp + 0x67]
mov ecx, ebx
call fcn.140138330
test al, al
je 0x140138a32
mov esi, 0x100
mov eax, 4
mul rsi
mov r14, 0xffffffffffffffff
cmovo rax, r14
mov rcx, rax
call fcn.1402b2274
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 0x140138a2a
nop word [rax + rax]
mov edi, dword [rbp + 0x67]
cmp edi, ebx
jb 0x1401385cf
mov rcx, r12
call fcn.1402b712c
add esi, esi
mov eax, 4
mul rsi
cmovo rax, r14
mov rcx, rax
call fcn.1402b2274
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 0x140138580
jmp 0x140138a2a
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.1401fcb40
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.1402ba94c
lea edx, [r13 + 0x39]
lea rcx, [rbp - 0x79]
call fcn.1401fde50
nop
xor r8d, r8d
movzx edx, r13b
lea rcx, [rbp - 0x79]
call fcn.1400eb0d0
mov rsi, rax
mov qword [rbp - 0x11], rax
cmp dword [rbp - 0x71], 0
jle 0x140138640
mov rcx, qword [rbp - 0x79]
call fcn.1402b7350
test rsi, rsi
je 0x1401386be
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 0x1401389cd
mov r15, r12
mov r13d, edi
mov r12d, dword [rbp + 0x77]
mov r14d, dword [r15]
cmp r14d, 4
jbe 0x1401389ae
cmp r14d, r12d
je 0x1401389ae
mov rdi, qword [0x140416ee8]
test rdi, rdi
jne 0x1401386fd
xor esi, esi
mov ebx, esi
mov qword [rsp + 0x48], rsi
jmp 0x140138716
or rbx, 0xffffffffffffffff
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x140138701
xor esi, esi
mov qword [rsp + 0x48], rsi
test ebx, ebx
jne 0x140138724
lea rax, [0x140346ce0]
mov qword [rsp + 0x40], rax
jmp 0x140138749
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.1401fcb40
movsxd r9, ebx
mov eax, dword [rsp + 0x48]
inc eax
movsxd rdx, eax
mov r8, rdi
mov rcx, qword [rsp + 0x40]
call fcn.1402ba94c
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.1401fde50
nop
mov rdi, qword [0x140416ee8]
test rdi, rdi
jne 0x14013876b
mov ebx, esi
mov qword [rsp + 0x38], rdi
jmp 0x140138787
or rbx, 0xffffffffffffffff
nop
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x140138770
mov qword [rsp + 0x38], 0
test ebx, ebx
jne 0x140138795
lea rax, [0x140346ce0]
mov qword [rsp + 0x30], rax
jmp 0x1401387ba
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.1401fcb40
movsxd r9, ebx
mov eax, dword [rsp + 0x38]
inc eax
movsxd rdx, eax
mov r8, rdi
mov rcx, qword [rsp + 0x30]
call fcn.1402ba94c
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.1401fde50
nop
mov r8d, r14d
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
test rax, rax
jne 0x1401387f9
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.1402b7a88
jmp 0x14013898b
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x40]
lea rdx, [rbp + 0x7f]
mov ecx, r14d
call fcn.140138330
test al, al
je 0x14013898b
cmp dword [rbp - 0x7d], 0
je 0x14013898b
xor r8d, r8d
lea rdx, str.NT_AUTHORITY_
lea rcx, [rsp + 0x40]
call fcn.1401ff2c0
test al, al
jne 0x14013898b
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x51]
call fcn.1400d44c0
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.1401ff2c0
movzx ebx, bl
test al, al
cmovne ebx, r12d
inc edi
lea rsi, [rsi + 8]
movsxd rax, edi
cmp rax, 7
jb 0x140138870
test bl, bl
mov r12d, dword [rbp + 0x77]
jne 0x14013897b
mov r8d, r14d
xor edx, edx
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x14013897b
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x1401388d9
lea rcx, str._5d__s_failed_to_terminate_r_n
jmp 0x140138965
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 0x1401388fe
lea rax, [0x140346ce0]
mov qword [rbp - 0x69], rax
jmp 0x140138926
lea rcx, [rbp - 0x69]
call fcn.1401fcb40
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.1402ba94c
mov edx, dword [rsp + 0x3c]
lea rcx, [rbp - 0x69]
call fcn.1401fde50
mov qword [rbp - 0x59], rbx
lea rdx, [rbp - 0x69]
call fcn.140139000
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 1]
call fcn.1401390a0
nop
cmp dword [rbp - 0x61], 0
jle 0x14013895e
mov rcx, qword [rbp - 0x69]
call fcn.1402b7350
lea rcx, str._5d__s_terminated_r_n
mov r8, qword [rbp - 0x51]
mov edx, r14d
call fcn.1402b95e8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp dword [rbp - 0x49], 0
jle 0x14013898b
mov rcx, qword [rbp - 0x51]
call fcn.1402b7350
nop
cmp dword [rsp + 0x38], 0
jle 0x14013899d
mov rcx, qword [rsp + 0x30]
call fcn.1402b7350
nop
cmp dword [rsp + 0x48], 0
jle 0x1401389ae
mov rcx, qword [rsp + 0x40]
call fcn.1402b7350
add r15, 4
dec r13
jne 0x1401386d0
mov r12, qword [rbp - 0x31]
mov rsi, qword [rbp - 0x11]
mov r14d, dword [rbp + 0x6f]
mov r13d, 1
mov rcx, r12
call fcn.1402b712c
test rsi, rsi
je 0x140138a1f
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 [0x140429a58], 1
mov bl, 1
jmp 0x140138a34
mov rcx, r12
call fcn.1402b712c
xor bl, bl
cmp dword [rbp - 0x39], 0
jle 0x140138a44
mov rcx, qword [rbp - 0x41]
call fcn.1402b7350
nop
cmp dword [rbp - 0x21], 0
jle 0x140138a53
mov rcx, qword [rbp - 0x29]
call fcn.1402b7350
movzx eax, bl
add rsp, 0xe8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret