Function at 0x101454
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x14
push 0
push 0
dec ecx
jne 0x10145c
push ebx
push esi
push edi
mov ebx, edx
xor edx, edx
push ebp
push 0x1017a6
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
mov dword [ebp - 8], edx
xor edx, edx
mov dword [ebp - 0x10], edx
mov esi, eax
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
push ebp
push 0x101781
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
push eax
push esi
call sub.wtsapi32.dll_WTSQueryUserToken
test eax, eax
je 0x1014e0
test ebx, ebx
je 0x101537
lea edx, [ebp - 0x38]
mov eax, 0x1017b8
call fcn.00031d88
lea eax, [ebp - 0x38]
push eax
lea edx, [ebp - 0x3c]
mov eax, esi
call fcn.0002d1ec
mov edx, dword [ebp - 0x3c]
pop eax
call fcn.00013ed4
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x34]
mov eax, ebx
call fcn.0004c428
jmp 0x101537
call sub.kernel32.dll_GetLastError_1
mov edi, eax
test ebx, ebx
je 0x101537
lea edx, [ebp - 0x44]
mov eax, 0x1017cc
call fcn.00031d88
lea eax, [ebp - 0x44]
push eax
mov eax, esi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x48]
call fcn.00033468
mov edx, dword [ebp - 0x48]
pop eax
call fcn.00013ed4
mov edx, dword [ebp - 0x44]
lea ecx, [ebp - 0x40]
mov eax, ebx
call fcn.0004ced0
lea edx, [ebp - 0x50]
mov eax, edi
call fcn.0002b100
mov edx, dword [ebp - 0x50]
lea ecx, [ebp - 0x4c]
mov eax, ebx
call fcn.0004ced0
cmp dword [ebp - 0x10], 0
je 0x1015b7
push 0
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 8]
push eax
push 1
push 1
push 0
push 0x2000000
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_DuplicateTokenEx
test eax, eax
jne 0x1015b7
call sub.kernel32.dll_GetLastError_1
mov edi, eax
test ebx, ebx
je 0x1015b7
lea edx, [ebp - 0x58]
mov eax, 0x1017d8
call fcn.00031d88
lea eax, [ebp - 0x58]
push eax
mov eax, esi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x5c]
call fcn.00033468
mov edx, dword [ebp - 0x5c]
pop eax
call fcn.00013ed4
mov edx, dword [ebp - 0x58]
lea ecx, [ebp - 0x54]
mov eax, ebx
call fcn.0004ced0
lea edx, [ebp - 0x64]
mov eax, edi
call fcn.0002b100
mov edx, dword [ebp - 0x64]
lea ecx, [ebp - 0x60]
mov eax, ebx
call fcn.0004ced0
cmp dword [ebp - 8], 0
je 0x101759
push 0
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0x1c]
push eax
push 0x1017e4
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
test eax, eax
je 0x1016e7
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x14], 2
mov edi, 0x10
xor eax, eax
mov dword [ebp - 0xc], eax
push 0
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x30]
push eax
push edi
lea eax, [ebp - 0x20]
push eax
push 0
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
test eax, eax
je 0x10167b
call sub.kernel32.dll_GetLastError_1
mov edi, eax
test ebx, ebx
je 0x101759
lea edx, [ebp - 0x6c]
mov eax, 0x1017f8
call fcn.00031d88
lea eax, [ebp - 0x6c]
push eax
mov eax, esi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x70]
call fcn.00033468
mov edx, dword [ebp - 0x70]
pop eax
call fcn.00013ed4
mov edx, dword [ebp - 0x6c]
lea ecx, [ebp - 0x68]
mov eax, ebx
call fcn.0004c428
lea edx, [ebp - 0x78]
mov eax, edi
call fcn.0002b100
mov edx, dword [ebp - 0x78]
lea ecx, [ebp - 0x74]
mov eax, ebx
call fcn.0004c428
jmp 0x101759
call sub.kernel32.dll_GetLastError_1
mov edi, eax
test ebx, ebx
je 0x101759
lea edx, [ebp - 0x80]
mov eax, 0x101804
call fcn.00031d88
lea eax, [ebp - 0x80]
push eax
mov eax, esi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x84]
call fcn.00033468
mov edx, dword [ebp - 0x84]
pop eax
call fcn.00013ed4
mov edx, dword [ebp - 0x80]
lea ecx, [ebp - 0x7c]
mov eax, ebx
call fcn.0004ced0
lea edx, [ebp - 0x8c]
mov eax, edi
call fcn.0002b100
mov edx, dword [ebp - 0x8c]
lea ecx, [ebp - 0x88]
mov eax, ebx
call fcn.0004ced0
jmp 0x101759
call sub.kernel32.dll_GetLastError_1
mov edi, eax
test ebx, ebx
je 0x101759
lea edx, [ebp - 0x94]
mov eax, 0x101810
call fcn.00031d88
lea eax, [ebp - 0x94]
push eax
mov eax, esi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x98]
call fcn.00033468
mov edx, dword [ebp - 0x98]
pop eax
call fcn.00013ed4
mov edx, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov eax, ebx
call fcn.0004ced0
lea edx, [ebp - 0xa0]
mov eax, edi
call fcn.0002b100
mov edx, dword [ebp - 0xa0]
lea ecx, [ebp - 0x9c]
mov eax, ebx
call fcn.0004ced0
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x101788
cmp dword [ebp - 0x10], 0
je 0x10177b
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
mov dword [ebp - 0x10], eax
ret