Function at 0x1401269f0
Capabilities:
Create process on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
mov eax, 0x41d0
call fcn.14026deb0
sub rsp, rax
mov rax, qword [0x140325ed8]
xor rax, rsp
mov qword [rsp + 0x41c0], rax
mov qword [rsp + 0x60], 0
mov eax, dword [rsp + 0x41f8]
and eax, 0x8000
cmp eax, 0x8000
jne 0x140126a4d
mov dword [rsp + 0xb8], 1
jmp 0x140126a58
mov dword [rsp + 0xb8], 0
mov eax, dword [rsp + 0xb8]
mov dword [rsp + 0x9c], eax
cmp dword [rsp + 0x9c], 0
je 0x140126a82
mov eax, dword [rsp + 0x41f8]
btc eax, 0xf
mov dword [rsp + 0x41f8], eax
lea rax, [rsp + 0x150]
mov rdi, rax
xor eax, eax
mov ecx, 0x68
rep stosb byte [rdi], al
lea rax, [rsp + 0xf0]
mov rdi, rax
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
mov qword [rsp + 0xb0], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x90], 0
mov qword [rsp + 0xd8], 0
mov dword [rsp + 0xa0], 0
lea rax, [rsp + 0xf0]
mov rdi, rax
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
lea rax, [rsp + 0x150]
mov rdi, rax
xor eax, eax
mov ecx, 0x68
rep stosb byte [rdi], al
cmp dword [rsp + 0x41f8], 5
je 0x140126b3f
cmp dword [rsp + 0x41f8], 0
je 0x140126b3f
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0xffffffff
jne 0x140126b3f
xor eax, eax
jmp 0x1401277de
cmp dword [rsp + 0x41f8], 0
je 0x140126cbe
cmp dword [rsp + 0x41f8], 4
je 0x140126cbe
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsp + 0xd8], rax
lea r8, [rsp + 0x88]
mov edx, 2
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140126bb3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9d, 2
mov r8d, 0x216
lea rdx, [0x1403ad450]
xor ecx, ecx
call fcn.140124df0
xor eax, eax
jmp 0x1401277de
lea rax, [rsp + 0x90]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0x2000000
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x140126c21
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9d, 2
mov r8d, 0x217
lea rdx, [0x1403ad3e0]
xor ecx, ecx
call fcn.140124df0
xor eax, eax
jmp 0x1401277de
cmp dword [rsp + 0x41f8], 5
jne 0x140126c39
mov eax, dword [rsp + 0x4200]
mov dword [rsp + 0x98], eax
mov r9d, 4
lea r8, [rsp + 0x98]
mov edx, listen
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x140126ca5
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9d, 2
mov r8d, 0x219
lea rdx, [0x1403ad370]
xor ecx, ecx
call fcn.140124df0
xor eax, eax
jmp 0x1401277de
cmp dword [rsp + 0x41f8], 2
jne 0x140126cbe
lea rax, str.Winsta0Winlogon
mov qword [rsp + 0x160], rax
cmp qword [rsp + 0x41f0], 0
je 0x140126d1b
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x41f0]
cmp qword [rcx + rax], 0
je 0x140126d1b
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x41f0]
cmp qword [rcx + rax], 0
jne 0x140126d1b
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x41f0]
mov rax, qword [rcx + rax]
mov qword [rsp + 0xb0], rax
jmp 0x140126edf
cmp qword [rsp + 0x41f0], 0
je 0x140126edf
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x41f0]
cmp qword [rcx + rax], 0
je 0x140126edf
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x41f0]
cmp qword [rcx + rax], 0
je 0x140126edf
mov dword [rsp + 0x80], 0
mov dword [rsp + 0x6c], 0
mov dword [rsp + 0x74], 0
movsxd rax, dword [rsp + 0x6c]
mov rcx, qword [rsp + 0x41f0]
cmp qword [rcx + rax*8], 0
je 0x140126dd4
movsxd rax, dword [rsp + 0x6c]
mov rcx, qword [rsp + 0x41f0]
mov rax, qword [rcx + rax*8]
mov qword [rsp + 0x110], rax
mov edx, 0x10000
mov rcx, qword [rsp + 0x110]
call fcn.140001160
mov ecx, dword [rsp + 0x74]
lea eax, [rcx + rax + 1]
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x6c]
inc eax
mov dword [rsp + 0x6c], eax
jmp 0x140126d7d
mov eax, dword [rsp + 0x74]
mov ecx, dword [rsp + 0x6c]
lea eax, [rax + rcx - 1]
mov dword [rsp + 0x74], eax
movsxd rax, dword [rsp + 0x74]
mov rcx, rax
call fcn.14027bb94
mov qword [rsp + 0xb0], rax
mov dword [rsp + 0x6c], 0
mov dword [rsp + 0x80], 0
mov dword [rsp + 0xa0], 1
movsxd rax, dword [rsp + 0x6c]
mov rcx, qword [rsp + 0x41f0]
cmp qword [rcx + rax*8], 0
je 0x140126edf
cmp dword [rsp + 0x6c], 0
jne 0x140126e47
lea rax, [0x1403b99a7]
mov qword [rsp + 0xe0], rax
jmp 0x140126e56
lea rax, [0x14033486c]
mov qword [rsp + 0xe0], rax
movsxd rax, dword [rsp + 0x6c]
mov ecx, dword [rsp + 0x80]
mov edx, dword [rsp + 0x74]
sub edx, ecx
mov ecx, edx
movsxd rcx, ecx
movsxd rdx, dword [rsp + 0x80]
mov rdi, qword [rsp + 0xb0]
add rdi, rdx
mov rdx, rdi
mov qword [rsp + 0x118], rdx
mov rdi, qword [rsp + 0x41f0]
mov rax, qword [rdi + rax*8]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0xe0]
lea r8, [0x1403acfc4]
mov rdx, rcx
mov rax, qword [rsp + 0x118]
mov rcx, rax
call fcn.140001420
mov ecx, dword [rsp + 0x80]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x80], eax
mov eax, dword [rsp + 0x6c]
inc eax
mov dword [rsp + 0x6c], eax
jmp 0x140126e17
mov dword [rsp + 0x130], 0x18
mov dword [rsp + 0x140], 1
mov qword [rsp + 0x138], 0
mov ecx, 0x80
call fcn.14027bb94
xor r9d, r9d
xor r8d, r8d
mov edx, 0x68
mov rcx, rax
call fcn.140113960
mov qword [rsp + 0x60], rax
cmp dword [rsp + 0x41f8], 4
je 0x140126f65
mov r9d, dword [rsp + 0x4210]
xor r8d, r8d
mov edx, 0x1000
mov rcx, qword [rsp + 0x41e0]
call fcn.1401264b0
mov rcx, qword [rsp + 0x60]
mov qword [rcx + 0x38], rax
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x38]
mov rcx, qword [rsp + 0x60]
mov qword [rax + 0x40], rcx
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x41e0]
mov qword [rax + 0x10], rcx
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x10]
mov rcx, qword [rsp + 0x60]
mov rax, qword [rax + 0x20]
mov qword [rcx + 0x60], rax
mov dword [rsp + 0x150], WSAGetLastError
cmp dword [rsp + 0x41f8], 4
je 0x1401270b4
mov r9d, dword [rsp + 0x4210]
xor r8d, r8d
mov edx, 0x1000
mov rcx, qword [rsp + 0x41e0]
call fcn.1401264b0
mov rcx, qword [rsp + 0x60]
mov qword [rcx + 0x28], rax
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x28]
mov rcx, qword [rsp + 0x60]
mov qword [rax + 0x40], rcx
mov r9d, dword [rsp + 0x4210]
xor r8d, r8d
mov edx, 0x1000
mov rcx, qword [rsp + 0x41e0]
call fcn.1401264b0
mov rcx, qword [rsp + 0x60]
mov qword [rcx + 0x30], rax
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x30]
mov rcx, qword [rsp + 0x60]
mov qword [rax + 0x40], rcx
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x28]
add rax, 0x88
mov rcx, rax
call fcn.140126210
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x30]
add rax, 0x80
mov rcx, rax
call fcn.140126210
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x38]
add rax, 0x80
mov rcx, rax
call fcn.140126210
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x38]
mov rax, qword [rax + 0x88]
mov qword [rsp + 0x1b0], rax
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x28]
mov rax, qword [rax + 0x80]
mov qword [rsp + 0x1a0], rax
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x30]
mov rax, qword [rax + 0x88]
mov qword [rsp + 0x1a8], rax
mov eax, dword [rsp + 0x18c]
bts eax, 8
mov dword [rsp + 0x18c], eax
cmp qword [rsp + 0x4208], 0
je 0x1401273cf
mov dword [rsp + 0x70], 0
mov rax, qword [rsp + 0x4208]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x1401271d1
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x78]
cmp qword [rcx + rax], 0
je 0x1401271d1
mov eax, 8
imul rax, rax, 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov rcx, qword [rsp + 0x78]
mov r8, qword [rcx + rax]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsp + 0xc8], eax
mov ecx, 8
imul rcx, rcx, 1
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov rdx, qword [rsp + 0x78]
mov r8, qword [rdx + rcx]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [rsp + 0xc8]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0xcc], eax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
lea r8, [0x140334844]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
add eax, dword [rsp + 0x70]
mov ecx, dword [rsp + 0xcc]
add eax, ecx
mov dword [rsp + 0x70], eax
mov rax, qword [rsp + 0x78]
add rax, 0x10
mov qword [rsp + 0x78], rax
jmp 0x1401270d8
mov eax, dword [rsp + 0x70]
shl eax, 1
cdqe
mov ecx, 0xffffffff
cmp rax, rcx
jae 0x140127232
mov eax, dword [rsp + 0x70]
shl eax, 1
cdqe
mov ecx, 0xffffffff
sub rcx, rax
mov rax, rcx
test rax, rax
jbe 0x140127232
mov eax, dword [rsp + 0x70]
shl eax, 1
cdqe
mov ecx, 0xffffffe7
cmp rax, rcx
jae 0x140127232
xor eax, eax
cmp eax, 1
je 0x140127232
mov eax, dword [rsp + 0x70]
shl eax, 1
cdqe
add rax, 0x18
mov rcx, rax
call fcn.14027bb94
mov qword [rsp + 0xe8], rax
jmp 0x14012723e
mov qword [rsp + 0xe8], 0
mov eax, dword [rsp + 0x70]
shl eax, 1
cdqe
xor r9d, r9d
xor r8d, r8d
mov rdx, rax
mov rcx, qword [rsp + 0xe8]
call fcn.140113960
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x68], 0
mov rax, qword [rsp + 0x4208]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x1401273bf
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x78]
cmp qword [rcx + rax], 0
je 0x1401273bf
mov rax, qword [rsp + 0xa8]
mov eax, dword [rax - 0x18]
cdq
sub eax, edx
sar eax, 1
movsxd rcx, dword [rsp + 0x68]
mov rdx, qword [rsp + 0xa8]
lea rcx, [rdx + rcx*2]
mov edx, 8
imul rdx, rdx, 0
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 0xffffffff
mov rax, qword [rsp + 0x78]
mov r8, qword [rax + rdx]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [rsp + 0x68]
lea eax, [rcx + rax - 1]
mov dword [rsp + 0x68], eax
mov rax, qword [rsp + 0xa8]
mov eax, dword [rax - 0x18]
cdq
sub eax, edx
sar eax, 1
sub eax, dword [rsp + 0x68]
movsxd rcx, dword [rsp + 0x68]
mov rdx, qword [rsp + 0xa8]
lea rcx, [rdx + rcx*2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 0xffffffff
lea r8, [0x14033482c]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [rsp + 0x68]
lea eax, [rcx + rax - 1]
mov dword [rsp + 0x68], eax
mov rax, qword [rsp + 0xa8]
mov eax, dword [rax - 0x18]
cdq
sub eax, edx
sar eax, 1
sub eax, dword [rsp + 0x68]
movsxd rcx, dword [rsp + 0x68]
mov rdx, qword [rsp + 0xa8]
lea rcx, [rdx + rcx*2]
mov edx, 8
imul rdx, rdx, 1
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov r9d, 0xffffffff
mov rax, qword [rsp + 0x78]
mov r8, qword [rax + rdx]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [rsp + 0x68]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x68], eax
mov rax, qword [rsp + 0x78]
add rax, 0x10
mov qword [rsp + 0x78], rax
jmp 0x140127279
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x4208], rax
cmp dword [rsp + 0x41f8], 0
je 0x1401273e7
cmp dword [rsp + 0x41f8], 4
jne 0x1401274ee
cmp dword [rsp + 0x9c], 0
je 0x1401273fe
mov dword [rsp + 0xbc], 0x208
jmp 0x140127409
mov dword [rsp + 0xbc], 0
cmp dword [rsp + 0x41f8], 4
jne 0x140127420
mov dword [rsp + 0xc0], 0
jmp 0x14012742b
mov dword [rsp + 0xc0], 1
mov eax, dword [rsp + 0xbc]
or eax, 0x8000400
mov dword [rsp + 0xd0], eax
mov r9d, 0x1000
lea r8, [rsp + 0x1c0]
mov edx, 0xffffffff
mov rcx, qword [rsp + 0xb0]
call fcn.140112d50
mov qword [rsp + 0x120], rax
mov r9d, 0x1000
lea r8, [rsp + 0x21c0]
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x41e8]
call fcn.140112d50
lea rcx, [rsp + 0xf0]
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x150]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], 0
mov rcx, qword [rsp + 0x4208]
mov qword [rsp + 0x30], rcx
mov ecx, dword [rsp + 0xd0]
mov dword [rsp + 0x28], ecx
mov ecx, dword [rsp + 0xc0]
mov dword [rsp + 0x20], ecx
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x120]
mov rdx, rcx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1401275ec
cmp dword [rsp + 0x41f8], 0
je 0x14012769f
cmp dword [rsp + 0x9c], 0
je 0x140127513
mov dword [rsp + 0xc4], 0x208
jmp 0x14012751e
mov dword [rsp + 0xc4], 0
mov eax, dword [rsp + 0xc4]
or eax, 0x8000400
mov dword [rsp + 0xd4], eax
mov r9d, 0x1000
lea r8, [rsp + 0x1c0]
mov edx, 0xffffffff
mov rcx, qword [rsp + 0xb0]
call fcn.140112d50
mov qword [rsp + 0x128], rax
mov r9d, 0x1000
lea r8, [rsp + 0x21c0]
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x41e8]
call fcn.140112d50
lea rcx, [rsp + 0xf0]
mov qword [rsp + 0x50], rcx
lea rcx, [rsp + 0x150]
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], 0
mov rcx, qword [rsp + 0x4208]
mov qword [rsp + 0x38], rcx
mov ecx, dword [rsp + 0xd4]
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov rcx, qword [rsp + 0x128]
mov r8, rcx
mov rdx, rax
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x14012769f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x108], eax
cmp dword [rsp + 0x41f8], 4
je 0x14012762d
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax + 0x38]
call fcn.140125f90
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax + 0x30]
call fcn.140125f90
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax + 0x28]
call fcn.140125f90
cmp dword [rsp + 0xa0], 0
je 0x140127644
mov rcx, qword [rsp + 0xb0]
call fcn.14027a7c0
mov rcx, qword [rsp + 0x60]
call fcn.140113b40
cmp qword [rsp + 0x88], 0
je 0x140127667
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rsp + 0x90], 0
je 0x140127680
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rsp + 0x4208], 0
je 0x140127698
mov rcx, qword [rsp + 0x4208]
call fcn.140113b40
xor eax, eax
jmp 0x1401277de
cmp qword [rsp + 0x4208], 0
je 0x1401276b7
mov rcx, qword [rsp + 0x4208]
call fcn.140113b40
cmp dword [rsp + 0xa0], 0
je 0x1401276ce
mov rcx, qword [rsp + 0xb0]
call fcn.14027a7c0
cmp dword [rsp + 0x41f8], 4
je 0x140127756
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x30]
mov rcx, qword [rax + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x30]
mov qword [rax + 0x88], 0
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x38]
mov rcx, qword [rax + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x38]
mov qword [rax + 0x88], 0
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x28]
mov rcx, qword [rax + 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x28]
mov qword [rax + 0x80], 0
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0xf0]
mov qword [rax + 0x50], rcx
cmp qword [rsp + 0xf8], 0
je 0x140127780
mov rcx, qword [rsp + 0xf8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x100]
mov dword [rax + 0x18], ecx
cmp qword [rsp + 0x88], 0
je 0x1401277b4
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x88], 0
cmp qword [rsp + 0x90], 0
je 0x1401277d9
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x90], 0
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x41c0]
xor rcx, rsp
call fcn.14026d940
add rsp, 0x41d0
pop rdi
ret