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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2cac
call fcn.00426460
mov eax, dword [0x4b95a8]
push ebx
inc eax
push esi
push edi
mov dword [0x4b95a8], eax
cmp eax, 0x30
jge 0x42c3f8
mov edi, dword [ebp + 0xc]
mov bl, 1
lea eax, [esp + 0x28]
mov dword [esp + 0x14], 0
mov byte [esp + 0x11], 1
mov byte [esp + 0x13], bl
mov byte [esp + 0x12], 0
call fcn.0040d770
lea esi, [esp + 0x18]
call fcn.00401a30
push esi
mov eax, 0x2000
lea ecx, [esp + 0x2c]
call fcn.0040e060
test al, al
je 0x42c41f
mov byte [esp + 0x10], 0
lea ecx, [esp + 0x18]
call fcn.00402000
cmp byte [esp + 0x10], 0
jne 0x42c429
lea ecx, [esp + 0x698]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x74]
push eax
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea ecx, [esp + 0x28a8]
push ecx
lea edx, [esp + 0x2ab4]
push edx
lea eax, [esp + 0x498]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x80]
push edx
call fcn.00413a6e
add esp, 0x14
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x284]
push ecx
call fcn.004127d8
lea edx, [esp + 0x498]
push edx
lea eax, [esp + 0x28c]
push eax
call fcn.004127a7
add esp, 0x10
lea ecx, [esp + 0x280]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp bl, 1
jne 0x42c55f
xor edx, edx
lea esi, [esp + 0x40]
mov word [esp + 0x8a8], dx
call fcn.00403140
mov al, byte [esp + 0x54]
test al, 3
jne 0x42c479
test al, 4
jne 0x42c45a
xor ebx, ebx
push 0x10
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 0x10
call fcn.004128c9
add esp, 4
push 4
mov dword [esp + 0x1c], eax
mov byte [eax], bl
call fcn.004128c9
add esp, 4
cmp eax, ebx
je 0x42c470
mov dword [eax], 1
mov dword [esp + 0x24], eax
lea edi, [esp + 0x18]
lea eax, [esp + 0x28]
call fcn.00403590
test al, al
je 0x40351c
lea edx, [esp + 0x40]
push edx
push edi
call fcn.004038e0
mov esi, dword [esp + 0x24]
dec dword [esi]
jne 0x40336a
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00410eb6
add esp, 4
push esi
call fcn.00410eb6
add esp, 4
mov al, 1
test al, al
je 0x40352c
mov eax, dword [esp + 0x44]
cmp eax, 0xffe
ja 0x42c48f
mov edx, dword [esp + 0x40]
push edx
lea eax, [esp + 0x8ac]
push eax
call fcn.004127d8
inc dword [esp + 0x1c]
add esp, 8
xor esi, esi
xor edi, edi
movzx ebx, word [esp + esi*2 + 0x8a8]
push ebx
call fcn.004132b8
add esp, 4
test eax, eax
je 0x4033c6
push ebx
call fcn.0041328f
add esp, 4
test eax, eax
jne 0x403506
cmp word [esp + esi*2 + 0x8a8], di
je 0x4033ed
mov cx, word [esp + esi*2 + 0x8a8]
mov word [esp + edi*2 + 0x8a8], cx
inc esi
inc edi
cmp word [esp + esi*2 + 0x8a8], 0
jne 0x4033d0
xor edx, edx
lea eax, [esp + 0x8a8]
mov word [esp + edi*2 + 0x8a8], dx
call fcn.00403790
test al, al
je 0x42c53b
lea eax, [esp + 0x8a8]
push eax
call fcn.00412781
add esp, 4
test eax, eax
je 0x403460
lea esi, [eax - 1]
test esi, esi
js 0x403456
jmp 0x403430
movzx edi, word [esp + esi*2 + 0x8a8]
push edi
call fcn.004132b8
add esp, 4
test eax, eax
je 0x403456
push edi
call fcn.0041328f
add esp, 4
test eax, eax
jne 0x42c4cf
xor ecx, ecx
mov word [esp + esi*2 + 0x8aa], cx
lea edx, [esp + 0x8a8]
push edx
mov byte [esp + 0x14], 0
call fcn.00412781
add esp, 4
cmp eax, 2
jle 0x403498
mov esi, eax
mov ax, word [esp + esi*2 + 0x8a4]
and ax, 0x7f
movzx ecx, ax
push ecx
call fcn.0041328f
add esp, 4
test eax, eax
jne 0x40350c
cmp byte [esp + 0x12], 1
je 0x42c4f1
mov esi, dword [ebp + 8]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x8b4]
push edx
mov ecx, esi
call fcn.00403810
cmp eax, 3
jne 0x42c507
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea ebx, [esp + 0x8b0]
call fcn.00403840
cmp byte [esp + 0x10], 1
je 0x42c531
mov byte [esp + 0x12], 0
cmp byte [esp + 0x11], 1
jne 0x42c55f
mov bl, byte [esp + 0x13]
jmp 0x4032c2
inc esi
jmp 0x4033a0
cmp word [esp + esi*2 + 0x8a6], 0x5f
jne 0x403498
jmp 0x42c4db
lea esi, [esp + 0x18]
call fcn.004012c0
xor al, al
jmp 0x40336c
lea esi, [esp + 0x28]
call fcn.0040d730
lea eax, [esp + 0x698]
push eax
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.0040d730
lea ecx, [esp + 0x40]
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
call fcn.00402000
call fcn.0040d730
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00410eb6
mov al, byte [esp + 0x15]
add esp, 4
dec dword [0x4b95a8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 8]
push str.include_depth_exceeded.__Make_sure_there_are_no_recursive_includes
push ecx
push edx
push eax
call fcn.00458659
dec dword [0x4b95a8]
xor al, al
jmp 0x40357d
mov byte [esp + 0x10], 1
jmp 0x403220
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x14]
push edx
mov edx, dword [ebp + 8]
push str.Error_opening_the_file
push eax
push ecx
push edx
call fcn.00458659
lea eax, [esp + 0x28]
push eax
call fcn.00448068
dec dword [0x4b95a8]
xor al, al
jmp 0x40357d
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.004667df
xor ebx, ebx
jmp 0x40336c
mov dword [esp + 0x24], ebx
jmp 0x40332c
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.0046676b
xor ebx, ebx
jmp 0x40336c
lea esi, [eax - 0xffe]
lea eax, [esp + 0x40]
call fcn.004024b0
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
sub ecx, esi
lea edx, [ecx + ecx - 0x1ffa]
push edx
lea ecx, [eax + esi*2 + 0x1ffc]
push ecx
add eax, 0x1ffc
push eax
call fcn.00412420
add esp, 0xc
sub dword [esp + 0x44], esi
jmp 0x403383
dec esi
jns 0x403430
jmp 0x403456
lea esi, [esp + esi*2 + 0x8a6]
xor edx, edx
mov word [esi], dx
mov byte [esp + 0x10], 1
jmp 0x403498
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x8a8]
push eax
push ecx
call fcn.0043876f
jmp 0x4034e2
sub eax, 0
je 0x42c527
sub eax, 2
je 0x4034cd
sub eax, 2
jne 0x4034e2
mov byte [esp + 0x13], al
jmp 0x4034e2
mov byte [esp + 0x11], 0
jmp 0x4034e2
mov byte [esp + 0x12], 1
jmp 0x4034f2
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x14]
lea edx, [esp + 0x8a8]
push edx
mov edx, dword [ebp + 8]
push str.Unterminated_string
push eax
push ecx
push edx
call fcn.00458659
mov byte [esp + 0x11], 0
xor ebx, ebx
jmp 0x40352c