Function at 0x405791
Capabilities:
Compare security identifiers
Get common file path
Get startup folder

Disassembly:
push 0x228
mov eax, 0x4081d6
call fcn.0040785d
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x224], ebx
mov dword [ebp - 4], ebx
push 2
call dword [sym.imp.ADVAPI32.dll_ImpersonateSelf]
test eax, eax
je 0x4057fb
lea eax, [ebp - 0x224]
push eax
call fcn.004059fd
test al, al
jne 0x4057f1
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x224], ebx
je 0x4059f3
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
jmp 0x4059ed
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
je 0x4057d0
mov dword [ebp - 0x228], ebx
mov byte [ebp - 4], 1
mov dword [ebp - 0x22c], ebx
mov byte [ebp - 4], 2
cmp dword [ebp - 0x228], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
mov byte [ebp - 0x220], bl
mov byte [ebp - 0x21f], bl
mov byte [ebp - 0x21e], bl
mov byte [ebp - 0x21d], bl
mov byte [ebp - 0x21c], bl
mov byte [ebp - 0x21b], 5
je 0x405850
push dword [ebp - 0x228]
call esi
mov dword [ebp - 0x228], ebx
mov edi, dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
lea eax, [ebp - 0x228]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x13
push 1
lea eax, [ebp - 0x220]
push eax
call edi
test eax, eax
je 0x405896
push dword [ebp - 0x228]
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x405896
mov edi, dword [ebp - 0x234]
mov byte [edi + 0x30], bl
jmp 0x4058f5
cmp dword [ebp - 0x22c], ebx
je 0x4058ac
push dword [ebp - 0x22c]
call esi
mov dword [ebp - 0x22c], ebx
lea eax, [ebp - 0x22c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea eax, [ebp - 0x220]
push eax
call edi
test eax, eax
je 0x4059a6
push dword [ebp - 0x22c]
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x4059a6
mov eax, dword [ebp - 0x234]
mov byte [eax + 0x30], 1
mov edi, eax
lea eax, [ebp - 0x218]
push eax
mov al, byte [edi + 0x30]
neg al
push ebx
push ebx
mov byte [ebp - 0x22d], bl
sbb eax, eax
and eax, 7
add eax, 0x1c
or eax, 0x8000
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x405951
lea eax, [ebp - 0x218]
add edi, 0x34
push eax
mov ecx, edi
call dword [sym.imp.GrooveUtil.DLL_public:_void___thiscall_GCStr::Set_wchar_t_const__]
lea eax, [ebp - 0x218]
push eax
push str._sMicrosoftOfficeGrooveAudit_
push edi
call dword [sym.imp.GrooveUtil.DLL_public:_long_int___cdecl_GCStr::Format_wchar_t_const__]
add esp, 0xc
mov byte [ebp - 0x22d], 1
mov byte [ebp - 4], 1
cmp dword [ebp - 0x22c], ebx
je 0x40596b
push dword [ebp - 0x22c]
call esi
mov dword [ebp - 0x22c], ebx
mov byte [ebp - 4], bl
cmp dword [ebp - 0x228], ebx
je 0x405984
push dword [ebp - 0x228]
call esi
mov dword [ebp - 0x228], ebx
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x224], ebx
je 0x40599e
push dword [ebp - 0x224]
call esi
mov dword [ebp - 0x224], ebx
mov al, byte [ebp - 0x22d]
jmp 0x4059f5
mov byte [ebp - 4], 1
cmp dword [ebp - 0x22c], ebx
je 0x4059c0
push dword [ebp - 0x22c]
call esi
mov dword [ebp - 0x22c], ebx
mov byte [ebp - 4], bl
cmp dword [ebp - 0x228], ebx
je 0x4059d9
push dword [ebp - 0x228]
call esi
mov dword [ebp - 0x228], ebx
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x224], ebx
je 0x4059f3
push dword [ebp - 0x224]
call esi
mov dword [ebp - 0x224], ebx
xor al, al
call fcn.004078e0
ret 4