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

Disassembly:
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x20], r9d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 7]
sub rsp, 0xe0
xor eax, eax
mov rbx, r8
mov rsi, rcx
mov rdi, rdx
lea rcx, [rbp - 0x31]
lea r8d, [rax + 0x38]
xor edx, edx
mov r15d, r9d
mov byte [rbp + 0x47], al
mov qword [rbp - 0x71], rax
mov r12d, eax
mov r13d, eax
mov r14d, eax
mov qword [rbp - 0x51], rax
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x79], rax
mov qword [rbp - 0x41], rax
call fcn.140015500
lea ecx, [r14 + 1]
mov eax, r14d
mov r9d, r15d
test cl, r15b
movzx eax, al
mov r8, rbx
cmovne eax, ecx
mov rdx, rdi
mov rcx, rsi
mov dword [rbp - 0x49], eax
lea rax, [rbp - 0x71]
mov dword [rbp - 0x31], gethostname
mov qword [rsp + 0x20], rax
mov qword [rbp - 0x29], rsi
call fcn.14003e720
xor esi, esi
test al, al
je 0x14004fb30
test r15b, 2
je 0x14004f944
mov rcx, qword [rbp - 0x71]
lea rax, [rbp - 0x69]
lea r9d, [r14 + 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 0x14004fb30
mov rcx, qword [rbp - 0x71]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [rbp - 0x69]
mov qword [rbp - 0x71], r11
lea rcx, str.winsta0
xor edx, edx
mov r8d, 0x60000
call qword [sym.imp.USER32.dll_OpenWindowStationW]
mov r12, rax
test rax, rax
je 0x14004fb30
or rbx, 0xffffffffffffffff
cmp rax, rbx
je 0x14004fb30
call qword [sym.imp.USER32.dll_GetProcessWindowStation]
mov rcx, r12
mov qword [rbp - 0x39], rax
call qword [sym.imp.USER32.dll_SetProcessWindowStation]
test eax, eax
je 0x14004fb30
lea rcx, str.default
mov r9d, 0x60081
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_OpenDesktopW]
mov r13, rax
test rax, rax
je 0x14004fb30
cmp rax, rbx
je 0x14004fb30
mov rcx, qword [rbp - 0x71]
lea rdx, [rbp - 0x51]
call fcn.14003e760
mov r14, qword [rbp - 0x51]
test al, al
je 0x14004fb30
lea r8, [rbp - 0x69]
mov rdx, r14
mov rcx, r12
mov word [rbp - 0x69], 0xb00
mov dword [rbp - 0x65], 0xf0000000
mov word [rbp - 0x5d], 0x400
mov dword [rbp - 0x59], 0xf037f
call fcn.14004f600
test al, al
je 0x14004fb30
lea r8, [rbp - 0x69]
mov rdx, r14
mov rcx, r13
mov word [rbp - 0x69], si
mov dword [rbp - 0x65], 0xf01ff
call fcn.14004f3a0
test al, al
je 0x14004fb30
mov rdi, qword [rbp + 0x7f]
mov r15, qword [rbp + 0x67]
lea rcx, str.winsta0default
mov esi, dword [rdi + 0x3c]
xor ebx, ebx
mov qword [rdi + 0x10], rcx
and esi, 0x100
test r15, r15
je 0x14004fa84
mov rcx, r15
call fcn.140014a74
mov rcx, 0xffffffffffffffff
lea rbx, [rax + 1]
mov eax, 2
mul rbx
cmovo rax, rcx
mov rcx, rax
call fcn.140014ee8
mov r8, rbx
mov rdx, r15
mov rcx, rax
mov qword [rbp - 0x79], rax
call fcn.1400155ec
xor ebx, ebx
mov r15d, dword [rbp - 0x49]
test r15b, r15b
je 0x14004faa3
mov rcx, qword [rbp - 0x71]
lea rdx, [rbp - 0x31]
call qword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x14004fb2a
test byte [rbp + 0x5f], 4
jne 0x14004fabe
mov rdx, qword [rbp - 0x71]
lea rcx, [rbp - 0x41]
xor r8d, r8d
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x14004fb2a
mov rax, qword [rbp + 0x77]
mov ecx, dword [rbp + 0x6f]
mov rbx, qword [rbp + 0x87]
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rdi
mov rdi, qword [rbp - 0x79]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x41]
bts ecx, 0xa
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ecx
mov rcx, qword [rbp - 0x71]
mov dword [rsp + 0x28], esi
xor esi, esi
xor r9d, r9d
mov r8, rdi
xor edx, edx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x14004fb33
test r15b, r15b
je 0x14004fb26
lea r8, [rbp - 0x71]
lea rdx, [rbp - 1]
mov rcx, rbx
call fcn.14003e640
mov bl, 1
jmp 0x14004fb49
mov rdi, qword [rbp - 0x79]
jmp 0x14004fb33
mov rdi, rsi
mov rdx, qword [rbp - 1]
test rdx, rdx
je 0x14004fb46
mov rcx, qword [rbp - 0x71]
call qword [sym.imp.USERENV.dll_UnloadUserProfile]
mov bl, byte [rbp + 0x47]
mov rcx, r14
call fcn.14003e440
test r12, r12
je 0x14004fb5f
mov rcx, r12
call qword [sym.imp.USER32.dll_CloseWindowStation]
test r13, r13
je 0x14004fb6d
mov rcx, r13
call qword [sym.imp.USER32.dll_CloseDesktop]
mov rax, qword [rbp - 0x39]
test rax, rax
je 0x14004fb7f
mov rcx, rax
call qword [sym.imp.USER32.dll_SetProcessWindowStation]
mov rcx, qword [rbp - 0x71]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.140014a90
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x14004fba0
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov al, bl
mov rbx, qword [rsp + 0x128]
add rsp, 0xe0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret