Function at 0x5c9140
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x17
push 0
push 0
dec ecx
jne 0x5c9148
push ebx
push esi
push edi
mov dword [ebp - 0x30], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5c9761
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 8]
mov eax, 0x5c9780
call sub.xmlrtl170.bpl__Xml_Xmldoc_NewXMLDocument_qqr20System_UnicodeString
mov edx, 0x5c9794
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x58]
movzx edx, byte [0x5c97a0]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x64]
lea ecx, [ebp - 0xc]
mov edx, 0x5c97b0
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0x78]
lea eax, [ebp - 0x10]
push eax
or ecx, 0xffffffff
mov edx, 0x5c97dc
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0x6c]
push ebp
lea eax, [ebp - 0x3c]
call fcn.005c8f3c
pop ecx
mov edx, dword [ebp - 0x3c]
lea eax, [ebp - 0x1c]
call sub.rtl170.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x96c]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x5c92c9
inc esi
xor ebx, ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x96c]
mov edx, ebx
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
movzx eax, byte [eax + 0x37c]
dec eax
sub al, 2
jae 0x5c92c1
cmp dword [ebp - 0x30], 0
je 0x5c9221
mov eax, dword [ebp - 0x34]
call sub.PQLibPack17.bpl__Pqigraphstation_TPQGraphStation_FindParentTab_qqrv
cmp eax, dword [ebp - 0x30]
jne 0x5c92c1
mov eax, dword [ebp - 0x34]
call sub.PQLibPack17.bpl__Pqigraphstation_TPQGraphStation_GetHighBusBar_qqrv
test al, al
jb 0x5c92c1
inc eax
mov byte [ebp - 0x36], al
mov byte [ebp - 0x35], 0
movzx edx, byte [ebp - 0x35]
lea ecx, [ebp - 0x20]
mov eax, dword [ebp - 0x34]
call sub.PQLibPack17.bpl__Pqigraphstation_TPQGraphStation_GetIDNameBB_qqr17Sysfkts_TPQBusBar
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc38]
mov edx, dword [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx + 0x5c]
test eax, eax
jge 0x5c92b5
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0x11
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0x11
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x210]
mov dword [ebp - 0x48], eax
mov byte [ebp - 0x44], 0x11
lea edx, [ebp - 0x60]
mov ecx, 3
mov eax, 0x5c97fc
call sub.rtl170.bpl__System_Sysutils_Format_qqrx20System_UnicodeStringpx14System_TVarRecxi
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc38]
mov ecx, dword [ebp - 0x34]
mov edi, dword [eax]
call dword [edi + 0x40]
inc byte [ebp - 0x35]
dec byte [ebp - 0x36]
jne 0x5c9239
inc ebx
dec esi
jne 0x5c91e4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc38]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x5c93aa
inc esi
xor ebx, ebx
lea ecx, [ebp - 0x24]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc38]
mov edx, ebx
call sub.rtl170.bpl__System_Classes_TStrings_GetName_qqri
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc38]
mov edx, ebx
call sub.rtl170.bpl__System_Classes_TStrings_GetValueFromIndex_qqri
lea eax, [ebp - 0x14]
push eax
or ecx, 0xffffffff
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0x6c]
lea eax, [ebp - 0x18]
push eax
or ecx, 0xffffffff
mov edx, 0x5c9820
mov eax, dword [ebp - 0x14]
mov edi, dword [eax]
call dword [edi + 0x6c]
lea ecx, [ebp - 0x64]
mov edx, dword [sym.imp.PQLibPack17.bpl__Sysfkts_CSepa]
movzx edx, word [edx]
lea eax, [ebp - 0x28]
call sub.PQLibPack17.bpl__Sysfkts_ExtractToChar_qqrr20System_UnicodeStringb
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x68]
lea eax, [ebp - 0x18]
push eax
or ecx, 0xffffffff
mov edx, 0x5c9834
mov eax, dword [ebp - 0x14]
mov edi, dword [eax]
call dword [edi + 0x6c]
lea ecx, [ebp - 0x68]
mov edx, dword [sym.imp.PQLibPack17.bpl__Sysfkts_CSepa]
movzx edx, word [edx]
lea eax, [ebp - 0x28]
call sub.PQLibPack17.bpl__Sysfkts_ExtractToChar_qqrr20System_UnicodeStringb
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x68]
lea eax, [ebp - 0x18]
push eax
or ecx, 0xffffffff
mov edx, 0x5c984c
mov eax, dword [ebp - 0x14]
mov edi, dword [eax]
call dword [edi + 0x6c]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x68]
inc ebx
dec esi
jne 0x5c92e5
cmp dword [ebp - 0x30], 0
je 0x5c93de
lea edx, [ebp - 0x6c]
mov eax, dword [ebp - 0x30]
call sub.vcl170.bpl__Vcl_Controls_TControl_GetText_qqrv
mov eax, dword [ebp - 0x6c]
push eax
lea eax, [ebp - 0x70]
mov edx, dword [sym.imp.PQLibPack17.bpl__Sysfkts_CUnderLn]
movzx edx, word [edx]
call sub.rtl170.bpl__System__UStrFromWChar_qqrr20System_UnicodeStringb
mov edx, dword [ebp - 0x70]
lea eax, [ebp - 0x24]
pop ecx
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
jmp 0x5c93e6
lea eax, [ebp - 0x24]
call sub.rtl170.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0x14]
push eax
or ecx, 0xffffffff
mov edx, 0x5c9868
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0x6c]
lea eax, [ebp - 0x18]
push eax
or ecx, 0xffffffff
mov edx, 0x5c9888
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0x6c]
lea edx, [ebp - 0x74]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x408]
mov eax, dword [eax + 0x2ec]
mov eax, dword [eax + 0x54]
sub eax, 5
call sub.rtl170.bpl__System_Sysutils_IntToStr_qqri
mov edx, dword [ebp - 0x74]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x68]
lea eax, [ebp - 0x18]
push eax
or ecx, 0xffffffff
mov edx, 0x5c98a4
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0x6c]
lea edx, [ebp - 0x78]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x408]
mov eax, dword [eax + 0x2ec]
mov eax, dword [eax + 0x50]
sub eax, 5
call sub.rtl170.bpl__System_Sysutils_IntToStr_qqri
mov edx, dword [ebp - 0x78]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x68]
lea edx, [ebp - 0x7c]
mov eax, 0x5c98b0
call sub.PQLibPack17.bpl__Sysfkts_GenerateFilter_qqrrx45System__Set_t16Sysfkts_TFileExt_iuc_0_iuc_38_
mov edx, dword [ebp - 0x7c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d4]
add eax, 0x78
call sub.rtl170.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, 0x5c98b0
mov dl, 0x1f
call sub.PQLibPack17.bpl__Sysfkts_GetFilterIndex_qqrrx45System__Set_t16Sysfkts_TFileExt_iuc_0_iuc_38_16Sysfkts_TFileExt
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x4d4]
mov dword [edx + 0x7c], eax
lea edx, [ebp - 0x80]
mov al, 0x1f
call sub.PQLibPack17.bpl__Sysfkts_GetFileExt_qqrx16Sysfkts_TFileExt
mov edx, dword [ebp - 0x80]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d4]
add eax, 0x8c
call sub.rtl170.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov edx, dword [sym.imp.PQLibPack17.bpl__Sysfkts_FSubDir]
mov edx, dword [edx + 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d4]
call sub.vcl170.bpl__Vcl_Dialogs_TOpenDialog_SetInitialDir_qqrx20System_UnicodeString
lea edx, [ebp - 0x88]
mov al, 0x1f
call sub.PQLibPack17.bpl__Sysfkts_GetFileExt_qqrx16Sysfkts_TFileExt
mov eax, dword [ebp - 0x88]
push eax
lea eax, [ebp - 0x8c]
mov ecx, dword [ebp - 0x24]
mov edx, 0x5c98c4
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x8c]
lea ecx, [ebp - 0x84]
pop edx
call sub.rtl170.bpl__System_Sysutils_ChangeFileExt_qqrx20System_UnicodeStringt1
mov edx, dword [ebp - 0x84]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d4]
call sub.vcl170.bpl__Vcl_Dialogs_TOpenDialog_SetFileName_qqr20System_UnicodeString
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x4d4]
mov eax, dword [0x5c98d0]
not eax
and dword [ebx + 0x74], eax
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x50]
test al, al
je 0x5c96be
lea edx, [ebp - 0x90]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d4]
call sub.vcl170.bpl__Vcl_Dialogs_TOpenDialog_GetFileName_qqrv
mov edx, dword [ebp - 0x90]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0xb0]
lea edx, [ebp - 0x94]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d4]
call sub.vcl170.bpl__Vcl_Dialogs_TOpenDialog_GetFileName_qqrv
mov eax, dword [ebp - 0x94]
lea edx, [ebp - 0x2c]
call sub.rtl170.bpl__System_Sysutils_ExtractFilePath_qqrx20System_UnicodeString
push 0
lea edx, [ebp - 0xa4]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4d4]
call sub.vcl170.bpl__Vcl_Dialogs_TOpenDialog_GetFileName_qqrv
mov eax, dword [ebp - 0xa4]
lea edx, [ebp - 0xa0]
call sub.rtl170.bpl__System_Sysutils_ExtractFileName_qqrx20System_UnicodeString
mov eax, dword [ebp - 0xa0]
lea ecx, [ebp - 0x9c]
mov edx, 0x5c98e0
call sub.rtl170.bpl__System_Sysutils_ChangeFileExt_qqrx20System_UnicodeStringt1
mov ecx, dword [ebp - 0x9c]
lea eax, [ebp - 0x98]
mov edx, dword [ebp - 0x2c]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x98]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov edx, dword [sym.imp.PQLibPack17.bpl__Sysfkts_FGlobal]
mov edx, dword [edx + 0x1a8]
lea eax, [ebp - 0xa8]
mov ecx, 0x5c98f8
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0xa8]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CopyFileW
push 0
lea eax, [ebp - 0xac]
mov ecx, 0x5c9918
mov edx, dword [ebp - 0x2c]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0xac]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov edx, dword [sym.imp.PQLibPack17.bpl__Sysfkts_FGlobal]
mov edx, dword [edx + 0x1a8]
lea eax, [ebp - 0xb0]
mov ecx, 0x5c9918
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0xb0]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CopyFileW
push 0
lea eax, [ebp - 0xb4]
mov ecx, 0x5c993c
mov edx, dword [ebp - 0x2c]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0xb4]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov edx, dword [sym.imp.PQLibPack17.bpl__Sysfkts_FGlobal]
mov edx, dword [edx + 0x1a8]
lea eax, [ebp - 0xb8]
mov ecx, 0x5c993c
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0xb8]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CopyFileW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5c976b
lea eax, [ebp - 0xb8]
mov edx, 5
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0xa4]
call sub.rtl170.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0xa0]
mov edx, 3
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x94]
mov edx, 2
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x8c]
mov edx, 8
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x6c]
call sub.rtl170.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0x68]
mov edx, 2
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x40]
mov edx, 2
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x2c]
mov edx, 5
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x18]
mov edx, dword [sym.imp.xmlrtl170.bpl___xp_20Xml_Xmlintf_IXMLNode]
mov ecx, 4
call sub.rtl170.bpl__System__FinalizeArray_qqrpvt1ui
lea eax, [ebp - 8]
call sub.rtl170.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
ret