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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1b50
call fcn.00439b40
mov eax, dword [0x4713e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [str.c:_setup]
mov dword [ebp - 0x530], eax
mov ecx, dword [0x468ca4]
mov dword [ebp - 0x52c], ecx
mov dl, byte [0x468ca8]
mov byte [ebp - 0x528], dl
push 0x3f7
push 0
lea eax, [ebp - 0x527]
push eax
call fcn.0043a830
add esp, 0xc
mov byte [ebp - 0x1b30], 0
push 0x3ff
push 0
lea ecx, [ebp - 0x1b2f]
push ecx
call fcn.0043a830
add esp, 0xc
mov byte [ebp - 0x1330], 0
push 0x3ff
push 0
lea edx, [ebp - 0x132f]
push edx
call fcn.0043a830
add esp, 0xc
mov byte [ebp - 0x1730], 0
push 0x3ff
push 0
lea eax, [ebp - 0x172f]
push eax
call fcn.0043a830
add esp, 0xc
mov byte [ebp - 0x130], 0
push 0x12b
push 0
lea ecx, [ebp - 0x12f]
push ecx
call fcn.0043a830
add esp, 0xc
mov dword [ebp + 0x10], 1
cmp dword [0x4683a8], 2
jne 0x419d3b
mov dword [ebp + 0x10], 0
lea edx, [ebp - 0x1330]
push edx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x419d80
mov eax, 1
imul ecx, eax, 0
mov dword [ebp - 0x1b50], ecx
cmp dword [ebp - 0x1b50], 0x400
jae 0x419d6d
jmp 0x419d72
call fcn.0043920a
mov edx, dword [ebp - 0x1b50]
mov byte [ebp + edx - 0x1330], 0
push 0x2c
mov eax, dword [ebp + 0xc]
push eax
call fcn.00439480
add esp, 8
mov dword [ebp - 0x1b34], eax
cmp dword [ebp - 0x1b34], 0
je 0x419f0f
mov ecx, dword [ebp - 0x1b34]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1b34]
add edx, 1
mov dword [ebp - 0x1b34], edx
push 0x2c
mov eax, dword [ebp - 0x1b34]
push eax
call fcn.00439480
add esp, 8
mov dword [ebp - 0x1b3c], eax
cmp dword [ebp - 0x1b3c], 0
je 0x419e05
mov ecx, dword [ebp - 0x1b3c]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1b3c]
add edx, 1
mov dword [ebp - 0x1b3c], edx
mov eax, dword [ebp - 0x1b3c]
push eax
lea ecx, [ebp - 0x130]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [ebp - 0x1b34]
push edx
lea eax, [ebp - 0x1b30]
push eax
call fcn.004392f0
add esp, 8
lea ecx, [ebp - 0x1b30]
push ecx
lea edx, [ebp - 0xf30]
push edx
call fcn.004392f0
add esp, 8
lea eax, [ebp - 0xf30]
push eax
push 0x468cac
call fcn.004145f0
add esp, 8
lea ecx, [ebp - 0xf30]
push ecx
push 0x468cc8
call fcn.00426800
add esp, 8
mov edx, 1
imul eax, edx, 0
movzx ecx, byte [ebp + eax - 0xf30]
test ecx, ecx
je 0x419f0d
lea edx, [ebp - 0xf30]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x419f0d
push 0x5c
lea eax, [ebp - 0xf30]
push eax
call fcn.0043a8c0
add esp, 8
mov dword [ebp - 0x1b3c], eax
cmp dword [ebp - 0x1b3c], 0
je 0x419eb1
mov ecx, dword [ebp - 0x1b3c]
mov byte [ecx], 0
jmp 0x419ee0
mov edx, 1
imul eax, edx, 0
mov dword [ebp - 0x1b4c], eax
cmp dword [ebp - 0x1b4c], 0x400
jae 0x419ecd
jmp 0x419ed2
call fcn.0043920a
mov ecx, dword [ebp - 0x1b4c]
mov byte [ebp + ecx - 0xf30], 0
mov edx, 1
imul eax, edx, 0
movzx ecx, byte [ebp + eax - 0xf30]
test ecx, ecx
je 0x419f08
lea edx, [ebp - 0xf30]
push edx
push 0x468ce4
call fcn.00426800
add esp, 8
jmp 0x419e59
jmp 0x419f1b
lea eax, [ebp - 0x530]
mov dword [ebp - 0x1b34], eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0x468d00
lea edx, [ebp - 0x930]
push edx
call fcn.00439aa0
add esp, 0xc
mov dword [ebp - 0x1b38], eax
lea eax, [ebp - 0x1730]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x419f7e
mov ecx, 1
imul edx, ecx, 0
mov dword [ebp - 0x1b48], edx
cmp dword [ebp - 0x1b48], 0x400
jae 0x419f6b
jmp 0x419f70
call fcn.0043920a
mov eax, dword [ebp - 0x1b48]
mov byte [ebp + eax - 0x1730], 0
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [ebp + edx - 0x1730]
test eax, eax
je 0x419fba
lea ecx, [ebp - 0x1730]
push ecx
push 0x468d04
call fcn.004145f0
add esp, 8
lea edx, [ebp - 0x1730]
push edx
push str.CurrentDirectory__s_r_n
call fcn.00426800
add esp, 8
push 0x468d34
call fcn.004145f0
add esp, 4
push str.Ask_user_for_a_path_r_n
call fcn.00426800
add esp, 4
mov eax, 1
imul ecx, eax, 0
movzx edx, byte [ebp + ecx - 0x130]
test edx, edx
je 0x41a00c
lea eax, [ebp - 0x130]
push eax
mov ecx, dword [ebp - 0x1b34]
push ecx
push 0x468d64
lea edx, [ebp - 0xb30]
push edx
call fcn.00439aa0
add esp, 0x10
jmp 0x41a020
mov eax, dword [ebp - 0x1b34]
push eax
lea ecx, [ebp - 0xb30]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 0x1b44], 1
mov edx, 1
imul eax, edx, 0
movzx ecx, byte [ebp + eax - 0xb30]
test ecx, ecx
je 0x41a06e
mov edx, 1
imul eax, edx, 0
movzx ecx, byte [ebp + eax - 0xb30]
cmp ecx, 0x2c
je 0x41a06e
lea edx, [ebp - 0xb30]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0041a450
add esp, 8
mov dword [ebp - 0x1b40], eax
jmp 0x41a082
mov dword [ebp - 0x1b40], 7
mov dword [ebp - 0x1b44], 0
cmp dword [ebp - 0x1b40], 2
jne 0x41a0a1
mov dword [0x4850b8], 1
xor eax, eax
jmp 0x41a2c6
cmp dword [ebp - 0x1b40], 6
jne 0x41a0fb
mov ecx, 0x400
sub ecx, dword [ebp - 0x1b38]
push ecx
mov edx, dword [ebp - 0x1b34]
push edx
mov eax, dword [ebp - 0x1b38]
lea ecx, [ebp + eax - 0x930]
push ecx
call fcn.004395b0
add esp, 0xc
mov edx, dword [ebp - 0x1b34]
push edx
lea eax, [ebp - 0x530]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [ebp - 0x530]
push ecx
call fcn.0041e3a0
add esp, 4
jmp 0x41a20f
cmp dword [ebp + 0x10], 0
je 0x41a19e
mov edx, 0x400
sub edx, dword [ebp - 0x1b38]
push edx
lea eax, [ebp - 0x1b30]
push eax
mov ecx, dword [ebp - 0x1b38]
lea edx, [ebp + ecx - 0x930]
push edx
call fcn.00414070
add esp, 0xc
lea eax, [ebp - 0x130]
push eax
mov ecx, 0x400
sub ecx, dword [ebp - 0x1b38]
push ecx
mov edx, dword [ebp - 0x1b38]
lea eax, [ebp + edx - 0x930]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041afe0
test eax, eax
jne 0x41a16e
cmp dword [ebp - 0x1b44], 0
jne 0x41a16c
xor eax, eax
jmp 0x41a2c6
jmp 0x41a19c
push 0x400
mov edx, dword [ebp - 0x1b38]
lea eax, [ebp + edx - 0x930]
push eax
lea ecx, [ebp - 0x530]
push ecx
call fcn.004395b0
add esp, 0xc
lea edx, [ebp - 0x530]
mov dword [ebp - 0x1b34], edx
jmp 0x41a20f
lea eax, [ebp - 0x130]
push eax
mov ecx, 0x400
sub ecx, dword [ebp - 0x1b38]
push ecx
mov edx, dword [ebp - 0x1b38]
lea eax, [ebp + edx - 0x930]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041b270
add esp, 0x10
test eax, eax
jne 0x41a1e1
cmp dword [ebp - 0x1b44], 0
jne 0x41a1df
xor eax, eax
jmp 0x41a2c6
jmp 0x41a20f
push 0x400
mov edx, dword [ebp - 0x1b38]
lea eax, [ebp + edx - 0x930]
push eax
lea ecx, [ebp - 0x530]
push ecx
call fcn.004395b0
add esp, 0xc
lea edx, [ebp - 0x530]
mov dword [ebp - 0x1b34], edx
cmp dword [ebp - 0x1b40], 7
je 0x419fd4
mov eax, 1
imul ecx, eax, 0
movzx edx, byte [ebp + ecx - 0x1330]
test edx, edx
je 0x41a265
lea eax, [ebp - 0x1330]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x1330]
push ecx
push 0x468d6c
call fcn.004145f0
add esp, 8
lea edx, [ebp - 0x1330]
push edx
push str.SetCurrentDirectory__s_r_n
call fcn.00426800
add esp, 8
mov eax, dword [ebp - 0x1b38]
lea ecx, [ebp + eax - 0x930]
push ecx
call fcn.00415220
add esp, 4
test eax, eax
jne 0x41a283
xor eax, eax
jmp 0x41a2c6
lea edx, [ebp - 0x930]
push edx
push str.Define___s__r_n
call fcn.004145f0
add esp, 8
mov eax, dword [ebp - 0x1b38]
lea ecx, [ebp + eax - 0x930]
push ecx
push str.Answer:___s__r_n
call fcn.00426800
add esp, 8
lea edx, [ebp - 0x930]
push edx
call fcn.00451a10
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00439b24
mov esp, ebp
pop ebp
ret