Function at 0x590850
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov ecx, 7
push 0
push 0
dec ecx
jne 0x590858
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x590be3
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
call sub.tmsdXE12.bpl__Advgrid_TAdvStringGrid_GetRowCountEx_qqrv
dec eax
test eax, eax
jle 0x59092a
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 1
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
xor edx, edx
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 1
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 2
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 3
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 4
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 5
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
inc dword [ebp - 8]
dec dword [ebp - 0xc]
jne 0x590891
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x400]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Close_qqrv
mov eax, dword [ebp - 0x10]
call sub.dac260.bpl__Dbaccess_TCustomDADataSet_GetSQL_qqrv
mov edx, dword [eax]
call dword [edx + 0x48]
mov eax, dword [ebp - 0x10]
call sub.dac260.bpl__Dbaccess_TCustomDADataSet_GetSQL_qqrv
mov edx, 0x590bfc
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov edx, 0x590d7c
mov eax, dword [ebp - 0x10]
call sub.odac260.bpl__Ora_TOraDataSet_ParamByName_qqrx20System_UnicodeString
mov edx, dword [0x730c68]
mov edx, dword [edx]
mov ecx, dword [eax]
call dword [ecx + 0x48]
call sub.rtl260.bpl__System_Sysutils_Now_qqrv
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x14]
mov eax, 0x590d90
call sub.rtl260.bpl__System_Sysutils_FormatDateTime_qqrx20System_UnicodeString16System_TDateTime
mov eax, dword [ebp - 0x14]
push eax
mov edx, 0x590db4
mov eax, dword [ebp - 0x10]
call sub.odac260.bpl__Ora_TOraDataSet_ParamByName_qqrx20System_UnicodeString
pop edx
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov eax, dword [ebp - 0x10]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Open_qqrv
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x590b7f
inc dword [ebp - 8]
mov edx, 0x590dcc
mov eax, dword [ebp - 0x10]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
lea edx, [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x88]
mov eax, dword [ebp - 0x18]
mov edx, 0x590de0
call sub.rtl260.bpl__System__UStrEqual_qqrv
jne 0x5909fd
push 0x590df0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
xor edx, edx
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
jmp 0x590a15
push 0x590e00
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
xor edx, edx
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
push 0x590e10
mov edx, 0x590db4
mov eax, dword [ebp - 0x10]
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, 0x590e28
call sub.rtl260.bpl__System_Sysutils_FormatDateTime_qqrx20System_UnicodeString16System_TDateTime
push dword [ebp - 0x20]
push 0x590e40
mov edx, 0x590e54
mov eax, dword [ebp - 0x10]
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]
push 0x590e70
push 0x590e80
mov edx, 0x590e90
mov eax, dword [ebp - 0x10]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
lea edx, [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x88]
push dword [ebp - 0x28]
lea eax, [ebp - 0x1c]
mov edx, 7
call sub.rtl260.bpl__System__UStrCatN_qqrv
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 1
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x590e54
mov eax, dword [ebp - 0x10]
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 + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 2
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x590e90
mov eax, dword [ebp - 0x10]
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 + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 3
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x590ea8
mov eax, dword [ebp - 0x10]
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 + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 4
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov edx, 0x590ebc
mov eax, dword [ebp - 0x10]
call sub.dbrtl260.bpl__Data_Db_TDataSet_FieldByName_qqrx20System_UnicodeString
lea edx, [ebp - 0x38]
mov ecx, dword [eax]
call dword [ecx + 0x88]
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
mov ecx, dword [ebp - 8]
mov edx, 5
call sub.tmsdXE12.bpl__Basegrid_TBaseGrid_SetCellEx_qqriix20System_UnicodeString
mov eax, dword [ebp - 0x10]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Next_qqrv
mov eax, dword [ebp - 0x10]
cmp byte [eax + 0xad], 0
je 0x5909b9
mov eax, dword [ebp - 0x10]
call sub.dbrtl260.bpl__Data_Db_TDataSet_Close_qqrv
cmp dword [ebp - 8], 0
jle 0x590baf
mov edx, dword [ebp - 8]
inc edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
call sub.tmsdXE12.bpl__Advgrid_TAdvStringGrid_SetRowCountEx_qqri
cmp dword [ebp - 8], 0
jne 0x590bc8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3dc]
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 0x590bea
lea eax, [ebp - 0x38]
mov edx, 0xa
call sub.rtl260.bpl__System__UStrArrayClr_qqrpvi
ret