Function at 0x1400202f0
Capabilities:
Create process on windows
Get session information
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x760]
sub rsp, 0x860
mov rax, qword [0x140073058]
xor rax, rsp
mov qword [rbp + 0x750], rax
xor edx, edx
mov r8d, 0xf0
lea rcx, [rbp + 0x30]
call fcn.14002d0c0
xorps xmm0, xmm0
movups xmmword [rbp + 8], xmm0
xor r15d, r15d
mov qword [rbp + 8], r15
mov qword [rbp + 0x10], r15
lea rax, [rbp + 8]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.HARDWAREDESCRIPTIONSystemBIOS
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400206d9
lea rax, [rbp + 0x14]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x10]
xor r8d, r8d
lea rdx, str.BIOSVersion
mov rcx, qword [rbp + 8]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400206d9
lea rax, [rbp + 0x14]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x10]
xor r8d, r8d
lea rdx, str.BIOSVersion
mov rcx, qword [rbp + 8]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400206d9
lea rdx, [0x140076118]
lea rcx, [rbp + 0x30]
call fcn.140004a20
test al, al
jne 0x140020401
lea rdx, [0x140076140]
lea rcx, [rbp + 0x30]
call fcn.140004a20
test al, al
je 0x1400206d9
mov qword [rsp + 0x68], r15
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov edi, eax
lea rax, [rbp]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x60]
mov r8d, 8
mov edx, edi
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x1400206d3
mov rcx, qword [rsp + 0x60]
cmp dword [rcx], 0
jne 0x1400206d9
lea rdx, [rsp + 0x68]
mov ecx, edi
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x1400206d3
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x1400206d9
mov r14, qword [rsp + 0x68]
xor bl, bl
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rsi, rax
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x330]
call fcn.14002d0c0
mov dword [rbp], 0x104
test rsi, rsi
je 0x14002062b
lea r9, [rbp]
lea r8, [rbp + 0x330]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_QueryFullProcessImageNameW]
mov edi, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x14002062b
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x120]
call fcn.14002d0c0
lea rax, str._OPSTCHK
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x330]
lea r8, str.__ls___s
mov edx, 0x104
lea rcx, [rbp + 0x120]
call fcn.1400126d0
lea rdx, [rbp + 0x120]
lea rcx, str.GetOPSTCapability__:_Command_Line:__ls_n
call fcn.14000fcd0
mov qword [rsp + 0x70], r15
mov r8d, 1
mov rdx, r14
lea rcx, [rsp + 0x70]
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x140020541
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14002062b
lea r8, str.winsta0default
mov edx, 0x104
lea rcx, [rbp + 0x540]
call fcn.140035914
lea rdi, [rbp - 0x70]
xor eax, eax
mov ecx, 0x68
rep stosb byte [rdi], al
mov dword [rbp - 0x70], 0x68
mov word [rbp - 0x30], r15w
lea rax, [rbp + 0x540]
mov qword [rbp - 0x60], rax
lea rdi, [rsp + 0x78]
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
lea rax, [rsp + 0x78]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], 0x400
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea r8, [rbp + 0x120]
xor edx, edx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x1400205db
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14002061c
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14002061c
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [rsp + 0x60], r15d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x140020611
cmp dword [rsp + 0x60], 0x64
sete bl
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x14002062b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140020641
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp + 0x18], r15
mov qword [rbp + 0x20], r15
movzx eax, bl
mov dword [rbp], eax
mov qword [rsp + 0x40], r15
lea rax, [rbp + 0x18]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetServicesLITSSVCOPST
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1400206bc
mov dword [rsp + 0x28], 4
lea rax, [rbp]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.Capability
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1400206c2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x18]
test rcx, rcx
je 0x1400206db
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400206db
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x1400206ea
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx eax, bl
mov rcx, qword [rbp + 0x750]
xor rcx, rsp
call fcn.14002a740
lea r11, [rsp + 0x860]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret