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

Disassembly:
sub esp, 0x410
lea eax, [esp + 0x208]
push ebx
push ebp
push esi
push edi
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x104
push 0x41c840
call ebp
push 0x5c
push 0x41c840
call fcn.00409ea6
add esp, 8
test eax, eax
je 0x401058
push 0x5c
push 0x41c840
call fcn.00409ea6
add esp, 8
xor ebx, ebx
mov byte [eax + 1], bl
jmp 0x401060
xor ebx, ebx
mov byte [0x41c840], bl
mov edi, str.Program_Files_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x41c840
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00401960
test eax, eax
je 0x4010f0
call fcn.00401960
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x41c840
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4170dc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x41c840
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00401930
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.IsInst
mov esi, edi
mov edx, ecx
mov edi, 0x41c840
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00401740
push eax
call fcn.00401710
push eax
call fcn.00406bf0
add esp, 0x10
test eax, eax
je 0x40118b
mov edi, 0x41c840
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x104
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x41c840
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
push ecx
push str.InstTo
call fcn.00401740
push eax
call fcn.00401710
push eax
call fcn.00406980
add esp, 0x18
push 0xfffffffffffffffa
call fcn.004068e0
push eax
call dword [sym.imp.USER32.dll_GetWindowLongA]
push ebx
push 0x401510
mov esi, eax
call fcn.004068e0
push eax
push str.SETUP
push esi
call dword [sym.imp.USER32.dll_DialogBoxParamA]
test eax, eax
jne 0x4011d3
lea edx, [esp + 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x410
ret
push 0x2f
push 0x41c840
call fcn.00409ea6
add esp, 8
cmp eax, ebx
je 0x4011fc
push 0x2f
push 0x41c840
mov byte [eax], 0x5c
call fcn.00409ea6
add esp, 8
cmp eax, ebx
jne 0x4011e6
push 0x4170c0
push 0x41c840
call fcn.00409e30
add esp, 8
cmp eax, ebx
je 0x40125e
cmp eax, 0x41c840
jne 0x401223
lea eax, [esp + 0x218]
push eax
jmp 0x40123d
xor ecx, ecx
mov cl, byte [eax - 1]
push ecx
call fcn.004048d0
add esp, 4
test eax, eax
jne 0x40125e
lea edx, [esp + 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x417070
call fcn.00406700
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x410
ret
push 0x41c840
call fcn.00403a70
add esp, 4
call fcn.004019c0
test eax, eax
je 0x4012e5
call fcn.00401930
push eax
push 0x41c840
call fcn.00409e30
add esp, 8
test eax, eax
jne 0x4012e5
mov edi, 0x4170dc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x41c840
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00401930
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x41c840
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x3a
push 0x41c840
call fcn.00409ea6
add esp, 8
test eax, eax
jne 0x40136a
lea eax, [esp + 0x10]
push 0x104
push eax
call ebp
lea ecx, [esp + 0x10]
push 0x3a
push ecx
call fcn.00409ea6
add esp, 8
cmp eax, ebx
je 0x40136a
mov byte [eax + 1], bl
mov edi, 0x41c840
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x10]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x41c840
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x3a
push 0x41c840
call fcn.00409ea6
add esp, 8
cmp eax, ebx
je 0x401440
lea ebp, [eax + 1]
mov al, byte [eax + 1]
cmp al, 0x5c
je 0x401440
mov edi, 0x41c840
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x3a
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
call fcn.00409ea6
mov byte [eax + 1], bl
or ecx, 0xffffffff
mov edi, 0x4170dc
xor eax, eax
add esp, 8
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x41c840
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41c840
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ecx + 0x41c83f], 0x5c
jne 0x4014a8
mov edi, 0x41c840
or ecx, 0xffffffff
xor eax, eax
mov edx, 0x41c840
repne scasb al, byte es:[edi]
not ecx
dec ecx
sub edx, 2
mov al, byte [ecx + edx]
push eax
call fcn.004048d0
add esp, 4
test eax, eax
jne 0x4014a8
push 0x41704c
call fcn.00406650
add esp, 4
lea ecx, [esp + 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x410
ret
lea edx, [esp + 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x41c840
push 0x417030
call fcn.00406840
add esp, 8
test eax, eax
je 0x4011c5
mov edi, 0x41c840
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x424]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x410
ret