Function at 0x4be1e0
Capabilities:
Reference sql statements

Disassembly:
push 0xffffffffffffffff
push 0x54d20c
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5c403c]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x3c]
mov eax, dword [0x5c7000]
add eax, 0x30
push eax
lea eax, [esp + 0x2c]
push eax
mov edi, 0x569730
call fcn.0040f2b0
add esp, 8
mov dword [esp + 0x34], 0
mov eax, dword [eax]
push eax
mov ecx, ebp
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::open_wchar_t_const__]
test eax, eax
setl bl
or edi, 0xffffffff
mov dword [esp + 0x34], edi
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
test bl, bl
je 0x4be31d
cmp dword [0x5c7004], 0
je 0x4be904
push 0
lea ecx, [esp + 0x2c]
call dword [0x55a504]
mov dword [esp + 0x34], 1
push str.wtwArchive
lea ecx, [esp + 0x28]
call dword [0x55a504]
mov byte [esp + 0x34], 2
mov eax, dword [0x5c6f7c]
push str.Archive_access_error__archive_will_be_unavailable_
push 0x3eb
lea ecx, [esp + 0x2c]
push ecx
call fcn.00504820
push eax
lea ecx, [esp + 0x24]
call dword [0x55a504]
mov byte [esp + 0x34], 3
push 0x55ae9c
lea ecx, [esp + 0x20]
call dword [0x55a504]
mov byte [esp + 0x34], 4
mov esi, dword [0x5c7004]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [edi - 1]
lea ebx, [esp + 0x28]
call fcn.00433ab0
mov byte [esp + 0x34], 3
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 2
mov ecx, ebx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 1
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov dword [esp + 0x34], edi
lea ecx, [esp + 0x28]
jmp 0x4be8fe
lea ecx, [esp + 0x18]
call dword [0x55a6c4]
mov dword [esp + 0x34], 5
mov ebx, dword [0x5c7008]
lea ecx, [esp + 0x1c]
push ecx
push 2
push str.SYS_ArchAccessMode
call fcn.00514350
mov edx, dword [esp + 0x1c]
mov esi, dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
push edx
lea eax, [esp + 0x1c]
push str.PRAGMA_synchronous_d_
push eax
call esi
mov ecx, dword [esp + 0x24]
mov edi, dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::executeNoRead_wchar_t_const__]
add esp, 0xc
push ecx
mov ecx, ebp
call edi
mov ebx, dword [0x5c7008]
lea edx, [esp + 0x1c]
push edx
push 0
push str.ARCH_SafeDelete
call fcn.00514350
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push str.PRAGMA_secure_delete_d_
push ecx
call esi
mov edx, dword [esp + 0x24]
add esp, 0xc
push edx
mov ecx, ebp
call edi
lea eax, [esp + 0x3c]
push eax
push str.SELECT_COUNT___FROM_sqlite_master_WHERE_namewtw_chat_index_
mov ecx, ebp
mov dword [esp + 0x44], 0xffffffff
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::executeAndRead_wchar_t_const___int__]
test eax, eax
jge 0x4be494
cmp dword [0x5c7004], 0
je 0x4be8f2
push str.Image_Warning32
lea ecx, [esp + 0x20]
call dword [0x55a504]
mov byte [esp + 0x34], 6
push str.wtwArchive
lea ecx, [esp + 0x24]
call dword [0x55a504]
mov byte [esp + 0x34], 7
mov eax, dword [0x5c6f7c]
push str.There_was_an_exception_while_creating_archive._Please_restart_and_check_file_permissions.
push 0x3ec
lea ecx, [esp + 0x28]
push ecx
call fcn.00504820
push eax
lea ecx, [esp + 0x28]
call dword [0x55a504]
mov byte [esp + 0x34], 8
push 0x55ae9c
lea ecx, [esp + 0x2c]
call dword [0x55a504]
mov byte [esp + 0x34], 9
mov esi, dword [0x5c7004]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x2c]
push eax
mov ecx, 0xfffffffe
lea ebx, [esp + 0x2c]
call fcn.00433ab0
mov byte [esp + 0x34], 8
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 7
mov ecx, ebx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 6
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 5
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x4be8f2
cmp dword [esp + 0x3c], 0
jne 0x4be570
cmp dword [0x5c7004], 0
je 0x4be531
push 0x55ae9c
lea ecx, [esp + 0x24]
call dword [0x55a504]
mov byte [esp + 0x34], 0xa
push str.There_is_no_archive_database__making_tables
lea ecx, [esp + 0x28]
call dword [0x55a504]
mov byte [esp + 0x34], 0xb
push str.ARSQ
lea ecx, [esp + 0x2c]
call dword [0x55a504]
mov byte [esp + 0x34], 0xc
mov esi, dword [0x5c7004]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x2c]
push edx
mov ecx, 5
lea ebx, [esp + 0x2c]
call fcn.00433ab0
mov byte [esp + 0x34], 0xb
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 0xa
mov ecx, ebx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 5
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push str.create_table_wtw_chat_index____index_id_INTEGER_NOT_NULL_PRIMARY_KEY___contact_id_TEXT___contact_net_TEXT___contact_uuid_TEXT___start_time_INTEGER___flags_INT___
mov ecx, ebp
call edi
push str.create_table_wtw_chat_data____chat_id_INTEGER_NOT_NULL_PRIMARY_KEY___index_id_INTEGER_NOT_NULL___contact_id_TEXT___contact_net_TEXT___entry_time_INTEGER___entry_text_TEXT___entry_pic_BLOB___entry_flags_INT___flags_INT___marker_INT___
mov ecx, ebp
call edi
push str.CREATE_INDEX_IX_ON_wtw_chat_data__index_id___
mov ecx, ebp
call edi
push str.create_table_wtw_sms_data___sms_id_INTEGER_NOT_NULL_PRIMARY_KEY___phone_number_TEXT____entry_time_INTEGER___entry_text_TEXT___entry_extra_TEXT___entry_flags_INT___flags_INT___
mov ecx, ebp
call edi
push str.CREATE_INDEX_IL_ON_wtw_sms_data__phone_number___
mov ecx, ebp
call edi
push str.create_table_wtw_message_data____msg_id_INTEGER_NOT_NULL_PRIMARY_KEY___contact_id_TEXT___contact_net_TEXT___entry_time_INT___entry_text_TEXT___entry_subject_TEXT___entry_extra_TEXT___entry_pic_BLOB___entry_flags_INT___flags_INT___
mov ecx, ebp
call edi
push str.create_table_wtw_data_table____id_INTEGER_NOT_NULL_PRIMARY_KEY___field_name_TEXT___field_value_BLOB___
mov ecx, ebp
call edi
push 0xc
call sub.mfc90u.dll_new
mov esi, eax
add esp, 4
mov dword [esp + 0x28], esi
mov byte [esp + 0x34], 0xd
test esi, esi
je 0x4be59c
push 0
push ebp
mov ecx, esi
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::db::CTransaction::constructor_class_wtw::db::CConnection___int_]
mov dword [esi], vtable.wtw::db::CTransaction.0
jmp 0x4be59e
xor esi, esi
mov byte [esp + 0x34], 5
lea eax, [esp + 0x3c]
push eax
push str.SELECT_COUNT___FROM_sqlite_master_WHERE_namewtw_contact_index_
mov ecx, ebp
mov dword [ebp + 0xc], esi
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::executeAndRead_wchar_t_const___int__]
cmp dword [esp + 0x3c], 0
jne 0x4be65c
cmp dword [0x5c7004], 0
je 0x4be653
push 0x55ae9c
lea ecx, [esp + 0x24]
call dword [0x55a504]
mov byte [esp + 0x34], 0xe
push str.Upgrading_archive__cti_
lea ecx, [esp + 0x28]
call dword [0x55a504]
mov byte [esp + 0x34], 0xf
push str.ARSQ
lea ecx, [esp + 0x2c]
call dword [0x55a504]
mov byte [esp + 0x34], 0x10
mov esi, dword [0x5c7004]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x2c]
push edx
or ecx, 0xffffffff
lea ebx, [esp + 0x2c]
call fcn.00433ab0
mov byte [esp + 0x34], 0xf
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 0xe
mov ecx, ebx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 5
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push str.create_table_wtw_contact_index___contact_id_TEXT___contact_net_TEXT___name_TEXT___flags_INT___
mov ecx, ebp
call edi
lea eax, [esp + 0x3c]
push eax
push str.SELECT_COUNT___FROM_sqlite_master_WHERE_namemarker_chat_index_
mov ecx, ebp
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::executeAndRead_wchar_t_const___int__]
cmp dword [esp + 0x3c], 0
jne 0x4be712
cmp dword [0x5c7004], 0
je 0x4be709
push 0x55ae9c
lea ecx, [esp + 0x24]
call dword [0x55a504]
mov byte [esp + 0x34], 0x11
push str.Upgrading_archive__mkr_
lea ecx, [esp + 0x28]
call dword [0x55a504]
mov byte [esp + 0x34], 0x12
push str.ARSQ
lea ecx, [esp + 0x2c]
call dword [0x55a504]
mov byte [esp + 0x34], 0x13
mov esi, dword [0x5c7004]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x2c]
push edx
or ecx, 0xffffffff
lea ebx, [esp + 0x2c]
call fcn.00433ab0
mov byte [esp + 0x34], 0x12
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 0x11
mov ecx, ebx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 5
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push str.CREATE_INDEX_marker_chat_index_ON_wtw_chat_data__marker___
mov ecx, ebp
call edi
lea eax, [esp + 0x3c]
push eax
push str.SELECT_COUNT___FROM_sqlite_master_WHERE_namewtw_conference_index_
mov ecx, ebp
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::executeAndRead_wchar_t_const___int__]
cmp dword [esp + 0x3c], 0
jne 0x4be7d1
cmp dword [0x5c7004], 0
je 0x4be7bf
push 0x55ae9c
lea ecx, [esp + 0x24]
call dword [0x55a504]
mov byte [esp + 0x34], 0x14
push str.Upgrading_archive__conference_
lea ecx, [esp + 0x28]
call dword [0x55a504]
mov byte [esp + 0x34], 0x15
push str.ARSQ
lea ecx, [esp + 0x2c]
call dword [0x55a504]
mov byte [esp + 0x34], 0x16
mov esi, dword [0x5c7004]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x2c]
push edx
or ecx, 0xffffffff
lea ebx, [esp + 0x2c]
call fcn.00433ab0
mov byte [esp + 0x34], 0x15
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 0x14
mov ecx, ebx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 5
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push str.create_table_wtw_conference_index___conf_id_INTEGER_NOT_NULL_PRIMARY_KEY___start_time_INT___conf_name_TEXT___flags_INT___
mov ecx, ebp
call edi
push str.create_table_wtw_conference_data____msg_id_INTEGER_NOT_NULL_PRIMARY_KEY___conference_id_INTEGER_NOT_NULL___contact_id_TEXT___contact_net_TEXT___entry_time_INT___entry_text_TEXT___entry_extra_TEXT___entry_flags_INT___flags_INT___marker_INT___
mov ecx, ebp
call edi
lea eax, [esp + 0x3c]
push eax
push str.SELECT_COUNT___FROM_sqlite_master_WHERE_namemarker_conference_index_
mov ecx, ebp
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::executeAndRead_wchar_t_const___int__]
cmp dword [esp + 0x3c], 0
jne 0x4be887
cmp dword [0x5c7004], 0
je 0x4be87e
push 0x55ae9c
lea ecx, [esp + 0x24]
call dword [0x55a504]
mov byte [esp + 0x34], 0x17
push str.Upgrading_archive__mkr_
lea ecx, [esp + 0x28]
call dword [0x55a504]
mov byte [esp + 0x34], 0x18
push str.ARSQ
lea ecx, [esp + 0x2c]
call dword [0x55a504]
mov byte [esp + 0x34], 0x19
mov esi, dword [0x5c7004]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x2c]
push edx
or ecx, 0xffffffff
lea ebx, [esp + 0x2c]
call fcn.00433ab0
mov byte [esp + 0x34], 0x18
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 0x17
mov ecx, ebx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x34], 5
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push str.CREATE_INDEX_marker_conference_index_ON_wtw_conference_data__marker___
mov ecx, ebp
call edi
mov esi, dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::columnExists_wchar_t_const___wchar_t_const__]
push str.marker
push str.wtw_chat_data
mov ecx, ebp
call esi
test eax, eax
jle 0x4be8a8
push str.ALTER_TABLE_wtw_chat_data_ADD_COLUMN_marker_INT_
mov ecx, ebp
call edi
push str.marker
push str.wtw_conference_data
mov ecx, ebp
call esi
test eax, eax
jle 0x4be8c3
push str.ALTER_TABLE_wtw_conference_data_ADD_COLUMN_marker_INT_
mov ecx, ebp
call edi
mov ebx, dword [0x5c7008]
lea eax, [esp + 0x1c]
push eax
push 0
push str.ARCH_AutoPurge
call fcn.00514350
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jle 0x4be8e9
mov edx, ebp
call fcn.004bc810
push str.CREATE_INDEX_IF_NOT_EXISTS_wtw_chat_index_idn_ON_wtw_chat_index__contact_id__contact_net___
mov ecx, ebp
call edi
mov dword [esp + 0x34], 0xffffffff
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4