Function at 0x40a0ce
Capabilities:
Get session information
Get session user name
Get user security identifier

Disassembly:
push ebp
lea ebp, [esp - 0x2268]
mov eax, 0x2268
call fcn.00433ba0
push 0xffffffffffffffff
push 0x43d458
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x44b074]
xor eax, ebp
mov dword [ebp + 0x2264], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x2270]
xor edi, edi
mov dword [ebp - 0x18], edi
test byte [0x44e5b0], 1
push 7
mov dword [ebp - 0x1c], eax
pop ebx
jne 0x40a14a
or dword [0x44e5b0], 1
push 0x43e7bd
mov dword [0x44e5ac], ebx
mov dword [0x44e5a8], edi
mov word [0x44e598], di
call fcn.0041f14b
pop ecx
cmp dword [0x44e5a8], edi
jne 0x40a319
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [ebp - 0x14]
push ecx
push eax
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x40a319
mov dword [ebp - 0x10], edi
mov dword [ebp + 0x50], ebx
mov dword [ebp + 0x4c], edi
mov word [ebp + 0x3c], di
mov dword [ebp - 4], edi
mov dword [ebp + 0x34], ebx
mov dword [ebp + 0x30], edi
mov word [ebp + 0x20], di
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x10]
push eax
push 5
mov byte [ebp - 4], 1
push dword [ebp - 0x14]
push edi
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
cmp eax, edi
je 0x40a2ff
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x40a2ff
lea esi, [ebp + 0x38]
call fcn.004096a6
push dword [ebp - 0x10]
call sub.WTSAPI32.dll_WTSFreeMemory
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push dword [ebp - 0x14]
mov dword [ebp - 0x10], edi
push edi
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
cmp eax, edi
je 0x40a2ff
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x40a2ff
lea esi, [ebp + 0x1c]
call fcn.004096a6
push dword [ebp - 0x10]
call sub.WTSAPI32.dll_WTSFreeMemory
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x14], edi
mov word [ebp + 4], di
mov eax, esi
push eax
lea eax, [ebp - 0x64]
push eax
mov byte [ebp - 4], 2
call fcn.0040b100
lea ecx, [ebp + 0x38]
push ecx
push eax
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 4], 3
call fcn.00409cd1
add esp, 0x14
push 0xffffffffffffffff
lea ecx, [ebp]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 4
call fcn.00409620
push edi
inc ebx
push ebx
lea esi, [ebp - 0x48]
call fcn.00409826
push edi
push ebx
lea esi, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.00409826
push 0x2002
lea eax, [ebp + 0x56]
push edi
push eax
mov word [ebp + 0x54], di
call fcn.0041ef10
push 0x20a
lea eax, [ebp + 0x205a]
push edi
push eax
mov word [ebp + 0x2058], di
call fcn.0041ef10
mov eax, dword [ebp + 4]
add esp, 0x18
cmp dword [ebp + 0x18], 8
mov dword [ebp - 0x18], 0x1000
mov dword [ebp - 0x24], 0x105
jae 0x40a2a0
lea eax, [ebp + 4]
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp + 0x2058]
push ecx
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp + 0x54]
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, edi
je 0x40a2e7
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 0x54]
push eax
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov eax, dword [ebp - 0x20]
mov esi, 0x44e594
call fcn.004096a6
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
push ebx
lea esi, [ebp]
call fcn.00409826
push edi
push ebx
lea esi, [ebp + 0x1c]
call fcn.00409826
push edi
push ebx
jmp 0x40a30d
push edi
push 1
lea esi, [ebp + 0x1c]
call fcn.00409826
push edi
push 1
or dword [ebp - 4], 0xffffffff
lea esi, [ebp + 0x38]
call fcn.00409826
mov esi, dword [ebp - 0x1c]
mov eax, 0x44e594
call fcn.0040949e
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2264]
xor ecx, ebp
call fcn.0041f018
add ebp, 0x2268
leave
ret