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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2cac
call fcn.00426a60
mov eax, dword [0x4a6cf8]
push ebx
inc eax
cmp eax, 0x30
push esi
push edi
mov dword [0x4a6cf8], eax
jge 0x42cd2e
mov edi, dword [ebp + 0xc]
mov bl, 1
lea eax, [esp + 0x30]
mov dword [esp + 0x14], 0
mov byte [esp + 0x10], 1
mov byte [esp + 0x13], bl
mov byte [esp + 0x11], 0
call fcn.0040f520
lea ecx, [esp + 0x48]
call fcn.004071d0
lea esi, [esp + 0x30]
call fcn.0040ea90
xor eax, eax
lea esi, [esp + 0x18]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x58], eax
call fcn.00401640
push esi
mov eax, 0x2000
lea ecx, [esp + 0x2c]
call fcn.0040f550
test al, al
je 0x42cd55
mov byte [esp + 0x12], 0
lea ecx, [esp + 0x18]
call fcn.00402130
cmp byte [esp + 0x12], 0
jne 0x42cd5f
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.004152b0
add esp, 0x14
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x284]
push ecx
call fcn.00412ba1
lea edx, [esp + 0x498]
push edx
lea eax, [esp + 0x28c]
push eax
call fcn.00412b73
add esp, 0x10
lea ecx, [esp + 0x280]
push ecx
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
mov edi, edi
cmp bl, 1
jne 0x42ce8c
xor edx, edx
lea esi, [esp + 0x48]
mov word [esp + 0x8a8], dx
call fcn.00403280
mov al, byte [esp + 0x5c]
test al, 3
jne 0x42cdaf
test al, 4
jne 0x42cd90
xor ebx, ebx
push 0x10
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 0x10
call fcn.00412c2a
add esp, 4
push 4
mov dword [esp + 0x1c], eax
mov byte [eax], bl
call fcn.00412c2a
add esp, 4
cmp eax, ebx
je 0x42cda6
mov dword [eax], 1
mov dword [esp + 0x24], eax
lea edx, [esp + 0x28]
push edx
lea edi, [esp + 0x1c]
call fcn.00403700
test al, al
je 0x403688
lea eax, [esp + 0x48]
push eax
mov eax, edi
call fcn.00403a70
mov esi, dword [esp + 0x24]
add dword [esi], 0xffffffff
jne 0x4034cb
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0041293d
add esp, 4
push esi
call fcn.0041293d
add esp, 4
mov al, 1
test al, al
je 0x403698
mov eax, dword [esp + 0x4c]
cmp eax, 0xffe
ja 0x42cdc5
mov edx, dword [esp + 0x48]
push edx
lea eax, [esp + 0x8ac]
push eax
call fcn.00412ba1
inc dword [esp + 0x1c]
add esp, 8
xor esi, esi
xor edi, edi
movzx ebx, word [esp + esi*2 + 0x8a8]
push ebx
call fcn.004149ff
add esp, 4
test eax, eax
je 0x403527
push ebx
call fcn.004149d6
add esp, 4
test eax, eax
jne 0x403672
cmp word [esp + esi*2 + 0x8a8], 0
je 0x40355d
jmp 0x403540
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 0x403540
xor edx, edx
lea eax, [esp + 0x8a8]
mov word [esp + edi*2 + 0x8a8], dx
call fcn.00403900
test al, al
lea eax, [esp + 0x8a8]
push eax
je 0x42ce70
call fcn.004127e5
add esp, 4
test eax, eax
je 0x4035d0
lea esi, [eax - 1]
test esi, esi
jl 0x4035c6
jmp 0x4035a0
movzx edi, word [esp + esi*2 + 0x8a8]
push edi
call fcn.004149ff
add esp, 4
test eax, eax
je 0x4035c6
push edi
call fcn.004149d6
add esp, 4
test eax, eax
jne 0x42ce05
xor ecx, ecx
mov word [esp + esi*2 + 0x8aa], cx
lea edx, [esp + 0x8a8]
push edx
xor bl, bl
call fcn.004127e5
add esp, 4
cmp eax, 2
jle 0x403605
mov esi, eax
mov ax, word [esp + esi*2 + 0x8a4]
and ax, 0x7f
movzx ecx, ax
push ecx
call fcn.004149d6
add esp, 4
test eax, eax
jne 0x403678
cmp byte [esp + 0x11], 1
je 0x42ce26
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.00403980
cmp eax, 3
jne 0x42ce3c
mov eax, dword [ebp + 0x10]
mov edx, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x8ac]
push ecx
push edx
call fcn.004039c0
cmp bl, 1
je 0x42ce66
mov byte [esp + 0x11], 0
cmp byte [esp + 0x10], 1
jne 0x42ce8c
mov bl, byte [esp + 0x13]
jmp 0x403420
inc esi
jmp 0x403501
cmp word [esp + esi*2 + 0x8a6], 0x5f
jne 0x403605
jmp 0x42ce13
lea esi, [esp + 0x18]
call fcn.0040e4e0
xor al, al
jmp 0x4034cd
lea esi, [esp + 0x30]
call fcn.0040ea90
lea ecx, [esp + 0x698]
push ecx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x5c], ebx
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
call fcn.0040ea90
lea ecx, [esp + 0x48]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x58], ebx
call fcn.00402130
call fcn.0040ea90
mov edx, dword [esp + 0x34]
push edx
call fcn.0041293d
mov al, byte [esp + 0x14]
add esp, 4
dec dword [0x4a6cf8]
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.00451d99
dec dword [0x4a6cf8]
xor al, al
jmp 0x4036e9
mov byte [esp + 0x12], 1
jmp 0x40337c
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.00451d99
lea eax, [esp + 0x28]
push eax
call fcn.00446387
dec dword [0x4a6cf8]
xor al, al
jmp 0x4036e9
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.004656c8
xor ebx, ebx
jmp 0x4034cd
mov dword [esp + 0x24], ebx
jmp 0x40348a
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.0045d86f
xor ebx, ebx
jmp 0x4034cd
lea esi, [eax - 0xffe]
lea eax, [esp + 0x48]
call fcn.004025f0
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
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.00412480
add esp, 0xc
sub dword [esp + 0x4c], esi
jmp 0x4034e4
sub esi, 1
jns 0x4035a0
jmp 0x4035c6
lea esi, [esp + esi*2 + 0x8a6]
xor edx, edx
mov word [esi], dx
mov bl, 1
jmp 0x403605
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x8a8]
push eax
push ecx
call fcn.0043988d
jmp 0x403650
sub eax, 0
je 0x42ce5c
sub eax, 2
je 0x40363a
sub eax, 2
jne 0x403650
mov byte [esp + 0x13], al
jmp 0x403650
mov byte [esp + 0x10], 0
jmp 0x403650
mov byte [esp + 0x11], 1
jmp 0x40365e
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
push str.Unterminated_string
push ecx
push edx
push eax
call fcn.00451d99
mov byte [esp + 0x10], 0
xor ebx, ebx
jmp 0x403698