Function at 0x18018d60
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x181d100c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor esi, esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 8]
push ecx
push 0x28
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x18018dd6
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], esi
push eax
push str.SeDebugPrivilege
push esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x18018dd6
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
push esi
push esi
push esi
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
push esi
push dword [ebp - 8]
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x18018ddd
call fcn.1801b8b5
mov esi, eax
cmp dword [ebp - 8], 0
je 0x18018dec
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.1811c608
leave
ret

Function at 0x18018f13
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x181d100c]
xor eax, ebp
mov dword [ebp - 4], eax
cmp ecx, 0xffffffff
je 0x18018f5b
lea eax, [ebp - 8]
xor edx, edx
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], edx
push eax
push 8
push ecx
push edx
mov dword [ebp - 8], edx
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x18018f5b
mov eax, dword [ebp - 0xc]
push esi
push eax
mov esi, dword [eax]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
test esi, esi
pop esi
sete al
jmp 0x18018f5d
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1811c608
leave
ret

Function at 0x18018f69
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x181d100c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [0x181d80ac]
mov eax, dword [0x181d80a8]
push esi
push edi
test edx, edx
jne 0x1801901f
test eax, eax
jne 0x1801901f
xor esi, esi
cmp ecx, 0xffffffff
je 0x1801901b
lea eax, [ebp - 8]
mov dword [ebp - 0xc], esi
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 8], esi
push eax
push 0x18
push ecx
push esi
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x18018fd7
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x18018fd7
mov esi, dword [eax + 0xc8]
mov edi, dword [eax + 0xcc]
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov edx, edi
jmp 0x1801901d
movzx ecx, byte [0x181d705a]
neg ecx
sbb ecx, ecx
and ecx, 0x181d6f50
je 0x1801901b
push 7
pop edx
push 0xfffffffffffffffe
pop eax
push eax
push edx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
call fcn.18008b3f
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1c]
push str._GetLogonTime_WTSQuerySessionInformation_failed__0x_x_
push eax
call fcn.18007210
add esp, 0xc
mov edx, esi
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.1811c608
leave
ret