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

uint script_phdr_string_to_type(void *closurev,char *name,size_t namelen)

{
  size_t __n;
  int iVar1;
  char *message;
  anon_struct_12_3_43c36f24 *paVar2;
  int iVar3;
  
  __n = 7;
  iVar3 = 0;
  paVar2 = phdr_type_names;
  while( true ) {
    if (__n == namelen) {
      iVar1 = strncmp(name,paVar2->name,__n);
      if (iVar1 == 0) {
        return phdr_type_names[iVar3].val;
      }
    }
    iVar3 = iVar3 + 1;
    if (iVar3 == 0xb) break;
    __n = paVar2[1].namelen;
    paVar2 = paVar2 + 1;
  }
  message = (char *)gettext("unknown PHDR type (try integer)");
  yyerror(closurev,message);
  return 0;
}



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

undefined4 FUN_0016b1c0(undefined4 param_1,char *param_2,undefined *param_3)

{
  undefined *__n;
  int iVar1;
  undefined4 uVar2;
  undefined **ppuVar3;
  int iVar4;
  
  __n = (undefined *)0x7;
  iVar4 = 0;
  ppuVar3 = &PTR_s_PT_NULL_00385180;
  while( true ) {
    if (__n == param_3) {
      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);
      if (iVar1 == 0) {
        return (&DAT_00385188)[iVar4 * 3];
      }
    }
    iVar4 = iVar4 + 1;
    if (iVar4 == 0xb) break;
    __n = ppuVar3[4];
    ppuVar3 = ppuVar3 + 3;
  }
  uVar2 = gettext("unknown PHDR type (try integer)");
  FUN_0016aaf0(param_1,uVar2);
  return 0;
}


PUSH EBP
MOV EAX,0x7
PUSH EDI
XOR EDI,EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x223e30
SUB ESP,0xc
MOV EBP,dword ptr [ESP + 0x28]
LEA ESI,[EBX + 0xffff6180]
JMP 0x0016b1f6
ADD EDI,0x1
ADD ESI,0xc
CMP EDI,0xb
JZ 0x0016b228
MOV EAX,dword ptr [ESI + 0x4]
CMP EAX,EBP
JNZ 0x0016b1e8
SUB ESP,0x4
PUSH EAX
PUSH dword ptr [ESI]
PUSH dword ptr [ESP + 0x30]
CALL 0x00029990
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0016b1e8
LEA EAX,[EDI + EDI*0x2]
MOV EAX,dword ptr [EBX + EAX*0x4 + 0xffff6188]
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfff0a2a0]
PUSH EAX
CALL 0x000293b0
POP EDX
POP ECX
PUSH EAX
PUSH dword ptr [ESP + 0x2c]
CALL 0x0016aaf0
ADD ESP,0x10
XOR EAX,EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0016b1c0(undefined4 param_1,char *param_2,undefined *param_3)\n\n{\n  undefined *__n;\n  int iVar1;\n  undefined4 uVar2;\n  undefined **ppuVar3;\n  int iVar4;\n  \n  __n = (undefined *)0x7;\n  iVar4 = 0;\n  ppuVar3 = &PTR_s_PT_NULL_00385180;\n  while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }\n  uVar2 = gettext("unknown PHDR type (try integer)");\n  FUN_0016aaf0(param_1,uVar2);\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_0016b1c0(undefined4 param_1,char *param_2,undefined *param_3)\n\n{\n  undefined *__n;\n  int iVar1;\n  undefined4 uVar2;\n  undefined **ppuVar3;\n  int iVar4;\n  \n  __n = (undefined *)0x7;\n  iVar4 = 0;\n  ppuVar3 = &PTR_s_PT_NULL_00385180;\n  while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }\n  uVar2 = gettext("unknown PHDR type (try integer)");\n  FUN_0016aaf0(param_1,uVar2);\n  return 0;\n}" type_identifier (function_declarator "FUN_0016b1c0(undefined4 param_1,char *param_2,undefined *param_3)" identifier (parameter_list "(undefined4 param_1,char *param_2,undefined *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined *__n;\n  int iVar1;\n  undefined4 uVar2;\n  undefined **ppuVar3;\n  int iVar4;\n  \n  __n = (undefined *)0x7;\n  iVar4 = 0;\n  ppuVar3 = &PTR_s_PT_NULL_00385180;\n  while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }\n  uVar2 = gettext("unknown PHDR type (try integer)");\n  FUN_0016aaf0(param_1,uVar2);\n  return 0;\n}" { (declaration "undefined *__n;" type_identifier (pointer_declarator "*__n" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined **ppuVar3;" type_identifier (pointer_declarator "**ppuVar3" * (pointer_declarator "*ppuVar3" * identifier)) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "__n = (undefined *)0x7;" (assignment_expression "__n = (undefined *)0x7" identifier = (cast_expression "(undefined *)0x7" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "ppuVar3 = &PTR_s_PT_NULL_00385180;" (assignment_expression "ppuVar3 = &PTR_s_PT_NULL_00385180" identifier = (pointer_expression "&PTR_s_PT_NULL_00385180" & identifier)) ;) (while_statement "while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }" { (if_statement "if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }" if (parenthesized_expression "(__n == param_3)" ( (binary_expression "__n == param_3" identifier == identifier) )) (compound_statement "{\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }" { (expression_statement "iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);" (assignment_expression "iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n)" identifier = (call_expression "strncmp(param_2,*ppuVar3,(size_t)__n)" identifier (argument_list "(param_2,*ppuVar3,(size_t)__n)" ( identifier , (pointer_expression "*ppuVar3" * identifier) , (cast_expression "(size_t)__n" ( (type_descriptor "size_t" primitive_type) ) identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        return (&DAT_00385188)[iVar4 * 3];\n      }" { (return_statement "return (&DAT_00385188)[iVar4 * 3];" return (subscript_expression "(&DAT_00385188)[iVar4 * 3]" (parenthesized_expression "(&DAT_00385188)" ( (pointer_expression "&DAT_00385188" & identifier) )) [ (binary_expression "iVar4 * 3" identifier * number_literal) ]) ;) })) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar4 == 0xb) break;" if (parenthesized_expression "(iVar4 == 0xb)" ( (binary_expression "iVar4 == 0xb" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "__n = ppuVar3[4];" (assignment_expression "__n = ppuVar3[4]" identifier = (subscript_expression "ppuVar3[4]" identifier [ number_literal ])) ;) (expression_statement "ppuVar3 = ppuVar3 + 3;" (assignment_expression "ppuVar3 = ppuVar3 + 3" identifier = (binary_expression "ppuVar3 + 3" identifier + number_literal)) ;) })) (expression_statement "uVar2 = gettext("unknown PHDR type (try integer)");" (assignment_expression "uVar2 = gettext("unknown PHDR type (try integer)")" identifier = (call_expression "gettext("unknown PHDR type (try integer)")" identifier (argument_list "("unknown PHDR type (try integer)")" ( (string_literal ""unknown PHDR type (try integer)"" " string_content ") )))) ;) (expression_statement "FUN_0016aaf0(param_1,uVar2);" (call_expression "FUN_0016aaf0(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nuint script_phdr_string_to_type(void *closurev,char *name,size_t namelen)\n\n{\n  size_t __n;\n  int iVar1;\n  char *message;\n  anon_struct_12_3_43c36f24 *paVar2;\n  int iVar3;\n  \n  __n = 7;\n  iVar3 = 0;\n  paVar2 = phdr_type_names;\n  while( true ) {\n    if (__n == namelen) {\n      iVar1 = strncmp(name,paVar2->name,__n);\n      if (iVar1 == 0) {\n        return phdr_type_names[iVar3].val;\n      }\n    }\n    iVar3 = iVar3 + 1;\n    if (iVar3 == 0xb) break;\n    __n = paVar2[1].namelen;\n    paVar2 = paVar2 + 1;\n  }\n  message = (char *)gettext("unknown PHDR type (try integer)");\n  yyerror(closurev,message);\n  return 0;\n}\n\n" comment comment (function_definition "uint script_phdr_string_to_type(void *closurev,char *name,size_t namelen)\n\n{\n  size_t __n;\n  int iVar1;\n  char *message;\n  anon_struct_12_3_43c36f24 *paVar2;\n  int iVar3;\n  \n  __n = 7;\n  iVar3 = 0;\n  paVar2 = phdr_type_names;\n  while( true ) {\n    if (__n == namelen) {\n      iVar1 = strncmp(name,paVar2->name,__n);\n      if (iVar1 == 0) {\n        return phdr_type_names[iVar3].val;\n      }\n    }\n    iVar3 = iVar3 + 1;\n    if (iVar3 == 0xb) break;\n    __n = paVar2[1].namelen;\n    paVar2 = paVar2 + 1;\n  }\n  message = (char *)gettext("unknown PHDR type (try integer)");\n  yyerror(closurev,message);\n  return 0;\n}" type_identifier (function_declarator "script_phdr_string_to_type(void *closurev,char *name,size_t namelen)" identifier (parameter_list "(void *closurev,char *name,size_t namelen)" ( (parameter_declaration "void *closurev" primitive_type (pointer_declarator "*closurev" * identifier)) , (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "size_t namelen" primitive_type identifier) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  char *message;\n  anon_struct_12_3_43c36f24 *paVar2;\n  int iVar3;\n  \n  __n = 7;\n  iVar3 = 0;\n  paVar2 = phdr_type_names;\n  while( true ) {\n    if (__n == namelen) {\n      iVar1 = strncmp(name,paVar2->name,__n);\n      if (iVar1 == 0) {\n        return phdr_type_names[iVar3].val;\n      }\n    }\n    iVar3 = iVar3 + 1;\n    if (iVar3 == 0xb) break;\n    __n = paVar2[1].namelen;\n    paVar2 = paVar2 + 1;\n  }\n  message = (char *)gettext("unknown PHDR type (try integer)");\n  yyerror(closurev,message);\n  return 0;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *message;" primitive_type (pointer_declarator "*message" * identifier) ;) (declaration "anon_struct_12_3_43c36f24 *paVar2;" type_identifier (pointer_declarator "*paVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "__n = 7;" (assignment_expression "__n = 7" identifier = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "paVar2 = phdr_type_names;" (assignment_expression "paVar2 = phdr_type_names" identifier = identifier) ;) (while_statement "while( true ) {\n    if (__n == namelen) {\n      iVar1 = strncmp(name,paVar2->name,__n);\n      if (iVar1 == 0) {\n        return phdr_type_names[iVar3].val;\n      }\n    }\n    iVar3 = iVar3 + 1;\n    if (iVar3 == 0xb) break;\n    __n = paVar2[1].namelen;\n    paVar2 = paVar2 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (__n == namelen) {\n      iVar1 = strncmp(name,paVar2->name,__n);\n      if (iVar1 == 0) {\n        return phdr_type_names[iVar3].val;\n      }\n    }\n    iVar3 = iVar3 + 1;\n    if (iVar3 == 0xb) break;\n    __n = paVar2[1].namelen;\n    paVar2 = paVar2 + 1;\n  }" { (if_statement "if (__n == namelen) {\n      iVar1 = strncmp(name,paVar2->name,__n);\n      if (iVar1 == 0) {\n        return phdr_type_names[iVar3].val;\n      }\n    }" if (parenthesized_expression "(__n == namelen)" ( (binary_expression "__n == namelen" identifier == identifier) )) (compound_statement "{\n      iVar1 = strncmp(name,paVar2->name,__n);\n      if (iVar1 == 0) {\n        return phdr_type_names[iVar3].val;\n      }\n    }" { (expression_statement "iVar1 = strncmp(name,paVar2->name,__n);" (assignment_expression "iVar1 = strncmp(name,paVar2->name,__n)" identifier = (call_expression "strncmp(name,paVar2->name,__n)" identifier (argument_list "(name,paVar2->name,__n)" ( identifier , (field_expression "paVar2->name" identifier -> field_identifier) , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        return phdr_type_names[iVar3].val;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        return phdr_type_names[iVar3].val;\n      }" { (return_statement "return phdr_type_names[iVar3].val;" return (field_expression "phdr_type_names[iVar3].val" (subscript_expression "phdr_type_names[iVar3]" identifier [ identifier ]) . field_identifier) ;) })) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == 0xb) break;" if (parenthesized_expression "(iVar3 == 0xb)" ( (binary_expression "iVar3 == 0xb" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "__n = paVar2[1].namelen;" (assignment_expression "__n = paVar2[1].namelen" identifier = (field_expression "paVar2[1].namelen" (subscript_expression "paVar2[1]" identifier [ number_literal ]) . field_identifier)) ;) (expression_statement "paVar2 = paVar2 + 1;" (assignment_expression "paVar2 = paVar2 + 1" identifier = (binary_expression "paVar2 + 1" identifier + number_literal)) ;) })) (expression_statement "message = (char *)gettext("unknown PHDR type (try integer)");" (assignment_expression "message = (char *)gettext("unknown PHDR type (try integer)")" identifier = (cast_expression "(char *)gettext("unknown PHDR type (try integer)")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "gettext("unknown PHDR type (try integer)")" identifier (argument_list "("unknown PHDR type (try integer)")" ( (string_literal ""unknown PHDR type (try integer)"" " string_content ") ))))) ;) (expression_statement "yyerror(closurev,message);" (call_expression "yyerror(closurev,message)" identifier (argument_list "(closurev,message)" ( identifier , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_0016b1c0(undefined4 param_1,char *param_2,undefined *param_3)\n\n{\n  undefined *__n;\n  int iVar1;\n  undefined4 uVar2;\n  undefined **ppuVar3;\n  int iVar4;\n  \n  __n = (undefined *)0x7;\n  iVar4 = 0;\n  ppuVar3 = &PTR_s_PT_NULL_00385180;\n  while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }\n  uVar2 = gettext("unknown PHDR type (try integer)");\n  FUN_0016aaf0(param_1,uVar2);\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0016b1c0(undefined4 param_1,char *param_2,undefined *param_3)\n\n{\n  undefined *__n;\n  int iVar1;\n  undefined4 uVar2;\n  undefined **ppuVar3;\n  int iVar4;\n  \n  __n = (undefined *)0x7;\n  iVar4 = 0;\n  ppuVar3 = &PTR_s_PT_NULL_00385180;\n  while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }\n  uVar2 = gettext("unknown PHDR type (try integer)");\n  FUN_0016aaf0(param_1,uVar2);\n  return 0;\n}" type_identifier (function_declarator "FUN_0016b1c0(undefined4 param_1,char *param_2,undefined *param_3)" identifier (parameter_list "(undefined4 param_1,char *param_2,undefined *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined *__n;\n  int iVar1;\n  undefined4 uVar2;\n  undefined **ppuVar3;\n  int iVar4;\n  \n  __n = (undefined *)0x7;\n  iVar4 = 0;\n  ppuVar3 = &PTR_s_PT_NULL_00385180;\n  while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }\n  uVar2 = gettext("unknown PHDR type (try integer)");\n  FUN_0016aaf0(param_1,uVar2);\n  return 0;\n}" { (declaration "undefined *__n;" type_identifier (pointer_declarator "*__n" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined **ppuVar3;" type_identifier (pointer_declarator "**ppuVar3" * (pointer_declarator "*ppuVar3" * identifier)) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "__n = (undefined *)0x7;" (assignment_expression "__n = (undefined *)0x7" identifier = (cast_expression "(undefined *)0x7" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "ppuVar3 = &PTR_s_PT_NULL_00385180;" (assignment_expression "ppuVar3 = &PTR_s_PT_NULL_00385180" identifier = (pointer_expression "&PTR_s_PT_NULL_00385180" & identifier)) ;) (while_statement "while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }" { (if_statement "if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }" if (parenthesized_expression "(__n == param_3)" ( (binary_expression "__n == param_3" identifier == identifier) )) (compound_statement "{\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }" { (expression_statement "iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);" (assignment_expression "iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n)" identifier = (call_expression "strncmp(param_2,*ppuVar3,(size_t)__n)" identifier (argument_list "(param_2,*ppuVar3,(size_t)__n)" ( identifier , (pointer_expression "*ppuVar3" * identifier) , (cast_expression "(size_t)__n" ( (type_descriptor "size_t" primitive_type) ) identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        return (&DAT_00385188)[iVar4 * 3];\n      }" { (return_statement "return (&DAT_00385188)[iVar4 * 3];" return (subscript_expression "(&DAT_00385188)[iVar4 * 3]" (parenthesized_expression "(&DAT_00385188)" ( (pointer_expression "&DAT_00385188" & identifier) )) [ (binary_expression "iVar4 * 3" identifier * number_literal) ]) ;) })) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar4 == 0xb) break;" if (parenthesized_expression "(iVar4 == 0xb)" ( (binary_expression "iVar4 == 0xb" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "__n = ppuVar3[4];" (assignment_expression "__n = ppuVar3[4]" identifier = (subscript_expression "ppuVar3[4]" identifier [ number_literal ])) ;) (expression_statement "ppuVar3 = ppuVar3 + 3;" (assignment_expression "ppuVar3 = ppuVar3 + 3" identifier = (binary_expression "ppuVar3 + 3" identifier + number_literal)) ;) })) (expression_statement "uVar2 = gettext("unknown PHDR type (try integer)");" (assignment_expression "uVar2 = gettext("unknown PHDR type (try integer)")" identifier = (call_expression "gettext("unknown PHDR type (try integer)")" identifier (argument_list "("unknown PHDR type (try integer)")" ( (string_literal ""unknown PHDR type (try integer)"" " string_content ") )))) ;) (expression_statement "FUN_0016aaf0(param_1,uVar2);" (call_expression "FUN_0016aaf0(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * IDENT) , (cast_expression ( (type_descriptor TYPE) ) IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression IDENT * LIT) ]) ;) })) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0016b1c0(undefined4 param_1,char *param_2,undefined *param_3)\n\n{\n  undefined *__n;\n  int iVar1;\n  undefined4 uVar2;\n  undefined **ppuVar3;\n  int iVar4;\n  \n  __n = (undefined *)0x7;\n  iVar4 = 0;\n  ppuVar3 = &PTR_s_PT_NULL_00385180;\n  while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }\n  uVar2 = gettext("unknown PHDR type (try integer)");\n  FUN_0016aaf0(param_1,uVar2);\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0016b1c0(undefined4 param_1,char *param_2,undefined *param_3)" (identifier "FUN_0016b1c0") (parameter_list "(undefined4 param_1,char *param_2,undefined *param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined *param_3" (type_identifier "undefined") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  undefined *__n;\n  int iVar1;\n  undefined4 uVar2;\n  undefined **ppuVar3;\n  int iVar4;\n  \n  __n = (undefined *)0x7;\n  iVar4 = 0;\n  ppuVar3 = &PTR_s_PT_NULL_00385180;\n  while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }\n  uVar2 = gettext("unknown PHDR type (try integer)");\n  FUN_0016aaf0(param_1,uVar2);\n  return 0;\n}" ({ "{") (declaration "undefined *__n;" (type_identifier "undefined") (pointer_declarator "*__n" (* "*") (identifier "__n")) (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined **ppuVar3;" (type_identifier "undefined") (pointer_declarator "**ppuVar3" (* "*") (pointer_declarator "*ppuVar3" (* "*") (identifier "ppuVar3"))) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "__n = (undefined *)0x7;" (assignment_expression "__n = (undefined *)0x7" (identifier "__n") (= "=") (cast_expression "(undefined *)0x7" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x7"))) (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "ppuVar3 = &PTR_s_PT_NULL_00385180;" (assignment_expression "ppuVar3 = &PTR_s_PT_NULL_00385180" (identifier "ppuVar3") (= "=") (pointer_expression "&PTR_s_PT_NULL_00385180" (& "&") (identifier "PTR_s_PT_NULL_00385180"))) (; ";")) (while_statement "while( true ) {\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }\n    iVar4 = iVar4 + 1;\n    if (iVar4 == 0xb) break;\n    __n = ppuVar3[4];\n    ppuVar3 = ppuVar3 + 3;\n  }" ({ "{") (if_statement "if (__n == param_3) {\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }" (if "if") (parenthesized_expression "(__n == param_3)" (( "(") (binary_expression "__n == param_3" (identifier "__n") (== "==") (identifier "param_3")) () ")")) (compound_statement "{\n      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);\n      if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }\n    }" ({ "{") (expression_statement "iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);" (assignment_expression "iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n)" (identifier "iVar1") (= "=") (call_expression "strncmp(param_2,*ppuVar3,(size_t)__n)" (identifier "strncmp") (argument_list "(param_2,*ppuVar3,(size_t)__n)" (( "(") (identifier "param_2") (, ",") (pointer_expression "*ppuVar3" (* "*") (identifier "ppuVar3")) (, ",") (cast_expression "(size_t)__n" (( "(") (type_descriptor "size_t" (primitive_type "size_t")) () ")") (identifier "__n")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        return (&DAT_00385188)[iVar4 * 3];\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return (&DAT_00385188)[iVar4 * 3];\n      }" ({ "{") (return_statement "return (&DAT_00385188)[iVar4 * 3];" (return "return") (subscript_expression "(&DAT_00385188)[iVar4 * 3]" (parenthesized_expression "(&DAT_00385188)" (( "(") (pointer_expression "&DAT_00385188" (& "&") (identifier "DAT_00385188")) () ")")) ([ "[") (binary_expression "iVar4 * 3" (identifier "iVar4") (* "*") (number_literal "3")) (] "]")) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar4 == 0xb) break;" (if "if") (parenthesized_expression "(iVar4 == 0xb)" (( "(") (binary_expression "iVar4 == 0xb" (identifier "iVar4") (== "==") (number_literal "0xb")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "__n = ppuVar3[4];" (assignment_expression "__n = ppuVar3[4]" (identifier "__n") (= "=") (subscript_expression "ppuVar3[4]" (identifier "ppuVar3") ([ "[") (number_literal "4") (] "]"))) (; ";")) (expression_statement "ppuVar3 = ppuVar3 + 3;" (assignment_expression "ppuVar3 = ppuVar3 + 3" (identifier "ppuVar3") (= "=") (binary_expression "ppuVar3 + 3" (identifier "ppuVar3") (+ "+") (number_literal "3"))) (; ";")) (} "}"))) (expression_statement "uVar2 = gettext("unknown PHDR type (try integer)");" (assignment_expression "uVar2 = gettext("unknown PHDR type (try integer)")" (identifier "uVar2") (= "=") (call_expression "gettext("unknown PHDR type (try integer)")" (identifier "gettext") (argument_list "("unknown PHDR type (try integer)")" (( "(") (string_literal ""unknown PHDR type (try integer)"" (" """) (string_content "unknown PHDR type (try integer)") (" """)) () ")")))) (; ";")) (expression_statement "FUN_0016aaf0(param_1,uVar2);" (call_expression "FUN_0016aaf0(param_1,uVar2)" (identifier "FUN_0016aaf0") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

type_1 function_1(void *closurev,char *name,size_t var_2)

{
  size_t var_1;
  int var_4;
  char *message;
  type_2 *var_6;
  int var_5;
  
  var_1 = 7;
  var_5 = 0;
  var_6 = phdr_type_names;
  while( true ) {
    if (var_1 == var_2) {
      var_4 = var_3(name,var_6->name,var_1);
      if (var_4 == 0) {
        return phdr_type_names[var_5].val;
      }
    }
    var_5 = var_5 + 1;
    if (var_5 == 0xb) break;
    var_1 = var_6[1].var_2;
    var_6 = var_6 + 1;
  }
  message = (char *)var_7("unknown PHDR type (try integer)");
  var_8(closurev,message);
  return 0;
}


(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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (pointer_declarator declarator: (identifier)))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (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)))) (return_statement (number_literal)))))

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

undefined4 MASKED(undefined4 param_1,char *param_2,undefined *param_3)

{
  undefined *__n;
  int iVar1;
  undefined4 uVar2;
  undefined **ppuVar3;
  int iVar4;
  
  __n = (undefined *)0x7;
  iVar4 = 0;
  ppuVar3 = &PTR_s_PT_NULL_00385180;
  while( true ) {
    if (__n == param_3) {
      iVar1 = strncmp(param_2,*ppuVar3,(size_t)__n);
      if (iVar1 == 0) {
        return (&DAT_00385188)[iVar4 * 3];
      }
    }
    iVar4 = iVar4 + 1;
    if (iVar4 == 0xb) break;
    __n = ppuVar3[4];
    ppuVar3 = ppuVar3 + 3;
  }
  uVar2 = gettext("unknown PHDR type (try integer)");
  FUN_0016aaf0(param_1,uVar2);
  return 0;
}

