Function at 0x6159a8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x30
push 0
push 0
dec ecx
jne 0x6159b0
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x615edb
push dword fs:[eax]
mov dword fs:[eax], esp
mov ecx, dword [ebx + 4]
mov dl, 1
mov eax, dword [sym.imp.vcl70.bpl__Dialogs_TOpenDialog_]
call sub.vcl70.bpl__Dialogs_TOpenDialog__bctr_qqrp18Classes_TComponent
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x615e21
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 8]
mov eax, ebx
call sub.vcl70.bpl__Controls_TControl_GetText_qqrv
mov eax, dword [ebp - 8]
mov edx, 0x615ef4
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x615a34
lea eax, [ebp - 8]
call sub.rtl70.bpl__System__LStrClr_qqrpv
jmp 0x615a34
push 1
lea eax, [ebp - 0x11c]
push eax
xor ecx, ecx
mov edx, 0x615f00
mov eax, dword [ebp - 8]
call sub.PCommonUtil.bpl__Ncutil_ReplaceStr_qqr17System_AnsiStringt1t1o
mov edx, dword [ebp - 0x11c]
lea eax, [ebp - 8]
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
lea eax, [ebp - 0x120]
mov edx, dword [ebp - 8]
call sub.rtl70.bpl__System__WStrFromLStr_qqrr17System_WideStringx17System_AnsiString
mov edx, dword [ebp - 0x120]
mov eax, 0x615f08
call sub.PCommonUtil.bpl__Ncutil_mypos_qqr17System_WideStringt1
test eax, eax
jg 0x615a0e
jmp 0x615a7e
push 1
lea eax, [ebp - 0x124]
push eax
xor ecx, ecx
mov edx, 0x615f14
mov eax, dword [ebp - 8]
call sub.PCommonUtil.bpl__Ncutil_ReplaceStr_qqr17System_AnsiStringt1t1o
mov edx, dword [ebp - 0x124]
lea eax, [ebp - 8]
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
lea eax, [ebp - 0x128]
mov edx, dword [ebp - 8]
call sub.rtl70.bpl__System__WStrFromLStr_qqrr17System_WideStringx17System_AnsiString
mov edx, dword [ebp - 0x128]
mov eax, 0x615f1c
call sub.PCommonUtil.bpl__Ncutil_mypos_qqr17System_WideStringt1
test eax, eax
jg 0x615a58
lea eax, [ebp - 0x12c]
mov edx, dword [ebp - 8]
call sub.rtl70.bpl__System__WStrFromLStr_qqrr17System_WideStringx17System_AnsiString
mov edx, dword [ebp - 0x12c]
mov eax, 0x615f24
call sub.PCommonUtil.bpl__Ncutil_mypos_qqr17System_WideStringt1
test eax, eax
jle 0x615b05
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x134]
mov edx, dword [ebp - 8]
call sub.rtl70.bpl__System__WStrFromLStr_qqrr17System_WideStringx17System_AnsiString
mov edx, dword [ebp - 0x134]
mov eax, 0x615f24
call sub.PCommonUtil.bpl__Ncutil_mypos_qqr17System_WideStringt1
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call sub.PCommonUtil.bpl__Ncutil_copystr_qqr17System_AnsiStringii
mov edx, dword [ebp - 0x130]
lea eax, [ebp - 8]
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 8]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 8]
call sub.rtl70.bpl__Sysutils_ExtractFileName_qqrx17System_AnsiString
mov eax, dword [ebp - 0xc]
call sub.rtl70.bpl__Sysutils_DirectoryExists_qqrx17System_AnsiString
test al, al
jne 0x615b52
lea eax, [ebp - 0x14]
push eax
push 0
push 0
call sub.shell32.dll_SHGetSpecialFolderLocation
lea eax, [ebp - 0x118]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.shell32.dll_SHGetPathFromIDListA
lea edx, [ebp - 0xc]
lea eax, [ebp - 0x118]
call sub.rtl70.bpl__Sysutils_StrPas_qqrpxc
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call sub.vcl70.bpl__Dialogs_TOpenDialog_SetInitialDir_qqrx17System_AnsiString
mov eax, dword [ebp - 4]
add eax, 0x78
mov edx, dword [ebp - 0x10]
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
mov eax, dword [ebp - 4]
add eax, 0x60
mov edx, 0x615f30
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
mov eax, dword [ebp - 4]
mov dword [eax + 0x64], 6
lea edx, [ebp - 0x13c]
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__Sysutils_ExtractFileExt_qqrx17System_AnsiString
mov eax, dword [ebp - 0x13c]
lea edx, [ebp - 0x138]
call sub.rtl70.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
mov eax, dword [ebp - 0x138]
mov edx, 0x615fcc
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x615bc0
mov eax, dword [ebp - 4]
mov dword [eax + 0x64], 1
lea edx, [ebp - 0x144]
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__Sysutils_ExtractFileExt_qqrx17System_AnsiString
mov eax, dword [ebp - 0x144]
lea edx, [ebp - 0x140]
call sub.rtl70.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
mov eax, dword [ebp - 0x140]
mov edx, 0x615fdc
call sub.rtl70.bpl__System__LStrCmp_qqrv
je 0x615c22
lea edx, [ebp - 0x14c]
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__Sysutils_ExtractFileExt_qqrx17System_AnsiString
mov eax, dword [ebp - 0x14c]
lea edx, [ebp - 0x148]
call sub.rtl70.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
mov eax, dword [ebp - 0x148]
mov edx, 0x615fec
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x615c2c
mov eax, dword [ebp - 4]
mov dword [eax + 0x64], 2
lea edx, [ebp - 0x154]
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__Sysutils_ExtractFileExt_qqrx17System_AnsiString
mov eax, dword [ebp - 0x154]
lea edx, [ebp - 0x150]
call sub.rtl70.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
mov eax, dword [ebp - 0x150]
mov edx, 0x615ffc
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x615c67
mov eax, dword [ebp - 4]
mov dword [eax + 0x64], 3
lea edx, [ebp - 0x15c]
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__Sysutils_ExtractFileExt_qqrx17System_AnsiString
mov eax, dword [ebp - 0x15c]
lea edx, [ebp - 0x158]
call sub.rtl70.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
mov eax, dword [ebp - 0x158]
mov edx, 0x61600c
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x615ca2
mov eax, dword [ebp - 4]
mov dword [eax + 0x64], 4
lea edx, [ebp - 0x164]
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__Sysutils_ExtractFileExt_qqrx17System_AnsiString
mov eax, dword [ebp - 0x164]
lea edx, [ebp - 0x160]
call sub.rtl70.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
mov eax, dword [ebp - 0x160]
mov edx, 0x61601c
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x615cdd
mov eax, dword [ebp - 4]
mov dword [eax + 0x64], 5
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
or eax, dword [0x616024]
mov edx, dword [ebp - 4]
mov dword [edx + 0x5c], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x3c]
test al, al
je 0x615e0b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7c]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
jne 0x615d2d
lea edx, [ebp - 0x168]
mov eax, dword [ebp - 4]
call sub.vcl70.bpl__Dialogs_TOpenDialog_GetFileName_qqrv
mov edx, dword [ebp - 0x168]
mov eax, ebx
call sub.vcl70.bpl__Controls_TControl_SetText_qqrx17System_AnsiString
jmp 0x615dc1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7c]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x615dc1
inc eax
mov dword [ebp - 0x18], eax
xor esi, esi
test esi, esi
jne 0x615d6d
lea ecx, [ebp - 0x16c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7c]
mov edx, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x16c]
mov eax, ebx
call sub.vcl70.bpl__Controls_TControl_SetText_qqrx17System_AnsiString
jmp 0x615dbb
lea edx, [ebp - 0x174]
mov eax, ebx
call sub.vcl70.bpl__Controls_TControl_GetText_qqrv
push dword [ebp - 0x174]
push 0x616030
lea ecx, [ebp - 0x178]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7c]
mov edx, esi
mov edi, dword [eax]
call dword [edi + 0xc]
push dword [ebp - 0x178]
lea eax, [ebp - 0x170]
mov edx, 3
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov edx, dword [ebp - 0x170]
mov eax, ebx
call sub.vcl70.bpl__Controls_TControl_SetText_qqrx17System_AnsiString
inc esi
dec dword [ebp - 0x18]
jne 0x615d47
push 0
lea edx, [ebp - 0x180]
mov eax, ebx
call sym.P_Interface.bpl__Unit_tabpub_TMyButtonEdit_Objectname_qqrv
mov eax, dword [ebp - 0x180]
push eax
lea edx, [ebp - 0x184]
mov eax, ebx
call sub.vcl70.bpl__Controls_TControl_GetText_qqrv
mov eax, dword [ebp - 0x184]
push eax
push 0x61603c
push 0
push 0
lea eax, [ebp - 0x17c]
push eax
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_STRNSDJH]
mov eax, dword [eax]
xor ecx, ecx
xor edx, edx
call sym.P_Interface.bpl__Publicutil_ReadXMLConfig_qqr17System_AnsiStringt1t1t1t1t1t1ot1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x615e28
mov eax, dword [ebp - 4]
call sub.rtl70.bpl__System_TObject_Free_qqrv
ret