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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x435866
mov eax, dword fs:[0]
push eax
sub esp, 0x860
mov eax, dword [0x449030]
xor eax, esp
mov dword [esp + 0x858], eax
push ebx
push esi
push edi
mov eax, dword [0x449030]
xor eax, esp
push eax
lea eax, [esp + 0x870]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x1c], ecx
lea ecx, [eax + 0x1c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x28], 4
mov dword [esp + 0x14], 5
call fcn.00413120
push 0x7fe
mov esi, eax
lea eax, [esp + 0x6a]
push 0
push eax
mov ebx, edx
mov word [esp + 0x70], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
test edi, edi
push 0x43ca34
push ebx
lea edx, [esp + 0x6c]
push esi
jne 0x41c57b
cmp dword [ebp + 0x14], 0
push ebx
push esi
push ebx
push esi
push ebx
push esi
jne 0x41c598
push str.SELECT__FROM__table_I64d__WHERE____table_I64d_.word_LIKE____AND___table_I64d_.adddate_BETWEEN_:begin_AND_:end___ORDER_BY__table_I64d_._s_COLLATE_NOCASE_ASC_limit_____
call fcn.00414610
add esp, 0x28
jmp 0x41c5b4
mov edi, dword [edi]
cmp edi, 4
je 0x41c560
cmp dword [ebp + 0x14], 0
push edi
push ebx
push esi
push ebx
push esi
push ebx
push esi
push ebx
push esi
jne 0x41c5a7
push str.SELECT__FROM__table_I64d__WHERE____table_I64d_.word_LIKE____AND___table_I64d_.adddate_BETWEEN_:begin_AND_:end__AND___table_I64d_.rank___d___ORDER_BY__table_I64d_._s_COLLATE_NOCASE_ASC_limit_____
jmp 0x41c5ac
push str.SELECT__FROM__table_I64d__WHERE____table_I64d_.word_LIKE____AND___table_I64d_.adddate_BETWEEN_:begin_AND_:end___ORDER_BY__table_I64d_._s_COLLATE_NOCASE_DESC_limit_____
call fcn.00414610
add esp, 0x28
jmp 0x41c5b4
push str.SELECT__FROM__table_I64d__WHERE____table_I64d_.word_LIKE____AND___table_I64d_.adddate_BETWEEN_:begin_AND_:end__AND___table_I64d_.rank___d___ORDER_BY__table_I64d_._s_COLLATE_NOCASE_DESC_limit_____
call fcn.00414610
add esp, 0x34
lea ecx, [esp + 0x64]
push ecx
lea ecx, [esp + 0x30]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov esi, dword [esp + 0x24]
mov eax, esi
mov dword [esp + 0x878], 0
call fcn.0041ca10
mov eax, dword [ebp + 0xc]
cmp eax, 4
ja case.default.0x41c5e1
jmp dword [eax*4 + 0x41c9f0]
mov edx, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov eax, dword [edx]
push str.adddate
push 2
push eax
jmp 0x41c634
push str.viewdate
jmp 0x41c629
mov eax, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov ecx, dword [eax]
push str.word
push 2
push ecx
jmp 0x41c634
mov edx, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov eax, dword [edx]
push str.rank
push 2
push eax
jmp 0x41c634
push 0x43cfb4
mov ecx, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov edx, dword [ecx]
push 2
push edx
push 0x43ca34
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::rfind_wchar_t_const___unsigned_int_const]
push eax
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::replace_unsigned_int__unsigned_int__wchar_t_const__]
cmp dword [esp + 0x20], 0
jne 0x41c6b2
mov eax, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov ecx, dword [eax]
push 0x43d584
push 6
push ecx
push 0x43d588
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::rfind_wchar_t_const___unsigned_int_const]
push eax
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::replace_unsigned_int__unsigned_int__wchar_t_const__]
mov edx, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov eax, dword [edx]
push str.strftime__s_now_
push 4
push eax
push str.:end
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::rfind_wchar_t_const___unsigned_int_const]
push eax
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::replace_unsigned_int__unsigned_int__wchar_t_const__]
mov ebx, 2
lea edi, [ebx + 1]
jmp 0x41c6ba
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x14]
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
jae 0x41c6c9
lea eax, [esp + 0x30]
mov edx, dword [esi + 0x18]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0xffffffffffffffff
push eax
push edx
call sub.sqlite3.dll_sqlite3_prepare16
add esp, 0x14
test eax, eax
jne 0x41c737
mov eax, dword [esp + 0x10]
push eax
call sub.sqlite3.dll_sqlite3_column_count
mov esi, dword [esp + 0x20]
add esp, 4
test esi, esi
push 0
je 0x41c754
mov ecx, dword [esi]
mov edx, dword [esp + 0x14]
push ecx
push ebx
push edx
call sub.sqlite3.dll_sqlite3_bind_int64
add esp, 0x10
test eax, eax
jne 0x41c72a
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x10]
push eax
push ecx
push edi
push edx
call sub.sqlite3.dll_sqlite3_bind_int64
add esp, 0x10
test eax, eax
je 0x41c7ab
mov eax, dword [esp + 0x10]
push eax
call sub.sqlite3.dll_sqlite3_finalize
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x878], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or eax, 0xffffffff
jmp 0x41c9c9
mov ecx, dword [esp + 0x14]
push 0
push ebx
push ecx
call sub.sqlite3.dll_sqlite3_bind_int64
add esp, 0x10
test eax, eax
je 0x41c76f
mov edx, dword [esp + 0x10]
push edx
jmp 0x41c72f
mov eax, dword [esp + 0x10]
or ebx, 0xffffffff
push ebx
push ebx
push edi
push eax
call sub.sqlite3.dll_sqlite3_bind_int64
add esp, 0x10
test eax, eax
je 0x41c7ae
mov ecx, dword [esp + 0x10]
push ecx
call sub.sqlite3.dll_sqlite3_finalize
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x878], ebx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, ebx
jmp 0x41c9c9
or ebx, 0xffffffff
mov esi, dword [esp + 0x20]
test esi, esi
je 0x41c7f2
mov edx, dword [esi + 4]
mov eax, dword [esi]
mov ecx, dword [esp + 0x10]
push edx
push eax
push 2
push ecx
call sub.sqlite3.dll_sqlite3_bind_int64
mov edx, dword [esp + 0x20]
add esp, 0x10
test eax, eax
jne 0x41c811
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
push eax
push ecx
push 3
push edx
call sub.sqlite3.dll_sqlite3_bind_int64
add esp, 0x10
test eax, eax
je 0x41c7f2
mov eax, dword [esp + 0x10]
push eax
jmp 0x41c78b
mov ecx, dword [esp + 0x10]
push 0
push ebx
push 0x43d5d0
push 1
push ecx
call sub.sqlite3.dll_sqlite3_bind_text16
add esp, 0x14
test eax, eax
je 0x41c817
mov edx, dword [esp + 0x10]
push edx
jmp 0x41c78b
mov eax, dword [esp + 0x10]
push eax
call sub.sqlite3.dll_sqlite3_step
add esp, 4
cmp eax, 0x64
jne 0x41c9a7
mov edi, dword [esp + 0x24]
add edi, 0x430
push 0x80
call sub.MFC80U.DLL_Ordinal_762
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov byte [esp + 0x878], 2
je 0x41c85e
push eax
call fcn.00403210
mov esi, eax
jmp 0x41c860
xor esi, esi
mov byte [esp + 0x878], 0
mov ecx, dword [esp + 0x10]
push 0
push ecx
mov dword [esp + 0x1c], esi
call sub.sqlite3.dll_sqlite3_column_int64
mov dword [esi], eax
mov dword [esi + 4], edx
mov edx, dword [esp + 0x18]
push 1
push edx
call sub.sqlite3.dll_sqlite3_column_text16
add esp, 0x10
push eax
lea ecx, [esi + 8]
call dword [0x438548]
mov eax, dword [esp + 0x10]
push 2
push eax
call sub.sqlite3.dll_sqlite3_column_text16
add esp, 8
push eax
lea ecx, [esi + 0x24]
call dword [0x438548]
mov ecx, dword [esp + 0x10]
push 3
push ecx
call sub.sqlite3.dll_sqlite3_column_bytes
mov edx, dword [esp + 0x18]
push 3
push edx
call sub.sqlite3.dll_sqlite3_column_text16
add esp, 0x10
push eax
lea ecx, [esi + 0x40]
call dword [0x438548]
mov eax, dword [esp + 0x10]
push 4
push eax
call sub.sqlite3.dll_sqlite3_column_int
mov dword [esi + 0x5c], eax
mov ecx, dword [esp + 0x18]
push 5
push ecx
call sub.sqlite3.dll_sqlite3_column_int
mov dword [esi + 0x60], eax
mov edx, dword [esp + 0x20]
push 6
push edx
call sub.sqlite3.dll_sqlite3_column_int64
mov dword [esi + 0x68], eax
mov dword [esi + 0x6c], edx
mov eax, dword [esp + 0x28]
push 7
push eax
call sub.sqlite3.dll_sqlite3_column_int64
mov dword [esi + 0x70], eax
mov dword [esi + 0x74], edx
mov ecx, dword [esp + 0x30]
push 8
push ecx
call sub.sqlite3.dll_sqlite3_column_int
mov dword [esi + 0x78], eax
mov edx, dword [esp + 0x38]
push 9
push edx
call sub.sqlite3.dll_sqlite3_column_text
add esp, 0x30
push eax
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov byte [esp + 0x878], 3
mov eax, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.0041e530
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0x7c], ecx
lea ebx, [esp + 0x14]
mov esi, edi
call fcn.00406090
mov edx, dword [esp + 0x10]
add dword [esp + 0x18], 1
push edx
call sub.sqlite3.dll_sqlite3_step
add esp, 4
lea ecx, [esp + 0x48]
mov esi, eax
mov byte [esp + 0x878], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp esi, 0x65
je 0x41c9a4
cmp esi, 0x64
je 0x41c837
or ebx, 0xffffffff
mov eax, dword [esp + 0x10]
push eax
call sub.sqlite3.dll_sqlite3_finalize
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x878], ebx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x870]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x858]
xor ecx, esp
call fcn.004322b8
mov esp, ebp
pop ebp
ret 0x10