Function at 0x140058550
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
mov r14, rcx
lea rcx, [rbp - 0x18]
mov ebx, r9d
mov r15, r8
call fcn.140050b40
lea rcx, [rbp - 0x18]
call fcn.14003f2a0
xor edi, edi
test al, al
je 0x1400588b9
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 [rsp + 0x78], rdi
mov qword [rbp - 0x60], rdi
call fcn.140014d40
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.14003efa0
test al, al
je 0x140058844
test bl, 2
je 0x14005864c
mov rcx, qword [rsp + 0x68]
lea rax, [rbp - 0x80]
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 0x140058844
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [rbp - 0x80]
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 0x140058844
or r14, 0xffffffffffffffff
cmp rax, r14
je 0x140058844
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 0x140058844
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 0x140058844
cmp rax, r14
je 0x140058844
mov rcx, qword [rsp + 0x68]
lea rdx, [rbp - 0x68]
call fcn.14003efe0
mov r13, qword [rbp - 0x68]
test al, al
je 0x140058844
lea r8, [rbp - 0x80]
mov rdx, r13
mov rcx, rsi
mov word [rbp - 0x80], 0xb00
mov dword [rbp - 0x7c], 0xf0000000
mov word [rbp - 0x74], 0x400
mov dword [rbp - 0x70], 0xf037f
call fcn.140050890
test al, al
je 0x140058844
lea r8, [rbp - 0x80]
mov rdx, r13
mov rcx, r12
mov word [rbp - 0x80], di
mov dword [rbp - 0x7c], 0xf01ff
call fcn.140050630
test al, al
je 0x140058844
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 0x140058791
mov rcx, qword [rbp + 0x70]
call fcn.140014cc4
mov rcx, 0xffffffffffffffff
lea rbx, [rax + 1]
mov eax, 2
mul rbx
cmovo rax, rcx
mov rcx, rax
call fcn.140014e9c
mov rdx, qword [rbp + 0x70]
mov r8, rbx
mov rcx, rax
mov qword [rsp + 0x78], rax
call fcn.140015758
mov ebx, dword [rbp + 0x68]
cmp byte [rsp + 0x70], dil
je 0x1400587af
mov rcx, qword [rsp + 0x68]
lea rdx, [rbp - 0x50]
call qword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x14005883d
test bl, 4
jne 0x1400587ca
mov rdx, qword [rsp + 0x68]
lea rcx, [rbp - 0x60]
xor r8d, r8d
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x14005883d
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 [rsp + 0x78]
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 0x140058847
cmp byte [rsp + 0x70], dil
je 0x140058839
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x20]
mov rcx, rbx
call fcn.14003ee20
mov bl, 1
jmp 0x14005885e
mov r14, qword [rsp + 0x78]
jmp 0x140058847
mov r14, rdi
mov rdx, qword [rbp - 0x20]
test rdx, rdx
je 0x14005885b
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.USERENV.dll_UnloadUserProfile]
mov bl, dil
mov rcx, r13
call fcn.14003ec50
test rsi, rsi
je 0x140058874
mov rcx, rsi
call qword [sym.imp.USER32.dll_CloseWindowStation]
test r12, r12
je 0x140058882
mov rcx, r12
call qword [sym.imp.USER32.dll_CloseDesktop]
mov rax, qword [rbp - 0x58]
test rax, rax
je 0x140058894
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.14001488c
mov rcx, qword [rbp - 0x60]
test rcx, rcx
je 0x1400588b6
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov dil, bl
lea rcx, [rbp - 0x18]
call fcn.140050af0
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