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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x181d400c]
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.18019d04
mov esi, dword [ebp - 0xc]
mov ebx, eax
mov edi, dword [ebp - 8]
test ebx, ebx
jns 0x1801b7ee
movzx ecx, byte [0x181da05a]
neg ecx
sbb ecx, ecx
and ecx, 0x181d9f50
je 0x1801b940
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 0x1801b940
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 0x1801b818
call fcn.1801baa5
mov ebx, eax
jmp 0x1801b940
mov ecx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x10], eax
jbe 0x1801b937
mov dword [ebp - 8], eax
mov ecx, dword [eax + ecx]
call fcn.18019105
test al, al
je 0x1801b900
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 0x1801b871
call fcn.1801baa5
mov ebx, eax
jmp 0x1801b900
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 0x1801b8a6
call fcn.1801baa5
mov ebx, eax
jmp 0x1801b8f7
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
test ecx, ecx
je 0x1801b8eb
xor edx, edx
cmp word [ecx], dx
je 0x1801b8eb
test eax, eax
je 0x1801b8eb
cmp word [eax], dx
je 0x1801b8eb
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1801b8e6
cmp dword [ebp - 0x20], eax
je 0x1801b961
push dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1801b91d
push dword [ebp - 0x2c]
jmp 0x1801b8f1
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 0x1801b937
mov ecx, dword [ebp - 0x1c]
jmp 0x1801b82f
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.1811e228
leave
ret
push 0x80004005
call fcn.18006bc5
int3