Function at 0x404a20
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 byte [ebp - 0x2c], bl
mov byte [ebp - 0x2b], bl
mov byte [ebp - 0x2a], bl
mov byte [ebp - 0x29], bl
mov byte [ebp - 0x28], bl
mov byte [ebp - 0x27], 5
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 0x404c66
push esi
mov esi, 0x41fa70
mov ecx, 0x200
mov eax, esi
mov byte [eax], bl
inc eax
dec ecx
jne 0x404a71
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 0x404ac0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x24]
push eax
push 5
push 0xffffffffffffffff
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x404ac0
push dword [ebp - 8]
push dword [ebp - 0x24]
push esi
call fcn.0040af00
add esp, 0xc
push dword [ebp - 0x24]
call sub.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 0x404b92
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push ebx
call esi
test eax, eax
je 0x404b8d
cmp dword [ebp - 4], ebx
je 0x404b8d
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x28
push dword [ebp - 0xc]
call edi
cmp dword [ebp - 0x10], ebx
je 0x404bbc
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x10]
push ebx
call esi
test eax, eax
je 0x404bb7
cmp dword [ebp - 4], ebx
je 0x404bb7
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x1e
push dword [ebp - 0x10]
call edi
cmp dword [ebp - 0x14], ebx
je 0x404be6
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
push ebx
call esi
test eax, eax
je 0x404be1
cmp dword [ebp - 4], ebx
je 0x404be1
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0xa
push dword [ebp - 0x14]
call edi
cmp dword [ebp - 0x18], ebx
je 0x404c10
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
push ebx
call esi
test eax, eax
je 0x404c0b
cmp dword [ebp - 4], ebx
je 0x404c0b
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x32
push dword [ebp - 0x18]
call edi
cmp dword [ebp - 0x1c], ebx
je 0x404c3a
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
push ebx
call esi
test eax, eax
je 0x404c35
cmp dword [ebp - 4], ebx
je 0x404c35
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x34
push dword [ebp - 0x1c]
call edi
cmp dword [ebp - 0x20], ebx
je 0x404c64
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x20]
push ebx
call esi
test eax, eax
je 0x404c5f
cmp dword [ebp - 4], ebx
je 0x404c5f
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