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

Disassembly:
push 0xffffffffffffffff
push 0x549b7e
mov eax, dword fs:[0]
push eax
sub esp, 0x17c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5c403c]
xor eax, esp
push eax
lea eax, [esp + 0x190]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x1a0]
cmp dword [0x5c6f20], 0
mov esi, dword [0x5c6f24]
je 0x4c2caa
xor eax, eax
jmp 0x4c32e4
push 0
lea eax, [esi + 0x10]
push eax
lea ecx, [esp + 0xd4]
call sub.mfc90u.dll_CSingleLock::CSingleLock
mov dword [esp + 0x198], 0
push 0xffffffffffffffff
lea ecx, [esp + 0xd0]
call sub.mfc90u.dll_CSingleLock::Lock
mov ecx, dword [esp + 0x1a4]
push 0x55ae9c
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_3]
lea ecx, [esp + 0x1c]
call dword [0x55a6c4]
mov byte [esp + 0x198], 1
lea ecx, [esp + 0x28]
call dword [0x55a6c4]
mov byte [esp + 0x198], 2
lea ecx, [esp + 0x2c]
call dword [0x55a6c4]
mov byte [esp + 0x198], 3
mov edi, dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
push ebp
lea ecx, [esp + 0x20]
push str.SELECT_contact_id_FROM_wtw_chat_index_WHERE_index_id___d
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 + 0x198], 4
mov eax, dword [esp + 0x1c]
mov ebx, 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 ebx
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 + 0x2c]
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 + 0x198], 3
lea ecx, [esp + 0x34]
call dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::CString::destructor_void_]
push ebp
lea ecx, [esp + 0x20]
push str.SELECT_contact_net_FROM_wtw_chat_index_WHERE_index_id___d
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 + 0x198], 5
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x34]
push edx
push eax
mov ecx, esi
call ebx
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 + 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 + 0x198], 3
mov ebx, dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::CString::destructor_void_]
lea ecx, [esp + 0x34]
call ebx
push ebp
lea ecx, [esp + 0x20]
push str.SELECT__FROM_wtw_chat_data_WHERE_index_id___d
push ecx
call edi
mov edx, dword [esp + 0x28]
add esp, 0xc
push edx
push esi
lea ecx, [esp + 0x100]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::db::CCommand::constructor_class_wtw::db::CConnection___wchar_t_const__]
mov byte [esp + 0x198], 6
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0xfc]
call dword [sym.imp.libWTW.module_public:_class_wtw::db::CReader___thiscall_wtw::db::CCommand::executeReader_void_]
mov byte [esp + 0x198], 7
push 0x48
lea ecx, [esp + 0x88]
push 0
push ecx
call sub.MSVCR90.dll_memset
mov eax, dword [0x5c7000]
add esp, 0xc
add eax, 0x34
push eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x88], 0x48
call dword [0x55a520]
mov byte [esp + 0x198], 8
lea ecx, [esp + 0x10c]
call fcn.004bb650
mov byte [esp + 0x198], 9
lea ecx, [esp + 0x50]
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::read_void_]
test eax, eax
jne 0x4c3239
mov ebp, dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__int___int_]
push 0x48
lea edx, [esp + 0x88]
push 0
push edx
call sub.MSVCR90.dll_memset
xor eax, eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
lea ecx, [esp + 0x44]
mov dword [esp + 0x84], 0x48
mov dword [esp + 0x64], 0x20
mov dword [esp + 0x7c], eax
call dword [0x55a6c4]
mov byte [esp + 0x198], 0xa
lea ecx, [esp + 0x4c]
call dword [0x55a6c4]
mov byte [esp + 0x198], 0xb
lea ecx, [esp + 0x20]
call dword [0x55a6c4]
mov byte [esp + 0x198], 0xc
push 0
lea ecx, [esp + 0xb4]
push ecx
push 7
lea ecx, [esp + 0x5c]
call ebp
push 0
push 0
lea edx, [esp + 0x3c]
push edx
push 4
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__]
test dword [esp + 0xb0], 0x10000000
jne 0x4c2fd6
lea ecx, [esp + 0xd8]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_void_]
mov byte [esp + 0x198], 0xd
push 0x55ae9c
lea ecx, [esp + 0xec]
call dword [sym.imp.libWTW.module_public:_void___thiscall_wtw::CString::constructor_wchar_t_const__]
mov byte [esp + 0x198], 0xe
lea eax, [esp + 0xe8]
push eax
lea ecx, [esp + 0xdc]
push ecx
push 5
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 + 0x198], 0xd
lea ecx, [esp + 0xe8]
call ebx
lea ecx, [esp + 0xd8]
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 + 0x198], 0xc
lea ecx, [esp + 0xd8]
call ebx
jmp 0x4c304d
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x28]
push eax
push 5
lea ecx, [esp + 0x5c]
xor edi, edi
call dword [sym.imp.libWTW.module_public:_long_int___thiscall_wtw::db::CReader::getResult_int__void____int__]
test dword [esp + 0xb0], 0x20000000
je 0x4c3017
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x24]
push ecx
push edx
push eax
call fcn.004bba70
add esp, 0xc
mov edi, 1
mov ecx, dword [esp + 0x24]
push ecx
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 + 0x24]
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 0x4c304d
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x94], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0xb4], edx
mov edx, dword [esp + 0x20]
mov dword [esp + 0xb8], ecx
push eax
lea ecx, [esp + 0x13c]
mov dword [esp + 0x94], eax
mov dword [esp + 0xb0], edx
xor esi, esi
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Compare]
test eax, eax
jne 0x4c30c1
mov eax, dword [esp + 0x94]
push eax
lea ecx, [esp + 0x140]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Compare]
test eax, eax
jne 0x4c30c1
mov ecx, dword [esp + 0x48]
cmp dword [esp + 0xb0], ecx
jne 0x4c30c1
lea esi, [eax + 1]
lea edx, [esp + 0x14c]
push edx
lea ecx, [esp + 0x8c]
lea edi, [esp + 0x110]
call fcn.004bb7d0
lea ecx, [esp + 0x14c]
call fcn.00417f00
mov eax, dword [esp + 0xb0]
lea ecx, [esp + 0x18]
mov dword [esp + 0x48], eax
call dword [0x55a6c4]
mov byte [esp + 0x198], 0xf
mov eax, dword [esp + 0xb0]
mov ecx, dword [esp + 0x1ac]
push 0
push 0
lea edx, [esp + 0x8c]
push ecx
test eax, 0x400
je 0x4c3134
shr eax, 7
not eax
and eax, 1
push eax
push edx
push 8
jmp 0x4c315c
test eax, 0x100
je 0x4c3149
shr eax, 7
not eax
and eax, 1
push eax
push edx
push 6
jmp 0x4c315c
test eax, 0x200
je 0x4c3181
shr eax, 7
not eax
and eax, 1
push eax
push edx
push 7
mov eax, dword [esp + 0x1c0]
push eax
lea edx, [esp + 0x80]
lea ecx, [esp + 0x34]
call fcn.004f52e0
mov dword [esp + 0x90], 0x55ae9c
jmp 0x4c31cd
lea ecx, [esp + 0x24]
test al, 2
je 0x4c31aa
shr eax, 7
not eax
and eax, 1
push eax
mov eax, dword [esp + 0x1b8]
push edx
lea edx, [esp + 0x78]
test esi, esi
je 0x4c31a6
push 5
jmp 0x4c31c7
push 2
jmp 0x4c31c7
shr eax, 7
not eax
and eax, 1
push eax
mov eax, dword [esp + 0x1b8]
push edx
xor edx, edx
test esi, esi
je 0x4c31c5
push 3
jmp 0x4c31c7
push 1
push eax
call fcn.004f52e0
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x1a8]
call dword [0x55a4e8]
mov byte [esp + 0x198], 0xc
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 + 0x198], 0xb
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 + 0x198], 0xa
lea ecx, [esp + 0x4c]
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 + 0x198], 9
lea ecx, [esp + 0x44]
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 0x4c2e84
lea ecx, [esp + 0xcc]
call sub.mfc90u.dll_CSingleLock::Unlock
mov byte [esp + 0x198], 8
lea ecx, [esp + 0x10c]
call fcn.00417f00
mov byte [esp + 0x198], 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 + 0x198], 6
lea ecx, [esp + 0x50]
call dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::db::CReader::destructor_void_]
mov byte [esp + 0x198], 3
lea ecx, [esp + 0xf8]
call dword [sym.imp.libWTW.module_public_virtual:_void___thiscall_wtw::db::CCommand::destructor_void_]
mov byte [esp + 0x198], 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 + 0x198], 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 + 0x198], 0
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 dword [esp + 0x198], 0xffffffff
lea ecx, [esp + 0xcc]
call sub.mfc90u.dll_CSingleLock::Unlock
mov eax, 1
mov ecx, dword [esp + 0x190]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret 0x10