Function at 0x405a13
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x4ef340]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 8]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
cmp dword [edi], ebx
jne 0x405bd1
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push str._advapi32.dll
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.004493cf
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [edi], eax
test eax, eax
jne 0x405a8b
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x405c6d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetEntriesInAclA
push eax
call esi
push str.GetFileSecurityA
push dword [edi]
mov dword [edi + 0x20], eax
call esi
push str.SetFileSecurityA
push dword [edi]
mov dword [edi + 0x24], eax
call esi
push str.LookupAccountSidA
push dword [edi]
mov dword [edi + 0x40], eax
call esi
push str.GetExplicitEntriesFromAclA
push dword [edi]
mov dword [edi + 0x6c], eax
call esi
push 0x4b44ec
push dword [edi]
mov dword [edi + 0x84], eax
call esi
push 0x4b4500
push dword [edi]
mov dword [edi + 0x28], eax
call esi
push 0x4b4514
push dword [edi]
mov dword [edi + 0x2c], eax
call esi
push 0x4b4534
push dword [edi]
mov dword [edi + 0x30], eax
call esi
push str.GetSecurityDescriptorDacl
push dword [edi]
mov dword [edi + 0x34], eax
call esi
push 0x4b456c
push dword [edi]
mov dword [edi + 0x38], eax
call esi
push 0x4b4588
push dword [edi]
mov dword [edi + 0x3c], eax
call esi
push 0x4b4590
push dword [edi]
mov dword [edi + 0x44], eax
call esi
push 0x4b45a0
push dword [edi]
mov dword [edi + 0x64], eax
call esi
push 0x4b45b4
push dword [edi]
mov dword [edi + 0x68], eax
call esi
push str.InitializeSid
push dword [edi]
mov dword [edi + 0x48], eax
call esi
push str.GetSidSubAuthority
push dword [edi]
mov dword [edi + 0x4c], eax
call esi
push 0x4b45e8
push dword [edi]
mov dword [edi + 0x50], eax
call esi
push str.GetSecurityInfo
push dword [edi]
mov dword [edi + 0x54], eax
call esi
push str.SetSecurityInfo
push dword [edi]
mov dword [edi + 0x58], eax
call esi
mov dword [edi + 0x5c], eax
push str.QueryServiceStatusEx
push dword [edi]
call esi
push 0x4b4634
push dword [edi]
mov dword [edi + 0x60], eax
call esi
push str.DeleteAce
push dword [edi]
mov dword [edi + 0x70], eax
call esi
push 0x4b4648
push dword [edi]
mov dword [edi + 0x74], eax
call esi
push 0x4b4654
push dword [edi]
mov dword [edi + 0x78], eax
call esi
push str.SetSecurityDescriptorControl
push dword [edi]
mov dword [edi + 0x7c], eax
call esi
mov dword [edi + 0x80], eax
lea esi, [edi + 8]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [edi + 0x20], ebx
je 0x405c6b
cmp dword [edi + 0x24], ebx
je 0x405c6b
cmp dword [edi + 0x28], ebx
je 0x405c6b
cmp dword [edi + 0x2c], ebx
je 0x405c6b
cmp dword [edi + 0x30], ebx
je 0x405c6b
cmp dword [edi + 0x34], ebx
je 0x405c6b
cmp dword [edi + 0x38], ebx
je 0x405c6b
cmp dword [edi + 0x3c], ebx
je 0x405c6b
cmp dword [edi + 0x40], ebx
je 0x405c6b
cmp dword [edi + 0x44], ebx
je 0x405c6b
cmp dword [edi + 0x48], ebx
je 0x405c6b
cmp dword [edi + 0x4c], ebx
je 0x405c6b
cmp dword [edi + 0x50], ebx
je 0x405c6b
cmp dword [edi + 0x54], ebx
je 0x405c6b
cmp dword [edi + 0x58], ebx
je 0x405c6b
cmp dword [edi + 0x5c], ebx
je 0x405c6b
cmp dword [edi + 0x60], ebx
je 0x405c6b
cmp dword [edi + 0x64], ebx
je 0x405c6b
cmp dword [edi + 0x68], ebx
je 0x405c6b
cmp dword [edi + 0x6c], ebx
je 0x405c6b
cmp dword [edi + 0x7c], ebx
je 0x405c6b
cmp dword [edi + 0x70], ebx
je 0x405c6b
cmp dword [edi + 0x74], ebx
je 0x405c6b
cmp dword [edi + 0x78], ebx
je 0x405c6b
cmp dword [edi + 0x80], ebx
je 0x405c6b
cmp dword [edi + 0x84], ebx
je 0x405c6b
xor ebx, ebx
inc ebx
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043cfdf
mov esp, ebp
pop ebp
ret