Function at 0x180059990
Capabilities:
Create process on windows

Disassembly:
push rbp
push r12
push r13
push r14
lea rbp, [rsp - 0x678]
sub rsp, 0x778
mov rax, qword [0x1801c1080]
xor rax, rsp
mov qword [rbp + 0x660], rax
movups xmm0, xmmword [str.S_1_16_4096]
xor eax, eax
xor r14d, r14d
movsd xmm1, qword [0x180179df8]
mov r13, rdx
movups xmmword [rbp + 0x10], xmm0
mov r12, rcx
mov qword [rsp + 0x68], r14
movsd qword [rbp + 0x20], xmm1
mov qword [rbp + 0x28], rax
mov qword [rbp + 0x30], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x68]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x180059a0f
mov eax, 0x80004005
jmp 0x180059c8f
xor edx, edx
mov qword [rsp + 0x7b0], rdi
mov rdi, qword [rsp + 0x68]
lea rcx, [rbp - 0x60]
lea r8d, [rdx + 0x68]
call fcn.1801099b0
lea rax, [rsp + 0x60]
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x2000000
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x180059a68
mov r14d, 0x80004005
jmp 0x180059c7b
mov qword [rsp + 0x7a0], rbx
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x7a8], rsi
lea rcx, [rbp + 0x10]
mov rsi, qword [rsp + 0x60]
mov qword [rsp + 0x70], r14
call qword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x180059c5c
mov rbx, qword [rsp + 0x70]
test rbx, rbx
je 0x180059c5c
xor eax, eax
mov qword [rbp - 0x70], rbx
mov qword [rbp - 0x68], rax
mov rcx, rbx
mov dword [rbp - 0x68], 0x20
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rsp + 0x60]
lea r8, [rbp - 0x70]
mov edx, 0x19
lea r9d, [rax + 0x10]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x180059c4b
xor edx, edx
mov qword [rsp + 0x770], r15
mov r8d, 0x410
lea rcx, [rbp + 0x250]
call fcn.1801099b0
mov r15d, 0x208
lea rcx, [rbp + 0x40]
mov r8d, r15d
xor edx, edx
call fcn.1801099b0
test r12, r12
lea r8, [0x180178270]
mov rdx, r8
lea rax, [rbp + 0x250]
cmovne rdx, r12
lea rcx, [rbp + 0x250]
sub rdx, rax
lea rax, [r15 + 0x7ffffdf6]
test rax, rax
je 0x180059b55
movzx eax, word [rdx + rcx]
test ax, ax
je 0x180059b55
mov word [rcx], ax
add rcx, 2
sub r15, 1
jne 0x180059b33
test r15, r15
lea rax, [rcx - 2]
mov r15, qword [rsp + 0x770]
mov edx, 0x104
cmovne rax, rcx
test r13, r13
lea rcx, [rbp + 0x40]
cmovne r8, r13
mov word [rax], r14w
lea rax, [rbp + 0x40]
sub r8, rax
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x180059ba6
movzx eax, word [r8 + rcx]
test ax, ax
je 0x180059ba6
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x180059b83
lea rax, [rcx - 2]
test rdx, rdx
lea r8, [rbp + 0x250]
cmovne rax, rcx
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x50], rcx
lea rcx, [rbp - 0x60]
mov qword [rsp + 0x48], rcx
mov rcx, qword [rsp + 0x60]
mov word [rax], r14w
xor eax, eax
cmp word [rbp + 0x40], r14w
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
lea rax, [rbp + 0x40]
cmove rax, r14
xor r9d, r9d
mov qword [rsp + 0x40], rax
xor edx, edx
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x180059c4b
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x180059c2d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x78], r14
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x180059c51
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
mov qword [rbp - 0x80], r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x180059c62
mov r14d, 0x80004005
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x180059c62
mov r14d, 0x80004005
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0x7a8]
mov rbx, qword [rsp + 0x7a0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdi, qword [rsp + 0x7b0]
mov eax, r14d
mov rcx, qword [rbp + 0x660]
xor rcx, rsp
call fcn.1801027e0
add rsp, 0x778
pop r14
pop r13
pop r12
pop rbp
ret