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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x181c600c]
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.18019999
mov esi, dword [ebp - 0xc]
mov ebx, eax
mov edi, dword [ebp - 8]
test ebx, ebx
jns 0x1801b47e
movzx ecx, byte [0x181cc106]
neg ecx
sbb ecx, ecx
and ecx, 0x181cc000
je 0x1801b5d0
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 0x1801b5d0
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 0x1801b4a8
call fcn.1801b6cc
mov ebx, eax
jmp 0x1801b5d0
mov ecx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x10], eax
jbe 0x1801b5c7
mov dword [ebp - 8], eax
mov ecx, dword [eax + ecx]
call fcn.18018d9a
test al, al
je 0x1801b590
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 0x1801b501
call fcn.1801b6cc
mov ebx, eax
jmp 0x1801b590
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 0x1801b536
call fcn.1801b6cc
mov ebx, eax
jmp 0x1801b587
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
test ecx, ecx
je 0x1801b57b
xor edx, edx
cmp word [ecx], dx
je 0x1801b57b
test eax, eax
je 0x1801b57b
cmp word [eax], dx
je 0x1801b57b
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1801b576
cmp dword [ebp - 0x20], eax
je 0x1801b5f1
push dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1801b5ad
push dword [ebp - 0x2c]
jmp 0x1801b581
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 0x1801b5c7
mov ecx, dword [ebp - 0x1c]
jmp 0x1801b4bf
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.18117a58
leave
ret
push 0x80004005
call fcn.18006c85
int3