Function at 0x404814
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xa
push 0
push 0
dec ecx
jne 0x40481c
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x404e47
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.004052a0
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.00406044
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, 0x404e60
call sub.BF_BfLib500.bpl__Undbtools_GetDatabaseDefine_qqrx17System_AnsiStringr17System_AnsiStringt2t2t2rit6
test al, al
je 0x404921
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 0x404e78
push 0x404e90
push 0x404ea4
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 0x404930
mov eax, 0x404eb4
call sub.BF_BfLib500.bpl__Untools_ShowMessage_qqr17System_AnsiString
jmp 0x404e1f
xor eax, eax
push ebp
push 0x404948
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x404975
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x588]
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Close_qqrv
mov edx, 0x404ea4
mov eax, ebx
call sub.bdertl60.bpl__Dbtables_TDBDataSet_SetDatabaseName_qqrx17System_AnsiString
mov eax, dword [ebx + 0x248]
mov edx, 0x404f10
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Open_qqrv
jmp 0x404af3
push dword [ebp - 0x18]
push 0x404f94
mov edx, 0x404fa0
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 0x4049f1
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Next_qqrv
jmp 0x404af3
mov edx, 0x404fb4
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 0x404a72
push 0x404fc0
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
push dword [ebp - 0x34]
push 0x404fd0
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, 0x404fe4
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 0x404aec
push dword [ebp - 0x20]
push 0x404ff8
mov edx, 0x404fa0
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 0x404ae3
mov eax, dword [ebp - 4]
mov dword [eax + 0x5a8], 0xfffffffe
jmp 0x404aec
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 0x4049ad
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_Close_qqrv
mov edx, 0x405004
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 0x404b7a
inc eax
jne 0x404b5a
push 0x405010
push dword [ebp - 0x1c]
push 0x405028
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 0x404b72
lea eax, [ebp - 0x4c]
mov ecx, dword [ebp - 0x20]
mov edx, 0x405040
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 0x404e18
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 + 0x5c]
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 0x404c40
mov eax, dword [ebx + 0x248]
mov edx, 0x405070
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x4050b0
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x4050cc
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x405120
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x40516c
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x4051bc
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov edx, 0x4051d8
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 0x404c60
mov eax, dword [ebx + 0x248]
mov edx, 0x4051e8
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebx + 0x248]
mov edx, 0x40523c
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 0x404dcc
mov edx, 0x405258
mov eax, ebx
call sub.dbrtl60.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x84]
test al, al
je 0x404ca2
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 0x404cd5
mov eax, dword [ebp - 0x10]
call sub.rtl60.bpl__Classes_TMemoryStream_Clear_qqrv
mov edx, 0x405258
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, 0x405268
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, 0x405278
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, 0x40528c
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 0x405338
mov edx, 0x40528c
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, 0x405298
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 0x404c73
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 0x404e1f
mov eax, dword [sym.imp.BF_BfLib500.bpl__Dmpubdata_PubData]
mov eax, dword [eax]
mov eax, dword [eax + 0x5c]
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 0x404e4e
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