Function at 0x40c0ca
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.00402160
mov dword [ebp - 0xdc], eax
cmp dword [ebp - 0xdc], 0
je 0x40c10a
mov eax, dword [ebp - 0xdc]
jmp 0x40c796
cmp dword [ebp - 0x1a0], 3
jne 0x40c790
push 0x200
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x51dd50
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x51dd60
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x5a2660
call fcn.00406151
add esp, 4
test eax, eax
jne 0x40c19e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 2
je 0x40c19e
cmp dword [ebp - 0xd0], 5
jne 0x40c19e
push 0x4000b
call fcn.0040435c
add esp, 4
push 0x2020000
call fcn.004042f8
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
push 0x200
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x51dd6c
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x51dd7c
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x5a2660
call fcn.00406151
add esp, 4
test eax, eax
jne 0x40c225
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 2
je 0x40c225
cmp dword [ebp - 0xd0], 5
jne 0x40c225
push 0x4000b
call fcn.0040435c
add esp, 4
push 0x2020000
call fcn.004042f8
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
push 0x200
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x51dd88
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x51dd98
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x5a2660
call fcn.00406151
add esp, 4
test eax, eax
jne 0x40c2ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 2
je 0x40c2ac
cmp dword [ebp - 0xd0], 5
jne 0x40c2ac
push 0x4000b
call fcn.0040435c
add esp, 4
push 0x2020000
call fcn.004042f8
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
push 0x200
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x51dda4
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
cmp dword [ebp - 0xdc], 0xffffffff
jne 0x40c2ed
mov eax, dword [ebp - 0xdc]
jmp 0x40c796
push 0x51ddb4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x1d0], eax
cmp dword [ebp - 0x1d0], 0
jne 0x40c340
mov edx, dword [ebp - 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 1
call fcn.0040435c
add esp, 4
push 0x2020001
call fcn.004042f8
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40c796
push 0x51ddc4
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 0x40c39a
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.0040435c
add esp, 4
push 0x2020001
call fcn.004042f8
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40c796
push 0x51dddc
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 0x40c3f4
mov eax, dword [ebp - 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.0040435c
add esp, 4
push 0x2020001
call fcn.004042f8
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40c796
push 0x51ddf4
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 0x40c44e
mov edx, dword [ebp - 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.0040435c
add esp, 4
push 0x2020001
call fcn.004042f8
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40c796
push 0x51de18
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 0x40c4a8
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.0040435c
add esp, 4
push 0x2020001
call fcn.004042f8
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40c796
push 0x51de34
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 0x40c502
mov eax, dword [ebp - 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 2
call fcn.0040435c
add esp, 4
push 0x2020001
call fcn.004042f8
add esp, 4
mov dword [ebp - 0xdc], 0xffffffff
mov eax, dword [ebp - 0xdc]
jmp 0x40c796
push 6
push 0
push 0
push 0
call dword [ebp - 0xd8]
mov dword [ebp - 0x1cc], eax
cmp dword [ebp - 0x1cc], 0xffffffff
jne 0x40c558
push 8
call fcn.0040435c
add esp, 4
push 0x2020000
call fcn.004042f8
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 0x40c796
mov dword [ebp - 0x1c0], 0x1c
mov dword [ebp - 0x1c4], 0
jmp 0x40c57d
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 0x40c766
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 0x40c67c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x40c606
jmp 0x40c67c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40c63e
cmp dword [ebp - 0x1e4], 0
je 0x40c627
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 0x40c677
push 9
call fcn.0040435c
add esp, 4
push 0x2020000
call fcn.004042f8
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 0x40c796
jmp 0x40c5bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
jne 0x40c68c
jmp 0x40c56e
mov eax, dword [ebp - 0x1e4]
mov dword [ebp - 0x1dc], eax
jmp 0x40c6b7
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 0x40c74b
mov eax, dword [ebp - 0x1e4]
add eax, dword [ebp - 0x1e8]
cmp dword [ebp - 0x1dc], eax
jae 0x40c74b
mov ecx, dword [ebp - 0x1dc]
push ecx
push 0x51de54
call fcn.0041c3a0
add esp, 8
test eax, eax
jne 0x40c746
lea edx, [ebp - 0x1c0]
push edx
mov eax, dword [ebp - 0x1cc]
push eax
push 5
call dword [ebp - 0x1c8]
test eax, eax
jne 0x40c744
push 9
call fcn.0040435c
add esp, 4
push 0x2020000
call fcn.004042f8
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 0x40c796
jmp 0x40c74b
jmp 0x40c69a
cmp dword [ebp - 0x1e4], 0
je 0x40c761
mov edx, dword [ebp - 0x1e4]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40c56e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40c776
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