Function at 0x472a7c
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
xor edx, edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x472cd7
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x472cf0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
xor ecx, ecx
xor edx, edx
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
call sub.tmsdXE12.bpl__Advgrid_TAdvStringGrid_GetRowCountEx_qqrv
dec eax
test eax, eax
jle 0x472b28
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 1
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
mov ecx, dword [ebp - 0xc]
xor edx, edx
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
mov ecx, dword [ebp - 0xc]
mov edx, 1
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
mov ecx, dword [ebp - 0xc]
mov edx, 2
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
inc dword [ebp - 0xc]
dec dword [ebp - 0x10]
jne 0x472adb
mov eax, dword [0x730f34]
mov eax, dword [eax]
mov eax, dword [eax + 0x6c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Close_qqrv
mov eax, dword [ebp - 0x14]
call sub.dac260.bpl__Dbaccess_TCustomDADataSet_GetSQL_qqrv
mov edx, dword [eax]
call dword [edx + 0x48]
mov eax, dword [ebp - 0x14]
call sub.dac260.bpl__Dbaccess_TCustomDADataSet_GetSQL_qqrv
mov edx, 0x472d0c
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Open_qqrv
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x472c73
inc dword [ebp - 8]
mov edx, 0x472df4
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
lea edx, [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx + 0x88]
push dword [ebp - 0x20]
push 0x472e10
push 0x472e20
mov edx, 0x472e30
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
lea edx, [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x88]
push dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
mov edx, 4
call sub.rtl260.bpl__System__UStrCatN_qqrv
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
mov ecx, dword [ebp - 8]
xor edx, edx
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x472e50
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
lea edx, [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x88]
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
mov ecx, dword [ebp - 8]
mov edx, 1
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x472df4
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
lea edx, [ebp - 0x2c]
mov ecx, dword [eax]
call dword [ecx + 0x88]
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
mov ecx, dword [ebp - 8]
mov edx, 2
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x472e30
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
lea edx, [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x88]
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
mov ecx, dword [ebp - 8]
mov edx, 3
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Next_qqrv
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0xad], 0
je 0x472b6e
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Close_qqrv
cmp dword [ebp - 8], 0
jle 0x472ca3
mov edx, dword [ebp - 8]
inc edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
call sub.tmsdXE12.bpl__Advgrid_TAdvStringGrid_SetRowCountEx_qqri
cmp dword [ebp - 8], 0
jne 0x472cbc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
mov edx, 2
call sub.tmsdXE12.bpl__Advgrid_TAdvStringGrid_SetRowCountEx_qqri
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x472cde
lea eax, [ebp - 0x30]
mov edx, 6
call sub.rtl260.bpl__System__UStrArrayClr_qqrpvi
ret