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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x492110]
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 0x40d985
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.004366e6
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [edi], eax
test eax, eax
jne 0x40d83f
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x40da21
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 0x47049c
push dword [edi]
mov dword [edi + 0x84], eax
call esi
push 0x4704b0
push dword [edi]
mov dword [edi + 0x28], eax
call esi
push 0x4704c4
push dword [edi]
mov dword [edi + 0x2c], eax
call esi
push 0x4704e4
push dword [edi]
mov dword [edi + 0x30], eax
call esi
push str.GetSecurityDescriptorDacl
push dword [edi]
mov dword [edi + 0x34], eax
call esi
push 0x47051c
push dword [edi]
mov dword [edi + 0x38], eax
call esi
push 0x470538
push dword [edi]
mov dword [edi + 0x3c], eax
call esi
push str.OpenThreadToken
push dword [edi]
mov dword [edi + 0x44], eax
call esi
push 0x470550
push dword [edi]
mov dword [edi + 0x64], eax
call esi
push 0x470564
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 0x470598
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 0x4705cc
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 str.EqualSid
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 0x40da1f
cmp dword [edi + 0x24], ebx
je 0x40da1f
cmp dword [edi + 0x28], ebx
je 0x40da1f
cmp dword [edi + 0x2c], ebx
je 0x40da1f
cmp dword [edi + 0x30], ebx
je 0x40da1f
cmp dword [edi + 0x34], ebx
je 0x40da1f
cmp dword [edi + 0x38], ebx
je 0x40da1f
cmp dword [edi + 0x3c], ebx
je 0x40da1f
cmp dword [edi + 0x40], ebx
je 0x40da1f
cmp dword [edi + 0x44], ebx
je 0x40da1f
cmp dword [edi + 0x48], ebx
je 0x40da1f
cmp dword [edi + 0x4c], ebx
je 0x40da1f
cmp dword [edi + 0x50], ebx
je 0x40da1f
cmp dword [edi + 0x54], ebx
je 0x40da1f
cmp dword [edi + 0x58], ebx
je 0x40da1f
cmp dword [edi + 0x5c], ebx
je 0x40da1f
cmp dword [edi + 0x60], ebx
je 0x40da1f
cmp dword [edi + 0x64], ebx
je 0x40da1f
cmp dword [edi + 0x68], ebx
je 0x40da1f
cmp dword [edi + 0x6c], ebx
je 0x40da1f
cmp dword [edi + 0x7c], ebx
je 0x40da1f
cmp dword [edi + 0x70], ebx
je 0x40da1f
cmp dword [edi + 0x74], ebx
je 0x40da1f
cmp dword [edi + 0x78], ebx
je 0x40da1f
cmp dword [edi + 0x80], ebx
je 0x40da1f
cmp dword [edi + 0x84], ebx
je 0x40da1f
xor ebx, ebx
inc ebx
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042db8f
leave
ret