Function at 0x404adc
Capabilities:
Get common file path
Link many functions at runtime
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x40f014]
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x40fba4], edi
mov dword [ebp - 4], eax
jne 0x404c68
lea eax, [ebp - 0x20c]
push eax
mov ebx, 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x404b33
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x401454
push 0x401cec
push 0x192
jmp 0x404ddf
push ebx
lea eax, [ebp - 0x108]
push eax
push dword [0x40fba0]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x404b67
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x401cd8
push 0x401cec
push 0x198
jmp 0x404ddf
lea eax, [ebp - 0x108]
push 0x5c
push eax
call fcn.00406a30
cmp eax, edi
pop ecx
pop ecx
je 0x404c50
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov byte [eax], 0
lea eax, [ebp - 0x108]
push eax
call edi
test eax, eax
jne 0x404bb1
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x401410
push 0x401cec
push 0x1a5
jmp 0x404ddf
mov esi, 0x401cc8
push esi
push ebx
lea eax, [ebp - 0x108]
push eax
call fcn.00404a70
test eax, eax
lea eax, [ebp - 0x108]
jge 0x404bf5
push esi
push eax
push 0x4013d0
push 0
push 0
push 0x401cec
push 0x1ab
push 0x401240
call fcn.004062d4
add esp, 0x20
jmp 0x404dec
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x40fba4], eax
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x404c2a
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x401410
push 0x401cec
push 0x1b3
jmp 0x404ddf
cmp dword [0x40fba4], 0
jne 0x404c66
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4013c0
push 0x401cec
push 0x1ba
jmp 0x404ddf
push 0x401cac
push edi
push edi
push 0x401cec
push 0x1a0
jmp 0x404ddf
xor edi, edi
cmp dword [0x40fbc8], edi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
jne 0x404cac
push 0x401c9c
push dword [0x40fba4]
call esi
cmp eax, edi
mov dword [0x40fbc8], eax
jne 0x404cac
push 0x401c6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40136c
push 0x401cec
push 0x1c6
jmp 0x404ddf
cmp dword [0x40fbc0], edi
jne 0x404cea
push 0x4014c8
push dword [0x40fba4]
call esi
cmp eax, edi
mov dword [0x40fbc0], eax
jne 0x404cea
push 0x401c34
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40136c
push 0x401cec
push 0x1d0
jmp 0x404ddf
cmp dword [0x40fbcc], edi
jne 0x404d30
push 0x401c1c
push dword [0x40fba4]
call esi
cmp eax, edi
mov dword [0x40fbcc], eax
jne 0x404d28
push 0x401be4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40136c
push 0x401cec
push 0x1da
jmp 0x404ddf
push dword [0x40fbac]
call eax
cmp dword [0x40fbd0], edi
jne 0x404d6b
push 0x401bd0
push dword [0x40fba4]
call esi
cmp eax, edi
mov dword [0x40fbd0], eax
jne 0x404d6b
push 0x401b9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40136c
push 0x401cec
push 0x1e6
jmp 0x404ddf
cmp dword [0x40fbd4], edi
jne 0x404da6
push 0x401b84
push dword [0x40fba4]
call esi
cmp eax, edi
mov dword [0x40fbd4], eax
jne 0x404da6
push 0x401b4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40136c
push 0x401cec
push 0x1f0
jmp 0x404ddf
cmp dword [0x40fbc4], edi
jne 0x404df0
push 0x401b34
push dword [0x40fba4]
call esi
cmp eax, edi
mov dword [0x40fbc4], eax
jne 0x404df0
push 0x401afc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40136c
push 0x401cec
push 0x1fa
push 0x401240
call fcn.004062d4
add esp, 0x18
xor eax, eax
jmp 0x404df3
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.004065c9
leave
ret