Function at 0x100047b0
Capabilities:
Get token privileges

Disassembly:
sub esp, 0x80
mov eax, dword [0x1002ba4c]
xor eax, esp
mov dword [esp + 0x7c], eax
call fcn.10005178
push eax
lea ecx, [esp + 0xc]
call fcn.10005f9f
call fcn.10008301
test eax, eax
jne 0x100047e3
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 0x1000489f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x1000485a
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 0x1000489f
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x1000486a
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10004876
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x14], 0
je 0x10004889
mov ecx, dword [esp + 0x10]
push ecx
push 0
call fcn.10005742
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x7c]
xor ecx, esp
call fcn.100105af
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 0x100048ed
push eax
call ebp
mov eax, dword [esp + 0x10]
push eax
jmp 0x1000495f
xor ebp, ebp
cmp dword [ebx], ebp
jle 0x10004952
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 0x10004918
sub eax, edx
push eax
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x28]
call fcn.10004510
mov esi, dword [esp + 0x20]
push str.SeLoadDriverPrivilege
push esi
call fcn.10010755
add esp, 8
test eax, eax
je 0x100049af
add ebp, 1
add edi, 0xc
cmp ebp, dword [ebx]
jl 0x100048f6
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 0x10004981
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1c], 0
je 0x10004994
mov ecx, dword [esp + 0x18]
push ecx
push 0
call fcn.10005742
xor eax, eax
mov ecx, dword [esp + 0x8c]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.100105af
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 0x100049de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1c], 0
je 0x100049f1
mov ecx, dword [esp + 0x18]
push ecx
push 0
call fcn.10005742
mov eax, 1
jmp 0x10004996