Function at 0x18018f60
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x181d700c]
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 0x18018fd6
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 0x18018fd6
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 0x18018fdd
call fcn.1801bab5
mov esi, eax
cmp dword [ebp - 8], 0
je 0x18018fec
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.18122478
leave
ret

Function at 0x18019116
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x181d700c]
xor eax, ebp
mov dword [ebp - 4], eax
cmp ecx, 0xffffffff
je 0x1801915e
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 0x1801915e
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 0x18019160
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.18122478
leave
ret

Function at 0x1801916c
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x181d700c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [0x181de0b0]
mov eax, dword [0x181de0ac]
push esi
push edi
test edx, edx
jne 0x18019222
test eax, eax
jne 0x18019222
xor esi, esi
cmp ecx, 0xffffffff
je 0x1801921e
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 0x180191da
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x180191da
mov esi, dword [eax + 0xc8]
mov edi, dword [eax + 0xcc]
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov edx, edi
jmp 0x18019220
movzx ecx, byte [0x181dd05a]
neg ecx
sbb ecx, ecx
and ecx, 0x181dcf50
je 0x1801921e
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.18008b5d
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.18007230
add esp, 0xc
mov edx, esi
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.18122478
leave
ret