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

Disassembly:
push ebp
lea ebp, [esp - 0x2268]
mov eax, 0x2268
call fcn.00440c80
push 0xffffffffffffffff
push 0x452638
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x464074]
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 [0x46780c], 1
push 7
mov dword [ebp - 0x1c], eax
pop ebx
jne 0x40a8b7
or dword [0x46780c], 1
push 0x453e9d
mov dword [0x467808], ebx
mov dword [0x467804], edi
mov word [0x4677f4], di
call fcn.0042bd1f
pop ecx
cmp dword [0x467804], edi
jne 0x40aa8b
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 0x40aa8b
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 0x40aa71
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x40aa71
lea esi, [ebp + 0x38]
call fcn.00409f86
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 0x40aa71
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x40aa71
lea esi, [ebp + 0x1c]
call fcn.00409f86
push dword [ebp - 0x10]
call sub.WTSAPI32.dll_WTSFreeMemory
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x14], edi
mov word [ebp + 4], di
push 0x456bd0
mov eax, esi
push eax
lea eax, [ebp - 0x64]
push eax
mov byte [ebp - 4], 2
call fcn.0040b168
lea ecx, [ebp + 0x38]
push ecx
push eax
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 4], 3
call fcn.0040a594
add esp, 0x18
push 0xffffffffffffffff
lea ecx, [ebp]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 4
call fcn.00409f00
push edi
inc ebx
push ebx
lea esi, [ebp - 0x48]
call fcn.0040a106
push edi
push ebx
lea esi, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.0040a106
push 0x2002
lea eax, [ebp + 0x56]
push edi
push eax
mov word [ebp + 0x54], di
call fcn.0042b930
push 0x20a
lea eax, [ebp + 0x205a]
push edi
push eax
mov word [ebp + 0x2058], di
call fcn.0042b930
mov eax, dword [ebp + 4]
add esp, 0x18
cmp dword [ebp + 0x18], 8
mov dword [ebp - 0x18], 0x1000
mov dword [ebp - 0x24], 0x105
jae 0x40aa12
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 0x40aa59
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, 0x4677f0
call fcn.00409f86
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
push ebx
lea esi, [ebp]
call fcn.0040a106
push edi
push ebx
lea esi, [ebp + 0x1c]
call fcn.0040a106
push edi
push ebx
jmp 0x40aa7f
push edi
push 1
lea esi, [ebp + 0x1c]
call fcn.0040a106
push edi
push 1
or dword [ebp - 4], 0xffffffff
lea esi, [ebp + 0x38]
call fcn.0040a106
mov esi, dword [ebp - 0x1c]
mov eax, 0x4677f0
call fcn.00409d67
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.0042ba38
add ebp, 0x2268
leave
ret