Function at 0x40ad8f
Capabilities:
Get session information
Get session user name
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov edx, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp dword [edx + 0x5960], 0xffffffff
mov dword [ebp - 0x24], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x2c], ebx
mov word [ebp - 0x28], 0x500
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
jne 0x40afcd
push esi
mov esi, 0x41e7a8
mov ecx, 0x200
mov eax, esi
mov byte [eax], bl
inc eax
dec ecx
jne 0x40add6
lea eax, [ebp - 8]
push eax
push esi
mov dword [edx + 0x5960], ebx
mov dword [ebp - 8], 0x100
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x40ae27
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x24]
push eax
push 5
push 0xffffffffffffffff
push ebx
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x40ae27
push dword [ebp - 8]
push dword [ebp - 0x24]
push esi
call fcn.00405fc0
add esp, 0xc
push dword [ebp - 0x24]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x2c]
push eax
call esi
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x223
push 0x20
push 2
lea eax, [ebp - 0x2c]
push eax
call esi
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x222
push 0x20
push 2
lea eax, [ebp - 0x2c]
push eax
call esi
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea eax, [ebp - 0x2c]
push eax
call esi
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x13
push 1
lea eax, [ebp - 0x2c]
push eax
call esi
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x14
pop edi
push edi
push 1
lea eax, [ebp - 0x2c]
push eax
call esi
mov eax, dword [ebp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov dword [eax + 0x5960], edi
mov edi, dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0xc], ebx
je 0x40aef9
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push ebx
call esi
test eax, eax
je 0x40aef4
cmp dword [ebp - 4], ebx
je 0x40aef4
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x28
push dword [ebp - 0xc]
call edi
cmp dword [ebp - 0x10], ebx
je 0x40af23
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x10]
push ebx
call esi
test eax, eax
je 0x40af1e
cmp dword [ebp - 4], ebx
je 0x40af1e
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x1e
push dword [ebp - 0x10]
call edi
cmp dword [ebp - 0x14], ebx
je 0x40af4d
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
push ebx
call esi
test eax, eax
je 0x40af48
cmp dword [ebp - 4], ebx
je 0x40af48
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0xa
push dword [ebp - 0x14]
call edi
cmp dword [ebp - 0x18], ebx
je 0x40af77
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
push ebx
call esi
test eax, eax
je 0x40af72
cmp dword [ebp - 4], ebx
je 0x40af72
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x32
push dword [ebp - 0x18]
call edi
cmp dword [ebp - 0x1c], ebx
je 0x40afa1
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
push ebx
call esi
test eax, eax
je 0x40af9c
cmp dword [ebp - 4], ebx
je 0x40af9c
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x34
push dword [ebp - 0x1c]
call edi
cmp dword [ebp - 0x20], ebx
je 0x40afcb
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x20]
push ebx
call esi
test eax, eax
je 0x40afc6
cmp dword [ebp - 4], ebx
je 0x40afc6
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x36
push dword [ebp - 0x20]
call edi
pop edi
pop esi
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x5960]
pop ebx
leave
ret 4