
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint script_parse_memory_attr(void *closurev,char *attrs,size_t attrlen,int invert)

{
  char *pcVar1;
  uint uVar2;
  char *pcVar3;
  
  uVar2 = 0;
  pcVar1 = attrs;
  while (pcVar1 != attrs + attrlen) {
    pcVar3 = pcVar1 + 1;
    switch(*pcVar1) {
    case 'A':
    case 'a':
      uVar2 = uVar2 | 8;
      pcVar1 = pcVar3;
      break;
    default:
      pcVar1 = (char *)gettext("unknown MEMORY attribute");
      yyerror(closurev,pcVar1);
      pcVar1 = pcVar3;
      break;
    case 'I':
    case 'L':
    case 'i':
    case 'l':
      uVar2 = uVar2 | 0x10;
      pcVar1 = pcVar3;
      break;
    case 'R':
    case 'r':
      uVar2 = uVar2 | 4;
      pcVar1 = pcVar3;
      break;
    case 'W':
    case 'w':
      uVar2 = uVar2 | 6;
      pcVar1 = pcVar3;
      break;
    case 'X':
    case 'x':
      uVar2 = uVar2 | 1;
      pcVar1 = pcVar3;
    }
  }
  if (invert != 0) {
    uVar2 = uVar2 ^ 0x1f;
  }
  return uVar2;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint FUN_001426e0(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)

{
  undefined1 *puVar1;
  undefined4 uVar2;
  uint uVar3;
  undefined1 *puVar4;
  
  uVar3 = 0;
  puVar1 = param_2;
  while (puVar1 != param_2 + param_3) {
    puVar4 = puVar1 + 1;
    switch(*puVar1) {
    case 0x41:
    case 0x61:
      uVar3 = uVar3 | 8;
      puVar1 = puVar4;
      break;
    default:
      uVar2 = gettext("unknown MEMORY attribute");
      FUN_00141e70(param_1,uVar2);
      puVar1 = puVar4;
      break;
    case 0x49:
    case 0x4c:
    case 0x69:
    case 0x6c:
      uVar3 = uVar3 | 0x10;
      puVar1 = puVar4;
      break;
    case 0x52:
    case 0x72:
      uVar3 = uVar3 | 4;
      puVar1 = puVar4;
      break;
    case 0x57:
    case 0x77:
      uVar3 = uVar3 | 6;
      puVar1 = puVar4;
      break;
    case 0x58:
    case 0x78:
      uVar3 = uVar3 | 1;
      puVar1 = puVar4;
    }
  }
  if (param_4 != 0) {
    uVar3 = uVar3 ^ 0x1f;
  }
  return uVar3;
}


PUSH EBP
XOR EBP,EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035680
ADD EBX,0x1fc915
SUB ESP,0x1c
MOV ESI,dword ptr [ESP + 0x34]
MOV EDI,dword ptr [ESP + 0x38]
ADD EDI,ESI
LEA EAX,[EBX + 0xfff22252]
MOV dword ptr [ESP + 0xc],EAX
LEA ESI,[ESI]
NOP
CMP ESI,EDI
JZ 0x00142737
ADD ESI,0x1
MOVZX EAX,byte ptr [ESI + -0x1]
SUB EAX,0x41
CMP AL,0x37
JA 0x00142770
MOVZX EAX,AL
MOV EDX,dword ptr [EBX + EAX*0x4 + 0xfff22fc4]
ADD EDX,EBX
JMP EDX
MOV EDX,dword ptr [ESP + 0x3c]
MOV EAX,EBP
XOR EAX,0x1f
TEST EDX,EDX
CMOVNZ EBP,EAX
ADD ESP,0x1c
POP EBX
POP ESI
MOV EAX,EBP
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [ESP + 0x18]
CALL 0x000283c0
POP ECX
POP EDX
PUSH EAX
PUSH dword ptr [ESP + 0x3c]
CALL 0x00141e70
ADD ESP,0x10
JMP 0x00142710
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_001426e0(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)\n\n{\n  undefined1 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined1 *puVar4;\n  \n  uVar3 = 0;\n  puVar1 = param_2;\n  while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }\n  if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }\n  return uVar3;\n}\n\n" comment (function_definition "uint FUN_001426e0(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)\n\n{\n  undefined1 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined1 *puVar4;\n  \n  uVar3 = 0;\n  puVar1 = param_2;\n  while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }\n  if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_001426e0(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)" identifier (parameter_list "(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined1 *puVar4;\n  \n  uVar3 = 0;\n  puVar1 = param_2;\n  while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }\n  if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }\n  return uVar3;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "puVar1 = param_2;" (assignment_expression "puVar1 = param_2" identifier = identifier) ;) (while_statement "while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }" while (parenthesized_expression "(puVar1 != param_2 + param_3)" ( (binary_expression "puVar1 != param_2 + param_3" identifier != (binary_expression "param_2 + param_3" identifier + identifier)) )) (compound_statement "{\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }" { (expression_statement "puVar4 = puVar1 + 1;" (assignment_expression "puVar4 = puVar1 + 1" identifier = (binary_expression "puVar1 + 1" identifier + number_literal)) ;) (switch_statement "switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }" switch (parenthesized_expression "(*puVar1)" ( (pointer_expression "*puVar1" * identifier) )) (compound_statement "{\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }" { (case_statement "case 0x41:" case number_literal :) (case_statement "case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;" case number_literal : (expression_statement "uVar3 = uVar3 | 8;" (assignment_expression "uVar3 = uVar3 | 8" identifier = (binary_expression "uVar3 | 8" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;" default : (expression_statement "uVar2 = gettext("unknown MEMORY attribute");" (assignment_expression "uVar2 = gettext("unknown MEMORY attribute")" identifier = (call_expression "gettext("unknown MEMORY attribute")" identifier (argument_list "("unknown MEMORY attribute")" ( (string_literal ""unknown MEMORY attribute"" " string_content ") )))) ;) (expression_statement "FUN_00141e70(param_1,uVar2);" (call_expression "FUN_00141e70(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 0x49:" case number_literal :) (case_statement "case 0x4c:" case number_literal :) (case_statement "case 0x69:" case number_literal :) (case_statement "case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;" case number_literal : (expression_statement "uVar3 = uVar3 | 0x10;" (assignment_expression "uVar3 = uVar3 | 0x10" identifier = (binary_expression "uVar3 | 0x10" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 0x52:" case number_literal :) (case_statement "case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;" case number_literal : (expression_statement "uVar3 = uVar3 | 4;" (assignment_expression "uVar3 = uVar3 | 4" identifier = (binary_expression "uVar3 | 4" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 0x57:" case number_literal :) (case_statement "case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;" case number_literal : (expression_statement "uVar3 = uVar3 | 6;" (assignment_expression "uVar3 = uVar3 | 6" identifier = (binary_expression "uVar3 | 6" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 0x58:" case number_literal :) (case_statement "case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;" case number_literal : (expression_statement "uVar3 = uVar3 | 1;" (assignment_expression "uVar3 = uVar3 | 1" identifier = (binary_expression "uVar3 | 1" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;)) })) })) (if_statement "if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = uVar3 ^ 0x1f;\n  }" { (expression_statement "uVar3 = uVar3 ^ 0x1f;" (assignment_expression "uVar3 = uVar3 ^ 0x1f" identifier = (binary_expression "uVar3 ^ 0x1f" identifier ^ number_literal)) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint script_parse_memory_attr(void *closurev,char *attrs,size_t attrlen,int invert)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  char *pcVar3;\n  \n  uVar2 = 0;\n  pcVar1 = attrs;\n  while (pcVar1 != attrs + attrlen) {\n    pcVar3 = pcVar1 + 1;\n    switch(*pcVar1) {\n    case 'A':\n    case 'a':\n      uVar2 = uVar2 | 8;\n      pcVar1 = pcVar3;\n      break;\n    default:\n      pcVar1 = (char *)gettext("unknown MEMORY attribute");\n      yyerror(closurev,pcVar1);\n      pcVar1 = pcVar3;\n      break;\n    case 'I':\n    case 'L':\n    case 'i':\n    case 'l':\n      uVar2 = uVar2 | 0x10;\n      pcVar1 = pcVar3;\n      break;\n    case 'R':\n    case 'r':\n      uVar2 = uVar2 | 4;\n      pcVar1 = pcVar3;\n      break;\n    case 'W':\n    case 'w':\n      uVar2 = uVar2 | 6;\n      pcVar1 = pcVar3;\n      break;\n    case 'X':\n    case 'x':\n      uVar2 = uVar2 | 1;\n      pcVar1 = pcVar3;\n    }\n  }\n  if (invert != 0) {\n    uVar2 = uVar2 ^ 0x1f;\n  }\n  return uVar2;\n}\n\n" comment (function_definition "uint script_parse_memory_attr(void *closurev,char *attrs,size_t attrlen,int invert)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  char *pcVar3;\n  \n  uVar2 = 0;\n  pcVar1 = attrs;\n  while (pcVar1 != attrs + attrlen) {\n    pcVar3 = pcVar1 + 1;\n    switch(*pcVar1) {\n    case 'A':\n    case 'a':\n      uVar2 = uVar2 | 8;\n      pcVar1 = pcVar3;\n      break;\n    default:\n      pcVar1 = (char *)gettext("unknown MEMORY attribute");\n      yyerror(closurev,pcVar1);\n      pcVar1 = pcVar3;\n      break;\n    case 'I':\n    case 'L':\n    case 'i':\n    case 'l':\n      uVar2 = uVar2 | 0x10;\n      pcVar1 = pcVar3;\n      break;\n    case 'R':\n    case 'r':\n      uVar2 = uVar2 | 4;\n      pcVar1 = pcVar3;\n      break;\n    case 'W':\n    case 'w':\n      uVar2 = uVar2 | 6;\n      pcVar1 = pcVar3;\n      break;\n    case 'X':\n    case 'x':\n      uVar2 = uVar2 | 1;\n      pcVar1 = pcVar3;\n    }\n  }\n  if (invert != 0) {\n    uVar2 = uVar2 ^ 0x1f;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "script_parse_memory_attr(void *closurev,char *attrs,size_t attrlen,int invert)" identifier (parameter_list "(void *closurev,char *attrs,size_t attrlen,int invert)" ( (parameter_declaration "void *closurev" primitive_type (pointer_declarator "*closurev" * identifier)) , (parameter_declaration "char *attrs" primitive_type (pointer_declarator "*attrs" * identifier)) , (parameter_declaration "size_t attrlen" primitive_type identifier) , (parameter_declaration "int invert" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  uint uVar2;\n  char *pcVar3;\n  \n  uVar2 = 0;\n  pcVar1 = attrs;\n  while (pcVar1 != attrs + attrlen) {\n    pcVar3 = pcVar1 + 1;\n    switch(*pcVar1) {\n    case 'A':\n    case 'a':\n      uVar2 = uVar2 | 8;\n      pcVar1 = pcVar3;\n      break;\n    default:\n      pcVar1 = (char *)gettext("unknown MEMORY attribute");\n      yyerror(closurev,pcVar1);\n      pcVar1 = pcVar3;\n      break;\n    case 'I':\n    case 'L':\n    case 'i':\n    case 'l':\n      uVar2 = uVar2 | 0x10;\n      pcVar1 = pcVar3;\n      break;\n    case 'R':\n    case 'r':\n      uVar2 = uVar2 | 4;\n      pcVar1 = pcVar3;\n      break;\n    case 'W':\n    case 'w':\n      uVar2 = uVar2 | 6;\n      pcVar1 = pcVar3;\n      break;\n    case 'X':\n    case 'x':\n      uVar2 = uVar2 | 1;\n      pcVar1 = pcVar3;\n    }\n  }\n  if (invert != 0) {\n    uVar2 = uVar2 ^ 0x1f;\n  }\n  return uVar2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (expression_statement "pcVar1 = attrs;" (assignment_expression "pcVar1 = attrs" identifier = identifier) ;) (while_statement "while (pcVar1 != attrs + attrlen) {\n    pcVar3 = pcVar1 + 1;\n    switch(*pcVar1) {\n    case 'A':\n    case 'a':\n      uVar2 = uVar2 | 8;\n      pcVar1 = pcVar3;\n      break;\n    default:\n      pcVar1 = (char *)gettext("unknown MEMORY attribute");\n      yyerror(closurev,pcVar1);\n      pcVar1 = pcVar3;\n      break;\n    case 'I':\n    case 'L':\n    case 'i':\n    case 'l':\n      uVar2 = uVar2 | 0x10;\n      pcVar1 = pcVar3;\n      break;\n    case 'R':\n    case 'r':\n      uVar2 = uVar2 | 4;\n      pcVar1 = pcVar3;\n      break;\n    case 'W':\n    case 'w':\n      uVar2 = uVar2 | 6;\n      pcVar1 = pcVar3;\n      break;\n    case 'X':\n    case 'x':\n      uVar2 = uVar2 | 1;\n      pcVar1 = pcVar3;\n    }\n  }" while (parenthesized_expression "(pcVar1 != attrs + attrlen)" ( (binary_expression "pcVar1 != attrs + attrlen" identifier != (binary_expression "attrs + attrlen" identifier + identifier)) )) (compound_statement "{\n    pcVar3 = pcVar1 + 1;\n    switch(*pcVar1) {\n    case 'A':\n    case 'a':\n      uVar2 = uVar2 | 8;\n      pcVar1 = pcVar3;\n      break;\n    default:\n      pcVar1 = (char *)gettext("unknown MEMORY attribute");\n      yyerror(closurev,pcVar1);\n      pcVar1 = pcVar3;\n      break;\n    case 'I':\n    case 'L':\n    case 'i':\n    case 'l':\n      uVar2 = uVar2 | 0x10;\n      pcVar1 = pcVar3;\n      break;\n    case 'R':\n    case 'r':\n      uVar2 = uVar2 | 4;\n      pcVar1 = pcVar3;\n      break;\n    case 'W':\n    case 'w':\n      uVar2 = uVar2 | 6;\n      pcVar1 = pcVar3;\n      break;\n    case 'X':\n    case 'x':\n      uVar2 = uVar2 | 1;\n      pcVar1 = pcVar3;\n    }\n  }" { (expression_statement "pcVar3 = pcVar1 + 1;" (assignment_expression "pcVar3 = pcVar1 + 1" identifier = (binary_expression "pcVar1 + 1" identifier + number_literal)) ;) (switch_statement "switch(*pcVar1) {\n    case 'A':\n    case 'a':\n      uVar2 = uVar2 | 8;\n      pcVar1 = pcVar3;\n      break;\n    default:\n      pcVar1 = (char *)gettext("unknown MEMORY attribute");\n      yyerror(closurev,pcVar1);\n      pcVar1 = pcVar3;\n      break;\n    case 'I':\n    case 'L':\n    case 'i':\n    case 'l':\n      uVar2 = uVar2 | 0x10;\n      pcVar1 = pcVar3;\n      break;\n    case 'R':\n    case 'r':\n      uVar2 = uVar2 | 4;\n      pcVar1 = pcVar3;\n      break;\n    case 'W':\n    case 'w':\n      uVar2 = uVar2 | 6;\n      pcVar1 = pcVar3;\n      break;\n    case 'X':\n    case 'x':\n      uVar2 = uVar2 | 1;\n      pcVar1 = pcVar3;\n    }" switch (parenthesized_expression "(*pcVar1)" ( (pointer_expression "*pcVar1" * identifier) )) (compound_statement "{\n    case 'A':\n    case 'a':\n      uVar2 = uVar2 | 8;\n      pcVar1 = pcVar3;\n      break;\n    default:\n      pcVar1 = (char *)gettext("unknown MEMORY attribute");\n      yyerror(closurev,pcVar1);\n      pcVar1 = pcVar3;\n      break;\n    case 'I':\n    case 'L':\n    case 'i':\n    case 'l':\n      uVar2 = uVar2 | 0x10;\n      pcVar1 = pcVar3;\n      break;\n    case 'R':\n    case 'r':\n      uVar2 = uVar2 | 4;\n      pcVar1 = pcVar3;\n      break;\n    case 'W':\n    case 'w':\n      uVar2 = uVar2 | 6;\n      pcVar1 = pcVar3;\n      break;\n    case 'X':\n    case 'x':\n      uVar2 = uVar2 | 1;\n      pcVar1 = pcVar3;\n    }" { (case_statement "case 'A':" case (char_literal "'A'" ' character ') :) (case_statement "case 'a':\n      uVar2 = uVar2 | 8;\n      pcVar1 = pcVar3;\n      break;" case (char_literal "'a'" ' character ') : (expression_statement "uVar2 = uVar2 | 8;" (assignment_expression "uVar2 = uVar2 | 8" identifier = (binary_expression "uVar2 | 8" identifier | number_literal)) ;) (expression_statement "pcVar1 = pcVar3;" (assignment_expression "pcVar1 = pcVar3" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "default:\n      pcVar1 = (char *)gettext("unknown MEMORY attribute");\n      yyerror(closurev,pcVar1);\n      pcVar1 = pcVar3;\n      break;" default : (expression_statement "pcVar1 = (char *)gettext("unknown MEMORY attribute");" (assignment_expression "pcVar1 = (char *)gettext("unknown MEMORY attribute")" identifier = (cast_expression "(char *)gettext("unknown MEMORY attribute")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "gettext("unknown MEMORY attribute")" identifier (argument_list "("unknown MEMORY attribute")" ( (string_literal ""unknown MEMORY attribute"" " string_content ") ))))) ;) (expression_statement "yyerror(closurev,pcVar1);" (call_expression "yyerror(closurev,pcVar1)" identifier (argument_list "(closurev,pcVar1)" ( identifier , identifier ))) ;) (expression_statement "pcVar1 = pcVar3;" (assignment_expression "pcVar1 = pcVar3" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 'I':" case (char_literal "'I'" ' character ') :) (case_statement "case 'L':" case (char_literal "'L'" ' character ') :) (case_statement "case 'i':" case (char_literal "'i'" ' character ') :) (case_statement "case 'l':\n      uVar2 = uVar2 | 0x10;\n      pcVar1 = pcVar3;\n      break;" case (char_literal "'l'" ' character ') : (expression_statement "uVar2 = uVar2 | 0x10;" (assignment_expression "uVar2 = uVar2 | 0x10" identifier = (binary_expression "uVar2 | 0x10" identifier | number_literal)) ;) (expression_statement "pcVar1 = pcVar3;" (assignment_expression "pcVar1 = pcVar3" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 'R':" case (char_literal "'R'" ' character ') :) (case_statement "case 'r':\n      uVar2 = uVar2 | 4;\n      pcVar1 = pcVar3;\n      break;" case (char_literal "'r'" ' character ') : (expression_statement "uVar2 = uVar2 | 4;" (assignment_expression "uVar2 = uVar2 | 4" identifier = (binary_expression "uVar2 | 4" identifier | number_literal)) ;) (expression_statement "pcVar1 = pcVar3;" (assignment_expression "pcVar1 = pcVar3" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 'W':" case (char_literal "'W'" ' character ') :) (case_statement "case 'w':\n      uVar2 = uVar2 | 6;\n      pcVar1 = pcVar3;\n      break;" case (char_literal "'w'" ' character ') : (expression_statement "uVar2 = uVar2 | 6;" (assignment_expression "uVar2 = uVar2 | 6" identifier = (binary_expression "uVar2 | 6" identifier | number_literal)) ;) (expression_statement "pcVar1 = pcVar3;" (assignment_expression "pcVar1 = pcVar3" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 'X':" case (char_literal "'X'" ' character ') :) (case_statement "case 'x':\n      uVar2 = uVar2 | 1;\n      pcVar1 = pcVar3;" case (char_literal "'x'" ' character ') : (expression_statement "uVar2 = uVar2 | 1;" (assignment_expression "uVar2 = uVar2 | 1" identifier = (binary_expression "uVar2 | 1" identifier | number_literal)) ;) (expression_statement "pcVar1 = pcVar3;" (assignment_expression "pcVar1 = pcVar3" identifier = identifier) ;)) })) })) (if_statement "if (invert != 0) {\n    uVar2 = uVar2 ^ 0x1f;\n  }" if (parenthesized_expression "(invert != 0)" ( (binary_expression "invert != 0" identifier != number_literal) )) (compound_statement "{\n    uVar2 = uVar2 ^ 0x1f;\n  }" { (expression_statement "uVar2 = uVar2 ^ 0x1f;" (assignment_expression "uVar2 = uVar2 ^ 0x1f" identifier = (binary_expression "uVar2 ^ 0x1f" identifier ^ number_literal)) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "uint FUN_001426e0(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)\n\n{\n  undefined1 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined1 *puVar4;\n  \n  uVar3 = 0;\n  puVar1 = param_2;\n  while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }\n  if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }\n  return uVar3;\n}\n\n" (function_definition "uint FUN_001426e0(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)\n\n{\n  undefined1 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined1 *puVar4;\n  \n  uVar3 = 0;\n  puVar1 = param_2;\n  while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }\n  if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_001426e0(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)" identifier (parameter_list "(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined1 *puVar4;\n  \n  uVar3 = 0;\n  puVar1 = param_2;\n  while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }\n  if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }\n  return uVar3;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "puVar1 = param_2;" (assignment_expression "puVar1 = param_2" identifier = identifier) ;) (while_statement "while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }" while (parenthesized_expression "(puVar1 != param_2 + param_3)" ( (binary_expression "puVar1 != param_2 + param_3" identifier != (binary_expression "param_2 + param_3" identifier + identifier)) )) (compound_statement "{\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }" { (expression_statement "puVar4 = puVar1 + 1;" (assignment_expression "puVar4 = puVar1 + 1" identifier = (binary_expression "puVar1 + 1" identifier + number_literal)) ;) (switch_statement "switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }" switch (parenthesized_expression "(*puVar1)" ( (pointer_expression "*puVar1" * identifier) )) (compound_statement "{\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }" { (case_statement "case 0x41:" case number_literal :) (case_statement "case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;" case number_literal : (expression_statement "uVar3 = uVar3 | 8;" (assignment_expression "uVar3 = uVar3 | 8" identifier = (binary_expression "uVar3 | 8" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;" default : (expression_statement "uVar2 = gettext("unknown MEMORY attribute");" (assignment_expression "uVar2 = gettext("unknown MEMORY attribute")" identifier = (call_expression "gettext("unknown MEMORY attribute")" identifier (argument_list "("unknown MEMORY attribute")" ( (string_literal ""unknown MEMORY attribute"" " string_content ") )))) ;) (expression_statement "FUN_00141e70(param_1,uVar2);" (call_expression "FUN_00141e70(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 0x49:" case number_literal :) (case_statement "case 0x4c:" case number_literal :) (case_statement "case 0x69:" case number_literal :) (case_statement "case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;" case number_literal : (expression_statement "uVar3 = uVar3 | 0x10;" (assignment_expression "uVar3 = uVar3 | 0x10" identifier = (binary_expression "uVar3 | 0x10" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 0x52:" case number_literal :) (case_statement "case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;" case number_literal : (expression_statement "uVar3 = uVar3 | 4;" (assignment_expression "uVar3 = uVar3 | 4" identifier = (binary_expression "uVar3 | 4" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 0x57:" case number_literal :) (case_statement "case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;" case number_literal : (expression_statement "uVar3 = uVar3 | 6;" (assignment_expression "uVar3 = uVar3 | 6" identifier = (binary_expression "uVar3 | 6" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) (break_statement "break;" break ;)) (case_statement "case 0x58:" case number_literal :) (case_statement "case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;" case number_literal : (expression_statement "uVar3 = uVar3 | 1;" (assignment_expression "uVar3 = uVar3 | 1" identifier = (binary_expression "uVar3 | 1" identifier | number_literal)) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;)) })) })) (if_statement "if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = uVar3 ^ 0x1f;\n  }" { (expression_statement "uVar3 = uVar3 ^ 0x1f;" (assignment_expression "uVar3 = uVar3 ^ 0x1f" identifier = (binary_expression "uVar3 ^ 0x1f" identifier ^ number_literal)) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (switch_statement switch (parenthesized_expression ( (pointer_expression * IDENT) )) (compound_statement { (case_statement case LIT :) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (break_statement break ;)) (case_statement default : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (break_statement break ;)) (case_statement case LIT :) (case_statement case LIT :) (case_statement case LIT :) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (break_statement break ;)) (case_statement case LIT :) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (break_statement break ;)) (case_statement case LIT :) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (break_statement break ;)) (case_statement case LIT :) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;)) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT ^ LIT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint FUN_001426e0(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)\n\n{\n  undefined1 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined1 *puVar4;\n  \n  uVar3 = 0;\n  puVar1 = param_2;\n  while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }\n  if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }\n  return uVar3;\n}" (type_identifier "uint") (function_declarator "FUN_001426e0(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)" (identifier "FUN_001426e0") (parameter_list "(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined1 *param_2" (type_identifier "undefined1") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined1 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined1 *puVar4;\n  \n  uVar3 = 0;\n  puVar1 = param_2;\n  while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }\n  if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }\n  return uVar3;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1 = param_2;" (assignment_expression "puVar1 = param_2" (identifier "puVar1") (= "=") (identifier "param_2")) (; ";")) (while_statement "while (puVar1 != param_2 + param_3) {\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }" (while "while") (parenthesized_expression "(puVar1 != param_2 + param_3)" (( "(") (binary_expression "puVar1 != param_2 + param_3" (identifier "puVar1") (!= "!=") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3"))) () ")")) (compound_statement "{\n    puVar4 = puVar1 + 1;\n    switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }\n  }" ({ "{") (expression_statement "puVar4 = puVar1 + 1;" (assignment_expression "puVar4 = puVar1 + 1" (identifier "puVar4") (= "=") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1"))) (; ";")) (switch_statement "switch(*puVar1) {\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }" (switch "switch") (parenthesized_expression "(*puVar1)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) () ")")) (compound_statement "{\n    case 0x41:\n    case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;\n    default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;\n    case 0x49:\n    case 0x4c:\n    case 0x69:\n    case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;\n    case 0x52:\n    case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;\n    case 0x57:\n    case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;\n    case 0x58:\n    case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;\n    }" ({ "{") (case_statement "case 0x41:" (case "case") (number_literal "0x41") (: ":")) (case_statement "case 0x61:\n      uVar3 = uVar3 | 8;\n      puVar1 = puVar4;\n      break;" (case "case") (number_literal "0x61") (: ":") (expression_statement "uVar3 = uVar3 | 8;" (assignment_expression "uVar3 = uVar3 | 8" (identifier "uVar3") (= "=") (binary_expression "uVar3 | 8" (identifier "uVar3") (| "|") (number_literal "8"))) (; ";")) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" (identifier "puVar1") (= "=") (identifier "puVar4")) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "default:\n      uVar2 = gettext("unknown MEMORY attribute");\n      FUN_00141e70(param_1,uVar2);\n      puVar1 = puVar4;\n      break;" (default "default") (: ":") (expression_statement "uVar2 = gettext("unknown MEMORY attribute");" (assignment_expression "uVar2 = gettext("unknown MEMORY attribute")" (identifier "uVar2") (= "=") (call_expression "gettext("unknown MEMORY attribute")" (identifier "gettext") (argument_list "("unknown MEMORY attribute")" (( "(") (string_literal ""unknown MEMORY attribute"" (" """) (string_content "unknown MEMORY attribute") (" """)) () ")")))) (; ";")) (expression_statement "FUN_00141e70(param_1,uVar2);" (call_expression "FUN_00141e70(param_1,uVar2)" (identifier "FUN_00141e70") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" (identifier "puVar1") (= "=") (identifier "puVar4")) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 0x49:" (case "case") (number_literal "0x49") (: ":")) (case_statement "case 0x4c:" (case "case") (number_literal "0x4c") (: ":")) (case_statement "case 0x69:" (case "case") (number_literal "0x69") (: ":")) (case_statement "case 0x6c:\n      uVar3 = uVar3 | 0x10;\n      puVar1 = puVar4;\n      break;" (case "case") (number_literal "0x6c") (: ":") (expression_statement "uVar3 = uVar3 | 0x10;" (assignment_expression "uVar3 = uVar3 | 0x10" (identifier "uVar3") (= "=") (binary_expression "uVar3 | 0x10" (identifier "uVar3") (| "|") (number_literal "0x10"))) (; ";")) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" (identifier "puVar1") (= "=") (identifier "puVar4")) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 0x52:" (case "case") (number_literal "0x52") (: ":")) (case_statement "case 0x72:\n      uVar3 = uVar3 | 4;\n      puVar1 = puVar4;\n      break;" (case "case") (number_literal "0x72") (: ":") (expression_statement "uVar3 = uVar3 | 4;" (assignment_expression "uVar3 = uVar3 | 4" (identifier "uVar3") (= "=") (binary_expression "uVar3 | 4" (identifier "uVar3") (| "|") (number_literal "4"))) (; ";")) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" (identifier "puVar1") (= "=") (identifier "puVar4")) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 0x57:" (case "case") (number_literal "0x57") (: ":")) (case_statement "case 0x77:\n      uVar3 = uVar3 | 6;\n      puVar1 = puVar4;\n      break;" (case "case") (number_literal "0x77") (: ":") (expression_statement "uVar3 = uVar3 | 6;" (assignment_expression "uVar3 = uVar3 | 6" (identifier "uVar3") (= "=") (binary_expression "uVar3 | 6" (identifier "uVar3") (| "|") (number_literal "6"))) (; ";")) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" (identifier "puVar1") (= "=") (identifier "puVar4")) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 0x58:" (case "case") (number_literal "0x58") (: ":")) (case_statement "case 0x78:\n      uVar3 = uVar3 | 1;\n      puVar1 = puVar4;" (case "case") (number_literal "0x78") (: ":") (expression_statement "uVar3 = uVar3 | 1;" (assignment_expression "uVar3 = uVar3 | 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 | 1" (identifier "uVar3") (| "|") (number_literal "1"))) (; ";")) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" (identifier "puVar1") (= "=") (identifier "puVar4")) (; ";"))) (} "}"))) (} "}"))) (if_statement "if (param_4 != 0) {\n    uVar3 = uVar3 ^ 0x1f;\n  }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = uVar3 ^ 0x1f;\n  }" ({ "{") (expression_statement "uVar3 = uVar3 ^ 0x1f;" (assignment_expression "uVar3 = uVar3 ^ 0x1f" (identifier "uVar3") (= "=") (binary_expression "uVar3 ^ 0x1f" (identifier "uVar3") (^ "^") (number_literal "0x1f"))) (; ";")) (} "}"))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

type_1 function_1(void *closurev,char *var_2,size_t var_3,int var_7)

{
  char *var_1;
  type_1 var_4;
  char *pcVar3;
  
  var_4 = 0;
  var_1 = var_2;
  while (var_1 != var_2 + var_3) {
    pcVar3 = var_1 + 1;
    switch(*var_1) {
    case 'A':
    case 'a':
      var_4 = var_4 | 8;
      var_1 = pcVar3;
      break;
    default:
      var_1 = (char *)var_5("unknown MEMORY attribute");
      var_6(closurev,var_1);
      var_1 = pcVar3;
      break;
    case 'I':
    case 'L':
    case 'i':
    case 'l':
      var_4 = var_4 | 0x10;
      var_1 = pcVar3;
      break;
    case 'R':
    case 'r':
      var_4 = var_4 | 4;
      var_1 = pcVar3;
      break;
    case 'W':
    case 'w':
      var_4 = var_4 | 6;
      var_1 = pcVar3;
      break;
    case 'X':
    case 'x':
      var_4 = var_4 | 1;
      var_1 = pcVar3;
    }
  }
  if (var_7 != 0) {
    var_4 = var_4 ^ 0x1f;
  }
  return var_4;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (switch_statement condition: (parenthesized_expression (pointer_expression argument: (identifier))) body: (compound_statement (case_statement value: (number_literal)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement)) (case_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement)) (case_statement value: (number_literal)) (case_statement value: (number_literal)) (case_statement value: (number_literal)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement)) (case_statement value: (number_literal)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement)) (case_statement value: (number_literal)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement)) (case_statement value: (number_literal)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint MASKED(undefined4 param_1,undefined1 *param_2,int param_3,int param_4)

{
  undefined1 *puVar1;
  undefined4 uVar2;
  uint uVar3;
  undefined1 *puVar4;
  
  uVar3 = 0;
  puVar1 = param_2;
  while (puVar1 != param_2 + param_3) {
    puVar4 = puVar1 + 1;
    switch(*puVar1) {
    case 0x41:
    case 0x61:
      uVar3 = uVar3 | 8;
      puVar1 = puVar4;
      break;
    default:
      uVar2 = gettext("unknown MEMORY attribute");
      FUN_00141e70(param_1,uVar2);
      puVar1 = puVar4;
      break;
    case 0x49:
    case 0x4c:
    case 0x69:
    case 0x6c:
      uVar3 = uVar3 | 0x10;
      puVar1 = puVar4;
      break;
    case 0x52:
    case 0x72:
      uVar3 = uVar3 | 4;
      puVar1 = puVar4;
      break;
    case 0x57:
    case 0x77:
      uVar3 = uVar3 | 6;
      puVar1 = puVar4;
      break;
    case 0x58:
    case 0x78:
      uVar3 = uVar3 | 1;
      puVar1 = puVar4;
    }
  }
  if (param_4 != 0) {
    uVar3 = uVar3 ^ 0x1f;
  }
  return uVar3;
}

