Function at 0x100058c0
Capabilities:
Get token privileges

Disassembly:
sub esp, 0x80
mov eax, dword [0x1002da4c]
xor eax, esp
mov dword [esp + 0x7c], eax
call fcn.10006288
push eax
lea ecx, [esp + 0xc]
call fcn.100070af
call fcn.10009412
test eax, eax
jne 0x100058f3
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 0x100059af
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x1000596a
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 0x100059af
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x1000597a
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10005986
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x14], 0
je 0x10005999
mov ecx, dword [esp + 0x10]
push ecx
push 0
call fcn.10006852
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x7c]
xor ecx, esp
call fcn.100116bf
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 0x100059fd
push eax
call ebp
mov eax, dword [esp + 0x10]
push eax
jmp 0x10005a6f
xor ebp, ebp
cmp dword [ebx], ebp
jle 0x10005a62
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 0x10005a28
sub eax, edx
push eax
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x28]
call fcn.10005620
mov esi, dword [esp + 0x20]
push str.SeLoadDriverPrivilege
push esi
call fcn.10011865
add esp, 8
test eax, eax
je 0x10005abf
add ebp, 1
add edi, 0xc
cmp ebp, dword [ebx]
jl 0x10005a06
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 0x10005a91
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1c], 0
je 0x10005aa4
mov ecx, dword [esp + 0x18]
push ecx
push 0
call fcn.10006852
xor eax, eax
mov ecx, dword [esp + 0x8c]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.100116bf
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 0x10005aee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x1c], 0
je 0x10005b01
mov ecx, dword [esp + 0x18]
push ecx
push 0
call fcn.10006852
mov eax, 1
jmp 0x10005aa6