Function at 0x59add4
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
xor ecx, ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call sub.rtl260.bpl__System__UStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x59b13e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
mov edx, 0x59b158
call sub.rtl260.bpl__System__UStrEqual_qqrv
jne 0x59ae44
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x41c]
mov edx, 0xffffff
call sub.vcl260.bpl__Vcl_Controls_TControl_SetColor_qqr21System_Uitypes_TColor
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x440]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x41c]
mov dword [edx + 0xc], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
call sub.tmsdXE12.bpl__Advgrid_TAdvStringGrid_GetRowCountEx_qqrv
dec eax
test eax, eax
jle 0x59af14
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 1
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
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 + 0x44c]
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 + 0x44c]
mov ecx, dword [ebp - 0xc]
mov edx, 2
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
mov ecx, dword [ebp - 0xc]
mov edx, 3
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
mov ecx, dword [ebp - 0xc]
mov edx, 4
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
mov ecx, dword [ebp - 0xc]
mov edx, 5
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
mov ecx, 0x16
mov edx, dword [ebp - 0xc]
call sub.vcl260.bpl__Vcl_Grids_TCustomGrid_SetRowHeights_qqrii
inc dword [ebp - 0xc]
dec dword [ebp - 0x10]
jne 0x59ae65
mov eax, dword [0x730f34]
mov eax, dword [eax]
mov eax, dword [eax + 0xd0]
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, 0x59b168
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov eax, dword [ebp - 4]
fild dword [eax + 0x470]
fstp qword [ebp - 0x1c]
wait
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
mov edx, 0x59b228
mov eax, dword [ebp - 0x14]
call sub.odac260.bpl__Ora_TOraDataSet_ParamByName_qqrx20System_UnicodeString
mov edx, dword [eax]
call dword [edx + 0x78]
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Open_qqrv
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x59b0d2
inc dword [ebp - 0xc]
mov edx, 0x59b23c
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
mov edx, dword [eax]
call dword [edx + 0x64]
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x20]
mov eax, 0x59b25c
call sub.rtl260.bpl__System_Sysutils_FormatDateTime_qqrx20System_UnicodeString16System_TDateTime
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
mov ecx, dword [ebp - 0xc]
xor edx, edx
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x59b23c
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
mov edx, dword [eax]
call dword [edx + 0x64]
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x24]
mov eax, 0x59b280
call sub.rtl260.bpl__System_Sysutils_FormatDateTime_qqrx20System_UnicodeString16System_TDateTime
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
mov ecx, dword [ebp - 0xc]
mov edx, 1
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x59b2a0
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 + 0x44c]
mov ecx, dword [ebp - 0xc]
mov edx, 2
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x59b2b8
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 + 0x44c]
mov ecx, dword [ebp - 0xc]
mov edx, 3
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x59b2d0
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 + 0x44c]
mov ecx, dword [ebp - 0xc]
mov edx, 4
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x59b2e4
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
lea edx, [ebp - 0x34]
mov ecx, dword [eax]
call dword [ecx + 0x88]
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
mov ecx, dword [ebp - 0xc]
mov edx, 5
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 0x59af82
mov eax, dword [ebp - 0x14]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Close_qqrv
cmp dword [ebp - 0xc], 0
jle 0x59b102
mov edx, dword [ebp - 0xc]
inc edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
call sub.tmsdXE12.bpl__Advgrid_TAdvStringGrid_SetRowCountEx_qqri
cmp dword [ebp - 0xc], 0
jne 0x59b11b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44c]
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 0x59b145
lea eax, [ebp - 0x34]
mov edx, 6
call sub.rtl260.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 8]
call sub.rtl260.bpl__System__UStrClr_qqrpv
ret