Function at 0x41dfca0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x13
push 0
push 0
dec ecx
jne 0x41dfca8
push ebx
push esi
push edi
mov esi, eax
xor eax, eax
push ebp
push 0x41e014f
push dword fs:[eax]
mov dword fs:[eax], esp
xor ecx, ecx
mov dl, 1
mov eax, dword [0x41c6790]
call sub.vcl60.bpl__Forms_TCustomForm__bctr_qqrp18Classes_TComponent
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x48]
push eax
lea edx, [ebp - 0x48]
or ecx, 0xffffffff
mov eax, 0x41e0168
call sub.rtl60.bpl__Sysutils_Format_qqrx17System_AnsiStringpx14System_TVarRecxi
mov edx, dword [ebp - 0x48]
lea ecx, [ebp - 0x44]
mov eax, dword [esi + 0x4fc]
call fcn.0419af10
lea eax, [ebp - 0x44]
call sub.rtl60.bpl__System__VarToInt_qqrrx14System_Variant
mov edi, eax
lea eax, [ebp - 0x5c]
push eax
mov dword [ebp - 0x64], edi
mov byte [ebp - 0x60], 0
lea edx, [ebp - 0x64]
xor ecx, ecx
mov eax, 0x41e01b8
call sub.rtl60.bpl__Sysutils_Format_qqrx17System_AnsiStringpx14System_TVarRecxi
mov edx, dword [ebp - 0x5c]
lea ecx, [ebp - 0x58]
mov eax, dword [esi + 0x4fc]
call fcn.0419af10
lea eax, [ebp - 0x58]
call sub.rtl60.bpl__System__VarToInt_qqrrx14System_Variant
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x3d8]
mov edx, dword [eax]
call dword [edx + 0x50]
add esp, 0xfffffff8
fstp qword [esp]
wait
lea eax, [ebp - 0x68]
call sub.rtl60.bpl__Sysutils_DateToStr_qqrx16System_TDateTime
mov eax, dword [ebp - 0x68]
mov edx, 0x41e0230
call sub.rtl60.bpl__System__LStrCmp_qqrv
je 0x41dfd9a
mov eax, dword [esi + 0x3d8]
mov edx, dword [eax]
call dword [edx + 0x50]
add esp, 0xfffffff8
fstp qword [esp]
wait
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2e]
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x2a]
call sub.rtl60.bpl__Sysutils_DecodeTime_qqrx16System_TDateTimerust2t2t2
movzx ebx, word [ebp - 0x2c]
movzx eax, word [ebp - 0x2a]
mov dword [ebp - 0x28], eax
jmp 0x41dfdc9
mov eax, dword [esi + 0x3d4]
mov edx, dword [eax]
call dword [edx + 0x50]
add esp, 0xfffffff8
fstp qword [esp]
wait
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2e]
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x2a]
call sub.rtl60.bpl__Sysutils_DecodeTime_qqrx16System_TDateTimerust2t2t2
movzx ebx, word [ebp - 0x2c]
movzx eax, word [ebp - 0x2a]
mov dword [ebp - 0x28], eax
call sub.rtl60.bpl__Sysutils_Now_qqrv
add esp, 0xfffffff8
fstp qword [esp]
wait
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2e]
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x2a]
call sub.rtl60.bpl__Sysutils_DecodeTime_qqrx16System_TDateTimerust2t2t2
movzx eax, word [ebp - 0x2c]
movzx edx, word [ebp - 0x2a]
mov dword [ebp - 0x24], edx
mov ecx, eax
sub ecx, ebx
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x28]
imul eax, eax, 0x3c
add ecx, eax
mov eax, ecx
cdq
idiv dword [ebp - 4]
mov dword [ebp - 0x6c], eax
fild dword [ebp - 0x6c]
fstp qword [ebp - 0x10]
wait
fld qword [ebp - 0x10]
fcomp dword [0x41e023c]
fnstsw ax
sahf
jbe 0x41e00e8
fld qword [ebp - 0x10]
fcomp dword [0x41e023c]
fnstsw ax
sahf
jbe 0x41dfe53
fld qword [ebp - 0x10]
fcomp dword [0x41e0240]
fnstsw ax
sahf
ja 0x41dfe53
mov eax, dword [esi + 0x4e4]
mov edx, dword [eax]
call dword [edx + 0x54]
fstp qword [ebp - 0x18]
wait
jmp 0x41dff38
fld qword [ebp - 0x10]
fcomp dword [0x41e0240]
fnstsw ax
sahf
jbe 0x41dfe83
fld qword [ebp - 0x10]
fcomp dword [0x41e0244]
fnstsw ax
sahf
ja 0x41dfe83
mov eax, dword [esi + 0x4e8]
mov edx, dword [eax]
call dword [edx + 0x54]
fstp qword [ebp - 0x18]
wait
jmp 0x41dff38
fld qword [ebp - 0x10]
fcomp dword [0x41e0244]
fnstsw ax
sahf
jbe 0x41dfeb3
fld qword [ebp - 0x10]
fcomp dword [0x41e0248]
fnstsw ax
sahf
ja 0x41dfeb3
mov eax, dword [esi + 0x4ec]
mov edx, dword [eax]
call dword [edx + 0x54]
fstp qword [ebp - 0x18]
wait
jmp 0x41dff38
fld qword [ebp - 0x10]
fcomp dword [0x41e0248]
fnstsw ax
sahf
jbe 0x41dfee0
fld qword [ebp - 0x10]
fcomp dword [0x41e024c]
fnstsw ax
sahf
ja 0x41dfee0
mov eax, dword [esi + 0x4f0]
mov edx, dword [eax]
call dword [edx + 0x54]
fstp qword [ebp - 0x18]
wait
jmp 0x41dff38
fld qword [ebp - 0x10]
fcomp dword [0x41e024c]
fnstsw ax
sahf
jbe 0x41dff0d
fld qword [ebp - 0x10]
fcomp dword [0x41e0250]
fnstsw ax
sahf
jae 0x41dff0d
mov eax, dword [esi + 0x4f4]
mov edx, dword [eax]
call dword [edx + 0x54]
fstp qword [ebp - 0x18]
wait
jmp 0x41dff38
fld qword [ebp - 0x10]
fcomp dword [0x41e0250]
fnstsw ax
sahf
jbe 0x41dff38
fld qword [ebp - 0x10]
fcomp dword [0x41e0254]
fnstsw ax
sahf
ja 0x41dff38
mov eax, dword [esi + 0x4f8]
mov edx, dword [eax]
call dword [edx + 0x54]
fstp qword [ebp - 0x18]
wait
mov eax, dword [esi + 0x4d8]
mov edx, dword [eax]
call dword [edx + 0x54]
fsubr qword [ebp - 0x18]
fstp qword [ebp - 0x18]
wait
push dword [ebp - 0x14]
push dword [ebp - 0x18]
mov eax, dword [ebp - 0x34]
call fcn.041c69e0
mov eax, dword [ebp - 0x34]
call fcn.041c693c
fstp st(0)
mov eax, dword [esi + 0x3ec]
call sub.dbrtl60.bpl__Db_TDataSet_Open_qqrv
mov eax, dword [esi + 0x3ec]
call sub.dbrtl60.bpl__Db_TDataSet_Append_qqrv
lea edx, [ebp - 0x70]
mov eax, dword [esi + 0x3c8]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov edx, dword [ebp - 0x70]
mov eax, dword [esi + 0x408]
mov ecx, dword [eax]
call dword [ecx + 0xb0]
mov eax, dword [esi + 0x3d4]
mov edx, dword [eax]
call dword [edx + 0x50]
add esp, 0xfffffff8
fstp qword [esp]
wait
mov eax, dword [esi + 0x3fc]
mov edx, dword [eax]
call dword [edx + 0xa0]
mov eax, dword [esi + 0x3d8]
mov edx, dword [eax]
call dword [edx + 0x50]
add esp, 0xfffffff8
fstp qword [esp]
wait
mov eax, dword [esi + 0x400]
mov edx, dword [eax]
call dword [edx + 0xa0]
push dword [ebp - 0x14]
push dword [ebp - 0x18]
mov eax, dword [esi + 0x3f8]
mov edx, dword [eax]
call dword [edx + 0xa4]
lea eax, [ebp - 0x84]
push eax
mov dword [ebp - 0x64], edi
mov byte [ebp - 0x60], 0
lea edx, [ebp - 0x64]
xor ecx, ecx
mov eax, 0x41e0260
call sub.rtl60.bpl__Sysutils_Format_qqrx17System_AnsiStringpx14System_TVarRecxi
mov edx, dword [ebp - 0x84]
lea ecx, [ebp - 0x80]
mov eax, dword [esi + 0x4fc]
call fcn.0419af10
lea eax, [ebp - 0x80]
call sub.rtl60.bpl__System__VarToReal_qqrrx14System_Variant
add esp, 0xfffffff8
fstp qword [esp]
wait
mov eax, dword [esi + 0x474]
mov edx, dword [eax]
call dword [edx + 0xa4]
mov edx, edi
mov eax, dword [esi + 0x40c]
mov ecx, dword [eax]
call dword [ecx + 0xa8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
mov eax, dword [esi + 0x3f0]
mov edx, dword [eax]
call dword [edx + 0xa4]
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0x64], edi
mov byte [ebp - 0x60], 0
lea edx, [ebp - 0x64]
xor ecx, ecx
mov eax, 0x41e02e4
call sub.rtl60.bpl__Sysutils_Format_qqrx17System_AnsiStringpx14System_TVarRecxi
mov edx, dword [ebp - 0x98]
lea ecx, [ebp - 0x94]
mov eax, dword [esi + 0x4fc]
call fcn.0419af10
lea eax, [ebp - 0x94]
call sub.rtl60.bpl__System__VarToInt_qqrrx14System_Variant
mov edx, eax
mov eax, dword [esi + 0x3f4]
mov ecx, dword [eax]
call dword [ecx + 0xa8]
mov eax, dword [esi + 0x3ec]
mov edx, dword [eax]
call dword [edx + 0x248]
mov eax, dword [esi + 0x424]
cmp byte [eax + 0x170], 0
je 0x41e00d0
mov eax, esi
call fcn.041deac0
mov edx, dword [esi + 0x3ec]
mov eax, esi
call fcn.041dec28
mov eax, dword [esi + 0x3ec]
call sub.dbrtl60.bpl__Db_TDataSet_Delete_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41e0156
lea eax, [ebp - 0x98]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x94]
call sub.rtl60.bpl__System__VarClr_qqrr14System_Variant
lea eax, [ebp - 0x84]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x80]
call sub.rtl60.bpl__System__VarClr_qqrr14System_Variant
lea eax, [ebp - 0x70]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x68]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x5c]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x58]
call sub.rtl60.bpl__System__VarClr_qqrr14System_Variant
lea eax, [ebp - 0x48]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x44]
call sub.rtl60.bpl__System__VarClr_qqrr14System_Variant
ret