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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x4c143c]
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 0x415a8e
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.00465e4f
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [edi], eax
test eax, eax
jne 0x415948
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x415b2a
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 0x4951c0
push dword [edi]
mov dword [edi + 0x84], eax
call esi
push 0x4951d4
push dword [edi]
mov dword [edi + 0x28], eax
call esi
push str.InitializeSecurityDescriptor
push dword [edi]
mov dword [edi + 0x2c], eax
call esi
push str.SetSecurityDescriptorDacl
push dword [edi]
mov dword [edi + 0x30], eax
call esi
push str.GetSecurityDescriptorDacl
push dword [edi]
mov dword [edi + 0x34], eax
call esi
push 0x495240
push dword [edi]
mov dword [edi + 0x38], eax
call esi
push 0x49525c
push dword [edi]
mov dword [edi + 0x3c], eax
call esi
push str.OpenThreadToken
push dword [edi]
mov dword [edi + 0x44], eax
call esi
push 0x495274
push dword [edi]
mov dword [edi + 0x64], eax
call esi
push str.InitializeAcl
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 str.AddAccessAllowedAce
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 str.GetAce
push dword [edi]
mov dword [edi + 0x60], eax
call esi
push str.DeleteAce
push dword [edi]
mov dword [edi + 0x70], eax
call esi
push 0x49531c
push dword [edi]
mov dword [edi + 0x74], eax
call esi
push str.GetAclInformation
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 0x415b28
cmp dword [edi + 0x24], ebx
je 0x415b28
cmp dword [edi + 0x28], ebx
je 0x415b28
cmp dword [edi + 0x2c], ebx
je 0x415b28
cmp dword [edi + 0x30], ebx
je 0x415b28
cmp dword [edi + 0x34], ebx
je 0x415b28
cmp dword [edi + 0x38], ebx
je 0x415b28
cmp dword [edi + 0x3c], ebx
je 0x415b28
cmp dword [edi + 0x40], ebx
je 0x415b28
cmp dword [edi + 0x44], ebx
je 0x415b28
cmp dword [edi + 0x48], ebx
je 0x415b28
cmp dword [edi + 0x4c], ebx
je 0x415b28
cmp dword [edi + 0x50], ebx
je 0x415b28
cmp dword [edi + 0x54], ebx
je 0x415b28
cmp dword [edi + 0x58], ebx
je 0x415b28
cmp dword [edi + 0x5c], ebx
je 0x415b28
cmp dword [edi + 0x60], ebx
je 0x415b28
cmp dword [edi + 0x64], ebx
je 0x415b28
cmp dword [edi + 0x68], ebx
je 0x415b28
cmp dword [edi + 0x6c], ebx
je 0x415b28
cmp dword [edi + 0x7c], ebx
je 0x415b28
cmp dword [edi + 0x70], ebx
je 0x415b28
cmp dword [edi + 0x74], ebx
je 0x415b28
cmp dword [edi + 0x78], ebx
je 0x415b28
cmp dword [edi + 0x80], ebx
je 0x415b28
cmp dword [edi + 0x84], ebx
je 0x415b28
xor ebx, ebx
inc ebx
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00458eeb
leave
ret