Function at 0x140057e40
Capabilities:
Create process on windows
Impersonate user

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov dword [rax + 0x20], r9d
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x110
lea rax, str.SeAssignPrimaryTokenPrivilege
mov r14, rcx
lea rdx, [rsp + 0x78]
mov qword [rsp + 0x78], rax
lea rax, str.SeIncreaseQuotaPrivilege
lea rcx, [rbp - 0x18]
mov ebx, r9d
mov r15, r8
mov qword [rbp - 0x80], rax
call fcn.140050680
lea rcx, [rbp - 0x18]
call fcn.14003ef00
xor edi, edi
test al, al
je 0x1400581c9
lea r8d, [rdi + 0x38]
lea rcx, [rbp - 0x50]
xor edx, edx
mov qword [rsp + 0x68], rdi
mov esi, edi
mov r12d, edi
mov r13d, edi
mov qword [rbp - 0x68], rdi
mov qword [rbp - 0x58], rdi
mov qword [rbp - 0x70], rdi
mov qword [rbp - 0x60], rdi
call fcn.140014ac0
mov rdx, qword [rbp + 0x58]
lea ecx, [rdi + 1]
movzx eax, dil
test cl, bl
mov r9d, ebx
mov r8, r15
cmovne eax, ecx
mov rcx, r14
mov dword [rbp - 0x50], gethostname
mov dword [rsp + 0x70], eax
lea rax, [rsp + 0x68]
mov qword [rbp - 0x48], r14
mov qword [rsp + 0x20], rax
call fcn.14003ec00
test al, al
je 0x140058154
test bl, 2
je 0x140057f59
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x78]
lea r9d, [rdi + 2]
mov qword [rsp + 0x28], rax
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x140058154
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [rsp + 0x78]
mov qword [rsp + 0x68], r11
lea rcx, str.winsta0
xor edx, edx
mov r8d, 0x60000
call qword [sym.imp.USER32.dll_OpenWindowStationW]
mov rsi, rax
test rax, rax
je 0x140058154
or r14, 0xffffffffffffffff
cmp rax, r14
je 0x140058154
call qword [sym.imp.USER32.dll_GetProcessWindowStation]
mov rcx, rsi
mov qword [rbp - 0x58], rax
call qword [sym.imp.USER32.dll_SetProcessWindowStation]
test eax, eax
je 0x140058154
lea rcx, str.default
mov r9d, 0x60081
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_OpenDesktopW]
mov r12, rax
test rax, rax
je 0x140058154
cmp rax, r14
je 0x140058154
mov rcx, qword [rsp + 0x68]
lea rdx, [rbp - 0x68]
call fcn.14003ec40
mov r13, qword [rbp - 0x68]
test al, al
je 0x140058154
lea r8, [rsp + 0x78]
mov rdx, r13
mov rcx, rsi
mov word [rsp + 0x78], 0xb00
mov dword [rsp + 0x7c], 0xf0000000
mov word [rbp - 0x7c], 0x400
mov dword [rbp - 0x78], 0xf037f
call fcn.1400503d0
test al, al
je 0x140058154
lea r8, [rsp + 0x78]
mov rdx, r13
mov rcx, r12
mov word [rsp + 0x78], di
mov dword [rsp + 0x7c], 0xf01ff
call fcn.140050170
test al, al
je 0x140058154
mov r14, qword [rbp + 0x88]
lea rcx, str.winsta0default
mov r15d, dword [r14 + 0x3c]
mov qword [r14 + 0x10], rcx
and r15d, 0x100
cmp qword [rbp + 0x70], rdi
je 0x1400580a3
mov rcx, qword [rbp + 0x70]
call fcn.140014a44
mov rcx, 0xffffffffffffffff
lea rbx, [rax + 1]
mov eax, 2
mul rbx
cmovo rax, rcx
mov rcx, rax
call fcn.140014c1c
mov rdx, qword [rbp + 0x70]
mov r8, rbx
mov rcx, rax
mov qword [rbp - 0x70], rax
call fcn.1400154d8
mov ebx, dword [rbp + 0x68]
cmp byte [rsp + 0x70], dil
je 0x1400580c1
mov rcx, qword [rsp + 0x68]
lea rdx, [rbp - 0x50]
call qword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x14005814e
test bl, 4
jne 0x1400580dc
mov rdx, qword [rsp + 0x68]
lea rcx, [rbp - 0x60]
xor r8d, r8d
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x14005814e
mov rax, qword [rbp + 0x80]
mov ecx, dword [rbp + 0x78]
mov rbx, qword [rbp + 0x90]
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], r14
mov r14, qword [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x60]
bts ecx, 0xa
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ecx
mov rcx, qword [rsp + 0x68]
xor r9d, r9d
mov r8, r14
xor edx, edx
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x140058157
cmp byte [rsp + 0x70], dil
je 0x14005814a
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x20]
mov rcx, rbx
call fcn.14003eb20
mov bl, 1
jmp 0x14005816e
mov r14, qword [rbp - 0x70]
jmp 0x140058157
mov r14, rdi
mov rdx, qword [rbp - 0x20]
test rdx, rdx
je 0x14005816b
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.USERENV.dll_UnloadUserProfile]
mov bl, dil
mov rcx, r13
call fcn.14003e9e0
test rsi, rsi
je 0x140058184
mov rcx, rsi
call qword [sym.imp.USER32.dll_CloseWindowStation]
test r12, r12
je 0x140058192
mov rcx, r12
call qword [sym.imp.USER32.dll_CloseDesktop]
mov rax, qword [rbp - 0x58]
test rax, rax
je 0x1400581a4
mov rcx, rax
call qword [sym.imp.USER32.dll_SetProcessWindowStation]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call fcn.14001460c
mov rcx, qword [rbp - 0x60]
test rcx, rcx
je 0x1400581c6
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov dil, bl
lea rcx, [rbp - 0x18]
call fcn.140050630
mov rbx, qword [rsp + 0x150]
mov al, dil
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret