Function at 0x4c1714
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x4c171c
push ecx
push ebx
push esi
push edi
xor eax, eax
push ebp
push 0x4c1a4f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
call sub.rtl170.bpl__System__DynArrayHigh_qqrpxv
mov esi, eax
test esi, esi
jl 0x4c179b
inc esi
xor ebx, ebx
lea edi, [ebx + ebx*2]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
test byte [eax + edi*8 + 0x14], 1
je 0x4c1797
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
cmp dword [eax + edi*8 + 0xc], 0
je 0x4c1797
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
cmp dword [eax + edi*8 + 4], 0
jne 0x4c1797
push dword [ebp - 4]
push 0x4c1a6c
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push dword [eax + edi*8 + 0xc]
push 0x4c1a9c
lea eax, [ebp - 4]
mov edx, 4
call sub.rtl170.bpl__System__UStrCatN_qqrv
inc ebx
dec esi
jne 0x4c1749
cmp dword [ebp - 4], 0
je 0x4c1a07
push 0x4c1aac
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 8]
call fcn.004c0b4c
pop ecx
push dword [ebp - 8]
push 0x4c1b34
push dword [ebp - 4]
push 0x4c1b5c
lea eax, [ebp - 4]
mov edx, 5
call sub.rtl170.bpl__System__UStrCatN_qqrv
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call sub.dac170.bpl__Dbaccess_TCustomDADataSet_GetSQL_qqrv
mov edx, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call sub.dbrtl170.bpl__Data_Db_TDataSet_Open_qqrv
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
call sub.rtl170.bpl__System__DynArrayHigh_qqrpxv
mov esi, eax
test esi, esi
jl 0x4c18bc
inc esi
xor ebx, ebx
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
test byte [edx + eax*8 + 0x14], 1
je 0x4c18b4
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
cmp dword [edx + eax*8 + 0xc], 0
je 0x4c18b4
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
cmp dword [edx + eax*8 + 4], 0
jne 0x4c18b4
movzx eax, byte [0x4c1bb0]
push eax
lea eax, [ebp - 0x18]
lea edx, [ebx + ebx*2]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 8]
mov edx, dword [ecx + edx*8 + 0xc]
call sub.rtl170.bpl__System_Variants__VarFromUStr_qqrr8TVarDatax20System_UnicodeString
lea ecx, [ebp - 0x18]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov edx, 0x4c1bc0
mov edi, dword [eax]
call dword [edi + 0x2c0]
test al, al
je 0x4c18b4
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x38]
xor edx, edx
call sub.dbrtl170.bpl__Data_Db_TFields_GetField_qqri
lea edx, [ebp - 0x2c]
mov ecx, dword [eax]
call dword [ecx + 0x94]
lea eax, [ebp - 0x2c]
lea edx, [ebp - 0x1c]
call sub.dac170.bpl__Crfunctions__VarToStr_qqrrx14System_Variant
mov edx, dword [ebp - 0x1c]
lea eax, [ebx + ebx*2]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 8]
lea eax, [ecx + eax*8 + 4]
call sub.rtl170.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
inc ebx
dec esi
jne 0x4c180a
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call sub.dbrtl170.bpl__Data_Db_TDataSet_Close_qqrv
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
call sub.rtl170.bpl__System__DynArrayHigh_qqrpxv
mov esi, eax
test esi, esi
jl 0x4c1a07
inc esi
xor ebx, ebx
lea edi, [ebx + ebx*2]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
test byte [eax + edi*8 + 0x14], 1
je 0x4c19ff
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
cmp dword [eax + edi*8 + 0xc], 0
je 0x4c19ff
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
cmp dword [edx + eax*8 + 4], 0
je 0x4c1931
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
mov eax, dword [edx + eax*8 + 4]
mov edx, 0x4c1bdc
call sub.rtl170.bpl__System__UStrEqual_qqrv
jne 0x4c19ff
mov eax, dword [ebp + 8]
cmp dword [eax - 0x14], 0
jne 0x4c19e7
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
call fcn.004c2684
mov edx, dword [eax + 0x74]
mov eax, dword [ebp + 8]
add eax, 0xffffffec
call sub.rtl170.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
push 1
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp + 8]
mov edx, dword [eax - 0x14]
mov eax, dword [0x5e4238]
mov eax, dword [eax]
xor ecx, ecx
mov edi, dword [eax]
call dword [edi + 0x34]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp + 8]
add eax, 0xffffffec
call sub.rtl170.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp + 8]
cmp dword [eax - 0x14], 0
jne 0x4c19e7
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call sub.dac170.bpl__Dbaccess_TCustomDADataSet_GetSQL_qqrv
mov edx, 0x4c1c04
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call sub.dbrtl170.bpl__Data_Db_TDataSet_Open_qqrv
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x38]
xor edx, edx
call sub.dbrtl170.bpl__Data_Db_TFields_GetField_qqri
lea edx, [ebp - 0x44]
mov ecx, dword [eax]
call dword [ecx + 0x94]
lea eax, [ebp - 0x44]
lea edx, [ebp - 0x34]
call sub.dac170.bpl__Crfunctions__VarToStr_qqrrx14System_Variant
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp + 8]
add eax, 0xffffffec
call sub.rtl170.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call sub.dbrtl170.bpl__Data_Db_TDataSet_Close_qqrv
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
lea eax, [edx + eax*8 + 4]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x14]
call sub.rtl170.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
inc ebx
dec esi
jne 0x4c18df
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c1a56
lea eax, [ebp - 0x44]
call sub.rtl170.bpl__System_Variants__VarClr_qqrr8TVarData
lea eax, [ebp - 0x34]
mov edx, 2
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x2c]
call sub.rtl170.bpl__System_Variants__VarClr_qqrr8TVarData
lea eax, [ebp - 0x1c]
call sub.rtl170.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0x18]
call sub.rtl170.bpl__System_Variants__VarClr_qqrr8TVarData
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
ret