Function at 0x437e18
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 9
push 0
push 0
dec ecx
jne 0x437e21
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
mov edi, dword [sym.imp.JMBase.bpl__U_jmdm_F_JMDM]
xor eax, eax
push ebp
push 0x4382e8
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 4], 0
jne 0x437eff
mov eax, dword [ebx + 0x30c]
mov eax, dword [eax + 0x208]
mov eax, dword [eax + 0x10]
mov dl, 2
call sub.vcl70.bpl__Graphics_TPen_SetStyle_qqr18Graphics_TPenStyle
xor ecx, ecx
xor edx, edx
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TCustomGrid_SetColWidths_qqrii
mov ecx, 0x3c
mov edx, 1
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TCustomGrid_SetColWidths_qqrii
mov ecx, 0x159
mov edx, 2
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TCustomGrid_SetColWidths_qqrii
mov ecx, 0x46
mov edx, 3
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TCustomGrid_SetColWidths_qqrii
mov ecx, 0x50
mov edx, 4
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TCustomGrid_SetColWidths_qqrii
mov ecx, 0x2d
mov edx, 5
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TCustomGrid_SetColWidths_qqrii
xor edx, edx
mov eax, dword [ebx + 0x340]
mov ecx, dword [eax]
call dword [ecx + 0xd0]
mov eax, dword [ebx + 0x344]
mov edx, dword [eax]
call dword [edx + 0xe0]
cmp dword [ebp - 4], 0
je 0x437f0b
cmp dword [ebp - 4], 1
jne 0x437f11
mov dword [ebx + 0x350], esi
mov eax, esi
mov dword [ebx + 0x35c], eax
dec eax
mov esi, eax
add esi, esi
lea esi, [esi + esi*4]
lea edx, [ebp - 0x14]
mov eax, dword [ebx + 0x344]
call sub.vcl70.bpl__Controls_TControl_GetText_qqrv
cmp dword [ebp - 0x14], 0
je 0x437fd9
mov eax, dword [ebx + 0x340]
mov edx, dword [eax]
call dword [edx + 0xcc]
test eax, eax
jne 0x437f80
push 0x438300
lea edx, [ebp - 0x1c]
mov eax, dword [ebx + 0x344]
call sub.vcl70.bpl__Controls_TControl_GetText_qqrv
mov eax, dword [ebp - 0x1c]
lea edx, [ebp - 0x18]
call sub.rtl70.bpl__Sysutils_Trim_qqrx17System_AnsiString
push dword [ebp - 0x18]
push 0x438320
lea eax, [ebp - 0xc]
mov edx, 3
call sub.rtl70.bpl__System__LStrCatN_qqrv
jmp 0x437fd9
push 0x43832c
lea edx, [ebp - 0x24]
mov eax, dword [ebx + 0x344]
call sub.vcl70.bpl__Controls_TControl_GetText_qqrv
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x20]
call sub.rtl70.bpl__Sysutils_Trim_qqrx17System_AnsiString
push dword [ebp - 0x20]
push 0x43834c
push 0x438358
lea edx, [ebp - 0x2c]
mov eax, dword [ebx + 0x344]
call sub.vcl70.bpl__Controls_TControl_GetText_qqrv
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x28]
call sub.rtl70.bpl__Sysutils_Trim_qqrx17System_AnsiString
push dword [ebp - 0x28]
push 0x438378
lea eax, [ebp - 0xc]
mov edx, 6
call sub.rtl70.bpl__System__LStrCatN_qqrv
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov edx, 0x438388
call sub.rtl70.bpl__System__LStrCat3_qqrv
push 0x43844c
push dword [ebp - 0x10]
push 0x438474
push 0x4384a0
push 0x4384f8
push 0x438550
push 0x4385a8
push 0x438600
push 0x438658
lea edx, [ebp - 0x30]
mov eax, esi
call sub.rtl70.bpl__Sysutils_IntToStr_qqri
push dword [ebp - 0x30]
push 0x438678
push 0x4386a4
push dword [ebp - 0xc]
push 0x4386e4
lea eax, [ebp - 8]
mov edx, 0xe
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
call sub.dbrtl70.bpl__Db_TDataSet_Close_qqrv
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
mov edx, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x2b0]
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
call sub.dbrtl70.bpl__Db_TDataSet_Open_qqrv
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
mov edx, 0x438718
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x58]
mov esi, eax
mov dword [ebp - 0x34], esi
fild dword [ebp - 0x34]
fdiv dword [0x438720]
add esp, 0xfffffff4
fstp xword [esp]
wait
call sub.rtl70.bpl__Math_Ceil_qqrxg
mov dword [ebx + 0x354], eax
xor esi, esi
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
mov edx, 0x43872c
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x38]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0x38]
push eax
mov ecx, esi
xor edx, edx
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
mov edx, 0x438740
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x3c]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0x3c]
push eax
mov ecx, esi
mov edx, 1
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
mov edx, 0x438754
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x40]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0x40]
push eax
mov ecx, esi
mov edx, 2
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
mov edx, 0x438764
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x44]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0x44]
push eax
mov ecx, esi
mov edx, 3
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
mov edx, 0x438778
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x50]
add esp, 0xfffffff8
fstp qword [esp]
wait
lea eax, [ebp - 0x48]
call sub.rtl70.bpl__Sysutils_DateToStr_qqrx16System_TDateTime
mov eax, dword [ebp - 0x48]
push eax
mov ecx, esi
mov edx, 4
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
mov edx, 0x43878c
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x4c]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, esi
mov edx, 5
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
cmp byte [eax + 0xa1], 0
je 0x438255
push 0
mov ecx, esi
xor edx, edx
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
push 0
mov ecx, esi
mov edx, 1
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
push 0
mov ecx, esi
mov edx, 2
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
push 0
mov ecx, esi
mov edx, 3
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
push 0
mov ecx, esi
mov edx, 4
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
push 0
mov ecx, esi
mov edx, 5
mov eax, dword [ebx + 0x30c]
call sub.vcl70.bpl__Grids_TStringGrid_SetCells_qqriix17System_AnsiString
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
call sub.dbrtl70.bpl__Db_TDataSet_Next_qqrv
inc esi
cmp esi, 0xa
jne 0x4380a6
mov eax, dword [edi]
mov eax, dword [eax + 0x88]
call sub.dbrtl70.bpl__Db_TDataSet_Close_qqrv
mov eax, ebx
call fcn.00438790
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4382ef
lea eax, [ebp - 0x4c]
mov edx, 6
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x30]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x2c]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x28]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x24]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x20]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x1c]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x18]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x14]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x10]
mov edx, 3
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
ret