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

Disassembly:
push 0x228
mov eax, 0x4081e0
call fcn.0040782d
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 0x4057bf
lea eax, [ebp - 0x224]
push eax
call fcn.004059c1
test al, al
jne 0x4057b5
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x224], ebx
je 0x4059b7
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
jmp 0x4059b1
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
je 0x405794
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 0x405814
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 0x40585a
push dword [ebp - 0x228]
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x40585a
mov edi, dword [ebp - 0x234]
mov byte [edi + 0x30], bl
jmp 0x4058b9
cmp dword [ebp - 0x22c], ebx
je 0x405870
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 0x40596a
push dword [ebp - 0x22c]
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x40596a
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 0x405915
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 0x40592f
push dword [ebp - 0x22c]
call esi
mov dword [ebp - 0x22c], ebx
mov byte [ebp - 4], bl
cmp dword [ebp - 0x228], ebx
je 0x405948
push dword [ebp - 0x228]
call esi
mov dword [ebp - 0x228], ebx
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x224], ebx
je 0x405962
push dword [ebp - 0x224]
call esi
mov dword [ebp - 0x224], ebx
mov al, byte [ebp - 0x22d]
jmp 0x4059b9
mov byte [ebp - 4], 1
cmp dword [ebp - 0x22c], ebx
je 0x405984
push dword [ebp - 0x22c]
call esi
mov dword [ebp - 0x22c], ebx
mov byte [ebp - 4], bl
cmp dword [ebp - 0x228], ebx
je 0x40599d
push dword [ebp - 0x228]
call esi
mov dword [ebp - 0x228], ebx
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x224], ebx
je 0x4059b7
push dword [ebp - 0x224]
call esi
mov dword [ebp - 0x224], ebx
xor al, al
call fcn.004078b0
ret 4