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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2cbc
call fcn.00426240
mov eax, dword [0x4a0878]
push ebx
inc eax
cmp eax, 0x30
push esi
push edi
mov dword [0x4a0878], eax
jge 0x42a8c9
mov edi, dword [ebp + 0xc]
xor eax, eax
lea esi, [esp + 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
call fcn.00410910
mov eax, 0x2000
mov ecx, esi
call fcn.00410960
test al, al
je 0x42a8f0
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.00415090
add esp, 0x14
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x84]
push edx
call fcn.00412576
lea eax, [esp + 0x4a8]
push eax
lea ecx, [esp + 0x8c]
push ecx
call fcn.00412548
add esp, 0x10
lea edx, [esp + 0x80]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x410594
mov bl, byte [esp + 0xf]
cmp bl, 1
jne 0x410751
mov al, byte [esp + 0x2c]
test al, 3
jne 0x42a93c
test al, 4
jne 0x42a920
lea edx, [esp + 0x8b8]
push edx
lea eax, [esp + 0x24]
push eax
mov eax, 0xfff
call fcn.00410430
test al, al
je 0x410751
inc dword [esp + 0x10]
xor esi, esi
xor edi, edi
jmp 0x4105e0
movzx ebx, word [esp + esi*2 + 0x8b8]
push ebx
call fcn.00414699
add esp, 4
test eax, eax
je 0x410606
push ebx
call fcn.00414670
add esp, 4
test eax, eax
jne 0x410780
cmp word [esp + esi*2 + 0x8b8], 0
je 0x41063d
jmp 0x410620
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 0x410620
xor ecx, ecx
lea eax, [esp + 0x8b8]
mov word [esp + edi*2 + 0x8b8], cx
call fcn.004107a0
test al, al
je 0x42a9c3
lea edx, [esp + 0x8b8]
push edx
call fcn.004143fa
add esp, 4
test eax, eax
je 0x4106b0
lea esi, [eax - 1]
test esi, esi
jl 0x4106a6
jmp 0x410680
movzx edi, word [esp + esi*2 + 0x8b8]
push edi
call fcn.00414699
add esp, 4
test eax, eax
je 0x4106a6
push edi
call fcn.00414670
add esp, 4
test eax, eax
jne 0x42a958
xor eax, eax
mov word [esp + esi*2 + 0x8ba], ax
lea ecx, [esp + 0x8b8]
push ecx
xor bl, bl
call fcn.004143fa
add esp, 4
cmp eax, 2
jle 0x4106e9
mov esi, eax
mov dx, word [esp + esi*2 + 0x8b4]
and dx, 0x7f
movzx eax, dx
push eax
call fcn.00414670
add esp, 4
test eax, eax
jne 0x410786
cmp byte [esp + 0xe], 1
je 0x42a979
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
push edi
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x29c]
push eax
lea ecx, [esp + 0x8c8]
push ecx
mov ecx, esi
call fcn.00410820
cmp eax, 3
jne 0x42a98f
mov eax, dword [esp + 0x10]
push edi
lea edx, [esp + 0x8bc]
push edx
push eax
call fcn.00410860
cmp bl, 1
je 0x42a9b9
mov byte [esp + 0xe], 0
cmp byte [esp + 0xd], 1
je 0x410590
lea esi, [esp + 0x20]
call fcn.00410910
lea edx, [esp + 0x6a8]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.00410910
dec dword [0x4a0878]
mov al, byte [esp + 0xd]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
inc esi
jmp 0x4105e0
cmp word [esp + esi*2 + 0x8b6], 0x5f
jne 0x4106e9
jmp 0x42a966
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.00439bbe
dec dword [0x4a0878]
xor al, al
jmp 0x410777
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.00439bbe
lea esi, [esp + 0x20]
call fcn.00410910
dec dword [0x4a0878]
xor al, al
jmp 0x410777
push 0xfff
lea eax, [esp + 0x8bc]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00438b0c
jmp 0x4105c8
push 0xfff
lea ecx, [esp + 0x8bc]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.00444f65
jmp 0x4105c8
sub esi, 1
jns 0x410680
jmp 0x4106a6
lea esi, [esp + esi*2 + 0x8b6]
xor ecx, ecx
mov word [esi], cx
mov bl, 1
jmp 0x4106e9
mov eax, dword [ebp + 8]
lea edx, [esp + 0x8b8]
push edx
push eax
call fcn.00439986
jmp 0x410738
sub eax, 0
je 0x42a9af
sub eax, 2
je 0x410725
sub eax, 2
jne 0x410738
mov byte [esp + 0xf], al
jmp 0x410738
mov byte [esp + 0xd], 0
jmp 0x410738
mov byte [esp + 0xe], 1
jmp 0x410746
mov edx, dword [esp + 0x10]
mov eax, dword [ebp + 0x14]
lea ecx, [esp + 0x8b8]
push ecx
mov ecx, dword [ebp + 8]
push str.Unterminated_string
push edx
push eax
push ecx
call fcn.00439bbe
mov byte [esp + 0xd], 0
jmp 0x410751