Function at 0x140001090
Capabilities:
Acquire debug privileges

Disassembly:
push rbp
lea rbp, [rsp - 0x18100]
mov eax, 0x18200
call fcn.1400027a0
sub rsp, rax
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp + 0x180d0], rax
mov qword [rsp + 0x58], rdx
cmp ecx, 2
jl 0x140001a15
mov qword [rsp + 0x18210], rbx
mov qword [rsp + 0x18220], rdi
mov qword [rsp + 0x181e0], r15
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov ecx, 0x1fffff
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
lea r8, [rbp - 0x60]
mov edx, 0x28
mov rcx, rax
mov rdi, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, qword [rbp - 0x60]
lea rax, [rbp - 0x78]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [r9 + 0x19]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov edx, dword [rbp - 0x78]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r9d, dword [rbp - 0x78]
mov edx, 0x19
mov rcx, qword [rbp - 0x60]
mov rbx, rax
lea rax, [rbp - 0x78]
mov r8, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
movzx ecx, byte [rax]
dec cl
movzx edx, cl
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
cmp dword [rax], 0x3000
jae 0x14000118b
lea rcx, str.Bye..._n
call fcn.140001010
mov eax, 1
jmp 0x1400019e5
mov qword [rsp + 0x181f8], r12
lea r8, [rbp + 0x398]
mov qword [rsp + 0x181f0], r13
lea rdx, str.SeAssignPrimaryTokenPrivilege
xor ecx, ecx
mov qword [rsp + 0x181e8], r14
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x1400011c9
lea rcx, str._t____Failed_SPT_n
call fcn.140001010
mov rax, qword [rbp + 0x398]
lea r8, [rbp + 0x380]
mov rcx, qword [rbp - 0x60]
mov r15d, 1
xor r14d, r14d
mov dword [rbp + 0x380], r15d
mov qword [rsp + 0x28], r14
xor edx, edx
mov qword [rbp + 0x384], rax
lea r9d, [r15 + 0xf]
mov dword [rbp + 0x38c], 2
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x14000122a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._t____Failed_SP:__d_n
call fcn.140001010
lea rcx, str.____Enabling_SeDebugPrivilege_n
call fcn.140001010
lea r8, [rbp + 0x3a0]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x14000125c
lea rcx, str._t____Failed_SDP__n
call fcn.140001010
mov rax, qword [rbp + 0x3a0]
lea r8, [rbp + 0x380]
mov rcx, qword [rbp - 0x60]
mov r9d, 0x10
mov qword [rsp + 0x28], r14
xor edx, edx
mov qword [rbp + 0x384], rax
mov dword [rbp + 0x380], r15d
mov dword [rbp + 0x38c], 2
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1400012b6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._t____Failed_SDP:__d_n
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea rdx, [rbp + 0x390]
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
lea rcx, str.ntdll
mov dword [rbp + 0x374], r14d
mov r13d, r14d
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.NtQuerySystemInformation
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0xa00000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
lea r9, [rbp + 0x374]
mov r8d, 0xa00000
mov rdx, rax
mov qword [rsp + 0x50], rax
mov ecx, 0x10
mov r12, rax
call rbx
mov eax, r14d
mov dword [rsp + 0x40], eax
cmp dword [r12], r14d
jbe 0x140001928
lea rcx, [rbp + 0x3b0]
mov qword [rsp + 0x18218], rsi
mov qword [rsp + 0x48], rcx
nop word [rax + rax]
lea rcx, [rax + rax*2]
xor edx, edx
movups xmm1, xmmword [r12 + rcx*8 + 8]
movd eax, xmm1
lea ecx, [rdx + 0x40]
movups xmmword [rsp + 0x60], xmm1
movzx r8d, ax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x1400013a3
mov rcx, rax
jmp 0x140001901
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
movups xmm0, xmmword [rsp + 0x60]
mov dword [rsp + 0x30], 2
lea r9, [rbp - 0x58]
mov r8, rax
mov dword [rsp + 0x28], r14d
pextrw edx, xmm0, 3
mov rcx, r12
mov dword [rsp + 0x20], r14d
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x1400013e1
mov rcx, r12
jmp 0x140001901
mov ecx, 0x2000
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, qword [rbp - 0x58]
mov ecx, 0x10
mov rdi, r14
mov dword [rbp + 0x370], 0x10
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r9d, dword [rbp + 0x370]
mov edx, 2
mov rbx, rax
mov rcx, rsi
lea rax, [rbp + 0x370]
mov r8, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtQueryObject]
cmp eax, 0x80000005
je 0x14000143d
cmp eax, 0xc0000004
jne 0x140001473
mov edx, dword [rbp + 0x370]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov r9d, dword [rbp + 0x370]
mov edx, 2
mov rbx, rax
mov rcx, rsi
lea rax, [rbp + 0x370]
mov r8, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtQueryObject]
test eax, eax
js 0x14000149e
cmp qword [rbx + 8], r14
je 0x14000149e
movzx ecx, word [rbx]
mov edx, 2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
movzx r8d, word [rbx]
mov rcx, rax
mov rdx, qword [rbx + 8]
mov rdi, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r14
lea rdx, str.Token
movzx eax, word [rdi + rcx*2]
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x1400018f4
cmp rcx, 6
jne 0x1400014b1
mov rcx, qword [rbp - 0x58]
lea rax, [rbp - 0x74]
xor r9d, r9d
mov qword [rbp - 0x50], rcx
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, r15d
mov dword [rbp + 0x378], 0x200
mov dword [rbp + 0x370], 0x200
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400015b3
mov edx, dword [rbp - 0x74]
lea ecx, [rax + 0x40]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov r9d, dword [rbp - 0x74]
mov edx, r15d
mov rcx, qword [rbp - 0x50]
mov rbx, rax
lea rax, [rbp - 0x74]
mov r8, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x1400015b3
mov rdx, qword [rbx]
lea rax, [rbp + 0x394]
mov qword [rsp + 0x30], rax
lea r9, [rbp + 0x378]
lea rax, [rbp + 0x370]
xor ecx, ecx
mov qword [rsp + 0x28], rax
lea r8, [rbp + 0x17ab0]
lea rax, [rbp + 0x17cb0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
lea rax, [rbp + 0x17ab0]
mov edx, 0x10f
lea r9, [rbp + 0x17cb0]
mov qword [rsp + 0x20], rax
lea r8, str._ws__ws
lea rcx, [rbp + 0x17eb0]
call fcn.140001a20
lea r8, [rbp + 0x17eb0]
mov edx, 0x1e
lea rcx, [rbp - 0x40]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov rcx, qword [rbp - 0x50]
lea rax, [rbp - 0x70]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [r9 + 0xa]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001648
mov edx, dword [rbp - 0x70]
lea ecx, [rax + 0x40]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov r9d, dword [rbp - 0x70]
mov edx, 0xa
mov rcx, qword [rbp - 0x50]
mov rbx, rax
lea rax, [rbp - 0x70]
mov r8, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140001648
mov eax, dword [rbx + 0x18]
cmp eax, r15d
jne 0x14000162c
lea rdi, str.TokenPrimary
mov edx, 0x1e
mov r8, rdi
lea rcx, [rbp + 0x1de]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
jmp 0x14000164f
cmp eax, 2
jne 0x140001648
lea r8, str.TokenImpersonation
lea edx, [rax + 0x1c]
lea rcx, [rbp + 0x1de]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
lea rdi, str.TokenPrimary
mov rcx, qword [rbp - 0x50]
lea rax, [rbp - 0x6c]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [r9 + 0xc]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400016ae
mov edx, dword [rbp - 0x6c]
lea ecx, [rax + 0x40]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov r9d, dword [rbp - 0x6c]
lea rax, [rbp - 0x6c]
mov rcx, qword [rbp - 0x50]
lea r8, [rbp + 0x37c]
mov edx, 0xc
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [rbp - 0x44]
test eax, eax
cmovne ecx, dword [rbp + 0x37c]
mov dword [rbp - 0x44], ecx
lea rdx, [rbp + 0x1de]
mov rcx, 0xffffffffffffffff
nop dword [rax]
movzx eax, word [rdx + rcx*2 + 2]
cmp ax, word [rdi + rcx*2 + 2]
jne 0x1400016e0
add rcx, 2
cmp rcx, 0xd
je 0x140001747
movzx eax, word [rdx + rcx*2]
cmp ax, word [rdi + rcx*2]
je 0x1400016c0
mov rcx, qword [rbp - 0x50]
lea rax, [rbp - 0x68]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [r9 + 9]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001789
mov edx, dword [rbp - 0x68]
lea ecx, [rax + 0x40]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov r9d, dword [rbp - 0x68]
mov edx, 9
mov rcx, qword [rbp - 0x50]
mov rbx, rax
lea rax, [rbp - 0x68]
mov r8, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140001789
mov eax, dword [rbx]
cmp eax, 2
jne 0x140001750
lea r8, str.SecurityImpersonation
jmp 0x140001777
lea r8, [0x14000356c]
jmp 0x140001777
cmp eax, 3
jne 0x14000175e
lea r8, str.SecurityDelegation
jmp 0x140001777
test eax, eax
jne 0x14000176b
lea r8, str.SecurityAnonymous
jmp 0x140001777
cmp eax, r15d
jne 0x140001789
lea r8, str.SecurityIdentification
mov edx, 0x1e
lea rcx, [rbp + 0x2a6]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
lea ebx, [r13 + 1]
mov r10d, r14d
test r13d, r13d
js 0x140001853
lea r9, [rbp + 0x5de]
movsxd r11, ebx
nop dword [rax]
nop word [rax + rax]
lea rax, [r9 - 0x21e]
lea r8, [rbp - 0x40]
sub r8, rax
nop
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x1400017d4
add rax, 2
test ecx, ecx
jne 0x1400017c0
test edx, edx
jne 0x14000183a
lea r8, [rbp + 0x1de]
mov rax, r9
sub r8, r9
nop word [rax + rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140001804
add rax, 2
test ecx, ecx
jne 0x1400017f0
test edx, edx
jne 0x14000183a
lea rax, [r9 + 0xc8]
lea r8, [rbp + 0x2a6]
sub r8, rax
nop dword [rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140001834
add rax, 2
test ecx, ecx
jne 0x140001820
test edx, edx
cmove r10d, r15d
add r9, 0x3c0
sub r11, r15
jne 0x1400017b0
test r10d, r10d
jne 0x1400018ef
mov rdi, qword [rsp + 0x48]
lea rcx, [rbp - 0x50]
mov rax, rdi
mov dword [rbp - 0x48], r13d
mov edx, 7
nop dword [rax + rax]
lea rax, [rax + 0x80]
movups xmm0, xmmword [rcx]
movups xmm1, xmmword [rcx + 0x10]
lea rcx, [rcx + 0x80]
movups xmmword [rax - 0x80], xmm0
movups xmm0, xmmword [rcx - 0x60]
movups xmmword [rax - 0x70], xmm1
movups xmm1, xmmword [rcx - 0x50]
movups xmmword [rax - 0x60], xmm0
movups xmm0, xmmword [rcx - 0x40]
movups xmmword [rax - 0x50], xmm1
movups xmm1, xmmword [rcx - 0x30]
movups xmmword [rax - 0x40], xmm0
movups xmm0, xmmword [rcx - 0x20]
movups xmmword [rax - 0x30], xmm1
movups xmm1, xmmword [rcx - 0x10]
movups xmmword [rax - 0x20], xmm0
movups xmmword [rax - 0x10], xmm1
sub rdx, r15
jne 0x140001870
movups xmm0, xmmword [rcx]
add rdi, 0x3c0
mov r13d, ebx
movups xmm1, xmmword [rcx + 0x10]
mov qword [rsp + 0x48], rdi
movups xmmword [rax], xmm0
movups xmm0, xmmword [rcx + 0x20]
movups xmmword [rax + 0x10], xmm1
movups xmm1, xmmword [rcx + 0x30]
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm1
mov rcx, r12
jmp 0x140001901
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x40]
mov r12, qword [rsp + 0x50]
inc eax
mov dword [rsp + 0x40], eax
cmp eax, dword [r12]
jb 0x140001370
mov rsi, qword [rsp + 0x18218]
mov rdx, qword [rsp + 0x58]
lea r8, [0x140003570]
mov r12, qword [rsp + 0x181f8]
mov rcx, r14
mov rdx, qword [rdx + 8]
nop dword [rax]
nop word [rax + rax]
movzx eax, word [rdx + rcx*2]
inc rcx
cmp ax, word [r8 + rcx*2 - 2]
jne 0x1400019d3
cmp rcx, 5
jne 0x140001950
movsxd rdi, r13d
test r13d, r13d
jle 0x1400019d3
lea rbx, [rbp + 0x3b8]
nop dword [rax]
nop dword [rax + rax]
mov r8d, dword [rbx + 4]
lea rdx, [rbp + 0x6a6]
movsxd rax, r14d
lea r9, [rbp + 0x5de]
imul rcx, rax, 0x3c0
lea rax, [rbp + 0x3c0]
add rdx, rcx
add rax, rcx
mov qword [rsp + 0x28], rax
add r9, rcx
mov qword [rsp + 0x20], rdx
lea rcx, str._ID:__d__SESSION:__d___ws___ws__User:__ws_n
mov edx, dword [rbx]
call fcn.140001010
inc r14d
lea rbx, [rbx + 0x3c0]
sub rdi, r15
jne 0x140001980
mov r14, qword [rsp + 0x181e8]
xor eax, eax
mov r13, qword [rsp + 0x181f0]
mov rdi, qword [rsp + 0x18220]
mov rbx, qword [rsp + 0x18210]
mov r15, qword [rsp + 0x181e0]
mov rcx, qword [rbp + 0x180d0]
xor rcx, rsp
call fcn.140001aa0
add rsp, 0x18200
pop rbp
ret
call fcn.140001070
int3