Function at 0x4be920
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x54d0ec
mov eax, dword fs:[0]
push eax
sub esp, 0x2ec
mov eax, dword [0x5c403c]
xor eax, esp
mov dword [esp + 0x2e8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5c403c]
xor eax, esp
push eax
lea eax, [esp + 0x300]
mov dword fs:[0], eax
mov eax, dword [esp + 0x31c]
mov ebp, dword [esp + 0x310]
mov edi, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x308], 1
cmp dword [0x5c6f20], 0
mov ebx, dword [0x5c6f24]
jne 0x4befd1
push 0x583eb8
push 0x583ec0
lea ecx, [esp + 0x320]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Replace]
push 0x583ec4
push 0x583ecc
lea ecx, [esp + 0x320]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Replace]
push 0
lea ecx, [ebx + 0x10]
push ecx
lea ecx, [esp + 0xa0]
call sub.mfc90u.dll_CSingleLock::CSingleLock
mov byte [esp + 0x308], 2
push 0xffffffffffffffff
lea ecx, [esp + 0x9c]
call sub.mfc90u.dll_CSingleLock::Lock
mov esi, ebp
call fcn.004604d0
lea ecx, [esp + 0x24]
call dword [0x55a6c4]
mov byte [esp + 0x308], 3
lea ecx, [esp + 0x20]
call dword [0x55a6c4]
mov byte [esp + 0x308], 4
lea ecx, [esp + 0x18]
call dword [0x55a6c4]
mov byte [esp + 0x308], 5
lea ecx, [esp + 0x14]
call dword [0x55a6c4]
mov byte [esp + 0x308], 6
mov eax, dword [edi]
mov edi, dword [edi + 4]
mov esi, dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
mov edx, eax
or edx, edi
je 0x4bea63
push edi
push eax
lea eax, [esp + 0x1c]
push 0x583ed0
push eax
call esi
add esp, 0x10
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
call dword [0x55a4e8]
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov edx, eax
or edx, ecx
je 0x4bea9a
add eax, 0x15180
adc ecx, 0
push ecx
push eax
lea eax, [esp + 0x1c]
push str.AND_entry_time____lld
push eax
call esi
add esp, 0x10
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
call dword [0x55a4e8]
mov edx, dword [esp + 0x318]
push edx
lea eax, [esp + 0x24]
push str.entry_text_LIKE____s__
push eax
call esi
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x320]
mov edx, dword [esp + 0x2c]
add esp, 0xc
cmp dword [eax - 0xc], 1
push ecx
push edx
jge 0x4bead9
lea eax, [esp + 0x2c]
push str.SELECT_sms_id__phone_number__entry_time__entry_flags_FROM_wtw_sms_data_WHERE_1_AND__s__s_ORDER_BY_entry_time_DESC_
push eax
call esi
add esp, 0x10
jmp 0x4beae9
push eax
lea eax, [esp + 0x30]
push str.SELECT_sms_id__phone_number__entry_time__entry_flags_FROM_wtw_sms_data_WHERE_phone_number_s_AND__s__s_ORDER_BY_entry_time_DESC_
push eax
call esi
add esp, 0x14
mov ecx, dword [esp + 0x24]
push ecx
push ebx
lea ecx, [esp + 0xcc]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::db::CCommand::constructor_class_wtw::db::CConnection___wchar_t_const__]
mov byte [esp + 0x308], 7
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0xc8]
call dword [sym.imp.libWTW.module_public:_class_wtw::db::CReader___thiscall_wtw::db::CCommand::executeReader_void_]
mov byte [esp + 0x308], 8
lea ecx, [esp + 0x50]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::read_void_]
test eax, eax
jne 0x4bef42
jmp 0x4beb46
mov esi, dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
lea ecx, [esp + 0x2c]
call dword [0x55a6c4]
mov byte [esp + 0x308], 9
push 0
lea eax, [esp + 0x64]
push eax
push 0
lea ecx, [esp + 0x5c]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__int___int_]
mov ecx, dword [esp + 0x60]
push ecx
lea edx, [esp + 0x30]
push 0x584158
push edx
call esi
mov eax, 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 [0x55a6c4]
add esp, 0xc
push eax
push ecx
push 7
push 4
lea edx, [esp + 0x74]
push edx
call fcn.00532989
mov byte [esp + 0x308], 0xb
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x68]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
lea ecx, [esp + 0x28]
call dword [0x55a6c4]
mov byte [esp + 0x308], 0xc
lea ecx, [esp + 0x30]
call dword [0x55a6c4]
mov bl, 0xd
mov byte [esp + 0x308], bl
lea ecx, [esp + 0xa4]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_void_]
mov byte [esp + 0x308], 0xe
push 0x55ae9c
lea ecx, [esp + 0xb8]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_wchar_t_const__]
mov byte [esp + 0x308], 0xf
lea ecx, [esp + 0xb4]
push ecx
lea edx, [esp + 0xa8]
push edx
push 1
lea ecx, [esp + 0x5c]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__class_wtw::CString___class_wtw::CString_const__]
mov byte [esp + 0x308], 0xe
mov esi, dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::CString::destructor_void_]
lea ecx, [esp + 0xb4]
call esi
lea ecx, [esp + 0xa4]
call dword [sym.imp.libWTW.module_public:_wchar_t_const____thiscall_wtw::CString::operator_wchar_t_const__void_const]
push eax
lea ecx, [esp + 0x6c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_3]
mov byte [esp + 0x308], bl
lea ecx, [esp + 0xa4]
call esi
push 0x5642f4
lea ecx, [esp + 0x3c]
call dword [0x55a504]
mov byte [esp + 0x308], 0x10
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.004b1200
mov esi, eax
mov byte [esp + 0x308], bl
lea ecx, [esp + 0x38]
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 esi, esi
je 0x4beccd
mov eax, dword [0x5c7044]
add eax, 0x810
lea ecx, [esp + 0x30]
lea edx, [esp + 0x28]
call fcn.00414f10
test eax, eax
je 0x4beccd
add eax, 0xa0
push eax
lea ecx, [esp + 0x70]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
xor eax, eax
push 0x1fc
push eax
lea ecx, [esp + 0x106]
push ecx
mov word [esp + 0x108], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0
push 0
lea edx, [esp + 0x4c]
push edx
push 2
lea ecx, [esp + 0x60]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__long_long___int64____long_long___int64__]
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.MSVCR90.dll__localtime64]
mov esi, eax
add esp, 4
mov ecx, 9
lea edi, [esp + 0xd8]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xd8]
push ecx
push str._a___c
lea edx, [esp + 0x104]
push 0xff
push edx
call dword [sym.imp.MSVCR90.dll_wcsftime]
add esp, 0x10
lea eax, [esp + 0xfc]
push eax
lea ecx, [esp + 0x74]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_3]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
push 0
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x8c], ecx
push 3
lea ecx, [esp + 0x5c]
mov dword [esp + 0x94], edx
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__int___int_]
test byte [esp + 0x34], 1
push str.wtwArchive
je 0x4bedcd
lea ecx, [esp + 0x40]
call dword [0x55a504]
mov byte [esp + 0x308], 0x11
mov eax, dword [0x5c6f7c]
push str.Received
push 0x3ed
lea ecx, [esp + 0x44]
push ecx
call fcn.00504820
push eax
lea ecx, [esp + 0x78]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_3]
mov byte [esp + 0x308], bl
lea ecx, [esp + 0x3c]
jmp 0x4bee0e
lea ecx, [esp + 0x20]
call dword [0x55a504]
mov byte [esp + 0x308], 0x12
mov eax, dword [0x5c6f7c]
push str.Sent
push 0x3ee
lea edx, [esp + 0x24]
push edx
call fcn.00504820
push eax
lea ecx, [esp + 0x78]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_3]
mov byte [esp + 0x308], bl
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]
test dword [esp + 0x34], 0x10000000
lea ecx, [esp + 0x78]
je 0x4bee29
push str.UTF_8_
jmp 0x4bee2e
push str.UTF_16_
call dword [0x55a294]
test dword [esp + 0x34], 0x20000000
je 0x4bee4d
push str.COMPR_
lea ecx, [esp + 0x7c]
call dword [0x55a294]
mov eax, dword [esp + 0x78]
cmp dword [eax - 0xc], 0
je 0x4bee96
mov eax, dword [eax - 0xc]
add eax, 0xfffffffe
push eax
push 0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x84]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Mid_1]
mov byte [esp + 0x308], 0x13
push eax
lea ecx, [esp + 0x7c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
mov byte [esp + 0x308], bl
lea ecx, [esp + 0x40]
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 [ebp + 0x1c]
inc ecx
cmp dword [ebp + 0x14], ecx
ja 0x4beea6
mov ebx, ebp
call fcn.004c3fa0
mov esi, dword [ebp + 0x1c]
add esi, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
cmp eax, esi
ja 0x4beeb5
sub esi, eax
mov edx, dword [ebp + 0x10]
cmp dword [edx + esi*4], 0
jne 0x4beece
push 0x30
call sub.mfc90u.dll_new
mov ecx, dword [ebp + 0x10]
add esp, 4
mov dword [ecx + esi*4], eax
mov edx, dword [ebp + 0x10]
mov esi, dword [edx + esi*4]
lea edi, [esp + 0x64]
call fcn.004c4390
inc dword [ebp + 0x1c]
mov byte [esp + 0x308], 0xc
lea ecx, [esp + 0x30]
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 + 0x308], 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 + 0x308], 9
mov eax, dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push eax
push 7
push 4
mov ecx, edi
push ecx
call fcn.005327e3
mov byte [esp + 0x308], 8
lea ecx, [esp + 0x2c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [esp + 0x50]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::read_void_]
test eax, eax
je 0x4beb40
lea ecx, [esp + 0x98]
call sub.mfc90u.dll_CSingleLock::Unlock
mov byte [esp + 0x308], 7
lea ecx, [esp + 0x50]
call dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::db::CReader::destructor_void_]
mov byte [esp + 0x308], 6
lea ecx, [esp + 0xc4]
call dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::db::CCommand::destructor_void_]
mov byte [esp + 0x308], 5
lea ecx, [esp + 0x14]
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 + 0x308], 4
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 byte [esp + 0x308], 3
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 + 0x308], 2
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 byte [esp + 0x308], 1
lea ecx, [esp + 0x98]
call sub.mfc90u.dll_CSingleLock::Unlock
mov byte [esp + 0x308], 0
lea ecx, [esp + 0x314]
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 + 0x308], 0xffffffff
lea ecx, [esp + 0x318]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor eax, eax
mov ecx, dword [esp + 0x300]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2e8]
xor ecx, esp
call fcn.00532776
add esp, 0x2f8
ret 0x10