user: 请从给定的汇编指令推导出C源代码：

```asm
<filt_w_message>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x410,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  mov    $0x3e,%esi
  call   <strchr@plt>
  mov    %rax,%r12
  lea    D86(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %r12,%r12
  je     L71
  mov    %rax,%rbp
  test   %rax,%rax
  je     L71
  lea    D86(%rip),%rdi
  call   <strlen@plt>
  cltq
  add    %rax,%rbp
  mov    %rsp,%r14
  lea    D26(%rip),%rdx
  mov    $0x200,%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  movslq %eax,%r13
  add    %r14,%r13
  lea    0x1(%r12),%rsi
  mov    $0x10,%edx
  mov    %r13,%rdi
  call   <memcpy@plt>
  lea    0x10(%r13),%rdi
  lea    0x200(%rsp),%rsi
  mov    %rbp,%rcx
  lea    D91(%rip),%rdx
  sub    %edi,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  mov    $0x200,%edx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strncpy@plt>
  lea    D137(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L11
L41:
  lea    0x200(%rsp),%rbp
  mov    $0x0,%r9d
  mov    $0x200,%r8d
  mov    %rbp,%rcx
  lea    D36(%rip),%rdx
  mov    $0x0,%esi
  lea    D66(%rip),%rdi
  call   <ezplib_get_attr_val@plt>
  lea    D40(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L59
  mov    %rbp,%rdi
  lea    D79(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L42
L59:
  lea    D79(%rip),%rcx
  lea    D33(%rip),%rdx
  mov    $0x0,%esi
  lea    D70(%rip),%rdi
  call   <ezplib_replace_attr@plt>
L42:
  mov    %rbx,%rsi
  lea    D74(%rip),%rdi
  call   <printf@plt>
L71:
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0x410,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L11:
  lea    D98(%rip),%rsi
  mov    %rbp,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L41
  jmp    L42
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D86
type: string
name: retrieve_data
arguments: label: D26
type: string
name: retrieve_data
arguments: label: D91
type: string
name: retrieve_data
arguments: label: D137
type: string
name: retrieve_data
arguments: label: D36
type: string
name: retrieve_data
arguments: label: D66
type: string
name: retrieve_data
arguments: label: D40
type: string
name: retrieve_data
arguments: label: D79
type: string
name: retrieve_data
arguments: label: D33
type: string
name: retrieve_data
arguments: label: D70
type: string
name: retrieve_data
arguments: label: D74
type: string
name: retrieve_data
arguments: label: D98
type: string

tool: D86: WIFIConnect

tool: D26: <SYS>	

tool: D91: WIFI Connect: %s

tool: D137: wrong

tool: D36: state

tool: D66: wan_status_rule

tool: D40: 0

tool: D79: 1

tool: D33: wisp

tool: D70: plug_rule

tool: D74: msg:%s


tool: D98: encryption

assistant: ```c
void filt_w_message(char *msg, char *keycat) {
  char dst[512], wan_status[512];
  char *cur = &dst[0];
  char *p1, *p3;
  int n;
  p1 = strchr(msg, '>');
  p3 = strstr(msg, "WIFIConnect");
  if (!p1 || !p3)
    return;
  p1 += 1;
  p3 += strlen("WIFIConnect");
  n = snprintf(cur, 512, "<SYS>\t");
  cur = cur + n;
  memcpy(cur, p1, sizeof("Dec  8 11:12:58 ") - 1);
  cur = cur + (sizeof("Dec  8 11:12:58 ") - 1);
  snprintf(cur, (&dst[0]) + 512 - cur, "WIFI Connect: %s", p3);
  strncpy(msg, dst, 512);
  if (strstr(p3, "wrong") || strstr(p3, "encryption")) {
    ezplib_get_attr_val("wan_status_rule", 0, "state", wan_status, sizeof(wan_status), 0);
    if (!strcmp(wan_status, "0") || !strcmp(wan_status, "1"))
      ezplib_replace_attr("plug_rule", 0, "wisp", "1");
  }
  printf("msg:%s\n", msg);
}
```