
char * GetLocaleMonitorMessage(char *text)

{
  long lVar1;
  char *pcVar2;
  long in_FS_OFFSET;
  char message [4096];
  char tag [4096];
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  CopyMagickString(tag,text,0x1000);
  pcVar2 = strrchr(tag,0x2f);
  if (pcVar2 != (char *)0x0) {
    *pcVar2 = '\0';
  }
  FormatLocaleString(message,0x1000,"Monitor/%s",tag);
  pcVar2 = GetLocaleMessage(message);
  if (pcVar2 == message) {
    pcVar2 = text;
  }
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return pcVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



undefined1 * FUN_00314953(undefined1 *param_1)

{
  char *pcVar1;
  undefined1 *puVar2;
  long in_FS_OFFSET;
  undefined1 auStack_2028 [4096];
  char local_1028 [4104];
  long local_20;
  
  local_20 = *(long *)(in_FS_OFFSET + 0x28);
  CopyMagickString(local_1028,param_1,0x1000);
  pcVar1 = strrchr(local_1028,0x2f);
  if (pcVar1 != (char *)0x0) {
    *pcVar1 = '\0';
  }
  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);
  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);
  if (puVar2 == auStack_2028) {
    puVar2 = param_1;
  }
  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
    return puVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH RBP
PUSH RBX
SUB RSP,0x2018
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x2008],RAX
XOR EAX,EAX
LEA RBX,[RSP + 0x1000]
MOV EDX,0x1000
MOV RSI,RDI
MOV RDI,RBX
CALL 0x0014a0b0
MOV ESI,0x2f
MOV RDI,RBX
CALL 0x0014b5a0
TEST RAX,RAX
JZ 0x0031499f
MOV byte ptr [RAX],0x0
LEA RCX,[RSP + 0x1000]
MOV RBX,RSP
LEA RDX,[0x438726]
MOV ESI,0x1000
MOV RDI,RBX
MOV EAX,0x0
CALL 0x0014d3c0
MOV RDI,RBX
CALL 0x0014acb0
CMP RAX,RBX
CMOVZ RAX,RBP
MOV RDX,qword ptr [RSP + 0x2008]
XOR RDX,qword ptr FS:[0x28]
JNZ 0x003149ef
ADD RSP,0x2018
POP RBX
POP RBP
RET
CALL 0x0014c5c0
(translation_unit "undefined1 * FUN_00314953(undefined1 *param_1)\n\n{\n  char *pcVar1;\n  undefined1 *puVar2;\n  long in_FS_OFFSET;\n  undefined1 auStack_2028 [4096];\n  char local_1028 [4104];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(local_1028,param_1,0x1000);\n  pcVar1 = strrchr(local_1028,0x2f);\n  if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }\n  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);\n  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);\n  if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "undefined1 * FUN_00314953(undefined1 *param_1)\n\n{\n  char *pcVar1;\n  undefined1 *puVar2;\n  long in_FS_OFFSET;\n  undefined1 auStack_2028 [4096];\n  char local_1028 [4104];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(local_1028,param_1,0x1000);\n  pcVar1 = strrchr(local_1028,0x2f);\n  if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }\n  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);\n  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);\n  if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" type_identifier (pointer_declarator "* FUN_00314953(undefined1 *param_1)" * (function_declarator "FUN_00314953(undefined1 *param_1)" identifier (parameter_list "(undefined1 *param_1)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  undefined1 *puVar2;\n  long in_FS_OFFSET;\n  undefined1 auStack_2028 [4096];\n  char local_1028 [4104];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(local_1028,param_1,0x1000);\n  pcVar1 = strrchr(local_1028,0x2f);\n  if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }\n  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);\n  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);\n  if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 auStack_2028 [4096];" type_identifier (array_declarator "auStack_2028 [4096]" identifier [ number_literal ]) ;) (declaration "char local_1028 [4104];" primitive_type (array_declarator "local_1028 [4104]" identifier [ number_literal ]) ;) (declaration "long local_20;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "CopyMagickString(local_1028,param_1,0x1000);" (call_expression "CopyMagickString(local_1028,param_1,0x1000)" identifier (argument_list "(local_1028,param_1,0x1000)" ( identifier , identifier , number_literal ))) ;) (expression_statement "pcVar1 = strrchr(local_1028,0x2f);" (assignment_expression "pcVar1 = strrchr(local_1028,0x2f)" identifier = (call_expression "strrchr(local_1028,0x2f)" identifier (argument_list "(local_1028,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *pcVar1 = '\0';\n  }" { (expression_statement "*pcVar1 = '\0';" (assignment_expression "*pcVar1 = '\0'" (pointer_expression "*pcVar1" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (expression_statement "FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);" (call_expression "FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028)" identifier (argument_list "(auStack_2028,0x1000,"Monitor/%s",local_1028)" ( identifier , number_literal , (string_literal ""Monitor/%s"" " string_content ") , identifier ))) ;) (expression_statement "puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);" (assignment_expression "puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028)" identifier = (cast_expression "(undefined1 *)GetLocaleMessage(auStack_2028)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetLocaleMessage(auStack_2028)" identifier (argument_list "(auStack_2028)" ( identifier ))))) ;) (if_statement "if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }" if (parenthesized_expression "(puVar2 == auStack_2028)" ( (binary_expression "puVar2 == auStack_2028" identifier == identifier) )) (compound_statement "{\n    puVar2 = param_1;\n  }" { (expression_statement "puVar2 = param_1;" (assignment_expression "puVar2 = param_1" identifier = identifier) ;) })) (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }" if (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_20 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return puVar2;\n  }" { (return_statement "return puVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "char * GetLocaleMonitorMessage(char *text)\n\n{\n  long lVar1;\n  char *pcVar2;\n  long in_FS_OFFSET;\n  char message [4096];\n  char tag [4096];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(tag,text,0x1000);\n  pcVar2 = strrchr(tag,0x2f);\n  if (pcVar2 != (char *)0x0) {\n    *pcVar2 = '\0';\n  }\n  FormatLocaleString(message,0x1000,"Monitor/%s",tag);\n  pcVar2 = GetLocaleMessage(message);\n  if (pcVar2 == message) {\n    pcVar2 = text;\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return pcVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "char * GetLocaleMonitorMessage(char *text)\n\n{\n  long lVar1;\n  char *pcVar2;\n  long in_FS_OFFSET;\n  char message [4096];\n  char tag [4096];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(tag,text,0x1000);\n  pcVar2 = strrchr(tag,0x2f);\n  if (pcVar2 != (char *)0x0) {\n    *pcVar2 = '\0';\n  }\n  FormatLocaleString(message,0x1000,"Monitor/%s",tag);\n  pcVar2 = GetLocaleMessage(message);\n  if (pcVar2 == message) {\n    pcVar2 = text;\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return pcVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (pointer_declarator "* GetLocaleMonitorMessage(char *text)" * (function_declarator "GetLocaleMonitorMessage(char *text)" identifier (parameter_list "(char *text)" ( (parameter_declaration "char *text" primitive_type (pointer_declarator "*text" * identifier)) )))) (compound_statement "{\n  long lVar1;\n  char *pcVar2;\n  long in_FS_OFFSET;\n  char message [4096];\n  char tag [4096];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(tag,text,0x1000);\n  pcVar2 = strrchr(tag,0x2f);\n  if (pcVar2 != (char *)0x0) {\n    *pcVar2 = '\0';\n  }\n  FormatLocaleString(message,0x1000,"Monitor/%s",tag);\n  pcVar2 = GetLocaleMessage(message);\n  if (pcVar2 == message) {\n    pcVar2 = text;\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return pcVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "char message [4096];" primitive_type (array_declarator "message [4096]" identifier [ number_literal ]) ;) (declaration "char tag [4096];" primitive_type (array_declarator "tag [4096]" identifier [ number_literal ]) ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "CopyMagickString(tag,text,0x1000);" (call_expression "CopyMagickString(tag,text,0x1000)" identifier (argument_list "(tag,text,0x1000)" ( identifier , identifier , number_literal ))) ;) (expression_statement "pcVar2 = strrchr(tag,0x2f);" (assignment_expression "pcVar2 = strrchr(tag,0x2f)" identifier = (call_expression "strrchr(tag,0x2f)" identifier (argument_list "(tag,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar2 != (char *)0x0) {\n    *pcVar2 = '\0';\n  }" if (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *pcVar2 = '\0';\n  }" { (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (expression_statement "FormatLocaleString(message,0x1000,"Monitor/%s",tag);" (call_expression "FormatLocaleString(message,0x1000,"Monitor/%s",tag)" identifier (argument_list "(message,0x1000,"Monitor/%s",tag)" ( identifier , number_literal , (string_literal ""Monitor/%s"" " string_content ") , identifier ))) ;) (expression_statement "pcVar2 = GetLocaleMessage(message);" (assignment_expression "pcVar2 = GetLocaleMessage(message)" identifier = (call_expression "GetLocaleMessage(message)" identifier (argument_list "(message)" ( identifier )))) ;) (if_statement "if (pcVar2 == message) {\n    pcVar2 = text;\n  }" if (parenthesized_expression "(pcVar2 == message)" ( (binary_expression "pcVar2 == message" identifier == identifier) )) (compound_statement "{\n    pcVar2 = text;\n  }" { (expression_statement "pcVar2 = text;" (assignment_expression "pcVar2 = text" identifier = identifier) ;) })) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return pcVar2;\n  }" if (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return pcVar2;\n  }" { (return_statement "return pcVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined1 * FUN_00314953(undefined1 *param_1)\n\n{\n  char *pcVar1;\n  undefined1 *puVar2;\n  long in_FS_OFFSET;\n  undefined1 auStack_2028 [4096];\n  char local_1028 [4104];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(local_1028,param_1,0x1000);\n  pcVar1 = strrchr(local_1028,0x2f);\n  if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }\n  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);\n  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);\n  if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "undefined1 * FUN_00314953(undefined1 *param_1)\n\n{\n  char *pcVar1;\n  undefined1 *puVar2;\n  long in_FS_OFFSET;\n  undefined1 auStack_2028 [4096];\n  char local_1028 [4104];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(local_1028,param_1,0x1000);\n  pcVar1 = strrchr(local_1028,0x2f);\n  if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }\n  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);\n  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);\n  if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}" type_identifier (pointer_declarator "* FUN_00314953(undefined1 *param_1)" * (function_declarator "FUN_00314953(undefined1 *param_1)" identifier (parameter_list "(undefined1 *param_1)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  undefined1 *puVar2;\n  long in_FS_OFFSET;\n  undefined1 auStack_2028 [4096];\n  char local_1028 [4104];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(local_1028,param_1,0x1000);\n  pcVar1 = strrchr(local_1028,0x2f);\n  if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }\n  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);\n  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);\n  if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 auStack_2028 [4096];" type_identifier (array_declarator "auStack_2028 [4096]" identifier [ number_literal ]) ;) (declaration "char local_1028 [4104];" primitive_type (array_declarator "local_1028 [4104]" identifier [ number_literal ]) ;) (declaration "long local_20;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "CopyMagickString(local_1028,param_1,0x1000);" (call_expression "CopyMagickString(local_1028,param_1,0x1000)" identifier (argument_list "(local_1028,param_1,0x1000)" ( identifier , identifier , number_literal ))) ;) (expression_statement "pcVar1 = strrchr(local_1028,0x2f);" (assignment_expression "pcVar1 = strrchr(local_1028,0x2f)" identifier = (call_expression "strrchr(local_1028,0x2f)" identifier (argument_list "(local_1028,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *pcVar1 = '\0';\n  }" { (expression_statement "*pcVar1 = '\0';" (assignment_expression "*pcVar1 = '\0'" (pointer_expression "*pcVar1" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (expression_statement "FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);" (call_expression "FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028)" identifier (argument_list "(auStack_2028,0x1000,"Monitor/%s",local_1028)" ( identifier , number_literal , (string_literal ""Monitor/%s"" " string_content ") , identifier ))) ;) (expression_statement "puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);" (assignment_expression "puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028)" identifier = (cast_expression "(undefined1 *)GetLocaleMessage(auStack_2028)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "GetLocaleMessage(auStack_2028)" identifier (argument_list "(auStack_2028)" ( identifier ))))) ;) (if_statement "if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }" if (parenthesized_expression "(puVar2 == auStack_2028)" ( (binary_expression "puVar2 == auStack_2028" identifier == identifier) )) (compound_statement "{\n    puVar2 = param_1;\n  }" { (expression_statement "puVar2 = param_1;" (assignment_expression "puVar2 = param_1" identifier = identifier) ;) })) (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }" if (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_20 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return puVar2;\n  }" { (return_statement "return puVar2;" return identifier ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined1 * FUN_00314953(undefined1 *param_1)\n\n{\n  char *pcVar1;\n  undefined1 *puVar2;\n  long in_FS_OFFSET;\n  undefined1 auStack_2028 [4096];\n  char local_1028 [4104];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(local_1028,param_1,0x1000);\n  pcVar1 = strrchr(local_1028,0x2f);\n  if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }\n  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);\n  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);\n  if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}" (type_identifier "undefined1") (pointer_declarator "* FUN_00314953(undefined1 *param_1)" (* "*") (function_declarator "FUN_00314953(undefined1 *param_1)" (identifier "FUN_00314953") (parameter_list "(undefined1 *param_1)" (( "(") (parameter_declaration "undefined1 *param_1" (type_identifier "undefined1") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")")))) (compound_statement "{\n  char *pcVar1;\n  undefined1 *puVar2;\n  long in_FS_OFFSET;\n  undefined1 auStack_2028 [4096];\n  char local_1028 [4104];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  CopyMagickString(local_1028,param_1,0x1000);\n  pcVar1 = strrchr(local_1028,0x2f);\n  if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }\n  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);\n  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);\n  if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined1 auStack_2028 [4096];" (type_identifier "undefined1") (array_declarator "auStack_2028 [4096]" (identifier "auStack_2028") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "char local_1028 [4104];" (primitive_type "char") (array_declarator "local_1028 [4104]" (identifier "local_1028") ([ "[") (number_literal "4104") (] "]")) (; ";")) (declaration "long local_20;" (sized_type_specifier "long" (long "long")) (identifier "local_20") (; ";")) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_20") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "CopyMagickString(local_1028,param_1,0x1000);" (call_expression "CopyMagickString(local_1028,param_1,0x1000)" (identifier "CopyMagickString") (argument_list "(local_1028,param_1,0x1000)" (( "(") (identifier "local_1028") (, ",") (identifier "param_1") (, ",") (number_literal "0x1000") () ")"))) (; ";")) (expression_statement "pcVar1 = strrchr(local_1028,0x2f);" (assignment_expression "pcVar1 = strrchr(local_1028,0x2f)" (identifier "pcVar1") (= "=") (call_expression "strrchr(local_1028,0x2f)" (identifier "strrchr") (argument_list "(local_1028,0x2f)" (( "(") (identifier "local_1028") (, ",") (number_literal "0x2f") () ")")))) (; ";")) (if_statement "if (pcVar1 != (char *)0x0) {\n    *pcVar1 = '\0';\n  }" (if "if") (parenthesized_expression "(pcVar1 != (char *)0x0)" (( "(") (binary_expression "pcVar1 != (char *)0x0" (identifier "pcVar1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *pcVar1 = '\0';\n  }" ({ "{") (expression_statement "*pcVar1 = '\0';" (assignment_expression "*pcVar1 = '\0'" (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}"))) (expression_statement "FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);" (call_expression "FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028)" (identifier "FormatLocaleString") (argument_list "(auStack_2028,0x1000,"Monitor/%s",local_1028)" (( "(") (identifier "auStack_2028") (, ",") (number_literal "0x1000") (, ",") (string_literal ""Monitor/%s"" (" """) (string_content "Monitor/%s") (" """)) (, ",") (identifier "local_1028") () ")"))) (; ";")) (expression_statement "puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);" (assignment_expression "puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028)" (identifier "puVar2") (= "=") (cast_expression "(undefined1 *)GetLocaleMessage(auStack_2028)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "GetLocaleMessage(auStack_2028)" (identifier "GetLocaleMessage") (argument_list "(auStack_2028)" (( "(") (identifier "auStack_2028") () ")"))))) (; ";")) (if_statement "if (puVar2 == auStack_2028) {\n    puVar2 = param_1;\n  }" (if "if") (parenthesized_expression "(puVar2 == auStack_2028)" (( "(") (binary_expression "puVar2 == auStack_2028" (identifier "puVar2") (== "==") (identifier "auStack_2028")) () ")")) (compound_statement "{\n    puVar2 = param_1;\n  }" ({ "{") (expression_statement "puVar2 = param_1;" (assignment_expression "puVar2 = param_1" (identifier "puVar2") (= "=") (identifier "param_1")) (; ";")) (} "}"))) (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }" (if "if") (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_20 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_20") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return puVar2;\n  }" ({ "{") (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

char * function_1(char *text)

{
  long var_8;
  char *var_4;
  long var_1;
  char var_7 [4096];
  char tag [4096];
  
  var_8 = *(long *)(var_1 + 0x28);
  var_2(tag,text,0x1000);
  var_4 = var_3(tag,0x2f);
  if (var_4 != (char *)0x0) {
    *var_4 = '\0';
  }
  var_5(var_7,0x1000,"Monitor/%s",tag);
  var_4 = var_6(var_7);
  if (var_4 == var_7) {
    var_4 = text;
  }
  if (var_8 == *(long *)(var_1 + 0x28)) {
    return var_4;
  }
                    /* WARNING: Subroutine does not return */
  var_9();
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (string_literal (string_content)) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

undefined1 * MASKED(undefined1 *param_1)

{
  char *pcVar1;
  undefined1 *puVar2;
  long in_FS_OFFSET;
  undefined1 auStack_2028 [4096];
  char local_1028 [4104];
  long local_20;
  
  local_20 = *(long *)(in_FS_OFFSET + 0x28);
  CopyMagickString(local_1028,param_1,0x1000);
  pcVar1 = strrchr(local_1028,0x2f);
  if (pcVar1 != (char *)0x0) {
    *pcVar1 = '\0';
  }
  FormatLocaleString(auStack_2028,0x1000,"Monitor/%s",local_1028);
  puVar2 = (undefined1 *)GetLocaleMessage(auStack_2028);
  if (puVar2 == auStack_2028) {
    puVar2 = param_1;
  }
  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
    return puVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

