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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2cbc
call fcn.004203f0
mov eax, dword [0x4a4b78]
push ebx
inc eax
cmp eax, 0x30
push esi
push edi
mov dword [0x4a4b78], eax
jge 0x42ba4b
mov edi, dword [ebp + 0xc]
xor eax, eax
lea esi, [esp + 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
call fcn.00411ae0
mov eax, 0x2000
mov ecx, esi
call fcn.00411b30
test al, al
je 0x42ba72
lea edx, [esp + 0x6a8]
push edx
mov bl, 1
push 0x104
mov byte [esp + 0x15], 1
mov byte [esp + 0x17], bl
mov byte [esp + 0x16], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x294]
push ecx
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea edx, [esp + 0x2ac0]
push edx
lea eax, [esp + 0x28bc]
push eax
lea ecx, [esp + 0x4a8]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x2a0]
push eax
call fcn.00415b80
add esp, 0x14
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x84]
push edx
call fcn.004131c5
lea eax, [esp + 0x4a8]
push eax
lea ecx, [esp + 0x8c]
push ecx
call fcn.00413197
add esp, 0x10
lea edx, [esp + 0x80]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x411764
mov bl, byte [esp + 0xf]
cmp bl, 1
jne 0x411920
mov al, byte [esp + 0x2c]
test al, 3
jne 0x42babe
test al, 4
jne 0x42baa2
lea edx, [esp + 0x8b8]
push edx
lea eax, [esp + 0x24]
push eax
mov eax, 0xfff
call fcn.00411600
test al, al
je 0x411920
inc dword [esp + 0x10]
xor esi, esi
xor edi, edi
jmp 0x4117b0
movzx ebx, word [esp + esi*2 + 0x8b8]
push ebx
call fcn.004152d9
add esp, 4
test eax, eax
je 0x4117d6
push ebx
call fcn.004152b0
add esp, 4
test eax, eax
jne 0x41194f
cmp word [esp + esi*2 + 0x8b8], 0
je 0x41180d
jmp 0x4117f0
mov ax, word [esp + esi*2 + 0x8b8]
mov word [esp + edi*2 + 0x8b8], ax
inc esi
inc edi
cmp word [esp + esi*2 + 0x8b8], 0
jne 0x4117f0
xor ecx, ecx
lea eax, [esp + 0x8b8]
mov word [esp + edi*2 + 0x8b8], cx
call fcn.00411970
lea edx, [esp + 0x8b8]
push edx
test al, al
je 0x42bb45
call fcn.0041503a
add esp, 4
test eax, eax
je 0x411880
lea esi, [eax - 1]
test esi, esi
jl 0x411876
jmp 0x411850
movzx edi, word [esp + esi*2 + 0x8b8]
push edi
call fcn.004152d9
add esp, 4
test eax, eax
je 0x411876
push edi
call fcn.004152b0
add esp, 4
test eax, eax
jne 0x42bada
xor eax, eax
mov word [esp + esi*2 + 0x8ba], ax
lea ecx, [esp + 0x8b8]
push ecx
xor bl, bl
call fcn.0041503a
add esp, 4
cmp eax, 2
jle 0x4118b9
mov esi, eax
mov dx, word [esp + esi*2 + 0x8b4]
and dx, 0x7f
movzx eax, dx
push eax
call fcn.004152b0
add esp, 4
test eax, eax
jne 0x411955
cmp byte [esp + 0xe], 1
je 0x42bafb
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x298]
push eax
lea ecx, [esp + 0x8c4]
push ecx
mov ecx, esi
call fcn.004119f0
cmp eax, 3
jne 0x42bb11
mov edx, dword [ebp + 0x10]
mov ecx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x8bc]
push eax
push ecx
call fcn.00411a30
cmp bl, 1
je 0x42bb3b
mov byte [esp + 0xe], 0
cmp byte [esp + 0xd], 1
je 0x411760
lea esi, [esp + 0x20]
call fcn.00411ae0
lea eax, [esp + 0x6a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.00411ae0
dec dword [0x4a4b78]
mov al, byte [esp + 0xd]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
inc esi
jmp 0x4117b0
cmp word [esp + esi*2 + 0x8b6], 0x5f
jne 0x4118b9
jmp 0x42bae8
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.0043ae82
dec dword [0x4a4b78]
xor al, al
jmp 0x411946
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp + 8]
push str.Error_opening_the_file
push edx
push eax
push ecx
call fcn.0043ae82
lea esi, [esp + 0x20]
call fcn.00411ae0
dec dword [0x4a4b78]
xor al, al
jmp 0x411946
push 0xfff
lea eax, [esp + 0x8bc]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00439db8
jmp 0x411798
push 0xfff
lea ecx, [esp + 0x8bc]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.00446bd0
jmp 0x411798
sub esi, 1
jns 0x411850
jmp 0x411876
lea esi, [esp + esi*2 + 0x8b6]
xor ecx, ecx
mov word [esi], cx
mov bl, 1
jmp 0x4118b9
mov eax, dword [ebp + 8]
lea edx, [esp + 0x8b8]
push edx
push eax
call fcn.0043ac45
jmp 0x411907
sub eax, 0
je 0x42bb31
sub eax, 2
je 0x4118f1
sub eax, 2
jne 0x411907
mov byte [esp + 0xf], al
jmp 0x411907
mov byte [esp + 0xd], 0
jmp 0x411907
mov byte [esp + 0xe], 1
jmp 0x411915
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
push str.Unterminated_string
push eax
push ecx
push edx
call fcn.0043ae82
mov byte [esp + 0xd], 0
jmp 0x411920