Function at 0x4125c0
Capabilities:
Get session user name
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
mov eax, dword [0x4a00a0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov dword [ebp - 0x238], 0
mov edi, ecx
mov ecx, dword [eax]
mov ebx, edx
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x248], eax
mov dword [eax], 0
test ecx, ecx
je 0x412605
push ecx
call fcn.0040fb50
lea eax, [ebp - 0x238]
mov dword [ebp - 0x238], 0x101
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
cmp dword [edi + 0x14], 8
jb 0x41262d
mov eax, dword [edi]
jmp 0x41262f
mov eax, edi
mov esi, dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
lea ecx, [ebp - 0x220]
push ecx
push 0
lea ecx, [ebp - 0x230]
push ecx
push 0
push 0
push 4
push ebx
push eax
call esi
cmp eax, 5
jne 0x41268b
mov edx, ebx
mov ecx, edi
call fcn.00412430
test al, al
je 0x41288f
cmp dword [edi + 0x14], 8
jb 0x41266f
mov eax, dword [edi]
jmp 0x412671
mov eax, edi
lea ecx, [ebp - 0x220]
push ecx
push 0
lea ecx, [ebp - 0x230]
push ecx
push 0
push 0
push 4
push ebx
push eax
call esi
test eax, eax
jne 0x41288f
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x230]
call dword [sym.imp.ADVAPI32.dll_GetExplicitEntriesFromAclW]
test eax, eax
je 0x4126d0
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00466c90
mov esp, ebp
pop ebp
ret
xor ebx, ebx
cmp dword [ebp - 0x228], ebx
jbe 0x41272e
xor esi, esi
nop dword [eax]
mov eax, dword [ebp - 0x21c]
cmp dword [esi + eax + 4], 3
jne 0x412722
cmp dword [esi + eax + 0x14], 0
jne 0x412722
lea ecx, [ebp - 0x218]
push ecx
push dword [esi + eax + 0x1c]
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
je 0x412722
cmp dword [ebp - 0x218], 0
je 0x412722
mov ecx, dword [ebp - 0x21c]
mov eax, dword [ebp + 8]
not eax
and dword [ecx + esi], eax
inc ebx
add esi, 0x20
cmp ebx, dword [ebp - 0x228]
jb 0x4126e0
push 3
push 1
push dword [ebp + 8]
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
mov esi, dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
lea eax, [ebp - 0x234]
push eax
push 0
lea eax, [ebp - 0x268]
push eax
push 1
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
jne 0x41287f
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0x234]
push dword [ebp - 0x21c]
push dword [ebp - 0x228]
call esi
push dword [ebp - 0x234]
mov esi, eax
call ebx
test esi, esi
jne 0x41287f
mov edx, dword [edi + 0x14]
cmp edx, 8
jb 0x4127aa
mov ecx, dword [edi]
jmp 0x4127ac
mov ecx, edi
mov eax, dword [edi + 0x10]
lea eax, [ecx + eax*2]
cmp edx, 8
jb 0x4127bb
mov ecx, dword [edi]
jmp 0x4127bd
mov ecx, edi
mov byte [ebp - 0x218], 0
push dword [ebp - 0x218]
mov dword [ebp - 0x244], 0
push eax
push ecx
lea ecx, [ebp - 0x244]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
call fcn.00413090
mov esi, dword [ebp - 0x244]
push 0
push dword [ebp - 0x22c]
push 0
push 0
push 4
push dword [ebp - 0x224]
push esi
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov dword [ebp - 0x218], eax
cmp eax, 5
jne 0x412853
mov edx, dword [ebp - 0x224]
mov ecx, edi
call fcn.00412430
test al, al
je 0x412853
push 0
push dword [ebp - 0x22c]
push 0
push 0
push 4
push dword [ebp - 0x224]
push esi
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov dword [ebp - 0x218], eax
push dword [ebp - 0x22c]
call ebx
cmp dword [ebp - 0x218], 0
je 0x4128a2
test esi, esi
je 0x41287f
mov eax, dword [ebp - 0x23c]
lea ecx, [ebp - 0x244]
sub eax, esi
sar eax, 1
push eax
push esi
call fcn.004055d0
push dword [ebp - 0x21c]
call ebx
push dword [ebp - 0x220]
call ebx
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00466c90
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x21c]
call ebx
cmp dword [ebp + 0xc], 0
je 0x4128ba
push dword [ebp - 0x220]
call ebx
jmp 0x41291e
push 0x24
call fcn.00466a4b
mov ebx, dword [ebp - 0x248]
xor ecx, ecx
add esp, 4
mov dword [eax + 0x14], 7
mov dword [eax + 0x10], 0
mov word [eax], cx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
mov ecx, dword [ebx]
mov dword [ebx], eax
test ecx, ecx
je 0x4128f1
push ecx
call fcn.0040fb50
mov ecx, dword [ebx]
push 0xffffffffffffffff
push 0
push edi
call fcn.004047b0
mov ecx, dword [ebx]
mov eax, dword [ebp - 0x230]
mov dword [ecx + 0x1c], eax
mov ecx, dword [ebx]
mov eax, dword [ebp - 0x220]
mov dword [ecx + 0x20], eax
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x224]
mov dword [eax + 0x18], ecx
test esi, esi
je 0x412939
mov eax, dword [ebp - 0x23c]
lea ecx, [ebp - 0x244]
sub eax, esi
sar eax, 1
push eax
push esi
call fcn.004055d0
mov ecx, dword [ebp - 8]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00466c90
mov esp, ebp
pop ebp
ret