Function at 0x18001e8d0
Capabilities:
Create process on windows
Terminate process

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push r14
lea rbp, [rsp - 0x20d0]
mov eax, 0x21d0
call fcn.18002b690
sub rsp, rax
mov rsi, rcx
mov ecx, 0x1002
call fcn.1800251fc
mov r14, rax
mov qword [rbp - 0x60], rax
test rax, rax
je 0x18001e910
mov word [rax + 0x1000], 0
mov rax, qword [0x1800378a8]
test rax, rax
jne 0x18001e953
mov rax, qword [0x1800378a0]
test rax, rax
jne 0x18001e93c
lea rcx, str.psapi
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x1800378a0], rax
lea rdx, str.EnumProcesses
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1800378a8], rax
lea r8, [rsp + 0x60]
mov edx, 0x1000
mov rcx, r14
mov qword [rsp + 0x21f0], rbx
call rax
test eax, eax
jne 0x18001e98a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test r14, r14
je 0x18001e983
mov rcx, r14
call sub.KERNEL32.dll_LocalFree
mov eax, ebx
jmp 0x18001eec9
mov eax, dword [rsp + 0x60]
mov qword [rsp + 0x21c8], rdi
xor edi, edi
mov qword [rsp + 0x21b8], r13
shr eax, 2
mov qword [rsp + 0x21b0], r15
mov r15d, edi
lea r13d, [rdi + 0x20]
test eax, eax
jle 0x18001ee67
mov qword [rsp + 0x21c0], r12
mov r12, r14
mov r14, qword [rbp + 0x20f8]
lea ebx, [rdi + 1]
nop
mov ecx, dword [r12]
test ecx, ecx
je 0x18001ee44
cmp ecx, 4
je 0x18001ee44
cmp ecx, 8
je 0x18001ee44
lea rdx, [rbp + 0x2100]
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x18001ee44
mov eax, dword [rbp + 0x2100]
cmp eax, r13d
jae 0x18001ee44
imul rax, rax, 0x34
cmp dword [rax + rsi + 8], 0
jne 0x18001ee44
mov r8d, dword [r12]
xor edx, edx
mov ecx, 0x2000000
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], rdi
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x18001edbd
lea r8, [rsp + 0x68]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x18001edbd
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x70]
mov r9d, ebx
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, 0x2000000
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x18001edbd
mov rax, qword [0x180037b78]
mov qword [rbp - 0x68], 0
test rax, rax
jne 0x18001eadf
mov rax, qword [0x180037b68]
test rax, rax
jne 0x18001eac8
lea rcx, str.advapi32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x180037b68], rax
lea rdx, str.ConvertStringSidToSidW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180037b78], rax
lea rdx, [rbp - 0x68]
lea rcx, str.S_1_16_12288
call rax
mov rcx, qword [rbp - 0x68]
mov dword [rbp], r13d
mov qword [rbp - 8], rcx
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rsp + 0x70]
lea r8, [rbp - 8]
lea r9d, [rax + 0x10]
mov edx, 0x19
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov rcx, qword [rsp + 0x68]
lea r11, [rbp + 0x2108]
lea r8, [rbp + 0xb0]
mov r9d, 0x2000
mov edx, ebx
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x18001edbd
mov rdx, qword [rbp + 0xb0]
cmp byte [rdx], 1
jne 0x18001edbd
cmp byte [rdx + 2], 0
jne 0x18001edbd
cmp byte [rdx + 3], 0
jne 0x18001edbd
cmp byte [rdx + 4], 0
jne 0x18001edbd
cmp byte [rdx + 5], 0
jne 0x18001edbd
cmp byte [rdx + 6], 0
jne 0x18001edbd
cmp byte [rdx + 7], 5
jne 0x18001edbd
cmp byte [rdx + 1], 5
jne 0x18001edbd
cmp dword [rdx + 8], 0x15
jne 0x18001edbd
mov eax, dword [rbp + 0x2100]
lea r9, [rbp + 0x2108]
xor ecx, ecx
mov dword [rbp + 0x2108], SQLGetData
imul rax, rax, 0x34
lea r8, [rax + rsi + 0xc]
lea rax, [rbp - 0x10]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x2108]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x80]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
je 0x18001edbd
mov rax, qword [0x180037b80]
mov rbx, qword [rsp + 0x68]
test rax, rax
jne 0x18001ec3d
mov rax, qword [0x180037b70]
test rax, rax
jne 0x18001ec26
lea rcx, str.userenv
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x180037b70], rax
lea rdx, str.CreateEnvironmentBlock
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180037b80], rax
lea rcx, [rsp + 0x78]
xor r8d, r8d
mov rdx, rbx
call rax
xor edx, edx
lea rcx, [rbp + 0x10]
lea r8d, [rdx + 0x68]
call fcn.1800252b0
mov eax, 1
lea rcx, [rbp - 0x80]
lea r8d, [rax + 0x17]
xor edx, edx
mov dword [rbp + 0x10], 0x68
mov dword [rbp + 0x4c], eax
mov word [rbp + 0x50], ax
call fcn.1800252b0
xor ebx, ebx
lea rcx, [rbp - 0x38]
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x20], rbx
mov qword [rbp - 0x28], rbx
mov dword [rbp - 0x38], ebx
call fcn.18001be10
lea rcx, [rbp - 0x58]
mov edx, 0x1000
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x48], rbx
mov dword [rbp - 0x58], ebx
call fcn.180005b40
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rbx, qword [rbp - 0x40]
mov r8, qword [rbp - 0x20]
lea rdx, str._smsiexec.exe__d__d
mov rcx, rbx
mov r9d, 0xd1
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_wsprintfW]
xor ecx, ecx
lea r11, [rbp - 0x80]
lea rax, [rbp + 0x10]
xor r9d, r9d
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x434
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x70]
mov r8, rbx
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x18001eda1
mov eax, dword [r14 + 0x20]
mov r9, qword [r14 + 0x18]
mov rdx, qword [rbp - 0x78]
mov rcx, qword [rbp - 0x80]
lea r8, [rbp - 0x18]
mov dword [rsp + 0x20], eax
mov qword [rbp - 0x18], 0
call fcn.18000a6a0
test eax, eax
je 0x18001ed66
mov rcx, qword [rbp - 0x80]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18001ed97
mov ecx, dword [rbp + 0x2100]
mov eax, ecx
imul rax, rax, 0x34
mov dword [rax + rsi], ecx
mov ecx, dword [rbp + 0x2100]
mov eax, dword [rbp - 0x70]
imul rcx, rcx, 0x34
mov dword [rcx + rsi + 4], eax
mov ecx, dword [rbp + 0x2100]
mov eax, dword [rbp - 0x80]
imul rcx, rcx, 0x34
mov dword [rcx + rsi + 8], eax
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x18001edaf
call sub.KERNEL32.dll_LocalFree
mov rcx, qword [rbp - 0x30]
test rcx, rcx
je 0x18001edbd
call sub.KERNEL32.dll_LocalFree
mov rbx, qword [rsp + 0x78]
test rbx, rbx
je 0x18001ee0f
mov rax, qword [0x180037b88]
test rax, rax
jne 0x18001ee0a
mov rax, qword [0x180037b70]
test rax, rax
jne 0x18001edf3
lea rcx, str.userenv
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x180037b70], rax
lea rdx, str.DestroyEnvironmentBlock
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180037b88], rax
mov rcx, rbx
call rax
test rdi, rdi
je 0x18001ee1d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x18001ee2d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x18001ee3d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 1
xor edi, edi
mov eax, dword [rsp + 0x60]
inc r15d
add r12, 4
shr eax, 2
cmp r15d, eax
jl 0x18001e9d0
mov r14, qword [rbp - 0x60]
mov r12, qword [rsp + 0x21c0]
mov r15, qword [rsp + 0x21b0]
lea rbx, [rsi + 8]
mov eax, dword [rbx]
test eax, eax
je 0x18001eea1
mov ecx, eax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x18001eea1
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rbx - 8], 0xffffffff
mov qword [rbx - 4], 0
add rbx, 0x34
dec r13
jne 0x18001ee73
mov r13, qword [rsp + 0x21b8]
mov rdi, qword [rsp + 0x21c8]
test r14, r14
je 0x18001eec7
mov rcx, r14
call sub.KERNEL32.dll_LocalFree
xor eax, eax
mov rbx, qword [rsp + 0x21f0]
add rsp, 0x21d0
pop r14
pop rsi
pop rbp
ret