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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x527064]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
lea ebx, [edi + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi], 0
jne 0x4042f6
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str._advapi32.dll
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004a29f7
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi], eax
test eax, eax
jne 0x4041b1
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004908ad
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4f7f28
push eax
call esi
push str.GetFileSecurityW
push dword [edi]
mov dword [edi + 0x20], eax
call esi
push str.SetFileSecurityW
push dword [edi]
mov dword [edi + 0x24], eax
call esi
push str.LookupAccountSidW
push dword [edi]
mov dword [edi + 0x40], eax
call esi
push str.GetExplicitEntriesFromAclW
push dword [edi]
mov dword [edi + 0x6c], eax
call esi
push 0x4f7f94
push dword [edi]
mov dword [edi + 0x84], eax
call esi
push 0x4f7fa8
push dword [edi]
mov dword [edi + 0x28], eax
call esi
push 0x4f7fbc
push dword [edi]
mov dword [edi + 0x2c], eax
call esi
push 0x4f7fdc
push dword [edi]
mov dword [edi + 0x30], eax
call esi
push str.GetSecurityDescriptorDacl
push dword [edi]
mov dword [edi + 0x34], eax
call esi
push 0x4f8014
push dword [edi]
mov dword [edi + 0x38], eax
call esi
push 0x4f8030
push dword [edi]
mov dword [edi + 0x3c], eax
call esi
push str.OpenThreadToken
push dword [edi]
mov dword [edi + 0x44], eax
call esi
push 0x4f8048
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
push str.QueryServiceStatusEx
push dword [edi]
mov dword [edi + 0x5c], eax
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 0x4f80f0
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
pop esi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [edi + 0x20], 0
je 0x40419f
cmp dword [edi + 0x24], 0
je 0x40419f
cmp dword [edi + 0x28], 0
je 0x40419f
cmp dword [edi + 0x2c], 0
je 0x40419f
cmp dword [edi + 0x30], 0
je 0x40419f
cmp dword [edi + 0x34], 0
je 0x40419f
cmp dword [edi + 0x38], 0
je 0x40419f
cmp dword [edi + 0x3c], 0
je 0x40419f
cmp dword [edi + 0x40], 0
je 0x40419f
cmp dword [edi + 0x44], 0
je 0x40419f
cmp dword [edi + 0x48], 0
je 0x40419f
cmp dword [edi + 0x4c], 0
je 0x40419f
cmp dword [edi + 0x50], 0
je 0x40419f
cmp dword [edi + 0x54], 0
je 0x40419f
cmp dword [edi + 0x58], 0
je 0x40419f
cmp dword [edi + 0x5c], 0
je 0x40419f
cmp dword [edi + 0x60], 0
je 0x40419f
cmp dword [edi + 0x64], 0
je 0x40419f
cmp dword [edi + 0x68], 0
je 0x40419f
cmp dword [edi + 0x6c], 0
je 0x40419f
cmp dword [edi + 0x7c], 0
je 0x40419f
cmp dword [edi + 0x70], 0
je 0x40419f
cmp dword [edi + 0x74], 0
je 0x40419f
cmp dword [edi + 0x78], 0
je 0x40419f
cmp dword [edi + 0x80], 0
je 0x40419f
cmp dword [edi + 0x84], 0
je 0x40419f
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
xor ecx, ebp
pop ebx
call fcn.004908ad
mov esp, ebp
pop ebp
ret