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

Disassembly:
push 0xffffffffffffffff
push 0x53d34f
mov eax, dword fs:[0]
push eax
sub esp, 0xac
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5c403c]
xor eax, esp
push eax
lea eax, [esp + 0xc0]
mov dword fs:[0], eax
cmp dword [0x5c6f20], 0
mov esi, dword [0x5c6f24]
jne 0x4c2804
push 0
lea eax, [esi + 0x10]
push eax
lea ecx, [esp + 0x60]
call sub.mfc90u.dll_CSingleLock::CSingleLock
mov dword [esp + 0xc8], 0
or ebp, 0xffffffff
push ebp
lea ecx, [esp + 0x5c]
call sub.mfc90u.dll_CSingleLock::Lock
mov ebx, dword [esp + 0xd0]
call fcn.0044e790
lea ecx, [esp + 0x18]
call dword [0x55a6c4]
mov byte [esp + 0xc8], 1
lea ecx, [esp + 0x20]
call dword [0x55a6c4]
mov byte [esp + 0xc8], 2
lea ecx, [esp + 0x1c]
call dword [0x55a6c4]
mov byte [esp + 0xc8], 3
push 0
call dword [sym.imp.MSVCR90.dll__time64]
mov ecx, eax
mov eax, dword [esp + 0xe0]
imul eax, eax, 0xe10
mov edi, edx
cdq
add esp, 4
sub ecx, eax
sbb edi, edx
push edi
mov edi, dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
push ecx
mov ecx, dword [esp + 0xdc]
mov edx, dword [ecx]
push edx
lea eax, [esp + 0x24]
push str.SELECT_index_id_FROM_wtw_chat_index_WHERE__0__s__AND_start_time____llu_ORDER_BY_start_time_DESC_LIMIT_0_1_
push eax
call edi
mov edx, dword [esp + 0x2c]
add esp, 0x14
lea ecx, [esp + 0x28]
push ecx
push edx
mov ecx, esi
mov dword [esp + 0x30], ebp
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::executeAndRead_wchar_t_const___int__]
test eax, eax
jge 0x4c280b
lea ecx, [esp + 0x58]
call sub.mfc90u.dll_CSingleLock::Unlock
mov byte [esp + 0xc8], 2
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 + 0xc8], 1
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 + 0xc8], 0
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 dword [esp + 0xc8], ebp
lea ecx, [esp + 0x58]
call sub.mfc90u.dll_CSingleLock::Unlock
xor eax, eax
jmp 0x4c2c3f
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x1c]
push 0x585f68
push ecx
call edi
add esp, 0xc
lea ecx, [esp + 0x34]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_void_]
mov byte [esp + 0xc8], 4
mov eax, dword [esp + 0x18]
mov ebp, dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CConnection::executeAndRead_wchar_t_const___class_wtw::CString__]
lea edx, [esp + 0x34]
push edx
push eax
mov ecx, esi
call ebp
lea ecx, [esp + 0x34]
call dword [sym.imp.libWTW.module_public:_wchar_t_const____thiscall_wtw::CString::operator_wchar_t_const__void_const]
push eax
lea ecx, [esp + 0x24]
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 + 0xc8], 3
mov ebx, dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::CString::destructor_void_]
lea ecx, [esp + 0x34]
call ebx
mov ecx, dword [esp + 0x28]
push ecx
lea edx, [esp + 0x1c]
push 0x585fe0
push edx
call edi
add esp, 0xc
lea ecx, [esp + 0x34]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_void_]
mov byte [esp + 0xc8], 5
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
push ecx
mov ecx, esi
call ebp
lea ecx, [esp + 0x34]
call dword [sym.imp.libWTW.module_public:_wchar_t_const____thiscall_wtw::CString::operator_wchar_t_const__void_const]
push eax
lea ecx, [esp + 0x20]
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 + 0xc8], 3
lea ecx, [esp + 0x34]
call ebx
mov edx, dword [esp + 0xd8]
mov eax, dword [esp + 0x28]
push edx
push eax
lea ecx, [esp + 0x20]
push str.SELECT__FROM_wtw_chat_data_WHERE_index_id___d_ORDER_BY_entry_time_DESC__chat_id_DESC_LIMIT_0__d_
push ecx
call edi
mov edx, dword [esp + 0x28]
add esp, 0x10
push edx
push esi
lea ecx, [esp + 0xb4]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::db::CCommand::constructor_class_wtw::db::CConnection___wchar_t_const__]
mov byte [esp + 0xc8], 6
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0xb0]
call dword [sym.imp.libWTW.module_public:_class_wtw::db::CReader___thiscall_wtw::db::CCommand::executeReader_void_]
mov byte [esp + 0xc8], 7
mov eax, dword [0x5c7000]
add eax, 0x34
push eax
lea ecx, [esp + 0x34]
call dword [0x55a520]
mov byte [esp + 0xc8], 8
lea ecx, [esp + 0x44]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::read_void_]
test eax, eax
jne 0x4c2bae
lea ecx, [esp + 0x6c]
push ecx
call fcn.00502240
mov byte [esp + 0xc8], 9
lea ecx, [esp + 0x64]
call dword [0x55a6c4]
mov byte [esp + 0xc8], 0xa
lea ecx, [esp + 0x54]
call dword [0x55a6c4]
mov byte [esp + 0xc8], 0xb
lea ecx, [esp + 0x2c]
call dword [0x55a6c4]
mov byte [esp + 0xc8], 0xc
push 0
lea edx, [esp + 0x88]
push edx
push 7
lea ecx, [esp + 0x50]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__int___int_]
mov ebp, dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__long_long___int64____long_long___int64__]
push 0
push 0
lea eax, [esp + 0x3c]
push eax
push 4
lea ecx, [esp + 0x54]
call ebp
test dword [esp + 0x84], 0x10000000
jne 0x4c2a50
lea ecx, [esp + 0x8c]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_void_]
mov byte [esp + 0xc8], 0xd
push 0x55ae9c
lea ecx, [esp + 0xa0]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_wchar_t_const__]
mov byte [esp + 0xc8], 0xe
lea ecx, [esp + 0x9c]
push ecx
lea edx, [esp + 0x90]
push edx
push 5
lea ecx, [esp + 0x50]
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 + 0xc8], 0xd
lea ecx, [esp + 0x9c]
call ebx
lea ecx, [esp + 0x8c]
call dword [sym.imp.libWTW.module_public:_wchar_t_const____thiscall_wtw::CString::operator_wchar_t_const__void_const]
push eax
lea ecx, [esp + 0x30]
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 + 0xc8], 0xc
lea ecx, [esp + 0x8c]
call ebx
jmp 0x4c2ac7
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x28]
push ecx
push 5
lea ecx, [esp + 0x50]
xor edi, edi
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__void____int__]
test dword [esp + 0x84], 0x20000000
je 0x4c2a91
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x24]
push edx
push eax
push ecx
call fcn.004bba70
add esp, 0xc
mov edi, 1
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.libWTW.module_public:_static_wchar_t____cdecl_wtw::CConv::utow_char_const__]
add esp, 4
mov esi, eax
push esi
lea ecx, [esp + 0x30]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_3]
push esi
call sub.mfc90u.dll_delete__
add esp, 4
test edi, edi
je 0x4c2ac7
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push 0
push 0
lea ecx, [esp + 0x3c]
push ecx
push 4
lea ecx, [esp + 0x54]
call ebp
lea edx, [esp + 0x20]
push edx
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 eax, [esp + 0x1c]
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_2]
lea ecx, [esp + 0x2c]
push ecx
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 edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x78]
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], eax
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
mov ebp, dword [esp + 0xd0]
mov esi, dword [ebp + 0x14]
mov eax, dword [esi + 4]
lea edx, [esp + 0x6c]
push edx
push eax
push esi
call fcn.004c4260
mov ecx, ebp
mov edi, eax
call fcn.004c4310
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
mov byte [esp + 0xc8], 0xb
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 + 0xc8], 0xa
lea ecx, [esp + 0x54]
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 + 0xc8], 9
lea ecx, [esp + 0x64]
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 + 0xc8], 8
lea ecx, [esp + 0x6c]
push ecx
call fcn.0049a860
lea ecx, [esp + 0x44]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::read_void_]
test eax, eax
je 0x4c2943
lea ecx, [esp + 0x58]
call sub.mfc90u.dll_CSingleLock::Unlock
mov byte [esp + 0xc8], 7
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 + 0xc8], 6
lea ecx, [esp + 0x44]
call dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::db::CReader::destructor_void_]
mov byte [esp + 0xc8], 3
lea ecx, [esp + 0xac]
call dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::db::CCommand::destructor_void_]
mov byte [esp + 0xc8], 2
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 + 0xc8], 1
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 + 0xc8], 0
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 dword [esp + 0xc8], 0xffffffff
lea ecx, [esp + 0x58]
call sub.mfc90u.dll_CSingleLock::Unlock
mov eax, 1
mov ecx, dword [esp + 0xc0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb8
ret 0x10