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

Disassembly:
push ebp
lea ebp, [esp - 0x2268]
mov eax, 0x2268
call fcn.00430b50
push 0xffffffffffffffff
push 0x43a188
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x447074]
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 [0x44a548], 1
push 7
mov dword [ebp - 0x1c], eax
pop ebx
jne 0x40a05f
or dword [0x44a548], 1
push 0x43b40d
mov dword [0x44a544], ebx
mov dword [0x44a540], edi
mov word [0x44a530], di
call fcn.0041c5eb
pop ecx
cmp dword [0x44a540], edi
jne 0x40a22e
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 0x40a22e
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 0x40a214
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x40a214
lea esi, [ebp + 0x38]
call fcn.004095cf
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 0x40a214
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x40a214
lea esi, [ebp + 0x1c]
call fcn.004095cf
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.0040b005
lea ecx, [ebp + 0x38]
push ecx
push eax
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 4], 3
call fcn.00409bd4
add esp, 0x14
push 0xffffffffffffffff
lea ecx, [ebp]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 4
call fcn.00409549
push edi
inc ebx
push ebx
lea esi, [ebp - 0x48]
call fcn.00409746
push edi
push ebx
lea esi, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.00409746
push 0x2002
lea eax, [ebp + 0x56]
push edi
push eax
mov word [ebp + 0x54], di
call fcn.0041c3b0
push 0x20a
lea eax, [ebp + 0x205a]
push edi
push eax
mov word [ebp + 0x2058], di
call fcn.0041c3b0
mov eax, dword [ebp + 4]
add esp, 0x18
cmp dword [ebp + 0x18], 8
mov dword [ebp - 0x18], 0x1000
mov dword [ebp - 0x24], 0x105
jae 0x40a1b5
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 0x40a1fc
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, 0x44a52c
call fcn.004095cf
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
push ebx
lea esi, [ebp]
call fcn.00409746
push edi
push ebx
lea esi, [ebp + 0x1c]
call fcn.00409746
push edi
push ebx
jmp 0x40a222
push edi
push 1
lea esi, [ebp + 0x1c]
call fcn.00409746
push edi
push 1
or dword [ebp - 4], 0xffffffff
lea esi, [ebp + 0x38]
call fcn.00409746
mov esi, dword [ebp - 0x1c]
mov eax, 0x44a52c
call fcn.004093d1
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.0041c4b8
add ebp, 0x2268
leave
ret