Function at 0x140012dbc
Capabilities:
Create process on windows

Disassembly:
mov rax, rsp
push rbp
push r13
push r15
lea rbp, [rax - 0x118]
sub rsp, 0x200
mov qword [rbp - 0x78], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x140076010]
xor rax, rsp
mov qword [rbp + 0xf8], rax
xor esi, esi
mov qword [rsp + 0x68], rsi
mov dword [rsp + 0x60], esi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
xor edx, edx
xor ecx, ecx
lea r8d, [rsi + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x140012e4b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x140012e38
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400136f6
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx eax, ax
or eax, 0x80070000
jmp 0x1400136f6
mov r8, qword [rsp + 0x68]
mov rbx, r8
mov edi, esi
cmp dword [rsp + 0x60], esi
jbe 0x1400136e2
mov r13d, 7
mov r15d, 0x1000
mov eax, edi
lea rcx, [rax + rax*2]
mov qword [rsp + 0x50], rsi
lea rdx, [rsp + 0x50]
mov ecx, dword [r8 + rcx*8]
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
mov rcx, qword [rsp + 0x50]
test eax, eax
je 0x14001324d
mov qword [rsp + 0x58], rsi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0x18b
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x140013232
mov rdx, qword [rsp + 0x58]
lea rcx, [rbp]
call fcn.140011e4c
cmp qword [rbp + 0x10], rsi
je 0x14001366d
lea rdx, str.C:WindowsSystem32_reg.exe_import
lea rcx, [rbp + 0x20]
call fcn.140007214
mov qword [rbp + 0xc8], rsi
mov qword [rbp + 0xd0], r13
mov word [rbp + 0xb8], si
lea rdx, [rbp]
cmp qword [rbp + 0x18], 8
cmovae rdx, qword [rbp]
mov r8, qword [rbp + 0x10]
lea rcx, [rbp + 0xb8]
call fcn.14000b598
mov qword [rbp + 0x80], rsi
mov qword [rbp + 0x88], rsi
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x80], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], r13
mov word [rax], si
mov rax, qword [rbp + 0xd0]
cmp rax, 8
jb 0x140012f8b
lea rax, [rax*2 + 2]
mov rcx, qword [rbp + 0xb8]
mov rdx, rcx
cmp rax, r15
jb 0x140012f84
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x140013274
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov qword [rbp + 0xc8], rsi
mov qword [rbp + 0xd0], r13
mov word [rbp + 0xb8], si
mov r9d, 1
lea r8, [0x14004cef0]
lea rcx, [rbp + 0x70]
call fcn.140013d20
mov qword [rbp + 0xa8], rsi
mov qword [rbp + 0xb0], rsi
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x98], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0xa8], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], r13
mov word [rax], si
lea rdx, [0x14004cef0]
lea rcx, [rbp + 0x98]
call fcn.140003950
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0xd8], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0xe8], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], r13
mov word [rax], si
lea rdx, [rbp + 0xd8]
lea rcx, [rbp + 0x20]
call fcn.14000c5a8
mov rax, qword [rbp + 0xf0]
cmp rax, 8
jb 0x140013073
nop dword [rax]
nop dword [rax + rax]
lea rax, [rax*2 + 2]
mov rcx, qword [rbp + 0xd8]
mov rdx, rcx
cmp rax, r15
jb 0x14001306c
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x14001327b
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rax, qword [rbp + 0xb0]
cmp rax, 8
jb 0x1400130b3
lea rax, [rax*2 + 2]
mov rcx, qword [rbp + 0x98]
mov rdx, rcx
cmp rax, r15
jb 0x1400130ac
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x140013282
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov qword [rbp + 0xa8], rsi
mov qword [rbp + 0xb0], r13
mov word [rbp + 0x98], si
mov rax, qword [rbp + 0x88]
cmp rax, 8
jb 0x140013105
lea rax, [rax*2 + 2]
mov rcx, qword [rbp + 0x70]
mov rdx, rcx
cmp rax, r15
jb 0x1400130fe
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x140013289
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
xor edx, edx
lea r8d, [rdx + 0x64]
lea rcx, [rbp - 0x6c]
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov dword [rbp - 0x70], 0x68
lea rax, [rsp + 0x70]
mov qword [rbp + 0x70], rax
movups xmm0, xmmword [rbp]
movups xmmword [rbp + 0x78], xmm0
movups xmm1, xmmword [rbp + 0x10]
movups xmmword [rbp + 0x88], xmm1
mov qword [rbp + 0x10], rsi
mov qword [rbp + 0x18], r13
mov word [rbp], si
lea rax, [rsp + 0x70]
mov qword [rbp + 0x40], rax
lea rdx, [rbp + 0x78]
lea rcx, [rbp + 0x48]
call fcn.14000ced8
mov byte [rbp + 0x68], 1
mov rax, qword [rbp + 0x90]
cmp rax, 8
jb 0x1400131aa
mov rcx, qword [rbp + 0x78]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x1400131a3
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
ja 0x140013290
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea rdx, [rbp + 0x20]
cmp qword [rbp + 0x38], 8
cmovae rdx, qword [rbp + 0x20]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x14001358e
mov edx, 0x2710
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x140013459
test eax, eax
je 0x140013297
lea rcx, [rbp + 0x40]
call fcn.1400138c8
lea rcx, [rbp + 0x20]
call fcn.140003dc0
lea rcx, [rbp]
call fcn.140003dc0
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140013248
mov qword [rsp + 0x58], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14001325e
mov qword [rsp + 0x50], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
inc edi
cmp edi, dword [rsp + 0x60]
jae 0x1400136e2
mov r8, qword [rsp + 0x68]
jmp 0x140012e6b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov dword [rsp + 0x64], esi
lea rdx, [rsp + 0x64]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x1400133a3
cmp byte [rbp + 0x68], sil
je 0x1400132c3
lea rcx, [rbp + 0x40]
call fcn.140013724
nop
mov rax, qword [rbp + 0x60]
cmp rax, 8
jb 0x140013307
mov rcx, qword [rbp + 0x48]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x140013300
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x140013300
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
nop dword [rax]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
movdqa xmm0, xmmword [0x1400646c0]
movdqu xmmword [rbp + 0x58], xmm0
mov word [rbp + 0x48], si
mov rax, qword [rbp + 0x38]
cmp rax, 8
jb 0x140013355
mov rcx, qword [rbp + 0x20]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x14001334e
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x14001334e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov qword [rbp + 0x30], rsi
mov qword [rbp + 0x38], r13
mov word [rbp + 0x20], si
mov rax, qword [rbp + 0x18]
cmp rax, 8
jb 0x1400136aa
mov rcx, qword [rbp]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x1400136a3
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x1400136a3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov edi, dword [rsp + 0x64]
cmp byte [rbp + 0x68], sil
je 0x1400133b7
lea rcx, [rbp + 0x40]
call fcn.140013724
nop
mov rax, qword [rbp + 0x60]
cmp rax, 8
jb 0x1400133f4
mov rcx, qword [rbp + 0x48]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x1400133ed
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x1400133ed
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
movdqa xmm0, xmmword [0x1400646c0]
movdqu xmmword [rbp + 0x58], xmm0
mov word [rbp + 0x48], si
lea rcx, [rbp + 0x20]
call fcn.140003dc0
lea rcx, [rbp]
call fcn.140003dc0
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x14001342d
mov qword [rsp + 0x58], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140013443
mov qword [rsp + 0x50], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
test rbx, rbx
je 0x140013452
mov rcx, rbx
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
nop
mov eax, edi
jmp 0x1400136f6
cmp byte [rbp + 0x68], sil
je 0x140013469
lea rcx, [rbp + 0x40]
call fcn.140013724
nop
mov rax, qword [rbp + 0x60]
cmp rax, 8
jb 0x1400134a6
mov rcx, qword [rbp + 0x48]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x14001349f
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x14001349f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
movdqa xmm0, xmmword [0x1400646c0]
movdqu xmmword [rbp + 0x58], xmm0
mov word [rbp + 0x48], si
mov rax, qword [rbp + 0x38]
cmp rax, 8
jb 0x1400134f4
mov rcx, qword [rbp + 0x20]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x1400134ed
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x1400134ed
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov qword [rbp + 0x30], rsi
mov qword [rbp + 0x38], r13
mov word [rbp + 0x20], si
mov rax, qword [rbp + 0x18]
cmp rax, 8
jb 0x14001353d
mov rcx, qword [rbp]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x140013536
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x140013536
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov qword [rbp + 0x10], rsi
mov qword [rbp + 0x18], r13
mov word [rbp], si
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x14001355f
mov qword [rsp + 0x58], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140013575
mov qword [rsp + 0x50], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
test rbx, rbx
je 0x140013584
mov rcx, rbx
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
nop
mov eax, 0x102
jmp 0x1400136f6
cmp byte [rbp + 0x68], sil
je 0x1400135a0
lea rcx, [rbp + 0x40]
call fcn.140013724
nop
nop
mov rax, qword [rbp + 0x60]
cmp rax, 8
jb 0x1400135dd
mov rcx, qword [rbp + 0x48]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x1400135d6
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x1400135d6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
movdqa xmm0, xmmword [0x1400646c0]
movdqu xmmword [rbp + 0x58], xmm0
mov word [rbp + 0x48], si
mov rax, qword [rbp + 0x38]
cmp rax, 8
jb 0x14001362b
mov rcx, qword [rbp + 0x20]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x140013624
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x140013624
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov qword [rbp + 0x30], rsi
mov qword [rbp + 0x38], r13
mov word [rbp + 0x20], si
mov rax, qword [rbp + 0x18]
cmp rax, 8
jb 0x1400136aa
mov rcx, qword [rbp]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x1400136a3
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x1400136a3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rax, qword [rbp + 0x18]
cmp rax, 8
jb 0x1400136aa
mov rcx, qword [rbp]
mov rdx, rcx
lea rax, [rax*2 + 2]
cmp rax, r15
jb 0x1400136a3
mov rcx, qword [rcx - 8]
sub rdx, rcx
lea rax, [rdx - 8]
cmp rax, 0x1f
jbe 0x1400136a3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rcx, qword [rsp + 0x58]
mov qword [rbp + 0x10], rsi
mov qword [rbp + 0x18], r13
mov word [rbp], si
test rcx, rcx
je 0x1400136cc
mov qword [rsp + 0x58], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1400136e2
mov qword [rsp + 0x50], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
test rbx, rbx
je 0x1400136f1
mov rcx, rbx
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
nop
mov eax, 1
mov rcx, qword [rbp + 0xf8]
xor rcx, rsp
call fcn.1400443a0
lea r11, [rsp + 0x200]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r13
pop rbp
ret