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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2cbc
call fcn.00426210
mov eax, dword [0x4a0878]
push ebx
inc eax
cmp eax, 0x30
push esi
push edi
mov dword [0x4a0878], eax
jge 0x42a8d8
mov edi, dword [ebp + 0xc]
xor eax, eax
lea esi, [esp + 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
call fcn.00410900
mov eax, 0x2000
mov ecx, esi
call fcn.00410950
test al, al
je 0x42a8ff
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.00415060
add esp, 0x14
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x84]
push edx
call fcn.00412546
lea eax, [esp + 0x4a8]
push eax
lea ecx, [esp + 0x8c]
push ecx
call fcn.00412518
add esp, 0x10
lea edx, [esp + 0x80]
push edx
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
jmp 0x410584
mov bl, byte [esp + 0xf]
cmp bl, 1
jne 0x410741
mov al, byte [esp + 0x2c]
test al, 3
jne 0x42a94b
test al, 4
jne 0x42a92f
lea edx, [esp + 0x8b8]
push edx
lea eax, [esp + 0x24]
push eax
mov eax, 0xfff
call fcn.00410420
test al, al
je 0x410741
inc dword [esp + 0x10]
xor esi, esi
xor edi, edi
jmp 0x4105d0
movzx ebx, word [esp + esi*2 + 0x8b8]
push ebx
call fcn.00414669
add esp, 4
test eax, eax
je 0x4105f6
push ebx
call fcn.00414640
add esp, 4
test eax, eax
jne 0x410770
cmp word [esp + esi*2 + 0x8b8], 0
je 0x41062d
jmp 0x410610
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 0x410610
xor ecx, ecx
lea eax, [esp + 0x8b8]
mov word [esp + edi*2 + 0x8b8], cx
call fcn.00410790
test al, al
je 0x42a9d2
lea edx, [esp + 0x8b8]
push edx
call fcn.004143ca
add esp, 4
test eax, eax
je 0x4106a0
lea esi, [eax - 1]
test esi, esi
jl 0x410696
jmp 0x410670
movzx edi, word [esp + esi*2 + 0x8b8]
push edi
call fcn.00414669
add esp, 4
test eax, eax
je 0x410696
push edi
call fcn.00414640
add esp, 4
test eax, eax
jne 0x42a967
xor eax, eax
mov word [esp + esi*2 + 0x8ba], ax
lea ecx, [esp + 0x8b8]
push ecx
xor bl, bl
call fcn.004143ca
add esp, 4
cmp eax, 2
jle 0x4106d9
mov esi, eax
mov dx, word [esp + esi*2 + 0x8b4]
and dx, 0x7f
movzx eax, dx
push eax
call fcn.00414640
add esp, 4
test eax, eax
jne 0x410776
cmp byte [esp + 0xe], 1
je 0x42a988
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.00410810
cmp eax, 3
jne 0x42a99e
mov eax, dword [esp + 0x10]
push edi
lea edx, [esp + 0x8bc]
push edx
push eax
call fcn.00410850
cmp bl, 1
je 0x42a9c8
mov byte [esp + 0xe], 0
cmp byte [esp + 0xd], 1
je 0x410580
lea esi, [esp + 0x20]
call fcn.00410900
lea edx, [esp + 0x6a8]
push edx
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
call fcn.00410900
dec dword [0x4a0878]
mov al, byte [esp + 0xd]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
inc esi
jmp 0x4105d0
cmp word [esp + esi*2 + 0x8b6], 0x5f
jne 0x4106d9
jmp 0x42a975
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.00439b66
dec dword [0x4a0878]
xor al, al
jmp 0x410767
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.00439b66
lea esi, [esp + 0x20]
call fcn.00410900
dec dword [0x4a0878]
xor al, al
jmp 0x410767
push 0xfff
lea eax, [esp + 0x8bc]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00438ade
jmp 0x4105b8
push 0xfff
lea ecx, [esp + 0x8bc]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.00444f32
jmp 0x4105b8
sub esi, 1
jns 0x410670
jmp 0x410696
lea esi, [esp + esi*2 + 0x8b6]
xor ecx, ecx
mov word [esi], cx
mov bl, 1
jmp 0x4106d9
mov eax, dword [ebp + 8]
lea edx, [esp + 0x8b8]
push edx
push eax
call fcn.0043992e
jmp 0x410728
sub eax, 0
je 0x42a9be
sub eax, 2
je 0x410715
sub eax, 2
jne 0x410728
mov byte [esp + 0xf], al
jmp 0x410728
mov byte [esp + 0xd], 0
jmp 0x410728
mov byte [esp + 0xe], 1
jmp 0x410736
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.00439b66
mov byte [esp + 0xd], 0
jmp 0x410741