Function at 0x40ea3a
Capabilities:
Check if file exists
Delete directory
Get common file path
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e8
mov dword [ebp - 0xdc], 0
lea eax, [ebp - 0xc8]
push eax
lea ecx, [ebp - 0x1a4]
push ecx
call fcn.00404ad0
mov dword [ebp - 0xdc], eax
cmp dword [ebp - 0xdc], 0
je 0x40ea7a
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
cmp dword [ebp - 0x1a0], 3
jne 0x40f100
push 0x200
push 0x5abd60
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x521ba8
push 0x5abd60
call fcn.0041e940
add esp, 8
push 0x521bb8
push 0x5abd60
call fcn.0041e940
add esp, 8
push 0x5abd60
call fcn.00408ac1
add esp, 4
test eax, eax
jne 0x40eb0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 2
je 0x40eb0e
cmp dword [ebp - 0xd0], 5
jne 0x40eb0e
push 0x4000b
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
push 0x200
push 0x5abd60
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x521bc4
push 0x5abd60
call fcn.0041e940
add esp, 8
push 0x521bd4
push 0x5abd60
call fcn.0041e940
add esp, 8
push 0x5abd60
call fcn.00408ac1
add esp, 4
test eax, eax
jne 0x40eb95
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 2
je 0x40eb95
cmp dword [ebp - 0xd0], 5
jne 0x40eb95
push 0x4000b
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
push 0x200
push 0x5abd60
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x521be0
push 0x5abd60
call fcn.0041e940
add esp, 8
push 0x521bf0
push 0x5abd60
call fcn.0041e940
add esp, 8
push 0x5abd60
call fcn.00408ac1
add esp, 4
test eax, eax
jne 0x40ec1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 2
je 0x40ec1c
cmp dword [ebp - 0xd0], 5
jne 0x40ec1c
push 0x4000b
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
push 0x200
push 0x5abd60
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x521bfc
push 0x5abd60
call fcn.0041e940
add esp, 8
push 0x5abd60
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
cmp dword [ebp - 0xdc], 0xffffffff
jne 0x40ec5d
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
push 0x521c0c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x1d0], eax
cmp dword [ebp - 0x1d0], 0
jne 0x40ecb0
mov edx, dword [ebp - 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 1
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
push 0x521c1c
mov eax, dword [ebp - 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xd8], eax
cmp dword [ebp - 0xd8], 0
jne 0x40ed0a
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
push 0x521c34
mov edx, dword [ebp - 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xcc], eax
cmp dword [ebp - 0xcc], 0
jne 0x40ed64
mov eax, dword [ebp - 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
push 0x521c4c
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xd4], eax
cmp dword [ebp - 0xd4], 0
jne 0x40edbe
mov edx, dword [ebp - 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
push str.SetupDiCallClassInstaller
mov eax, dword [ebp - 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c8], eax
cmp dword [ebp - 0x1c8], 0
jne 0x40ee18
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
push 0x521c8c
mov edx, dword [ebp - 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1d8], eax
cmp dword [ebp - 0x1d8], 0
jne 0x40ee72
mov eax, dword [ebp - 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.00406ccc
add esp, 4
push 0x2020001
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
push 6
push 0
push 0
push 0
call dword [ebp - 0xd8]
mov dword [ebp - 0x1cc], eax
cmp dword [ebp - 0x1cc], 0xffffffff
jne 0x40eec8
push 8
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
mov dword [ebp - 0x1c0], 0x1c
mov dword [ebp - 0x1c4], 0
jmp 0x40eeed
mov edx, dword [ebp - 0x1c4]
add edx, 1
mov dword [ebp - 0x1c4], edx
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp - 0x1c4]
push ecx
mov edx, dword [ebp - 0x1cc]
push edx
call dword [ebp - 0xcc]
mov dword [ebp - 0x1d4], eax
cmp dword [ebp - 0x1d4], 0
je 0x40f0d6
mov dword [ebp - 0x1e4], 0
mov dword [ebp - 0x1e8], 0
lea eax, [ebp - 0x1e8]
push eax
mov ecx, dword [ebp - 0x1e8]
push ecx
mov edx, dword [ebp - 0x1e4]
push edx
lea eax, [ebp - 0x1e0]
push eax
push 1
lea ecx, [ebp - 0x1c0]
push ecx
mov edx, dword [ebp - 0x1cc]
push edx
call dword [ebp - 0xd4]
test eax, eax
jne 0x40efec
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x40ef76
jmp 0x40efec
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40efae
cmp dword [ebp - 0x1e4], 0
je 0x40ef97
mov eax, dword [ebp - 0x1e4]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x1e8]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x1e4], eax
jmp 0x40efe7
push 9
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov edx, dword [ebp - 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
jmp 0x40ef2f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x40effc
jmp 0x40eede
mov eax, dword [ebp - 0x1e4]
mov dword [ebp - 0x1dc], eax
jmp 0x40f027
mov ecx, dword [ebp - 0x1dc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp - 0x1dc]
lea eax, [edx + eax + 1]
mov dword [ebp - 0x1dc], eax
mov ecx, dword [ebp - 0x1dc]
movsx edx, byte [ecx]
test edx, edx
je 0x40f0bb
mov eax, dword [ebp - 0x1e4]
add eax, dword [ebp - 0x1e8]
cmp dword [ebp - 0x1dc], eax
jae 0x40f0bb
mov ecx, dword [ebp - 0x1dc]
push ecx
push 0x521cac
call fcn.0041efd0
add esp, 8
test eax, eax
jne 0x40f0b6
lea edx, [ebp - 0x1c0]
push edx
mov eax, dword [ebp - 0x1cc]
push eax
push 5
call dword [ebp - 0x1c8]
test eax, eax
jne 0x40f0b4
push 9
call fcn.00406ccc
add esp, 4
push 0x2020000
call fcn.00406c68
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xdc]
jmp 0x40f106
jmp 0x40f0bb
jmp 0x40f00a
cmp dword [ebp - 0x1e4], 0
je 0x40f0d1
mov edx, dword [ebp - 0x1e4]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40eede
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40f0e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x1cc]
push eax
call dword [ebp - 0x1d8]
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0xdc]
mov esp, ebp
pop ebp
ret