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

Disassembly:
push 0xffffffffffffffff
push 0x54cf17
mov eax, dword fs:[0]
push eax
sub esp, 0x318
mov eax, dword [0x5c403c]
xor eax, esp
mov dword [esp + 0x310], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5c403c]
xor eax, esp
push eax
lea eax, [esp + 0x32c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x33c]
mov ebx, dword [esp + 0x344]
mov esi, ecx
mov dword [esp + 0x40], esi
mov edi, edx
mov dword [esp + 0x334], 0
cmp dword [0x5c6f20], 0
mov eax, dword [0x5c6f24]
mov dword [esp + 0x30], eax
jne 0x4c006d
push 0
add eax, 0x10
push eax
lea ecx, [esp + 0xa8]
call sub.mfc90u.dll_CSingleLock::CSingleLock
mov byte [esp + 0x334], 1
push 0xffffffffffffffff
lea ecx, [esp + 0xa4]
call sub.mfc90u.dll_CSingleLock::Lock
call fcn.004604d0
lea ecx, [esp + 0x28]
call dword [0x55a6c4]
mov byte [esp + 0x334], 2
lea ecx, [esp + 0x2c]
call dword [0x55a6c4]
mov byte [esp + 0x334], 3
lea ecx, [esp + 0x1c]
call dword [0x55a6c4]
mov byte [esp + 0x334], 4
lea ecx, [esp + 0x20]
call dword [0x55a6c4]
mov byte [esp + 0x334], 5
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 ecx, eax
or ecx, edi
je 0x4bf938
push edi
push eax
lea edx, [esp + 0x28]
push 0x583ed0
push edx
call esi
add esp, 0x10
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x20]
call dword [0x55a4e8]
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov edx, eax
or edx, ecx
je 0x4bf96b
add eax, 0x15180
adc ecx, 0
push ecx
push eax
lea eax, [esp + 0x28]
push str.AND_entry_time____lld
push eax
call esi
add esp, 0x10
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x20]
call dword [0x55a4e8]
mov edx, dword [esp + 0x340]
push edx
lea eax, [esp + 0x30]
push str.entry_text_LIKE____s__
push eax
call esi
add esp, 0xc
test ebp, ebp
je 0x4bfad9
cmp dword [ebp + 0x1c], 0
je 0x4bfad9
lea ecx, [esp + 0x18]
call dword [0x55a6c4]
mov byte [esp + 0x334], 6
mov esi, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
add ecx, esi
cmp esi, ecx
jbe 0x4bf9b8
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edi, dword [ebp]
mov ebx, esi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], ebx
lea ecx, [esp + 0x14]
call dword [0x55a6c4]
mov byte [esp + 0x334], 7
lea eax, [esp + 0x34]
call fcn.00413720
mov esi, eax
lea eax, [esp + 0x34]
call fcn.00413720
mov edx, dword [esi + 0x30]
mov eax, dword [eax + 0x2c]
push edx
push eax
lea ecx, [esp + 0x1c]
push str._contact_id_s_AND_contact_net_s_
push ecx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0x10
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
call dword [0x55a4e8]
test edi, edi
jne 0x4bfa85
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
xor ecx, ecx
mov ecx, dword [ecx + 0x1c]
add ecx, dword [eax + 0x18]
cmp ebx, ecx
jb 0x4bfa33
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
inc ebx
add esi, eax
mov dword [esp + 0x38], ebx
cmp eax, esi
jbe 0x4bfa4a
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [ebp]
test edi, edi
je 0x4bfa55
cmp edi, eax
je 0x4bfa5b
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp ebx, esi
je 0x4bfa8b
push 0x584460
lea ecx, [esp + 0x1c]
call dword [0x55a294]
mov byte [esp + 0x334], 6
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]
jmp 0x4bf9c5
mov eax, dword [edi]
mov ecx, eax
jmp 0x4bfa23
mov byte [esp + 0x334], 6
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 edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
push edx
push eax
push ecx
lea edx, [esp + 0x34]
push str.SELECT_msg_id__contact_id__entry_time__entry_flags__contact_net_FROM_wtw_message_data_WHERE___s__AND__s__s_ORDER_BY_entry_time_DESC_
push edx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0x14
mov byte [esp + 0x334], 5
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 esi, dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
jmp 0x4bfaf2
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
push eax
push ecx
lea edx, [esp + 0x30]
push str.SELECT_msg_id__contact_id__entry_time__entry_flags__contact_net_FROM_wtw_message_data_WHERE_1_AND__s__s_ORDER_BY_entry_time_DESC_
push edx
call esi
add esp, 0x10
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
push eax
push ecx
lea ecx, [esp + 0xf4]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::db::CCommand::constructor_class_wtw::db::CConnection___wchar_t_const__]
mov byte [esp + 0x334], 8
lea edx, [esp + 0x44]
push edx
lea ecx, [esp + 0xf0]
call dword [sym.imp.libWTW.module_public:_class_wtw::db::CReader___thiscall_wtw::db::CCommand::executeReader_void_]
mov byte [esp + 0x334], 9
lea ecx, [esp + 0x44]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::read_void_]
test eax, eax
jne 0x4bffde
mov ebp, dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::CString::destructor_void_]
jmp 0x4bfb56
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 + 0x14]
call dword [0x55a6c4]
mov byte [esp + 0x334], 0xa
push 0
lea eax, [esp + 0x6c]
push eax
push 0
lea ecx, [esp + 0x50]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__int___int_]
mov ecx, dword [esp + 0x68]
push ecx
lea edx, [esp + 0x18]
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 + 0x7c]
push edx
call fcn.00532989
mov byte [esp + 0x334], 0xc
lea eax, [esp + 0x14]
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]
lea ecx, [esp + 0x24]
call dword [0x55a6c4]
mov byte [esp + 0x334], 0xd
lea ecx, [esp + 0x18]
call dword [0x55a6c4]
mov byte [esp + 0x334], 0xe
mov esi, dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_void_]
lea ecx, [esp + 0xac]
call esi
mov byte [esp + 0x334], 0xf
mov ebx, dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_wchar_t_const__]
push 0x55ae9c
lea ecx, [esp + 0xe0]
call ebx
mov byte [esp + 0x334], 0x10
mov edi, dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__class_wtw::CString___class_wtw::CString_const__]
lea ecx, [esp + 0xdc]
push ecx
lea edx, [esp + 0xb0]
push edx
push 4
lea ecx, [esp + 0x50]
call edi
mov byte [esp + 0x334], 0xf
lea ecx, [esp + 0xdc]
call ebp
lea ecx, [esp + 0xac]
call dword [sym.imp.libWTW.module_public:_wchar_t_const____thiscall_wtw::CString::operator_wchar_t_const__void_const]
push eax
lea ecx, [esp + 0x28]
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 + 0x334], 0xe
lea ecx, [esp + 0xac]
call ebp
lea ecx, [esp + 0xbc]
call esi
mov byte [esp + 0x334], 0x11
push 0x55ae9c
lea ecx, [esp + 0xd0]
call ebx
mov byte [esp + 0x334], 0x12
lea eax, [esp + 0xcc]
push eax
lea ecx, [esp + 0xc0]
push ecx
push 1
lea ecx, [esp + 0x50]
call edi
mov byte [esp + 0x334], 0x11
lea ecx, [esp + 0xcc]
call ebp
lea ecx, [esp + 0xbc]
call dword [sym.imp.libWTW.module_public:_wchar_t_const____thiscall_wtw::CString::operator_wchar_t_const__void_const]
push eax
lea ecx, [esp + 0x1c]
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 + 0x334], 0xe
lea ecx, [esp + 0xbc]
call ebp
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x1c]
push str._s__s
push ecx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0x10
lea edx, [esp + 0x14]
push edx
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_2]
mov eax, dword [0x5c7044]
add eax, 0x810
lea ecx, [esp + 0x24]
lea edx, [esp + 0x18]
call fcn.00414f10
test eax, eax
je 0x4bfd40
add eax, 0xa0
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_2]
xor eax, eax
push 0x1fc
push eax
lea ecx, [esp + 0x12e]
push ecx
mov word [esp + 0x130], ax
call sub.MSVCR90.dll_memset
mov ebx, dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__long_long___int64____long_long___int64__]
add esp, 0xc
push 0
push 0
lea edx, [esp + 0x5c]
push edx
push 2
lea ecx, [esp + 0x54]
call ebx
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.MSVCR90.dll__localtime64]
mov esi, eax
add esp, 4
mov ecx, 9
lea edi, [esp + 0x100]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x100]
push ecx
push str._a___c
lea edx, [esp + 0x12c]
push 0xff
push edx
call dword [sym.imp.MSVCR90.dll_wcsftime]
add esp, 0x10
lea eax, [esp + 0x124]
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_3]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
push 0
push 0
lea eax, [esp + 0x64]
push eax
mov dword [esp + 0x98], ecx
push 3
lea ecx, [esp + 0x54]
mov dword [esp + 0xa0], edx
call ebx
mov eax, dword [esp + 0x5c]
and eax, 1
xor ecx, ecx
or eax, ecx
push str.wtwArchive
je 0x4bfe4a
lea ecx, [esp + 0x40]
call dword [0x55a504]
mov byte [esp + 0x334], 0x13
mov eax, dword [0x5c6f7c]
push str.Received
push 0x3ed
lea ecx, [esp + 0x44]
push ecx
call fcn.00504820
push eax
lea ecx, [esp + 0x80]
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 + 0x334], 0xe
lea ecx, [esp + 0x3c]
jmp 0x4bfe8f
lea ecx, [esp + 0x34]
call dword [0x55a504]
mov byte [esp + 0x334], 0x14
mov eax, dword [0x5c6f7c]
push str.Sent
push 0x3ee
lea edx, [esp + 0x38]
push edx
call fcn.00504820
push eax
lea ecx, [esp + 0x80]
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 + 0x334], 0xe
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 eax, dword [esp + 0x5c]
xor ecx, ecx
and eax, 0x10000000
or eax, ecx
lea ecx, [esp + 0x80]
je 0x4bfeb2
push str.UTF_8_
jmp 0x4bfeb7
push str.UTF_16_
call dword [0x55a294]
mov eax, dword [esp + 0x5c]
and eax, 0x20000000
xor ecx, ecx
or eax, ecx
je 0x4bfede
push str.COMPR_
lea ecx, [esp + 0x84]
call dword [0x55a294]
mov eax, dword [esp + 0x80]
cmp dword [eax - 0xc], 0
je 0x4bff2e
mov eax, dword [eax - 0xc]
add eax, 0xfffffffe
push eax
push 0
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x8c]
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 + 0x334], 0x15
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_____::operator_2]
mov byte [esp + 0x334], 0xe
lea ecx, [esp + 0x34]
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 ebx, dword [esp + 0x40]
mov ecx, dword [ebx + 0x1c]
inc ecx
cmp dword [ebx + 0x14], ecx
ja 0x4bff40
call fcn.004c3fa0
mov esi, dword [ebx + 0x1c]
add esi, dword [ebx + 0x18]
mov eax, dword [ebx + 0x14]
cmp eax, esi
ja 0x4bff4f
sub esi, eax
mov edx, dword [ebx + 0x10]
cmp dword [edx + esi*4], 0
jne 0x4bff68
push 0x30
call sub.mfc90u.dll_new
mov ecx, dword [ebx + 0x10]
add esp, 4
mov dword [ecx + esi*4], eax
mov edx, dword [ebx + 0x10]
mov esi, dword [edx + esi*4]
lea edi, [esp + 0x6c]
call fcn.004c4390
mov eax, ebx
inc dword [eax + 0x1c]
mov byte [esp + 0x334], 0xd
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 + 0x334], 0xc
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 + 0x334], 0xa
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 + 0x334], 9
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]
lea ecx, [esp + 0x44]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::read_void_]
test eax, eax
je 0x4bfb50
lea ecx, [esp + 0xa0]
call sub.mfc90u.dll_CSingleLock::Unlock
mov byte [esp + 0x334], 8
lea ecx, [esp + 0x44]
call dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::db::CReader::destructor_void_]
mov byte [esp + 0x334], 5
lea ecx, [esp + 0xec]
call dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::db::CCommand::destructor_void_]
mov byte [esp + 0x334], 4
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 + 0x334], 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 + 0x334], 2
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]
mov byte [esp + 0x334], 1
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 + 0x334], 0
lea ecx, [esp + 0xa0]
call sub.mfc90u.dll_CSingleLock::Unlock
mov dword [esp + 0x334], 0xffffffff
lea ecx, [esp + 0x340]
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 + 0x32c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x310]
xor ecx, esp
call fcn.00532776
add esp, 0x324
ret 0xc