Function at 0x401ed0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x700
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x200]
push ebx
push esi
push edi
mov edi, str._apppath_
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x20c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ebx, [esp + ecx + 0x20d]
push ebx
call fcn.00401600
add esp, 4
test eax, eax
jne 0x401f31
pop edi
pop esi
pop ebx
add esp, 0x700
ret
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
dec ecx
js 0x401f54
mov al, byte [ebx + ecx]
cmp al, 0x5c
je 0x401f50
cmp al, 0x2f
je 0x401f50
dec ecx
jns 0x401f40
jmp 0x401f54
mov byte [ebx + ecx], 0
mov esi, dword [esp + 0x718]
test esi, esi
je 0x401fb8
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
cmp eax, 1
jle 0x401fb8
mov cl, byte [eax + esi - 1]
dec eax
cmp cl, 0x5c
je 0x401fa2
cmp cl, 0x2f
je 0x401fa2
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x401fb8
mov ecx, eax
mov edi, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [ebx + eax], 0
mov edi, str._WIN_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x100
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
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
dec ecx
lea esi, [esp + ecx + 0x11]
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp eax, 1
jae 0x40200d
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x700
ret
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x40202e
mov al, byte [esi + ecx - 1]
dec ecx
cmp al, 0x5c
je 0x40202a
cmp al, 0x2f
jne 0x40202e
mov byte [esi + ecx], 0
mov edi, str._WINSYS_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x100
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x110]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + ecx + 0x111]
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, 1
jae 0x40208c
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x700
ret
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x4020ad
mov al, byte [esi + ecx - 1]
dec ecx
cmp al, 0x5c
je 0x4020a9
cmp al, 0x2f
jne 0x4020ad
mov byte [esi + ecx], 0
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x30c]
lea edx, [esp + 0x30c]
rep stosd dword es:[edi], eax
or ecx, 0xffffffff
lea edi, [esp + 0x20c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
lea edi, [esp + 0x20c]
repne scasb al, byte es:[edi]
not ecx
lea ebx, [esp + ecx + 0x20c]
lea edx, [esp + ecx + 0x30c]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0xc]
lea edx, [edx + ecx + 1]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add edx, ecx
lea ebx, [esp + ecx + 0xc]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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]
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x10c]
lea edx, [edx + ecx + 1]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add edx, ecx
lea edi, [esp + ecx + 0x10c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x710]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x30c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x714]
push ecx
push edx
push eax
call fcn.00405070
add esp, 0xc
neg eax
sbb eax, eax
pop edi
pop esi
pop ebx
neg eax
add esp, 0x700
ret