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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2cac
call fcn.00424fc0
mov eax, dword [0x4a82d0]
push ebx
inc eax
cmp eax, 0x30
push esi
push edi
mov dword [0x4a82d0], eax
jge 0x42b61f
mov edi, dword [ebp + 0xc]
mov bl, 1
lea eax, [esp + 0x28]
mov dword [esp + 0x14], 0
mov byte [esp + 0x10], 1
mov byte [esp + 0x13], bl
mov byte [esp + 0x11], 0
call fcn.0040d750
lea esi, [esp + 0x18]
call fcn.00401b60
push esi
mov eax, 0x2000
lea ecx, [esp + 0x2c]
call fcn.0040dd60
test al, al
je 0x42b646
mov byte [esp + 0x12], 0
lea ecx, [esp + 0x18]
call fcn.00402610
cmp byte [esp + 0x12], 0
jne 0x42b650
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.00413b60
add esp, 0x14
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x284]
push ecx
call fcn.00411441
lea edx, [esp + 0x498]
push edx
lea eax, [esp + 0x28c]
push eax
call fcn.00411413
add esp, 0x10
lea ecx, [esp + 0x280]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp bl, 1
jne 0x42b77d
xor edx, edx
lea esi, [esp + 0x40]
mov word [esp + 0x8a8], dx
call fcn.00403760
mov al, byte [esp + 0x54]
test al, 3
jne 0x42b6a0
test al, 4
jne 0x42b681
xor ebx, ebx
push 0x10
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 0x10
call fcn.004114ca
add esp, 4
push 4
mov dword [esp + 0x1c], eax
mov byte [eax], bl
call fcn.004114ca
add esp, 4
cmp eax, ebx
je 0x42b697
mov dword [eax], 1
mov dword [esp + 0x24], eax
lea edi, [esp + 0x18]
lea eax, [esp + 0x28]
call fcn.00403bc0
test al, al
je 0x403b48
lea edx, [esp + 0x40]
push edx
mov eax, edi
call fcn.00403f30
mov esi, dword [esp + 0x24]
add dword [esi], 0xffffffff
jne 0x40398c
mov eax, dword [esp + 0x18]
push eax
call fcn.0041109f
add esp, 4
push esi
call fcn.0041109f
add esp, 4
mov al, 1
test al, al
je 0x403b58
mov eax, dword [esp + 0x44]
cmp eax, 0xffe
ja 0x42b6b6
mov eax, dword [esp + 0x40]
push eax
lea ecx, [esp + 0x8ac]
push ecx
call fcn.00411441
inc dword [esp + 0x1c]
add esp, 8
xor esi, esi
xor edi, edi
movzx ebx, word [esp + esi*2 + 0x8a8]
push ebx
call fcn.0041329f
add esp, 4
test eax, eax
je 0x4039e8
push ebx
call fcn.00413276
add esp, 4
test eax, eax
jne 0x403b32
cmp word [esp + esi*2 + 0x8a8], 0
je 0x403a1d
jmp 0x403a00
mov dx, word [esp + esi*2 + 0x8a8]
mov word [esp + edi*2 + 0x8a8], dx
inc esi
inc edi
cmp word [esp + esi*2 + 0x8a8], 0
jne 0x403a00
xor eax, eax
mov word [esp + edi*2 + 0x8a8], ax
lea eax, [esp + 0x8a8]
call fcn.00403dc0
lea ecx, [esp + 0x8a8]
push ecx
test al, al
je 0x42b761
call fcn.00411085
add esp, 4
test eax, eax
je 0x403a90
lea esi, [eax - 1]
test esi, esi
jl 0x403a86
jmp 0x403a60
movzx edi, word [esp + esi*2 + 0x8a8]
push edi
call fcn.0041329f
add esp, 4
test eax, eax
je 0x403a86
push edi
call fcn.00413276
add esp, 4
test eax, eax
jne 0x42b6f6
xor edx, edx
mov word [esp + esi*2 + 0x8aa], dx
lea eax, [esp + 0x8a8]
push eax
xor bl, bl
call fcn.00411085
add esp, 4
cmp eax, 2
jle 0x403ac5
mov esi, eax
mov cx, word [esp + esi*2 + 0x8a4]
and cx, 0x7f
movzx edx, cx
push edx
call fcn.00413276
add esp, 4
test eax, eax
jne 0x403b38
cmp byte [esp + 0x11], 1
je 0x42b717
mov esi, dword [ebp + 8]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x8b4]
push eax
mov ecx, esi
call fcn.00403e40
cmp eax, 3
jne 0x42b72d
mov ecx, dword [ebp + 0x10]
mov eax, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x8ac]
push edx
push eax
call fcn.00403e80
cmp bl, 1
je 0x42b757
mov byte [esp + 0x11], 0
cmp byte [esp + 0x10], 1
jne 0x42b77d
mov bl, byte [esp + 0x13]
jmp 0x4038e2
inc esi
jmp 0x4039c2
cmp word [esp + esi*2 + 0x8a6], 0x5f
jne 0x403ac5
jmp 0x42b704
lea esi, [esp + 0x18]
call fcn.00401330
xor al, al
jmp 0x40398e
lea esi, [esp + 0x28]
call fcn.0040d710
lea edx, [esp + 0x698]
push edx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.0040d710
lea ecx, [esp + 0x40]
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
call fcn.00402610
call fcn.0040d710
mov eax, dword [esp + 0x2c]
push eax
call fcn.0041109f
mov al, byte [esp + 0x14]
add esp, 4
dec dword [0x4a82d0]
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.00453b23
dec dword [0x4a82d0]
xor al, al
jmp 0x403ba9
mov byte [esp + 0x12], 1
jmp 0x403840
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.00453b23
lea eax, [esp + 0x28]
push eax
call fcn.00444120
dec dword [0x4a82d0]
xor al, al
jmp 0x403ba9
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.00467a7d
xor ebx, ebx
jmp 0x40398e
mov dword [esp + 0x24], ebx
jmp 0x40394c
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.0045fbef
xor ebx, ebx
jmp 0x40398e
lea esi, [eax - 0xffe]
lea eax, [esp + 0x40]
call fcn.00402ad0
mov eax, dword [esp + 0x44]
sub eax, esi
lea ecx, [eax + eax - 0x1ffa]
mov eax, dword [esp + 0x40]
push ecx
lea edx, [eax + esi*2 + 0x1ffc]
push edx
add eax, 0x1ffc
push eax
call fcn.00410d20
add esp, 0xc
sub dword [esp + 0x44], esi
jmp 0x4039a5
sub esi, 1
jns 0x403a60
jmp 0x403a86
lea esi, [esp + esi*2 + 0x8a6]
xor eax, eax
mov word [esi], ax
mov bl, 1
jmp 0x403ac5
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x8a8]
push ecx
push edx
call fcn.004375f2
jmp 0x403b10
sub eax, 0
je 0x42b74d
sub eax, 2
je 0x403afa
sub eax, 2
jne 0x403b10
mov byte [esp + 0x13], al
jmp 0x403b10
mov byte [esp + 0x10], 0
jmp 0x403b10
mov byte [esp + 0x11], 1
jmp 0x403b1e
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
push str.Unterminated_string
push edx
push eax
push ecx
call fcn.00453b23
mov byte [esp + 0x10], 0
xor ebx, ebx
jmp 0x403b58