Function at 0x140002520
Capabilities:
Attach user process memory
Create thread
Find process by pid
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x7c8]
sub rsp, 0x8c8
mov rsi, rcx
mov r14, rdx
xor ecx, ecx
call fcn.14003a340
mov qword [0x140034e58], rax
call fcn.140003440
mov eax, dword [0x14000d8b0]
lea r8, ds:[rbp - 0x50]
mov dword [0x14000d854], eax
lea rcx, [rbp + 0x818]
mov rdi, qword [rsi + 0x28]
xor r15d, r15d
xorps xmm0, xmm0
mov qword [rbp + 0x818], r15
mov r13d, 0xf003f
mov dword [rbp - 0x50], 0x30
mov edx, r13d
mov qword [rbp - 0x48], r15
mov rax, qword [rdi + 0x30]
mov qword [0x1400356d8], rax
mov eax, dword [rdi + 0x40]
mov qword [0x1400356d0], rax
mov qword [rbp + 0x828], r15
mov dword [rbp - 0x38], 0x200
mov qword [rbp - 0x40], r14
movdqu xmmword [rbp - 0x30], xmm0
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
mov r9, qword ds:[r14 + 8]
lea r12d, [r15 + 0x4d]
mov ecx, r12d
lea r8, [0x140009d30]
xor edx, edx
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
or rbx, 0xffffffffffffffff
cmp qword [rbp + 0x818], r15
je 0x1400028f1
movaps xmm0, xmmword [0x140009d40]
lea rcx, ds:[rbp + 0x5a]
movaps xmm1, xmmword [0x140009d50]
xor edx, edx
movzx eax, word [0x140009da8]
mov r8d, 0x194
movaps xmmword [rbp - 0x10], xmm0
movaps xmm0, xmmword [0x140009d60]
movaps xmmword [rbp + 0x10], xmm0
movaps xmm0, xmmword [0x140009d80]
movaps xmmword [rbp], xmm1
movaps xmm1, xmmword [0x140009d70]
movaps xmmword [rbp + 0x30], xmm0
movsd xmm0, qword [0x140009da0]
movaps xmmword [rbp + 0x20], xmm1
movaps xmm1, xmmword [0x140009d90]
movsd qword [rbp + 0x50], xmm0
movaps xmmword [rbp + 0x40], xmm1
mov word [rbp + 0x58], ax
call fcn.140009540
mov r8, qword [rdi + 0x60]
lea rcx, [rbp - 0x10]
mov edx, 0xff
call sub.ntoskrnl.exe_wcscat_s
lea rcx, [rbp - 0x10]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], r15w
jne 0x14000267e
cdqe
lea r9, [rbp - 0x10]
lea r8, [0x140009db0]
xor edx, edx
mov ecx, r12d
mov word [rbp + rax*2 - 0x18], r15w
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rax, [rsp + 0x70]
mov qword [rbp + 0x820], r15
xorps xmm0, xmm0
mov qword [rbp - 0x70], rax
lea r8, [rbp - 0x80]
mov dword [rbp - 0x80], 0x30
mov edx, r13d
mov qword [rbp - 0x78], r15
lea rcx, [rbp + 0x820]
mov dword [rbp - 0x68], 0x200
movdqu xmmword [rbp - 0x60], xmm0
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
lea rdx, [0x140009dc0]
lea rcx, ds:[rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov rcx, qword [rbp + 0x818]
lea rax, [rbp + 0x810]
mov r13d, 4
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x28], r13d
mov r9d, r13d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov dword [rbp + 0x810], r13d
call qword [sym.imp.ntoskrnl.exe_ZwSetValueKey]
mov rcx, qword ds:[rbp + 0x820]
lea rax, [rbp + 0x810]
mov dword [rsp + 0x28], r13d
lea rdx, [rsp + 0x60]
mov r9d, r13d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ntoskrnl.exe_ZwSetValueKey]
mov rcx, qword [rbp + 0x818]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov rcx, qword ds:[rbp + 0x820]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp qword [0x14000d860], r15
je 0x140002ab6
cmp qword [0x14000d868], r15
nop word [rax + rax]
je 0x140002ab6
mov ecx, 0x1b58
call fcn.1400031e0
lea r8, [rbp - 0x50]
mov edx, 0xf003f
lea rcx, [rbp + 0x818]
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp qword [rbp + 0x818], r15
je 0x1400028f1
xor edx, edx
lea rcx, [rbp - 0x10]
mov r8d, 0x7d0
call fcn.140009540
lea rdx, [0x140009dd0]
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov rcx, qword ds:[rbp + 0x818]
lea rax, [rbp + 0x810]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x10]
lea r8d, [r13 - 2]
mov dword [rsp + 0x20], 0x74
lea rdx, [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
lea rdx, [rbp - 4]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov rax, qword [rsp + 0x68]
mov ecx, dword [rax]
mov dword [0x14000d850], ecx
test ecx, ecx
je 0x1400028a6
lea rdx, [rbp + 0x828]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov rcx, qword ds:[rbp + 0x828]
call qword [sym.imp.ntoskrnl.exe_PsGetProcessSectionBaseAddress]
mov rdi, rax
test rax, rax
je 0x1400028a6
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov rcx, qword ds:[rbp + 0x828]
lea rdx, [rdi + 0x20]
mov r8, rax
lea r9, [0x140034e4c]
lea rax, [rbp + 0x820]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], r15b
mov qword [rsp + 0x20], r13
call qword [sym.imp.ntoskrnl.exe_MmCopyVirtualMemory]
mov eax, dword [0x14000d850]
lea r8, [0x140009de0]
mov r9, qword [0x1400356d8]
xor edx, edx
mov dword [rsp + 0x30], eax
mov ecx, r12d
mov eax, dword [0x140034e4c]
mov dword [rsp + 0x28], eax
mov rax, qword [0x1400356d0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov rcx, qword [rbp + 0x818]
test rcx, rcx
je 0x1400028f1
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov rax, qword [0x14000d868]
lea r8, [0x140009e10]
mov r9, qword [0x14000d8c0]
xor edx, edx
mov qword [rsp + 0x50], rax
mov ecx, r12d
mov rax, qword [0x14000d860]
mov qword [rsp + 0x48], rax
mov rax, qword [0x14000d890]
mov qword [rsp + 0x40], rax
mov rax, qword [0x14000d870]
mov qword [rsp + 0x38], rax
mov rax, qword [0x14000d898]
mov qword [rsp + 0x30], rax
mov rax, qword [0x14000d8a8]
mov qword [rsp + 0x28], rax
mov rax, qword [0x14000d8a0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
cmp qword [0x14000d8a0], r15
mov eax, dword [0x14000d900]
mov dword [0x140034e70], eax
je 0x140002a33
lea rdx, [0x140009e30]
mov qword [rbp + 0x810], r15
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rax, [rsp + 0x70]
mov dword [rbp - 0x80], 0x30
xorps xmm0, xmm0
mov qword [rbp - 0x70], rax
lea r8, [rbp - 0x80]
mov qword [rbp - 0x78], r15
mov edx, 3
mov dword [rbp - 0x68], 0x200
lea rcx, [rbp + 0x810]
movdqu xmmword [rbp - 0x60], xmm0
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp qword [rbp + 0x810], r15
je 0x140002a33
lea rdx, [0x140009ea0]
lea rcx, ds:[rbp - 0x20]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rdx, [0x140009eb0]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
movzx eax, word ds:[rsp + 0x60]
lea rdx, [rbp - 0x20]
mov rcx, qword [rbp + 0x810]
mov r9d, 1
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_ZwSetValueKey]
mov rcx, qword [rbp + 0x810]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp qword [0x14000d880], r15
jne 0x140002a47
mov qword [0x14000d880], 0x1290
xor r9d, r9d
lea rdx, [0x140009ee0]
mov r8d, 0x7fff
lea rcx, [0x140035690]
call fcn.140007580
cmp qword [0x14000d8a0], r15
lea rax, [0x14000db30]
mov qword [0x140034e40], rax
mov r13d, 0x9090
je 0x140002ac5
lea r8, [0x140009f00]
mov dword [0x140034e4c], r13d
xor edx, edx
mov ecx, r12d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
add qword [0x14000d080], 0x1c4
mov qword [0x14000d8a8], r15
mov qword [0x14000d898], r15
jmp 0x140002ad8
mov eax, 0xc0000365
jmp 0x140002e3a
mov rdx, qword [0x14000d910]
mov rcx, qword [0x14000d908]
call fcn.140003de0
cmp qword [0x14000d870], r15
mov edi, 0x3d8
je 0x140002b3c
cmp qword [0x14000d080], rdi
jne 0x140002b3c
lea r8, [0x140009f10]
xor edx, edx
mov ecx, r12d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov eax, dword [0x14000d880]
mov dword [0x14000d72c], eax
call fcn.1400066c0
call fcn.140003800
xor ecx, ecx
call fcn.140003640
call fcn.140006160
lea r8, [0x140009f20]
xor edx, edx
mov ecx, r12d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov rcx, qword [rsi + 0x28]
call fcn.140037620
cmp dword [0x140034e4c], r13d
jne 0x140002cd5
cmp qword [0x14000d8a8], r15
je 0x140002b9c
cmp qword [0x14000d8c0], r15
jne 0x140002b93
cmp qword [0x14000d080], rdi
jne 0x140002b93
lea r8, [0x140009f30]
xor edx, edx
mov ecx, r12d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
xor ecx, ecx
call fcn.140005784
cmp dword [0x140034e4c], r13d
jne 0x140002cd5
cmp qword [0x14000d8a8], r15
jne 0x140002bdd
cmp qword [0x14000d8c0], r15
je 0x140002bdd
cmp qword [0x14000d080], rdi
jne 0x140002bdd
lea r8, [0x140009f40]
xor edx, edx
mov ecx, r12d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov ecx, 2
call fcn.140005784
cmp dword [0x140034e4c], r13d
jne 0x140002cd5
cmp qword [0x14000d898], r15
je 0x140002ca3
cmp qword [0x14000d8c8], r15
jne 0x140002ca3
cmp qword [0x14000d8c0], r15
nop
jne 0x140002ca3
cmp qword [0x14000d080], rdi
jne 0x140002ca3
lea r8, [0x140009f60]
xor edx, edx
mov ecx, r12d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov ecx, dword [0x14000d850]
lea rdx, ds:[rbp + 0x810]
mov qword [rbp + 0x810], r15
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov rcx, qword [rbp + 0x810]
lea rdx, [rbp - 0x80]
call qword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
mov rax, qword [0x14000d8e0]
lea rcx, [rbp - 0x80]
mov r9, qword [rax]
mov qword [0x140034e60], r9
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
xor r9d, r9d
lea rdx, [0x140009ee0]
mov r8d, 0x7fff
lea rcx, [0x140035690]
call fcn.140007580
lea rcx, [0x140035690]
call fcn.1400376c0
cmp dword [0x140034e4c], r13d
jne 0x140002cd5
cmp qword [0x14000d8a0], r15
je 0x140002e3a
cmp qword [0x14000d080], rdi
jne 0x140002cd5
lea r8, [0x140009f30]
xor edx, edx
mov ecx, r12d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov ecx, 1
call fcn.140005784
cmp qword [0x14000d8a0], r15
nop dword [rax]
je 0x140002e3a
lea r8, [0x140009f80]
xor edx, edx
mov ecx, r12d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov rdx, rbx
mov dword [0x14000d04e], 0xffffd8f0
mov ecx, 2
call qword [sym.imp.ntoskrnl.exe_MmAllocateContiguousMemory]
mov rdx, rbx
mov ecx, 0x3d
mov rdi, rax
call qword [sym.imp.ntoskrnl.exe_MmAllocateContiguousMemory]
mov rdx, rbx
mov ecx, 0x10
mov rsi, rax
call qword [sym.imp.ntoskrnl.exe_MmAllocateContiguousMemory]
mov qword [0x140034e50], rax
mov rcx, rdi
movzx r8d, word [r14]
mov rdx, qword [r14 + 8]
call fcn.140009280
mov qword [r14 + 8], rdi
mov rcx, qword [0x140034e50]
movups xmm0, xmmword [r14]
movdqu xmmword [rcx], xmm0
mov rdx, qword [0x140034e50]
movabs rcx, 0x111ffffffffffff
call fcn.140002480
mov rdx, qword [sym.imp.ntoskrnl.exe_KeDelayExecutionThread]
movabs rcx, 0x222ffffffffffff
call fcn.140002480
mov rdx, qword [sym.imp.ntoskrnl.exe_ZwUnloadDriver]
movabs rcx, 0x333ffffffffffff
call fcn.140002480
movups xmm0, xmmword [0x14000d040]
mov qword [rsp + 0x28], rdi
lea r8, [0x140009fa0]
mov r9, rsi
xor edx, edx
movups xmmword [rsi], xmm0
mov ecx, r12d
movups xmm1, xmmword [0x14000d050]
movups xmmword [rsi + 0x10], xmm1
movups xmm0, xmmword [0x14000d060]
movups xmmword [rsi + 0x20], xmm0
movsd xmm1, qword [0x14000d070]
movsd qword [rsi + 0x30], xmm1
mov eax, dword [0x14000d078]
mov dword [rsi + 0x38], eax
mov al, byte [0x14000d07c]
mov byte [rsi + 0x3c], al
mov rax, qword [0x140034e50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov qword [rsp + 0x30], r15
lea rcx, [rbp + 0x810]
mov qword [rsp + 0x28], rsi
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r15
mov edx, 0x1fffff
mov qword [rbp + 0x810], r15
call qword [sym.imp.ntoskrnl.exe_PsCreateSystemThread]
xor eax, eax
add rsp, 0x8c8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret