Function at 0x421ca0
Capabilities:
Access peb ldr_data
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4a6dd0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push esi
mov eax, dword [0x4c3518]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
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__
mov eax, ebx
call fcn.0043a870
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 0x40], eax
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
push eax
mov eax, dword [edi]
mov edx, dword [eax + 8]
mov ecx, edi
call edx
push eax
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
mov ecx, edi
call edx
push eax
mov eax, dword [edi]
mov edx, dword [eax]
mov ecx, edi
call edx
push eax
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
mov ecx, edi
call edx
push edx
push eax
mov eax, dword [edi]
mov edx, dword [eax + 8]
mov ecx, edi
call edx
push eax
push str.Insert_Into__message___address___date___text___flags___replace___svc_center___group_id___association_id___height___UIFlags___version___read____t_t_t_t_t___Values__s__d__s__d_0_null__select_group_id_from__group_member__where_address___s__0_0_0_0__d__
lea esi, [esp + 0x28]
call fcn.0043a2c0
mov eax, dword [esp + 0x28]
add esp, 0x20
push eax
mov eax, ebx
call fcn.0043a870
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 0x30]
mov edx, dword [eax + 0x34]
mov eax, dword [edi]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edx
mov edx, dword [eax + 8]
mov ecx, edi
call edx
push eax
push str.select_group_id_from__group_member__where_address___s_
call fcn.0043a2c0
mov eax, dword [esp + 0x10]
add esp, 8
push eax
lea ecx, [esp + 0x20]
push ecx
mov ecx, ebx
call fcn.0043a940
lea eax, [esp + 0x1c]
mov byte [esp + 0x40], 1
call fcn.0043a570
test al, al
jne 0x421dbe
xor eax, eax
lea ecx, [esp + 0x1c]
call fcn.0043a470
cmp eax, 5
jne 0x421da6
mov edx, dword [esp + 0xc]
xor eax, eax
push eax
push edx
push str.update__msg_group__set_newest_message___d_where_ROWID___d_
jmp 0x421e28
push 0
lea eax, [esp + 0x20]
call fcn.0043a370
mov edx, dword [esp + 0xc]
push eax
push edx
push str.update__msg_group__set_newest_message___d_where_ROWID___d_
jmp 0x421e28
mov eax, dword [esp + 0xc]
push eax
push str.Insert_Into__msg_group___type___newest_message___unread_count___hash____t_t_t_t_t___Values_0__d_0_0__
lea esi, [esp + 0x10]
call fcn.0043a2c0
mov ecx, dword [esp + 0x10]
add esp, 8
push ecx
mov eax, ebx
call fcn.0043a870
mov eax, dword [ebx + 4]
mov edx, dword [eax + 0x34]
mov esi, dword [eax + 0x30]
mov eax, dword [edi]
mov dword [esp + 0x18], edx
mov edx, dword [eax + 8]
mov ecx, edi
mov dword [esp + 0x14], esi
call edx
push eax
push esi
push str.Insert_Into__group_member___group_id___address___country____t_t_t_t_t___Values__d__s_NULL__
lea esi, [esp + 0x14]
call fcn.0043a2c0
mov eax, dword [esp + 0x14]
add esp, 0xc
push eax
mov eax, ebx
call fcn.0043a870
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
push ecx
push edx
push str.update__message__set_group_id___d_where_ROWID___d_
lea esi, [esp + 0x14]
call fcn.0043a2c0
mov esi, dword [esp + 0x14]
add esp, 0xc
push esi
mov eax, ebx
call fcn.0043a870
mov ecx, dword [esp + 0xc]
mov eax, dword [edi]
mov edx, dword [eax + 0x28]
push ecx
mov ecx, edi
call edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x40], 0
call fcn.0043a310
mov dword [esp + 0x40], 0xffffffff
test esi, esi
je 0x421e79
push esi
call fcn.00449dcf
add esp, 4
mov dword [esp + 8], 0
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_
mov eax, ebx
call fcn.0043a870
mov al, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret