Function at 0x10006e70
Capabilities:
Get token privileges

Disassembly:
sub esp, 0x80
mov eax, dword [0x10033a60]
xor eax, esp
mov dword [esp + 0x7c], eax
call fcn.1000956f
push eax
lea ecx, [esp + 0xc]
call fcn.1000a377
call fcn.1000c699
test eax, eax
jne 0x10006ea3
push 0x80004005
call fcn.10001090
mov edx, dword [eax]
push ebp
mov ecx, eax
mov eax, dword [edx + 0xc]
push esi
call eax
mov ebp, dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, eax
add esi, 0x10
push 0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], 0
call ebp
lea ecx, [esp + 8]
push ecx
push 0
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x10006f5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x10006f1a
lea edx, [esp + 8]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x10006f5f
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x10006f2a
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10006f36
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x14], 0
je 0x10006f49
mov ecx, dword [esp + 0x10]
push ecx
push 0
call fcn.10009b1a
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x7c]
xor ecx, esp
call fcn.1001530a
add esp, 0x80
ret
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea edx, [esp + 0x14]
push edx
push eax
push 0
push 3
push ecx
call edi
mov edx, dword [esp + 0x14]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ebx, eax
lea eax, [esp + 0x14]
push eax
push ecx
push ebx
push 3
push edx
call edi
test eax, eax
jne 0x10006fad
push eax
call ebp
mov eax, dword [esp + 0x10]
push eax
jmp 0x1000701f
xor ebp, ebp
cmp dword [ebx], ebp
jle 0x10007012
lea edi, [ebx + 4]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x2c]
push eax
push edi
push 0
mov dword [esp + 0x34], 0x64
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameA]
lea eax, [esp + 0x28]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10006fd8
sub eax, edx
push eax
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x28]
call fcn.100062b0
mov esi, dword [esp + 0x20]
push str.SeLoadDriverPrivilege
push esi
call fcn.10015476
add esp, 8
test eax, eax
je 0x1000706f
add ebp, 1
add edi, 0xc
cmp ebp, dword [ebx]
jl 0x10006fb6
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10007041
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1c], 0
je 0x10007054
mov ecx, dword [esp + 0x18]
push ecx
push 0
call fcn.10009b1a
xor eax, eax
mov ecx, dword [esp + 0x8c]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.1001530a
add esp, 0x80
ret
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1000709e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1c], 0
je 0x100070b1
mov ecx, dword [esp + 0x18]
push ecx
push 0
call fcn.10009b1a
mov eax, 1
jmp 0x10007056