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

Disassembly:
push ebp
lea ebp, [esp - 0x2268]
mov eax, 0x2268
call fcn.004305b0
push 0xffffffffffffffff
push 0x439bc8
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x446074]
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 [0x449548], 1
push 7
mov dword [ebp - 0x1c], eax
pop ebx
jne 0x409d7c
or dword [0x449548], 1
push 0x43ae2d
mov dword [0x449544], ebx
mov dword [0x449540], edi
mov word [0x449530], di
call fcn.0041c04b
pop ecx
cmp dword [0x449540], edi
jne 0x409f4b
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 0x409f4b
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 0x409f31
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x409f31
lea esi, [ebp + 0x38]
call fcn.004092fa
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 0x409f31
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x409f31
lea esi, [ebp + 0x1c]
call fcn.004092fa
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.0040ad22
lea ecx, [ebp + 0x38]
push ecx
push eax
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 4], 3
call fcn.004098ff
add esp, 0x14
push 0xffffffffffffffff
lea ecx, [ebp]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 4
call fcn.00409274
push edi
inc ebx
push ebx
lea esi, [ebp - 0x48]
call fcn.00409471
push edi
push ebx
lea esi, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.00409471
push 0x2002
lea eax, [ebp + 0x56]
push edi
push eax
mov word [ebp + 0x54], di
call fcn.0041be10
push 0x20a
lea eax, [ebp + 0x205a]
push edi
push eax
mov word [ebp + 0x2058], di
call fcn.0041be10
mov eax, dword [ebp + 4]
add esp, 0x18
cmp dword [ebp + 0x18], 8
mov dword [ebp - 0x18], 0x1000
mov dword [ebp - 0x24], 0x105
jae 0x409ed2
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 0x409f19
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, 0x44952c
call fcn.004092fa
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
push ebx
lea esi, [ebp]
call fcn.00409471
push edi
push ebx
lea esi, [ebp + 0x1c]
call fcn.00409471
push edi
push ebx
jmp 0x409f3f
push edi
push 1
lea esi, [ebp + 0x1c]
call fcn.00409471
push edi
push 1
or dword [ebp - 4], 0xffffffff
lea esi, [ebp + 0x38]
call fcn.00409471
mov esi, dword [ebp - 0x1c]
mov eax, 0x44952c
call fcn.004090fc
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.0041bf18
add ebp, 0x2268
leave
ret