Function at 0x687c84
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdcc
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x687ef3
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Classes_TStringList_]
call sub.rtl120.bpl__Classes_TStringList__bctr_qqrv
mov dword [ebp - 0xc], eax
push 0x104
lea eax, [ebp - 0x216]
push eax
call sub.kernel32.dll_GetSystemDirectoryW
lea eax, [ebp - 0x21c]
lea edx, [ebp - 0x216]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov edx, dword [ebp - 0x21c]
lea eax, [ebp - 4]
mov ecx, 0x687f14
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
xor eax, eax
push ebp
push 0x687ec6
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__Sysutils_FileExists_qqrx20System_UnicodeString
test al, al
je 0x687eb0
xor eax, eax
push ebp
push 0x687ea2
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x687e51
inc esi
xor ebx, ebx
lea ecx, [ebp - 0x220]
mov edx, ebx
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x220]
mov eax, 0x687f48
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jg 0x687df7
lea ecx, [ebp - 0x224]
mov edx, ebx
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x224]
mov eax, 0x687f68
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jg 0x687df7
lea ecx, [ebp - 0x228]
mov edx, ebx
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x228]
mov eax, 0x687f88
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jg 0x687df7
lea ecx, [ebp - 0x22c]
mov edx, ebx
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x22c]
mov eax, 0x687fc0
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jle 0x687e49
lea ecx, [ebp - 0x230]
mov edx, ebx
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x230]
mov eax, 0x687fe8
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
dec eax
je 0x687e49
lea ecx, [ebp - 0x234]
mov edx, ebx
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x234]
mov eax, 0x687fe8
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
dec eax
je 0x687e49
xor ecx, ecx
mov edx, ebx
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0x20]
inc ebx
dec esi
jne 0x687d67
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__Sysutils_FileGetAttr_qqrx20System_UnicodeString
mov ebx, eax
test bl, 1
jne 0x687e65
test bl, 2
je 0x687e75
mov edx, ebx
and edx, 0xfffffffe
and edx, 0xfffffffd
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__Sysutils_FileSetAttr_qqrx20System_UnicodeStringi
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x7c]
test bl, 1
jne 0x687e8a
test bl, 2
je 0x687e94
mov edx, ebx
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__Sysutils_FileSetAttr_qqrx20System_UnicodeStringi
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x687eb0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x687ecd
mov eax, dword [ebp - 0xc]
call sub.rtl120.bpl__System_TObject_Free_qqrv
ret