Function at 0x10006df0
Capabilities:
Get token privileges

Disassembly:
sub esp, 0x80
mov eax, dword [0x10033a60]
xor eax, esp
mov dword [esp + 0x7c], eax
call fcn.100094af
push eax
lea ecx, [esp + 0xc]
call fcn.1000a2b7
call fcn.1000c5d9
test eax, eax
jne 0x10006e23
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 0x10006edf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x10006e9a
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 0x10006edf
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x10006eaa
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10006eb6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x14], 0
je 0x10006ec9
mov ecx, dword [esp + 0x10]
push ecx
push 0
call fcn.10009a5a
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x7c]
xor ecx, esp
call fcn.1001524a
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 0x10006f2d
push eax
call ebp
mov eax, dword [esp + 0x10]
push eax
jmp 0x10006f9f
xor ebp, ebp
cmp dword [ebx], ebp
jle 0x10006f92
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 0x10006f58
sub eax, edx
push eax
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x28]
call fcn.10006230
mov esi, dword [esp + 0x20]
push str.SeLoadDriverPrivilege
push esi
call fcn.100153b6
add esp, 8
test eax, eax
je 0x10006fef
add ebp, 1
add edi, 0xc
cmp ebp, dword [ebx]
jl 0x10006f36
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 0x10006fc1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1c], 0
je 0x10006fd4
mov ecx, dword [esp + 0x18]
push ecx
push 0
call fcn.10009a5a
xor eax, eax
mov ecx, dword [esp + 0x8c]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.1001524a
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 0x1000701e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1c], 0
je 0x10007031
mov ecx, dword [esp + 0x18]
push ecx
push 0
call fcn.10009a5a
mov eax, 1
jmp 0x10006fd6