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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1698
call fcn.0044ba90
inc dword [0x46fcf4]
cmp dword [0x46fcf4], 0x30
push ebx
mov dword [ebp - 0xc], ecx
jl 0x40fda5
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.0040f75d
xor bl, bl
jmp 0x40ffac
and dword [ebp - 8], 0
push esi
lea eax, [ebp - 0x74]
mov byte [ebp - 1], 1
mov byte [ebp - 2], 1
xor bl, bl
call fcn.004139d1
push dword [ebp + 8]
mov eax, 0x2000
lea ecx, [ebp - 0x74]
call fcn.004139e1
test al, al
jne 0x40fded
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.0040f75d
jmp 0x40ffa3
lea eax, [ebp - 0x490]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x284]
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea eax, [ebp - 0x698]
push eax
lea eax, [ebp - 0x594]
push eax
lea eax, [ebp - 0x388]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x284]
push eax
call fcn.00449745
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x17c]
push eax
call fcn.004489e0
lea eax, [ebp - 0x388]
push eax
lea eax, [ebp - 0x17c]
push eax
call fcn.004489f0
add esp, 0x24
lea eax, [ebp - 0x17c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push edi
cmp byte [ebp - 2], 1
jne 0x40ff8a
mov ecx, 0xfff
lea edx, [ebp - 0x1698]
lea eax, [ebp - 0x74]
call fcn.00413f51
test al, al
je 0x40ff8a
inc dword [ebp - 8]
lea esi, [ebp - 0x1698]
call fcn.0040fbd0
mov eax, esi
call fcn.0040fc03
test al, al
je 0x40ff6a
mov edi, esi
call fcn.0040fba3
mov eax, esi
push eax
mov byte [ebp + 0x17], 0
call fcn.00448e50
mov esi, eax
cmp esi, 2
pop ecx
jle 0x40fef5
xor eax, eax
mov al, byte [ebp + esi - 0x169a]
and eax, 0x7f
push eax
call fcn.0044970b
test eax, eax
pop ecx
je 0x40fef5
lea eax, [ebp + esi - 0x1699]
cmp byte [eax], 0x5f
jne 0x40fef5
mov byte [eax], 0
mov byte [ebp + 0x17], 1
cmp bl, 1
mov esi, dword [ebp - 0xc]
jne 0x40ff0b
lea eax, [ebp - 0x1698]
push eax
call fcn.0040f8b5
jmp 0x40ff57
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x284]
push eax
push esi
lea ecx, [ebp - 0x1698]
call fcn.0040ffb9
test eax, eax
je 0x40ff53
cmp eax, 1
jle 0x40ff57
cmp eax, 3
jle 0x40ff3f
cmp eax, 4
jne 0x40ff57
mov byte [ebp - 2], 0
jmp 0x40ff57
push dword [ebp + 0xc]
lea eax, [ebp - 0x1698]
push eax
push dword [ebp - 8]
call fcn.0040f849
jmp 0x40ff57
mov byte [ebp - 1], 0
cmp byte [ebp + 0x17], 1
sete bl
cmp byte [ebp - 1], 1
je 0x40fe6e
jmp 0x40ff8a
push 0
lea eax, [ebp - 0x1698]
push eax
push str.Unterminated_string
push dword [ebp - 8]
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call fcn.0040f75d
mov byte [ebp - 1], 0
lea esi, [ebp - 0x74]
call fcn.00413bc3
lea eax, [ebp - 0x490]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov bl, byte [ebp - 1]
pop edi
lea esi, [ebp - 0x74]
call fcn.00413bc3
pop esi
dec dword [0x46fcf4]
mov al, bl
pop ebx
leave
ret 0x14