Function at 0x4067a8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x4c
push 0
push 0
dec ecx
jne 0x4067b1
xchg dword [ebp - 4], ecx
push ebx
push esi
test dl, dl
je 0x4067c9
add esp, 0xfffffff0
call sub.rtl70.bpl__System__ClassCreate_qqrp17System_TMetaClasso
mov dword [ebp - 4], ecx
mov ebx, edx
mov esi, eax
mov eax, dword [ebp - 4]
call sub.rtl70.bpl__System__LStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x406b8e
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [sym.imp.rtl70.bpl__Classes_TList_]
call sub.rtl70.bpl__System_TObject__bctr_qqrv
mov dword [esi + 0x14], eax
lea eax, [esi + 4]
mov edx, dword [ebp - 4]
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
call fcn.004061a0
mov byte [esi + 0x10], al
push 0xff
lea eax, [ebp - 0x212]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
lea edx, [ebp - 0x218]
lea eax, [ebp - 0x212]
call sub.rtl70.bpl__Sysutils_StrPas_qqrpxc
mov edx, dword [ebp - 0x218]
lea eax, [esi + 0x2c]
mov ecx, 0x406bbc
call sub.rtl70.bpl__System__LStrCat3_qqrv
push 0xff
lea eax, [ebp - 0x113]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
lea edx, [ebp - 0x21c]
lea eax, [ebp - 0x113]
call sub.rtl70.bpl__Sysutils_StrPas_qqrpxc
mov edx, dword [ebp - 0x21c]
lea eax, [esi + 0x28]
mov ecx, 0x406bbc
call sub.rtl70.bpl__System__LStrCat3_qqrv
lea edx, [ebp - 0x224]
mov eax, dword [sym.imp.vcl70.bpl__Forms_Application]
mov eax, dword [eax]
call sub.vcl70.bpl__Forms_TApplication_GetExeName_qqrv
mov eax, dword [ebp - 0x224]
lea edx, [ebp - 0x220]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
mov edx, dword [ebp - 0x220]
lea eax, [esi + 8]
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
push dword [esi + 8]
push 0x406bbc
lea ecx, [ebp - 0x228]
mov edx, dword [0x41f2bc]
mov eax, esi
call fcn.004081c8
push dword [ebp - 0x228]
push 0x406bc8
lea eax, [ebp - 0x10]
mov edx, 4
call sub.rtl70.bpl__System__LStrCatN_qqrv
push dword [esi + 8]
push 0x406bbc
lea edx, [ebp - 0x22c]
mov eax, esi
call fcn.004080fc
push dword [ebp - 0x22c]
lea eax, [ebp - 0x14]
mov edx, 3
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
je 0x406921
mov eax, dword [ebp - 0x14]
call sub.rtl70.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
jne 0x406921
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__Sysutils_RenameFile_qqrx17System_AnsiStringt1
push dword [esi + 8]
push 0x406bbc
lea edx, [ebp - 0x230]
mov eax, esi
call fcn.004080fc
push dword [ebp - 0x230]
lea eax, [ebp - 0xc]
mov edx, 3
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0xc]
call sub.rtl70.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
jne 0x406a0c
lea edx, [ebp - 0x234]
mov eax, dword [0x41f2bc]
call sub.rtl70.bpl__Sysutils_LowerCase_qqrx17System_AnsiString
mov edx, dword [ebp - 0x234]
mov eax, 0x406be4
call sub.rtl70.bpl__System__LStrPos_qqrv
test eax, eax
jle 0x406a28
cmp dword [esi + 4], 0
jne 0x4069b3
mov al, byte [0x406bec]
push eax
lea eax, [ebp - 0x238]
push eax
xor ecx, ecx
mov edx, 0x406bf8
mov eax, dword [0x41f2bc]
call sub.rtl70.bpl__Sysutils_StringReplace_qqrx17System_AnsiStringt1t149System__Set_t21Sysutils_SysUtils__94_iuc_0_iuc_1_
mov edx, dword [ebp - 0x238]
lea eax, [esi + 4]
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
lea ecx, [ebp - 0x23c]
mov edx, 0x406bc8
mov eax, esi
call fcn.0040837c
mov edx, dword [ebp - 0x23c]
lea eax, [esi + 0x1c]
call sub.rtl70.bpl__System__IntfCopy_qqrr45System__DelphiInterface_t17System_IInterface_x45System__DelphiInterface_t17System_IInter
lea eax, [ebp - 0x24c]
mov edx, dword [ebp - 0xc]
call sub.rtl70.bpl__Variants__OleVarFromLStr_qqrr8TVarDatax17System_AnsiString
push dword [ebp - 0x240]
push dword [ebp - 0x244]
push dword [ebp - 0x248]
push dword [ebp - 0x24c]
mov eax, dword [esi + 0x1c]
push eax
mov eax, dword [eax]
call dword [eax + 0x108]
call sub.rtl70.bpl__System__CheckAutoResult_qqrl
jmp 0x406a28
lea edx, [ebp - 0x250]
mov eax, dword [ebp - 0xc]
call fcn.00405eec
mov edx, dword [ebp - 0x250]
lea eax, [esi + 0x1c]
call sub.rtl70.bpl__System__IntfCopy_qqrr45System__DelphiInterface_t17System_IInterface_x45System__DelphiInterface_t17System_IInter
cmp dword [ebp - 4], 0
jne 0x406af7
lea ecx, [ebp - 0x254]
mov edx, dword [0x41f2bc]
mov eax, esi
call fcn.004082a8
mov edx, dword [ebp - 0x254]
lea eax, [esi + 4]
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
cmp dword [esi + 4], 0
jne 0x406af7
lea eax, [ebp - 8]
call sub.rtl70.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
push eax
push 0x406c04
mov eax, dword [esi + 0x1c]
push eax
mov eax, dword [eax]
call dword [eax + 0x94]
call sub.rtl70.bpl__System__CheckAutoResult_qqrl
cmp dword [ebp - 8], 0
je 0x406ac5
lea eax, [ebp - 0x258]
push eax
xor ecx, ecx
mov edx, 0x406c2c
mov eax, dword [ebp - 8]
call fcn.004060b4
cmp dword [ebp - 0x258], 0
je 0x406ac5
lea eax, [ebp - 0x25c]
push eax
xor ecx, ecx
mov edx, 0x406c2c
mov eax, dword [ebp - 8]
call fcn.004060b4
mov edx, dword [ebp - 0x25c]
lea eax, [esi + 4]
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
cmp dword [esi + 4], 0
jne 0x406af7
mov al, byte [0x406bec]
push eax
lea eax, [ebp - 0x260]
push eax
xor ecx, ecx
mov edx, 0x406bf8
mov eax, dword [0x41f2bc]
call sub.rtl70.bpl__Sysutils_StringReplace_qqrx17System_AnsiStringt1t149System__Set_t21Sysutils_SysUtils__94_iuc_0_iuc_1_
mov edx, dword [ebp - 0x260]
lea eax, [esi + 4]
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
lea ecx, [ebp - 0x264]
mov edx, 0x406c40
mov eax, esi
call fcn.0040837c
mov edx, dword [ebp - 0x264]
lea eax, [esi + 0x18]
call sub.rtl70.bpl__System__IntfCopy_qqrr45System__DelphiInterface_t17System_IInterface_x45System__DelphiInterface_t17System_IInter
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406b95
lea eax, [ebp - 0x264]
call sub.rtl70.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
lea eax, [ebp - 0x260]
mov edx, 4
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x250]
call sub.rtl70.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
lea eax, [ebp - 0x24c]
call sub.rtl70.bpl__Variants__VarClr_qqrr8TVarData
lea eax, [ebp - 0x23c]
call sub.rtl70.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
lea eax, [ebp - 0x238]
mov edx, 9
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x14]
mov edx, 3
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 8]
call sub.rtl70.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
lea eax, [ebp - 4]
call sub.rtl70.bpl__System__LStrClr_qqrpv
ret