Function at 0x4048fc
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xa
push 0
push 0
dec ecx
jne 0x404904
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x404f2f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00405388
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3cc]
call sub.vcl60.bpl__Imglist_TCustomImageList_Clear_qqrv
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3d0]
call sub.vcl60.bpl__Imglist_TCustomImageList_Clear_qqrv
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.0040612c
lea edx, [ebp - 0x18]
xor eax, eax
call sub.rtl60.bpl__System__LGetDir_qqrucr17System_AnsiString
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x5a8], edx
lea eax, [ebp - 0x20]
call sub.rtl60.bpl__System__LStrClr_qqrpv
mov eax, dword [ebp - 4]
add eax, 0x590
push eax
mov eax, dword [ebp - 4]
add eax, 0x598
push eax
mov eax, dword [ebp - 4]
add eax, 0x59c
push eax
mov eax, dword [ebp - 4]
add eax, 0x5a0
push eax
mov eax, dword [ebp - 4]
lea ecx, [eax + 0x594]
mov eax, dword [ebp - 4]
lea edx, [eax + 0x58c]
mov eax, 0x404f48
call sub.BF_BfLib500.bpl__Undbtools_GetDatabaseDefine_qqrx17System_AnsiStringr17System_AnsiStringt2t2t2rit6
test al, al
je 0x404a09
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x594]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x58c]
call sub.BF_BfLib500.bpl__Undbtools_SetDBConfigureFile_qqrx17System_AnsiStringt1
push 0x404f60
push 0x404f78
push 0x404f8c
push 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x590]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x58c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x584]
call sub.BF_BfLib500.bpl__Undbtools_OpenDatabase_qqrpx18Dbtables_TDatabasex17System_AnsiStringt2t2t2t2xo
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x584]
mov dl, 1
mov ecx, dword [eax]
call dword [ecx + 0x48]
jmp 0x404a18
mov eax, 0x404f9c
call sub.BF_BfLib500.bpl__Untools_ShowMessage_qqr17System_AnsiString
jmp 0x404f07
xor eax, eax
push ebp
push 0x404a30
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x404a5d
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x588]
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Close_qqrv
mov edx, 0x404f8c
mov eax, ebx
call sub.bdertl60.bpl__Dbtables_TDBDataSet_SetDatabaseName_qqrx17System_AnsiString
mov eax, dword [ebx + 0x248]
mov edx, 0x404ff8
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Open_qqrv
jmp 0x404bdb
push dword [ebp - 0x18]
push 0x40507c
mov edx, 0x405088
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x60]
push dword [ebp - 0x24]
lea eax, [ebp - 0x14]
mov edx, 3
call sub.rtl60.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x14]
call sub.rtl60.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
jne 0x404ad9
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Next_qqrv
jmp 0x404bdb
mov edx, 0x40509c
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x1c]
mov ecx, dword [eax]
call dword [ecx + 0x60]
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
mov eax, dword [ebp - 0x28]
push eax
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
call sub.rtl60.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
mov edx, dword [ebp - 0x2c]
pop eax
call sub.rtl60.bpl__System__LStrCmp_qqrv
je 0x404b5a
push 0x4050a8
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
push dword [ebp - 0x34]
push 0x4050b8
lea edx, [ebp - 0x38]
mov eax, dword [ebp - 0x1c]
call sub.rtl60.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
push dword [ebp - 0x38]
lea eax, [ebp - 0x30]
mov edx, 4
call sub.rtl60.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x30]
call sub.BF_BfLib500.bpl__Untools_ShowMessage_qqr17System_AnsiString
mov eax, dword [ebp - 4]
mov dword [eax + 0x5a8], 0xffffffff
mov edx, 0x4050cc
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x50]
fstp qword [ebp - 0x40]
wait
mov eax, dword [ebp - 0x14]
call sub.rtl60.bpl__Sysutils_FileAge_qqrx17System_AnsiString
call sub.rtl60.bpl__Sysutils_FileDateToDateTime_qqri
fcomp qword [ebp - 0x40]
fnstsw ax
sahf
jae 0x404bd4
push dword [ebp - 0x20]
push 0x4050e0
mov edx, 0x405088
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x44]
mov ecx, dword [eax]
call dword [ecx + 0x60]
push dword [ebp - 0x44]
lea eax, [ebp - 0x20]
mov edx, 3
call sub.rtl60.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 4]
cmp dword [eax + 0x5a8], 0
jne 0x404bcb
mov eax, dword [ebp - 4]
mov dword [eax + 0x5a8], 0xfffffffe
jmp 0x404bd4
mov eax, dword [ebp - 4]
dec dword [eax + 0x5a8]
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Next_qqrv
cmp byte [ebx + 0xa1], 0
je 0x404a95
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Close_qqrv
mov edx, 0x4050ec
mov eax, ebx
call sub.bdertl60.bpl__Dbtables_TDBDataSet_SetDatabaseName_qqrx17System_AnsiString
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x584]
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5a8]
test eax, eax
jge 0x404c62
inc eax
jne 0x404c42
push 0x4050f8
push dword [ebp - 0x1c]
push 0x405110
push dword [ebp - 0x18]
lea eax, [ebp - 0x48]
mov edx, 4
call sub.rtl60.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x48]
call sub.BF_BfLib500.bpl__Untools_ShowMessage_qqr17System_AnsiString
jmp 0x404c5a
lea eax, [ebp - 0x4c]
mov ecx, dword [ebp - 0x20]
mov edx, 0x405128
call sub.rtl60.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x4c]
call sub.BF_BfLib500.bpl__Untools_ShowMessage_qqr17System_AnsiString
mov eax, dword [ebp - 4]
call sub.vcl60.bpl__Forms_TCustomForm_Close_qqrv
mov dl, 1
mov eax, dword [sym.imp.vcl60.bpl__Graphics_TIcon_]
call sub.vcl60.bpl__Graphics_TIcon__bctr_qqrv
mov dword [ebp - 0xc], eax
mov dl, 1
mov eax, dword [sym.imp.rtl60.bpl__Classes_TMemoryStream_]
call sub.rtl60.bpl__System_TObject__bctr_qqrv
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x404f00
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [sym.imp.BF_BfLib500.bpl__Dmpubdata_PubData]
mov eax, dword [eax]
mov ebx, dword [eax + 0x60]
mov eax, dword [ebx + 0x248]
mov edx, dword [eax]
call dword [edx + 0x44]
call sub.BF_BfLib500.bpl__Dmpubdata_GetLoginRYID_qqrv
test eax, eax
jle 0x404d28
mov eax, dword [ebx + 0x248]
mov edx, 0x405158
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x405198
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x4051b4
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x405208
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x405254
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x4052a4
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov edx, 0x4052c0
mov eax, ebx
call sub.bdertl60.bpl__Dbtables_TQuery_ParamByName_qqrx17System_AnsiString
push eax
call sub.BF_BfLib500.bpl__Dmpubdata_GetLoginRYID_qqrv
mov edx, eax
pop eax
call sub.dbrtl60.bpl__Db_TParam_SetAsInteger_qqri
jmp 0x404d48
mov eax, dword [ebx + 0x248]
mov edx, 0x4052d0
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x405324
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Open_qqrv
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_First_qqrv
jmp 0x404eb4
mov edx, 0x405340
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x84]
test al, al
je 0x404d8a
mov eax, dword [sym.imp.vcl60.bpl__Forms_Application]
mov eax, dword [eax]
mov edx, dword [eax + 0x98]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x404dbd
mov eax, dword [ebp - 0x10]
call sub.rtl60.bpl__Classes_TMemoryStream_Clear_qqrv
mov edx, 0x405340
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [ebp - 0x10]
call sub.dbrtl60.bpl__Db_TBlobField_SaveToStream_qqrp15Classes_TStream
push 0
push 0
mov eax, dword [ebp - 0x10]
call sub.rtl60.bpl__Classes_TStream_SetPosition_qqrxj
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x54]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3cc]
mov edx, dword [ebp - 0xc]
call sub.vcl60.bpl__Imglist_TCustomImageList_AddIcon_qqrp14Graphics_TIcon
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3d0]
mov edx, dword [ebp - 0xc]
call sub.vcl60.bpl__Imglist_TCustomImageList_AddIcon_qqrp14Graphics_TIcon
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a8]
mov eax, dword [eax + 0x22c]
call sub.vcl60.bpl__Comctrls_TListItems_Add_qqrv
mov esi, eax
mov edx, 0x405350
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x50]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov edx, dword [ebp - 0x50]
mov eax, esi
call sub.vcl60.bpl__Comctrls_TListItem_SetCaption_qqrx17System_AnsiString
mov edx, 0x405360
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x54]
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov edx, dword [ebp - 0x54]
mov eax, dword [esi + 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, 0xc
call sub.rtl60.bpl__System__GetMem_qqri
mov edi, eax
mov edx, 0x405374
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x58]
mov dword [edi], eax
mov eax, dword [ebp - 4]
push eax
push 0x405420
mov edx, 0x405374
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x58]
mov edx, eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2f0]
mov eax, dword [ebp - 4]
call sub.BF_BfLib500.bpl__Untools_BuildMenu_qqrp18Classes_TComponentiynpqqrp14System_TObject_vp15Menus_TMainMenu
mov dword [edi + 4], eax
mov edx, 0x405380
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x58]
mov byte [edi + 8], al
mov edx, edi
mov eax, esi
call sub.vcl60.bpl__Comctrls_TListItem_SetData_qqrpv
mov ecx, dword [ebp - 8]
xor edx, edx
mov eax, esi
call sub.vcl60.bpl__Comctrls_TListItem_SetImage_qqrii
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Next_qqrv
cmp byte [ebx + 0xa1], 0
je 0x404d5b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c4]
mov si, 0xffeb
call sub.rtl60.bpl__System__CallDynaInst_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404f07
mov eax, dword [sym.imp.BF_BfLib500.bpl__Dmpubdata_PubData]
mov eax, dword [eax]
mov eax, dword [eax + 0x60]
call sub.dbrtl60.bpl__Db_TDataSet_Close_qqrv
mov eax, dword [ebp - 0xc]
call sub.rtl60.bpl__System_TObject_Free_qqrv
mov eax, dword [ebp - 0x10]
call sub.rtl60.bpl__System_TObject_Free_qqrv
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404f36
lea eax, [ebp - 0x54]
mov edx, 5
call sub.rtl60.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x38]
mov edx, 0xa
call sub.rtl60.bpl__System__LStrArrayClr_qqrpvi
ret