Function at 0x1801b78d
Capabilities:
Get session information
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x181c700c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, ecx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x30], eax
mov byte [eax], bl
mov dword [ebp - 0xc], ebx
call fcn.1800703b
push eax
lea ecx, [ebp - 0xc]
call fcn.1800774f
mov dword [ebp - 8], ebx
call fcn.1800703b
push eax
lea ecx, [ebp - 8]
call fcn.1800774f
lea edx, [ebp - 0xc]
lea ecx, [ebp - 8]
call fcn.18019d46
mov esi, dword [ebp - 0xc]
mov ebx, eax
mov edi, dword [ebp - 8]
test ebx, ebx
jns 0x1801b82e
movzx ecx, byte [0x181cd106]
neg ecx
sbb ecx, ecx
and ecx, 0x181cd000
je 0x1801b980
push 0xfffffffffffffffe
pop eax
lfence
push eax
push 7
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], 7
mov dword [ebp - 0x3c], eax
call fcn.18008bfd
push ebx
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x44]
push str._GetUserAccountAndDomainNames_failed__0x_08x_
push eax
call fcn.180072d0
add esp, 0xc
jmp 0x1801b980
lea eax, [ebp - 0x10]
xor ecx, ecx
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ecx
push eax
push 1
push ecx
push ecx
mov dword [ebp - 0x10], ecx
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x1801b858
call fcn.1801ba7c
mov ebx, eax
jmp 0x1801b980
mov ecx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x10], eax
jbe 0x1801b977
mov dword [ebp - 8], eax
mov ecx, dword [eax + ecx]
call fcn.18019147
test al, al
je 0x1801b940
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
xor edx, edx
push eax
mov eax, dword [ebp - 0x1c]
push 7
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x14], edx
push dword [ecx + eax]
push edx
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
jne 0x1801b8b1
call fcn.1801ba7c
mov ebx, eax
jmp 0x1801b940
mov eax, dword [ebp - 0x24]
xor edx, edx
mov ecx, dword [ebp - 8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], edx
push eax
mov eax, dword [ebp - 0x1c]
push 5
mov dword [ebp - 0x18], edx
push dword [ecx + eax]
push edx
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
jne 0x1801b8e6
call fcn.1801ba7c
mov ebx, eax
jmp 0x1801b937
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
test ecx, ecx
je 0x1801b92b
xor edx, edx
cmp word [ecx], dx
je 0x1801b92b
test eax, eax
je 0x1801b92b
cmp word [eax], dx
je 0x1801b92b
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1801b926
cmp dword [ebp - 0x20], eax
je 0x1801b9a1
push dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1801b95d
push dword [ebp - 0x2c]
jmp 0x1801b931
mov ebx, 0x80004005
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
push dword [ebp - 0xc]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 8]
inc ecx
add eax, 0xc
mov dword [ebp - 0x28], ecx
mov dword [ebp - 8], eax
cmp ecx, dword [ebp - 0x10]
jae 0x1801b977
mov ecx, dword [ebp - 0x1c]
jmp 0x1801b86f
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x2c]
mov byte [eax], 1
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
push dword [ebp - 0xc]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
xor ebx, ebx
push dword [ebp - 0x34]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
lea ecx, [edi - 0x10]
call fcn.18007012
lea ecx, [esi - 0x10]
call fcn.18007012
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.181188e8
leave
ret
push 0x80004005
call fcn.18006c85
int3