Function at 0x4057a1
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 0x4059df
push esi
mov esi, 0x42b110
mov ecx, 0x200
mov eax, esi
mov byte [eax], bl
inc eax
dec ecx
jne 0x4057e8
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 0x405839
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 0x405839
push dword [ebp - 8]
push dword [ebp - 0x24]
push esi
call fcn.00413290
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 0x40590b
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push ebx
call esi
test eax, eax
je 0x405906
cmp dword [ebp - 4], ebx
je 0x405906
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x28
push dword [ebp - 0xc]
call edi
cmp dword [ebp - 0x10], ebx
je 0x405935
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x10]
push ebx
call esi
test eax, eax
je 0x405930
cmp dword [ebp - 4], ebx
je 0x405930
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x1e
push dword [ebp - 0x10]
call edi
cmp dword [ebp - 0x14], ebx
je 0x40595f
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
push ebx
call esi
test eax, eax
je 0x40595a
cmp dword [ebp - 4], ebx
je 0x40595a
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0xa
push dword [ebp - 0x14]
call edi
cmp dword [ebp - 0x18], ebx
je 0x405989
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
push ebx
call esi
test eax, eax
je 0x405984
cmp dword [ebp - 4], ebx
je 0x405984
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x32
push dword [ebp - 0x18]
call edi
cmp dword [ebp - 0x1c], ebx
je 0x4059b3
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
push ebx
call esi
test eax, eax
je 0x4059ae
cmp dword [ebp - 4], ebx
je 0x4059ae
mov eax, dword [ebp + 8]
mov dword [eax + 0x5960], 0x34
push dword [ebp - 0x1c]
call edi
cmp dword [ebp - 0x20], ebx
je 0x4059dd
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x20]
push ebx
call esi
test eax, eax
je 0x4059d8
cmp dword [ebp - 4], ebx
je 0x4059d8
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