Function at 0x1400030f0
Capabilities:
Compare security identifiers

Disassembly:
push rbp
push rbx
push rsi
push r13
lea rbp, [rsp - 0x3f]
sub rsp, 0x98
mov rax, qword [0x14000c078]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r13, rcx
mov byte [rcx], 0
xor esi, esi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp + 0xf]
lea edx, [rsi + 8]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14000315b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.OpenProcessToken_failed:__u___x_
lea ecx, [rsi + 1]
mov r9d, ebx
mov r8d, eax
call qword [sym.imp.TBoxRT.dll_RTMsgErrorExit]
jmp 0x140003447
lea rax, [rbp + 0x17]
lea rcx, [rbp + 0x1f]
mov qword [rsp + 0xc8], rdi
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], esi
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x38], esi
mov dword [rsp + 0x30], esi
mov r9d, 0x220
mov r8d, 0x20
mov dl, 2
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x90], r14
mov dword [rbp + 0x1f], esi
mov word [rbp + 0x23], 0x500
mov dword [rsp + 0x20], esi
mov r14d, esi
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1400033f1
mov rcx, qword [rbp + 0xf]
xor r9d, r9d
lea rax, [rbp + 7]
lea edx, [r9 + 2]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400032a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400032a2
mov ecx, dword [rbp + 7]
lea rdx, str.E:_tbox5THypervBox_srcTBoxMain_src_helper_appsTBoxExtPackHelperApp.cpp
mov qword [rsp + 0xd0], r12
call qword [sym.imp.TBoxRT.dll_RTMemAllocZTag]
mov r9d, dword [rbp + 7]
mov rcx, qword [rbp + 0xf]
mov r12, rax
lea rax, [rbp + 7]
mov edx, 2
mov r8, r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140003267
mov ebx, esi
cmp dword [r12], ebx
jbe 0x14000328f
lea rdi, [r12 + 8]
nop word [rax + rax]
mov rdx, qword [rdi]
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x14000325f
inc ebx
add rdi, 0x10
cmp ebx, dword [r12]
jb 0x140003240
jmp 0x14000328f
mov r14d, 1
jmp 0x14000328f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetTokenInformation_TokenGroups_cb__failed:__u___x_
mov r9d, ebx
mov ecx, 1
mov r8d, eax
call qword [sym.imp.TBoxRT.dll_RTMsgErrorExit]
mov esi, eax
mov rcx, r12
call qword [sym.imp.TBoxRT.dll_RTMemFree]
mov r12, qword [rsp + 0xd0]
jmp 0x1400032ca
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetTokenInformation_TokenGroups_0__failed:__u___x_
mov r9d, ebx
mov ecx, 1
mov r8d, eax
call qword [sym.imp.TBoxRT.dll_RTMsgErrorExit]
mov esi, eax
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
test r14d, r14d
je 0x140003417
mov rcx, qword [rbp + 0xf]
xor r9d, r9d
lea rax, [rbp + 7]
lea edx, [r9 + 0x19]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400033ac
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400033ac
mov ecx, dword [rbp + 7]
lea rdx, str.E:_tbox5THypervBox_srcTBoxMain_src_helper_appsTBoxExtPackHelperApp.cpp
call qword [sym.imp.TBoxRT.dll_RTMemAllocTag]
mov r9d, dword [rbp + 7]
mov rcx, qword [rbp + 0xf]
mov rdi, rax
lea rax, [rbp + 7]
mov edx, 0x19
mov r8, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140003379
mov rcx, qword [rdi]
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
mov rcx, qword [rdi]
movzx edx, byte [rax]
dec edx
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
cmp dword [rax], 0x3000
jb 0x1400033a1
mov rcx, rdi
mov byte [r13], 1
call qword [sym.imp.TBoxRT.dll_RTMemFree]
jmp 0x14000342b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetTokenInformation_failed:__u___x_
mov r9d, ebx
mov ecx, 1
mov r8d, eax
call qword [sym.imp.TBoxRT.dll_RTMsgErrorExit]
mov esi, eax
mov rcx, rdi
call qword [sym.imp.TBoxRT.dll_RTMemFree]
jmp 0x14000342b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
je 0x1400033ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x32
je 0x1400033ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetTokenInformation_failed:__u___x_
mov r9d, ebx
mov ecx, 1
mov r8d, eax
call qword [sym.imp.TBoxRT.dll_RTMsgErrorExit]
jmp 0x140003429
mov byte [r13], 1
jmp 0x14000342b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.AllocateAndInitializeSid_failed:__u___x_
mov r9d, ebx
mov ecx, 1
mov r8d, eax
call qword [sym.imp.TBoxRT.dll_RTMsgErrorExit]
lea rdx, str.Membership_in_the_Administrators_group_is_required_to_perform_this_action
mov ecx, 1
call qword [sym.imp.TBoxRT.dll_RTMsgErrorExit]
mov esi, eax
mov rcx, qword [rbp + 0xf]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14, qword [rsp + 0x90]
mov rdi, qword [rsp + 0xc8]
mov eax, esi
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140005ac0
add rsp, 0x98
pop r13
pop rsi
pop rbx
pop rbp
ret