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

char * prchar(LWCHAR c)

{
  uint uVar1;
  char *pcVar2;
  
  uVar1 = c & 0xff;
  pcVar2 = binfmt;
  if (((c & 0x80) == 0) || (utf_mode == 0)) {
    if ((chardef[uVar1] & 2U) == 0) {
      pcVar2 = "%c";
    }
    else {
      if (uVar1 == 0x1b) goto LAB_0001717d;
      if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {
        pcVar2 = "^%c";
        uVar1 = uVar1 ^ 0x40;
      }
    }
  }
  else if (uVar1 == 0x1b) {
LAB_0001717d:
    builtin_strncpy(prchar::buf,"ESC",4);
    return prchar::buf;
  }
  __snprintf_chk(prchar::buf,0x20,1,0x20,pcVar2,uVar1);
  return prchar::buf;
}



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

undefined4 * FUN_00017100(uint param_1)

{
  uint uVar1;
  undefined *puVar2;
  
  uVar1 = param_1 & 0xff;
  puVar2 = DAT_000451a4;
  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {
    if (((&DAT_000451c0)[uVar1] & 2) == 0) {
      puVar2 = &DAT_000323bc;
    }
    else {
      if (uVar1 == 0x1b) goto LAB_0001717d;
      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {
        puVar2 = &DAT_000323bb;
        uVar1 = uVar1 ^ 0x40;
      }
    }
  }
  else if (uVar1 == 0x1b) {
LAB_0001717d:
    DAT_00045180 = 0x435345;
    return &DAT_00045180;
  }
  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);
  return &DAT_00045180;
}


PUSH ESI
PUSH EBX
CALL 0x000129d0
ADD EBX,0x2bd85
SUB ESP,0x4
MOV EAX,dword ptr [ESP + 0x10]
MOVZX EDX,AL
AND EAX,0x80
JZ 0x00017128
MOV ECX,dword ptr [EBX + 0x22b4]
TEST ECX,ECX
JNZ 0x00017178
TEST byte ptr [EBX + EDX*0x1 + 0x2334],0x2
JZ 0x00017198
CMP EDX,0x1b
JZ 0x0001717d
TEST EAX,EAX
JNZ 0x0001714a
MOV EAX,EDX
XOR EAX,0x40
TEST byte ptr [EBX + EAX*0x1 + 0x2334],0x2
JZ 0x000171a8
SUB ESP,0x8
PUSH EDX
PUSH dword ptr [EBX + 0x2318]
LEA ESI,[EBX + 0x22f4]
PUSH 0x20
PUSH 0x1
PUSH 0x20
PUSH ESI
CALL 0x00012050
ADD ESP,0x20
MOV EAX,ESI
ADD ESP,0x4
POP EBX
POP ESI
RET
CMP EDX,0x1b
JNZ 0x0001714a
MOV dword ptr [EBX + 0x22f4],0x435345
LEA ESI,[EBX + 0x22f4]
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffef530]
PUSH EDX
PUSH EAX
JMP 0x00017154
SUB ESP,0x8
PUSH EAX
LEA EAX,[EBX + 0xfffef52f]
PUSH EAX
JMP 0x00017154
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 * FUN_00017100(uint param_1)\n\n{\n  uint uVar1;\n  undefined *puVar2;\n  \n  uVar1 = param_1 & 0xff;\n  puVar2 = DAT_000451a4;\n  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }\n  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);\n  return &DAT_00045180;\n}\n\n" comment (function_definition "undefined4 * FUN_00017100(uint param_1)\n\n{\n  uint uVar1;\n  undefined *puVar2;\n  \n  uVar1 = param_1 & 0xff;\n  puVar2 = DAT_000451a4;\n  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }\n  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);\n  return &DAT_00045180;\n}" type_identifier (pointer_declarator "* FUN_00017100(uint param_1)" * (function_declarator "FUN_00017100(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) )))) (compound_statement "{\n  uint uVar1;\n  undefined *puVar2;\n  \n  uVar1 = param_1 & 0xff;\n  puVar2 = DAT_000451a4;\n  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }\n  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);\n  return &DAT_00045180;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "uVar1 = param_1 & 0xff;" (assignment_expression "uVar1 = param_1 & 0xff" identifier = (binary_expression "param_1 & 0xff" identifier & number_literal)) ;) (expression_statement "puVar2 = DAT_000451a4;" (assignment_expression "puVar2 = DAT_000451a4" identifier = identifier) ;) (if_statement "if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" if (parenthesized_expression "(((param_1 & 0x80) == 0) || (DAT_00045140 == 0))" ( (binary_expression "((param_1 & 0x80) == 0) || (DAT_00045140 == 0)" (parenthesized_expression "((param_1 & 0x80) == 0)" ( (binary_expression "(param_1 & 0x80) == 0" (parenthesized_expression "(param_1 & 0x80)" ( (binary_expression "param_1 & 0x80" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(DAT_00045140 == 0)" ( (binary_expression "DAT_00045140 == 0" identifier == number_literal) ))) )) (compound_statement "{\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }" { (if_statement "if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" if (parenthesized_expression "(((&DAT_000451c0)[uVar1] & 2) == 0)" ( (binary_expression "((&DAT_000451c0)[uVar1] & 2) == 0" (parenthesized_expression "((&DAT_000451c0)[uVar1] & 2)" ( (binary_expression "(&DAT_000451c0)[uVar1] & 2" (subscript_expression "(&DAT_000451c0)[uVar1]" (parenthesized_expression "(&DAT_000451c0)" ( (pointer_expression "&DAT_000451c0" & identifier) )) [ identifier ]) & number_literal) )) == number_literal) )) (compound_statement "{\n      puVar2 = &DAT_000323bc;\n    }" { (expression_statement "puVar2 = &DAT_000323bc;" (assignment_expression "puVar2 = &DAT_000323bc" identifier = (pointer_expression "&DAT_000323bc" & identifier)) ;) }) (else_clause "else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" else (compound_statement "{\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" { (if_statement "if (uVar1 == 0x1b) goto LAB_0001717d;" if (parenthesized_expression "(uVar1 == 0x1b)" ( (binary_expression "uVar1 == 0x1b" identifier == number_literal) )) (goto_statement "goto LAB_0001717d;" goto statement_identifier ;)) (if_statement "if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }" if (parenthesized_expression "(((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0))" ( (binary_expression "((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)" (parenthesized_expression "((param_1 & 0x80) == 0)" ( (binary_expression "(param_1 & 0x80) == 0" (parenthesized_expression "(param_1 & 0x80)" ( (binary_expression "param_1 & 0x80" identifier & number_literal) )) == number_literal) )) && (parenthesized_expression "(((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)" ( (binary_expression "((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0" (parenthesized_expression "((&DAT_000451c0)[uVar1 ^ 0x40] & 2)" ( (binary_expression "(&DAT_000451c0)[uVar1 ^ 0x40] & 2" (subscript_expression "(&DAT_000451c0)[uVar1 ^ 0x40]" (parenthesized_expression "(&DAT_000451c0)" ( (pointer_expression "&DAT_000451c0" & identifier) )) [ (binary_expression "uVar1 ^ 0x40" identifier ^ number_literal) ]) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }" { (expression_statement "puVar2 = &DAT_000323bb;" (assignment_expression "puVar2 = &DAT_000323bb" identifier = (pointer_expression "&DAT_000323bb" & identifier)) ;) (expression_statement "uVar1 = uVar1 ^ 0x40;" (assignment_expression "uVar1 = uVar1 ^ 0x40" identifier = (binary_expression "uVar1 ^ 0x40" identifier ^ number_literal)) ;) })) }))) }) (else_clause "else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" else (if_statement "if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" if (parenthesized_expression "(uVar1 == 0x1b)" ( (binary_expression "uVar1 == 0x1b" identifier == number_literal) )) (compound_statement "{\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" { (labeled_statement "LAB_0001717d:\n    DAT_00045180 = 0x435345;" statement_identifier : (expression_statement "DAT_00045180 = 0x435345;" (assignment_expression "DAT_00045180 = 0x435345" identifier = number_literal) ;)) (return_statement "return &DAT_00045180;" return (pointer_expression "&DAT_00045180" & identifier) ;) })))) (expression_statement "__snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);" (call_expression "__snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1)" identifier (argument_list "(&DAT_00045180,0x20,1,0x20,puVar2,uVar1)" ( (pointer_expression "&DAT_00045180" & identifier) , number_literal , number_literal , number_literal , identifier , identifier ))) ;) (return_statement "return &DAT_00045180;" return (pointer_expression "&DAT_00045180" & identifier) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * prchar(LWCHAR c)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  \n  uVar1 = c & 0xff;\n  pcVar2 = binfmt;\n  if (((c & 0x80) == 0) || (utf_mode == 0)) {\n    if ((chardef[uVar1] & 2U) == 0) {\n      pcVar2 = "%c";\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    builtin_strncpy(prchar::buf,"ESC",4);\n    return prchar::buf;\n  }\n  __snprintf_chk(prchar::buf,0x20,1,0x20,pcVar2,uVar1);\n  return prchar::buf;\n}\n\n" comment (function_definition "char * prchar(LWCHAR c)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  \n  uVar1 = c & 0xff;\n  pcVar2 = binfmt;\n  if (((c & 0x80) == 0) || (utf_mode == 0)) {\n    if ((chardef[uVar1] & 2U) == 0) {\n      pcVar2 = "%c";\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    builtin_strncpy(prchar::buf,"ESC",4);\n    return prchar::buf;\n  }\n  __snprintf_chk(prchar::buf,0x20,1,0x20,pcVar2,uVar1);\n  return prchar::buf;\n}" primitive_type (pointer_declarator "* prchar(LWCHAR c)" * (function_declarator "prchar(LWCHAR c)" identifier (parameter_list "(LWCHAR c)" ( (parameter_declaration "LWCHAR c" type_identifier identifier) )))) (compound_statement "{\n  uint uVar1;\n  char *pcVar2;\n  \n  uVar1 = c & 0xff;\n  pcVar2 = binfmt;\n  if (((c & 0x80) == 0) || (utf_mode == 0)) {\n    if ((chardef[uVar1] & 2U) == 0) {\n      pcVar2 = "%c";\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    builtin_strncpy(prchar::buf,"ESC",4);\n    return prchar::buf;\n  }\n  __snprintf_chk(prchar::buf,0x20,1,0x20,pcVar2,uVar1);\n  return prchar::buf;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (expression_statement "uVar1 = c & 0xff;" (assignment_expression "uVar1 = c & 0xff" identifier = (binary_expression "c & 0xff" identifier & number_literal)) ;) (expression_statement "pcVar2 = binfmt;" (assignment_expression "pcVar2 = binfmt" identifier = identifier) ;) (if_statement "if (((c & 0x80) == 0) || (utf_mode == 0)) {\n    if ((chardef[uVar1] & 2U) == 0) {\n      pcVar2 = "%c";\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    builtin_strncpy(prchar::buf,"ESC",4);\n    return prchar::buf;\n  }" if (parenthesized_expression "(((c & 0x80) == 0) || (utf_mode == 0))" ( (binary_expression "((c & 0x80) == 0) || (utf_mode == 0)" (parenthesized_expression "((c & 0x80) == 0)" ( (binary_expression "(c & 0x80) == 0" (parenthesized_expression "(c & 0x80)" ( (binary_expression "c & 0x80" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(utf_mode == 0)" ( (binary_expression "utf_mode == 0" identifier == number_literal) ))) )) (compound_statement "{\n    if ((chardef[uVar1] & 2U) == 0) {\n      pcVar2 = "%c";\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }" { (if_statement "if ((chardef[uVar1] & 2U) == 0) {\n      pcVar2 = "%c";\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" if (parenthesized_expression "((chardef[uVar1] & 2U) == 0)" ( (binary_expression "(chardef[uVar1] & 2U) == 0" (parenthesized_expression "(chardef[uVar1] & 2U)" ( (binary_expression "chardef[uVar1] & 2U" (subscript_expression "chardef[uVar1]" identifier [ identifier ]) & number_literal) )) == number_literal) )) (compound_statement "{\n      pcVar2 = "%c";\n    }" { (expression_statement "pcVar2 = "%c";" (assignment_expression "pcVar2 = "%c"" identifier = (string_literal ""%c"" " string_content ")) ;) }) (else_clause "else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" else (compound_statement "{\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" { (if_statement "if (uVar1 == 0x1b) goto LAB_0001717d;" if (parenthesized_expression "(uVar1 == 0x1b)" ( (binary_expression "uVar1 == 0x1b" identifier == number_literal) )) (goto_statement "goto LAB_0001717d;" goto statement_identifier ;)) (if_statement "if (((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)) {\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }" if (parenthesized_expression "(((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0))" ( (binary_expression "((c & 0x80) == 0) && ((chardef[uVar1 ^ 0x40] & 2U) == 0)" (parenthesized_expression "((c & 0x80) == 0)" ( (binary_expression "(c & 0x80) == 0" (parenthesized_expression "(c & 0x80)" ( (binary_expression "c & 0x80" identifier & number_literal) )) == number_literal) )) && (parenthesized_expression "((chardef[uVar1 ^ 0x40] & 2U) == 0)" ( (binary_expression "(chardef[uVar1 ^ 0x40] & 2U) == 0" (parenthesized_expression "(chardef[uVar1 ^ 0x40] & 2U)" ( (binary_expression "chardef[uVar1 ^ 0x40] & 2U" (subscript_expression "chardef[uVar1 ^ 0x40]" identifier [ (binary_expression "uVar1 ^ 0x40" identifier ^ number_literal) ]) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        pcVar2 = "^%c";\n        uVar1 = uVar1 ^ 0x40;\n      }" { (expression_statement "pcVar2 = "^%c";" (assignment_expression "pcVar2 = "^%c"" identifier = (string_literal ""^%c"" " string_content ")) ;) (expression_statement "uVar1 = uVar1 ^ 0x40;" (assignment_expression "uVar1 = uVar1 ^ 0x40" identifier = (binary_expression "uVar1 ^ 0x40" identifier ^ number_literal)) ;) })) }))) }) (else_clause "else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    builtin_strncpy(prchar::buf,"ESC",4);\n    return prchar::buf;\n  }" else (if_statement "if (uVar1 == 0x1b) {\nLAB_0001717d:\n    builtin_strncpy(prchar::buf,"ESC",4);\n    return prchar::buf;\n  }" if (parenthesized_expression "(uVar1 == 0x1b)" ( (binary_expression "uVar1 == 0x1b" identifier == number_literal) )) (compound_statement "{\nLAB_0001717d:\n    builtin_strncpy(prchar::buf,"ESC",4);\n    return prchar::buf;\n  }" { (labeled_statement "LAB_0001717d:\n    builtin_strncpy(prchar::buf,"ESC",4);" statement_identifier : (labeled_statement "builtin_strncpy(prchar::buf,"ESC",4);" statement_identifier (ERROR "(prchar:" ( (type_descriptor "prchar" type_identifier) :) : (expression_statement "buf,"ESC",4);" (comma_expression "buf,"ESC",4" identifier , (comma_expression ""ESC",4" (string_literal ""ESC"" " string_content ") , number_literal)) (ERROR ")" )) ;))) (return_statement "return prchar::buf;" return identifier (ERROR "::buf" : : identifier) ;) })))) (labeled_statement "__snprintf_chk(prchar::buf,0x20,1,0x20,pcVar2,uVar1);" statement_identifier (ERROR "(prchar:" ( (type_descriptor "prchar" type_identifier) :) : (expression_statement "buf,0x20,1,0x20,pcVar2,uVar1);" (comma_expression "buf,0x20,1,0x20,pcVar2,uVar1" identifier , (comma_expression "0x20,1,0x20,pcVar2,uVar1" number_literal , (comma_expression "1,0x20,pcVar2,uVar1" number_literal , (comma_expression "0x20,pcVar2,uVar1" number_literal , (comma_expression "pcVar2,uVar1" identifier , identifier))))) (ERROR ")" )) ;)) (return_statement "return prchar::buf;" return identifier (ERROR "::buf" : : identifier) ;) })))
(translation_unit "undefined4 * FUN_00017100(uint param_1)\n\n{\n  uint uVar1;\n  undefined *puVar2;\n  \n  uVar1 = param_1 & 0xff;\n  puVar2 = DAT_000451a4;\n  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }\n  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);\n  return &DAT_00045180;\n}\n\n" (function_definition "undefined4 * FUN_00017100(uint param_1)\n\n{\n  uint uVar1;\n  undefined *puVar2;\n  \n  uVar1 = param_1 & 0xff;\n  puVar2 = DAT_000451a4;\n  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }\n  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);\n  return &DAT_00045180;\n}" type_identifier (pointer_declarator "* FUN_00017100(uint param_1)" * (function_declarator "FUN_00017100(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) )))) (compound_statement "{\n  uint uVar1;\n  undefined *puVar2;\n  \n  uVar1 = param_1 & 0xff;\n  puVar2 = DAT_000451a4;\n  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }\n  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);\n  return &DAT_00045180;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "uVar1 = param_1 & 0xff;" (assignment_expression "uVar1 = param_1 & 0xff" identifier = (binary_expression "param_1 & 0xff" identifier & number_literal)) ;) (expression_statement "puVar2 = DAT_000451a4;" (assignment_expression "puVar2 = DAT_000451a4" identifier = identifier) ;) (if_statement "if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" if (parenthesized_expression "(((param_1 & 0x80) == 0) || (DAT_00045140 == 0))" ( (binary_expression "((param_1 & 0x80) == 0) || (DAT_00045140 == 0)" (parenthesized_expression "((param_1 & 0x80) == 0)" ( (binary_expression "(param_1 & 0x80) == 0" (parenthesized_expression "(param_1 & 0x80)" ( (binary_expression "param_1 & 0x80" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(DAT_00045140 == 0)" ( (binary_expression "DAT_00045140 == 0" identifier == number_literal) ))) )) (compound_statement "{\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }" { (if_statement "if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" if (parenthesized_expression "(((&DAT_000451c0)[uVar1] & 2) == 0)" ( (binary_expression "((&DAT_000451c0)[uVar1] & 2) == 0" (parenthesized_expression "((&DAT_000451c0)[uVar1] & 2)" ( (binary_expression "(&DAT_000451c0)[uVar1] & 2" (subscript_expression "(&DAT_000451c0)[uVar1]" (parenthesized_expression "(&DAT_000451c0)" ( (pointer_expression "&DAT_000451c0" & identifier) )) [ identifier ]) & number_literal) )) == number_literal) )) (compound_statement "{\n      puVar2 = &DAT_000323bc;\n    }" { (expression_statement "puVar2 = &DAT_000323bc;" (assignment_expression "puVar2 = &DAT_000323bc" identifier = (pointer_expression "&DAT_000323bc" & identifier)) ;) }) (else_clause "else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" else (compound_statement "{\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" { (if_statement "if (uVar1 == 0x1b) goto LAB_0001717d;" if (parenthesized_expression "(uVar1 == 0x1b)" ( (binary_expression "uVar1 == 0x1b" identifier == number_literal) )) (goto_statement "goto LAB_0001717d;" goto statement_identifier ;)) (if_statement "if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }" if (parenthesized_expression "(((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0))" ( (binary_expression "((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)" (parenthesized_expression "((param_1 & 0x80) == 0)" ( (binary_expression "(param_1 & 0x80) == 0" (parenthesized_expression "(param_1 & 0x80)" ( (binary_expression "param_1 & 0x80" identifier & number_literal) )) == number_literal) )) && (parenthesized_expression "(((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)" ( (binary_expression "((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0" (parenthesized_expression "((&DAT_000451c0)[uVar1 ^ 0x40] & 2)" ( (binary_expression "(&DAT_000451c0)[uVar1 ^ 0x40] & 2" (subscript_expression "(&DAT_000451c0)[uVar1 ^ 0x40]" (parenthesized_expression "(&DAT_000451c0)" ( (pointer_expression "&DAT_000451c0" & identifier) )) [ (binary_expression "uVar1 ^ 0x40" identifier ^ number_literal) ]) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }" { (expression_statement "puVar2 = &DAT_000323bb;" (assignment_expression "puVar2 = &DAT_000323bb" identifier = (pointer_expression "&DAT_000323bb" & identifier)) ;) (expression_statement "uVar1 = uVar1 ^ 0x40;" (assignment_expression "uVar1 = uVar1 ^ 0x40" identifier = (binary_expression "uVar1 ^ 0x40" identifier ^ number_literal)) ;) })) }))) }) (else_clause "else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" else (if_statement "if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" if (parenthesized_expression "(uVar1 == 0x1b)" ( (binary_expression "uVar1 == 0x1b" identifier == number_literal) )) (compound_statement "{\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" { (labeled_statement "LAB_0001717d:\n    DAT_00045180 = 0x435345;" statement_identifier : (expression_statement "DAT_00045180 = 0x435345;" (assignment_expression "DAT_00045180 = 0x435345" identifier = number_literal) ;)) (return_statement "return &DAT_00045180;" return (pointer_expression "&DAT_00045180" & identifier) ;) })))) (expression_statement "__snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);" (call_expression "__snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1)" identifier (argument_list "(&DAT_00045180,0x20,1,0x20,puVar2,uVar1)" ( (pointer_expression "&DAT_00045180" & identifier) , number_literal , number_literal , number_literal , identifier , identifier ))) ;) (return_statement "return &DAT_00045180;" return (pointer_expression "&DAT_00045180" & identifier) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ]) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression IDENT ^ LIT) ]) & LIT) )) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT ^ LIT)) ;) })) }))) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (return_statement return (pointer_expression & IDENT) ;) })))) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT , LIT , LIT , IDENT , IDENT ))) ;) (return_statement return (pointer_expression & IDENT) ;) })))
(function_definition "undefined4 * FUN_00017100(uint param_1)\n\n{\n  uint uVar1;\n  undefined *puVar2;\n  \n  uVar1 = param_1 & 0xff;\n  puVar2 = DAT_000451a4;\n  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }\n  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);\n  return &DAT_00045180;\n}" (type_identifier "undefined4") (pointer_declarator "* FUN_00017100(uint param_1)" (* "*") (function_declarator "FUN_00017100(uint param_1)" (identifier "FUN_00017100") (parameter_list "(uint param_1)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) () ")")))) (compound_statement "{\n  uint uVar1;\n  undefined *puVar2;\n  \n  uVar1 = param_1 & 0xff;\n  puVar2 = DAT_000451a4;\n  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }\n  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);\n  return &DAT_00045180;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (expression_statement "uVar1 = param_1 & 0xff;" (assignment_expression "uVar1 = param_1 & 0xff" (identifier "uVar1") (= "=") (binary_expression "param_1 & 0xff" (identifier "param_1") (& "&") (number_literal "0xff"))) (; ";")) (expression_statement "puVar2 = DAT_000451a4;" (assignment_expression "puVar2 = DAT_000451a4" (identifier "puVar2") (= "=") (identifier "DAT_000451a4")) (; ";")) (if_statement "if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }\n  else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" (if "if") (parenthesized_expression "(((param_1 & 0x80) == 0) || (DAT_00045140 == 0))" (( "(") (binary_expression "((param_1 & 0x80) == 0) || (DAT_00045140 == 0)" (parenthesized_expression "((param_1 & 0x80) == 0)" (( "(") (binary_expression "(param_1 & 0x80) == 0" (parenthesized_expression "(param_1 & 0x80)" (( "(") (binary_expression "param_1 & 0x80" (identifier "param_1") (& "&") (number_literal "0x80")) () ")")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(DAT_00045140 == 0)" (( "(") (binary_expression "DAT_00045140 == 0" (identifier "DAT_00045140") (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }\n  }" ({ "{") (if_statement "if (((&DAT_000451c0)[uVar1] & 2) == 0) {\n      puVar2 = &DAT_000323bc;\n    }\n    else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" (if "if") (parenthesized_expression "(((&DAT_000451c0)[uVar1] & 2) == 0)" (( "(") (binary_expression "((&DAT_000451c0)[uVar1] & 2) == 0" (parenthesized_expression "((&DAT_000451c0)[uVar1] & 2)" (( "(") (binary_expression "(&DAT_000451c0)[uVar1] & 2" (subscript_expression "(&DAT_000451c0)[uVar1]" (parenthesized_expression "(&DAT_000451c0)" (( "(") (pointer_expression "&DAT_000451c0" (& "&") (identifier "DAT_000451c0")) () ")")) ([ "[") (identifier "uVar1") (] "]")) (& "&") (number_literal "2")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      puVar2 = &DAT_000323bc;\n    }" ({ "{") (expression_statement "puVar2 = &DAT_000323bc;" (assignment_expression "puVar2 = &DAT_000323bc" (identifier "puVar2") (= "=") (pointer_expression "&DAT_000323bc" (& "&") (identifier "DAT_000323bc"))) (; ";")) (} "}")) (else_clause "else {\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" (else "else") (compound_statement "{\n      if (uVar1 == 0x1b) goto LAB_0001717d;\n      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }\n    }" ({ "{") (if_statement "if (uVar1 == 0x1b) goto LAB_0001717d;" (if "if") (parenthesized_expression "(uVar1 == 0x1b)" (( "(") (binary_expression "uVar1 == 0x1b" (identifier "uVar1") (== "==") (number_literal "0x1b")) () ")")) (goto_statement "goto LAB_0001717d;" (goto "goto") (statement_identifier "LAB_0001717d") (; ";"))) (if_statement "if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }" (if "if") (parenthesized_expression "(((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0))" (( "(") (binary_expression "((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)" (parenthesized_expression "((param_1 & 0x80) == 0)" (( "(") (binary_expression "(param_1 & 0x80) == 0" (parenthesized_expression "(param_1 & 0x80)" (( "(") (binary_expression "param_1 & 0x80" (identifier "param_1") (& "&") (number_literal "0x80")) () ")")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)" (( "(") (binary_expression "((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0" (parenthesized_expression "((&DAT_000451c0)[uVar1 ^ 0x40] & 2)" (( "(") (binary_expression "(&DAT_000451c0)[uVar1 ^ 0x40] & 2" (subscript_expression "(&DAT_000451c0)[uVar1 ^ 0x40]" (parenthesized_expression "(&DAT_000451c0)" (( "(") (pointer_expression "&DAT_000451c0" (& "&") (identifier "DAT_000451c0")) () ")")) ([ "[") (binary_expression "uVar1 ^ 0x40" (identifier "uVar1") (^ "^") (number_literal "0x40")) (] "]")) (& "&") (number_literal "2")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        puVar2 = &DAT_000323bb;\n        uVar1 = uVar1 ^ 0x40;\n      }" ({ "{") (expression_statement "puVar2 = &DAT_000323bb;" (assignment_expression "puVar2 = &DAT_000323bb" (identifier "puVar2") (= "=") (pointer_expression "&DAT_000323bb" (& "&") (identifier "DAT_000323bb"))) (; ";")) (expression_statement "uVar1 = uVar1 ^ 0x40;" (assignment_expression "uVar1 = uVar1 ^ 0x40" (identifier "uVar1") (= "=") (binary_expression "uVar1 ^ 0x40" (identifier "uVar1") (^ "^") (number_literal "0x40"))) (; ";")) (} "}"))) (} "}")))) (} "}")) (else_clause "else if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" (else "else") (if_statement "if (uVar1 == 0x1b) {\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" (if "if") (parenthesized_expression "(uVar1 == 0x1b)" (( "(") (binary_expression "uVar1 == 0x1b" (identifier "uVar1") (== "==") (number_literal "0x1b")) () ")")) (compound_statement "{\nLAB_0001717d:\n    DAT_00045180 = 0x435345;\n    return &DAT_00045180;\n  }" ({ "{") (labeled_statement "LAB_0001717d:\n    DAT_00045180 = 0x435345;" (statement_identifier "LAB_0001717d") (: ":") (expression_statement "DAT_00045180 = 0x435345;" (assignment_expression "DAT_00045180 = 0x435345" (identifier "DAT_00045180") (= "=") (number_literal "0x435345")) (; ";"))) (return_statement "return &DAT_00045180;" (return "return") (pointer_expression "&DAT_00045180" (& "&") (identifier "DAT_00045180")) (; ";")) (} "}"))))) (expression_statement "__snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);" (call_expression "__snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1)" (identifier "__snprintf_chk") (argument_list "(&DAT_00045180,0x20,1,0x20,puVar2,uVar1)" (( "(") (pointer_expression "&DAT_00045180" (& "&") (identifier "DAT_00045180")) (, ",") (number_literal "0x20") (, ",") (number_literal "1") (, ",") (number_literal "0x20") (, ",") (identifier "puVar2") (, ",") (identifier "uVar1") () ")"))) (; ";")) (return_statement "return &DAT_00045180;" (return "return") (pointer_expression "&DAT_00045180" (& "&") (identifier "DAT_00045180")) (; ";")) (} "}")))

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

char * function_1(type_1 var_1)

{
  type_2 var_3;
  char *pcVar2;
  
  var_3 = var_1 & 0xff;
  pcVar2 = binfmt;
  if (((var_1 & 0x80) == 0) || (var_2 == 0)) {
    if ((chardef[var_3] & 2U) == 0) {
      pcVar2 = "%c";
    }
    else {
      if (var_3 == 0x1b) goto LAB_0001717d;
      if (((var_1 & 0x80) == 0) && ((chardef[var_3 ^ 0x40] & 2U) == 0)) {
        pcVar2 = "^%c";
        var_3 = var_3 ^ 0x40;
      }
    }
  }
  else if (var_3 == 0x1b) {
LAB_0001717d:
    builtin_strncpy(function_1::buf,"ESC",4);
    return function_1::buf;
  }
  __snprintf_chk(function_1::buf,0x20,1,0x20,pcVar2,var_3);
  return function_1::buf;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (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: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (identifier)) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) (return_statement (pointer_expression argument: (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal) (number_literal) (number_literal) (identifier) (identifier)))) (return_statement (pointer_expression argument: (identifier))))))

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

undefined4 * MASKED(uint param_1)

{
  uint uVar1;
  undefined *puVar2;
  
  uVar1 = param_1 & 0xff;
  puVar2 = DAT_000451a4;
  if (((param_1 & 0x80) == 0) || (DAT_00045140 == 0)) {
    if (((&DAT_000451c0)[uVar1] & 2) == 0) {
      puVar2 = &DAT_000323bc;
    }
    else {
      if (uVar1 == 0x1b) goto LAB_0001717d;
      if (((param_1 & 0x80) == 0) && (((&DAT_000451c0)[uVar1 ^ 0x40] & 2) == 0)) {
        puVar2 = &DAT_000323bb;
        uVar1 = uVar1 ^ 0x40;
      }
    }
  }
  else if (uVar1 == 0x1b) {
LAB_0001717d:
    DAT_00045180 = 0x435345;
    return &DAT_00045180;
  }
  __snprintf_chk(&DAT_00045180,0x20,1,0x20,puVar2,uVar1);
  return &DAT_00045180;
}

