Function at 0x4216c0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4a6e69
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push esi
push edi
mov eax, dword [0x4c3518]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
cmp edi, ebx
je 0x421bc8
mov eax, dword [ebp + 8]
push str.DROP_TRIGGER_IF_EXISTS__delete_message___t_t_t_t_t_t_t_DROP_TRIGGER_IF_EXISTS__delete_newest_message___t_t_t_t_t_t_t_DROP_TRIGGER_IF_EXISTS__insert_unread_message___t_t_t_t_t_t_t_DROP_TRIGGER_IF_EXISTS__insert_newest_message___t_t_t_t_t_t_t_DROP_TRIGGER_IF_EXISTS__mark_message_unread___t_t_t_t_t_t_t_DROP_TRIGGER_IF_EXISTS__mark_message_read__
call fcn.0043a870
mov dword [esp + 0x14], ebx
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x8c], ebx
call fcn.00416880
mov byte [esp + 0x88], 1
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
sar ecx, 2
test ecx, ecx
jbe 0x4217af
mov eax, edi
call fcn.00421ea0
mov ecx, dword [eax]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x58]
mov dword [esp + 0x18], eax
test edx, edx
jne 0x421752
xor esi, esi
jmp 0x42175b
mov esi, dword [esp + 0x60]
sub esi, edx
sar esi, 2
mov ecx, dword [esp + 0x5c]
mov eax, ecx
sub eax, edx
sar eax, 2
cmp eax, esi
jae 0x42177b
mov edx, dword [esp + 0x18]
mov eax, ecx
add eax, 4
mov dword [ecx], edx
mov dword [esp + 0x5c], eax
jmp 0x42179f
mov esi, ecx
cmp edx, ecx
jbe 0x421786
call fcn.00485b29
mov eax, dword [esp + 0x4c]
push esi
push eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea eax, [esp + 0x5c]
call fcn.0042f660
mov edx, dword [edi + 0x10]
sub edx, dword [edi + 0xc]
inc ebx
sar edx, 2
cmp ebx, edx
jb 0x421732
xor ebx, ebx
sub esp, 0x18
mov eax, esp
mov dword [esp + 0x38], esp
push eax
lea ecx, [esp + 0x68]
call fcn.00421f20
mov byte [esp + 0xa0], 2
mov byte [esp + 0xa0], 1
call fcn.0042cbe0
push eax
push str.Delete_From__message__where_ROWID_in__s_
lea esi, [esp + 0x34]
mov dword [esp + 0x40], eax
call fcn.0043a2c0
mov esi, dword [esp + 0x34]
mov eax, dword [ebp + 8]
add esp, 0x20
push esi
call fcn.0043a870
push 4
call fcn.00485c0f
add esp, 4
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
mov byte [esp + 0x88], 3
cmp eax, ebx
je 0x421820
lea ecx, [esp + 0x34]
mov dword [eax], ecx
jmp 0x421822
xor eax, eax
mov byte [esp + 0x88], 1
mov dword [esp + 0x34], eax
mov byte [esp + 0x88], 5
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov byte [esp + 0x88], 6
mov edx, dword [edi + 0x10]
sub edx, dword [edi + 0xc]
mov dword [esp + 0x18], ebx
sar edx, 2
test edx, edx
jbe 0x42192b
mov ebx, dword [esp + 0x18]
mov eax, edi
call fcn.00421ea0
mov ecx, dword [eax]
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
call edx
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov ebx, eax
mov eax, edx
sub eax, ecx
sar eax, 2
xor esi, esi
mov dword [esp + 0x1c], ebx
test eax, eax
jbe 0x4218b0
cmp esi, eax
jb 0x42189f
call fcn.00485b29
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
cmp ebx, dword [ecx + esi*4]
je 0x4218b0
mov eax, edx
sub eax, ecx
inc esi
sar eax, 2
cmp esi, eax
jb 0x42189f
mov eax, edx
sub eax, ecx
sar eax, 2
cmp esi, eax
jne 0x421909
test ecx, ecx
jne 0x4218c3
xor esi, esi
jmp 0x4218cc
mov esi, dword [esp + 0x48]
sub esi, ecx
sar esi, 2
cmp eax, esi
jae 0x4218dd
mov eax, edx
mov dword [edx], ebx
lea edx, [eax + 4]
mov dword [esp + 0x44], edx
jmp 0x421905
mov esi, edx
cmp ecx, edx
jbe 0x4218e8
call fcn.00485b29
mov eax, dword [esp + 0x34]
push esi
push eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x34]
push ecx
lea eax, [esp + 0x44]
call fcn.0042f660
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov esi, dword [edi + 0x10]
sub esi, dword [edi + 0xc]
mov eax, dword [esp + 0x18]
inc eax
sar esi, 2
mov dword [esp + 0x18], eax
cmp eax, esi
jb 0x42185f
mov esi, dword [esp + 0x14]
xor ebx, ebx
jmp 0x421933
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
sub edx, ecx
sar edx, 2
xor edi, edi
cmp edx, edi
jbe 0x421a87
cmp ebx, edx
jb 0x42194f
call fcn.00485b29
mov ecx, dword [esp + 0x40]
mov edx, dword [ecx + ebx*4]
push edx
push str.select_ROWID_from__message__where_group_id___d_order_by_ROWID_desc_
lea esi, [esp + 0x1c]
call fcn.0043a2c0
mov eax, dword [esp + 0x1c]
mov edi, dword [ebp + 8]
add esp, 8
push eax
lea ecx, [esp + 0x68]
push ecx
mov ecx, edi
call fcn.0043a940
mov byte [esp + 0x88], 7
cmp dword [esp + 0x6c], 0
je 0x421b6e
cmp byte [esp + 0x70], 0
jne 0x4219e8
xor eax, eax
lea ecx, [esp + 0x64]
call fcn.0043a470
cmp eax, 5
jne 0x4219a6
xor esi, esi
jmp 0x4219b3
push 0
lea eax, [esp + 0x68]
call fcn.0043a370
mov esi, eax
mov edx, dword [esp + 0x44]
sub edx, dword [esp + 0x40]
sar edx, 2
cmp ebx, edx
jb 0x4219c7
call fcn.00485b29
mov eax, dword [esp + 0x40]
mov ecx, dword [eax + ebx*4]
push ecx
push esi
push str.update__msg_group__set_newest_message___d_where_ROWID___d_
lea esi, [esp + 0x20]
call fcn.0043a2c0
mov edx, dword [esp + 0x20]
add esp, 0xc
push edx
jmp 0x421a53
mov eax, dword [esp + 0x44]
sub eax, dword [esp + 0x40]
sar eax, 2
cmp ebx, eax
jb 0x4219fc
call fcn.00485b29
mov ecx, dword [esp + 0x40]
mov edx, dword [ecx + ebx*4]
push edx
push str.delete_from__group_member__where_group_id___d_
lea esi, [esp + 0x1c]
call fcn.0043a2c0
mov eax, dword [esp + 0x1c]
add esp, 8
push eax
mov eax, edi
call fcn.0043a870
mov ecx, dword [esp + 0x44]
sub ecx, dword [esp + 0x40]
sar ecx, 2
cmp ebx, ecx
jb 0x421a35
call fcn.00485b29
mov edx, dword [esp + 0x40]
mov eax, dword [edx + ebx*4]
push eax
push str.delete_from__msg_group__where_ROWID___d_
lea esi, [esp + 0x1c]
call fcn.0043a2c0
mov ecx, dword [esp + 0x1c]
add esp, 8
push ecx
mov eax, edi
call fcn.0043a870
lea ecx, [esp + 0x64]
mov byte [esp + 0x88], 6
call fcn.0043a310
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
sub edx, ecx
inc ebx
sar edx, 2
cmp ebx, edx
jb 0x42194f
mov esi, dword [esp + 0x14]
xor edi, edi
mov eax, dword [esp + 0x20]
push eax
call fcn.0048556b
mov byte [esp + 0x8c], 1
mov eax, dword [esp + 0x44]
add esp, 4
cmp eax, edi
je 0x421aad
push eax
call fcn.00485321
add esp, 4
mov ecx, dword [esp + 0x34]
push ecx
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
call fcn.00485321
mov byte [esp + 0x8c], 0
mov eax, dword [esp + 0x5c]
add esp, 4
cmp eax, edi
je 0x421adf
push eax
call fcn.00485321
add esp, 4
mov edx, dword [esp + 0x4c]
push edx
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
call fcn.00485321
add esp, 4
mov dword [esp + 0x88], 0xffffffff
cmp esi, edi
je 0x421bbb
cmp dword [0x4c4bd8], edi
je 0x421bad
mov eax, dword [0x4c7548]
cmp eax, edi
je 0x421b2a
push eax
call dword [0x4c4c20]
add esp, 4
push esi
call dword [0x4c4bfc]
mov ecx, dword [0x4c74e8]
neg eax
add ecx, eax
add esp, 4
cmp ecx, dword [0x4c750c]
mov dword [0x4c74e8], ecx
jle 0x421b52
mov dword [0x4c750c], ecx
push esi
call dword [0x4c4bf4]
mov eax, dword [0x4c7548]
add esp, 4
cmp eax, edi
je 0x421bb7
push eax
call dword [0x4c4c28]
jmp 0x421bb4
push str.Null_Virtual_Machine_pointer
push 0x3e8
push str.CPPSQLITE_ERROR
push str._s__d_:__s
mov dword [esp + 0x38], vtable.CppSQLite3Exception.0
mov dword [esp + 0x3c], 0x3e8
call fcn.0044af4b
add esp, 0x10
push 0x4be584
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x38], eax
call fcn.0048ae2b
push esi
call dword [0x4c4bf4]
add esp, 4
mov dword [esp + 0x14], edi
mov eax, dword [ebp + 8]
push str.Create__Trigger__delete_message__AFTER_DELETE_On__message__when_not_read_old.flags__begin__update_msg_group_set_unread_count___select_unread_count_from_msg_group_where_rowid__old.group_id____1_where_rowid__old.group_id__end__t_t_t_t_t_t_t_tCreate__Trigger__delete_newest_message__AFTER_DELETE_On__message__WHEN_old.ROWID___SELECT_newest_message_FROM_msg_group_WHERE_ROWID__old.group_id__BEGIN_UPDATE_msg_group_SET_newest_message___SELECT_ROWID_FROM_message_WHERE_group_id__old.group_id_AND_ROWID___SELECT_max_ROWID__FROM_message_WHERE_group_id__old.group_id___WHERE_ROWID__old.group_id__END__t_t_t_t_t_t_t_tCreate__Trigger__insert_newest_message__AFTER_INSERT_On__message__WHEN_new.ROWID___IFNULL__SELECT_MAX_ROWID__FROM_message_WHERE_message.group_id__new.group_id___0__BEGIN_UPDATE_msg_group_SET_newest_message__new.ROWID_WHERE_ROWID__new.group_id__END__t_t_t_t_t_t_t_tCreate__Trigger__insert_unread_message__AFTER_INSERT_On__message__WHEN_NOT_read_new.flags__BEGIN_UPDATE_msg_group_SET_unread_count___SELECT_unread_count_FROM_msg_group_WHERE_ROWID__new.group_id___1_WHERE_ROWID__new.group_id__END__t_t_t_t_t_t_t_tCreate__Trigger__mark_message_read__AFTER_UPDATE_On__message__WHEN_NOT_read_old.flags__AND_read_new.flags__BEGIN__UPDATE_msg_group_SET_unread_count___SELECT_unread_count_FROM_msg_group_WHERE_ROWID__new.group_id____1_WHERE_ROWID__new.group_id__END__t_t_t_t_t_t_t_tCreate__Trigger__mark_message_unread__AFTER_UPDATE_On__message__WHEN_read_old.flags__AND_NOT_read_new.flags__BEGIN__UPDATE_msg_group_SET_unread_count___SELECT_unread_count_FROM_msg_group_WHERE_ROWID__new.group_id___1_WHERE_ROWID__new.group_id___END_
call fcn.0043a870
mov al, 1
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4