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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x181d100c]
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.18006f7b
push eax
lea ecx, [ebp - 0xc]
call fcn.1800768f
mov dword [ebp - 8], ebx
call fcn.18006f7b
push eax
lea ecx, [ebp - 8]
call fcn.1800768f
lea edx, [ebp - 0xc]
lea ecx, [ebp - 8]
call fcn.18019b12
mov esi, dword [ebp - 0xc]
mov ebx, eax
mov edi, dword [ebp - 8]
test ebx, ebx
jns 0x1801b5fe
movzx ecx, byte [0x181d705a]
neg ecx
sbb ecx, ecx
and ecx, 0x181d6f50
je 0x1801b750
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.18008b3f
push ebx
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x44]
push str._GetUserAccountAndDomainNames_failed__0x_08x_
push eax
call fcn.18007210
add esp, 0xc
jmp 0x1801b750
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 0x1801b628
call fcn.1801b8b5
mov ebx, eax
jmp 0x1801b750
mov ecx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x10], eax
jbe 0x1801b747
mov dword [ebp - 8], eax
mov ecx, dword [eax + ecx]
call fcn.18018f13
test al, al
je 0x1801b710
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 0x1801b681
call fcn.1801b8b5
mov ebx, eax
jmp 0x1801b710
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 0x1801b6b6
call fcn.1801b8b5
mov ebx, eax
jmp 0x1801b707
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
test ecx, ecx
je 0x1801b6fb
xor edx, edx
cmp word [ecx], dx
je 0x1801b6fb
test eax, eax
je 0x1801b6fb
cmp word [eax], dx
je 0x1801b6fb
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1801b6f6
cmp dword [ebp - 0x20], eax
je 0x1801b771
push dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1801b72d
push dword [ebp - 0x2c]
jmp 0x1801b701
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 0x1801b747
mov ecx, dword [ebp - 0x1c]
jmp 0x1801b63f
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.18006f52
lea ecx, [esi - 0x10]
call fcn.18006f52
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1811c608
leave
ret
push 0x80004005
call fcn.18006bc5
int3