Function at 0x40ffa0
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2ca8
call fcn.0044c070
inc dword [0x47c794]
cmp dword [0x47c794], 0x30
push ebx
mov dword [ebp - 0xc], ecx
jl 0x40ffdd
push 0
push dword [ebp + 0x14]
push str.include_depth_exceeded.__Make_sure_there_are_no_recursive_includes
push dword [ebp + 0x18]
push dword [ebp + 0x10]
push ecx
call fcn.0040f96a
xor bl, bl
jmp 0x4101e6
and dword [ebp - 8], 0
push esi
lea eax, [ebp - 0x78]
mov byte [ebp - 1], 1
mov byte [ebp - 2], 1
xor bl, bl
call fcn.00413c2d
push dword [ebp + 8]
mov eax, 0x2000
lea ecx, [ebp - 0x78]
call fcn.00413c3d
test al, al
jne 0x410025
push 0
push dword [ebp + 0x14]
push str.Error_opening_the_file
push dword [ebp + 0x18]
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call fcn.0040f96a
jmp 0x4101dd
lea eax, [ebp - 0x8a0]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x490]
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea eax, [ebp - 0xca8]
push eax
lea eax, [ebp - 0xaa4]
push eax
lea eax, [ebp - 0x694]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x490]
push eax
call fcn.00449da6
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x284]
push eax
call fcn.00449154
lea eax, [ebp - 0x694]
push eax
lea eax, [ebp - 0x284]
push eax
call fcn.0044912a
add esp, 0x24
lea eax, [ebp - 0x284]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push edi
cmp byte [ebp - 2], 1
jne 0x4101c4
mov ecx, 0xfff
lea edx, [ebp - 0x2ca8]
lea eax, [ebp - 0x78]
call fcn.004141ae
test al, al
je 0x4101c4
inc dword [ebp - 8]
lea esi, [ebp - 0x2ca8]
call fcn.0040fdf3
mov eax, esi
call fcn.0040fe2c
test al, al
je 0x4101a4
mov edi, esi
call fcn.0040fdc4
mov eax, esi
push eax
mov byte [ebp + 0x17], 0
call fcn.004493b8
mov esi, eax
cmp esi, 2
pop ecx
jle 0x41012f
xor eax, eax
mov al, byte [ebp + esi*2 - 0x2cac]
and eax, 0x7f
push eax
call fcn.00449d8c
test eax, eax
pop ecx
je 0x41012f
lea eax, [ebp + esi*2 - 0x2caa]
cmp word [eax], 0x5f
jne 0x41012f
and word [eax], 0
mov byte [ebp + 0x17], 1
cmp bl, 1
mov esi, dword [ebp - 0xc]
jne 0x410145
lea eax, [ebp - 0x2ca8]
push eax
call fcn.0040fac3
jmp 0x410191
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x490]
push eax
push esi
lea ecx, [ebp - 0x2ca8]
call fcn.004101f3
test eax, eax
je 0x41018d
cmp eax, 1
jle 0x410191
cmp eax, 3
jle 0x410179
cmp eax, 4
jne 0x410191
mov byte [ebp - 2], 0
jmp 0x410191
push dword [ebp + 0xc]
lea eax, [ebp - 0x2ca8]
push eax
push dword [ebp - 8]
call fcn.0040fa56
jmp 0x410191
mov byte [ebp - 1], 0
cmp byte [ebp + 0x17], 1
sete bl
cmp byte [ebp - 1], 1
je 0x4100a6
jmp 0x4101c4
push 0
lea eax, [ebp - 0x2ca8]
push eax
push str.Unterminated_string
push dword [ebp - 8]
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call fcn.0040f96a
mov byte [ebp - 1], 0
lea esi, [ebp - 0x78]
call fcn.00413e1f
lea eax, [ebp - 0x8a0]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov bl, byte [ebp - 1]
pop edi
lea esi, [ebp - 0x78]
call fcn.00413e1f
pop esi
dec dword [0x47c794]
mov al, bl
pop ebx
leave
ret 0x14