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

int test_builtin(WORD_LIST *list)

{
  char **margv;
  int iVar1;
  char *format;
  int in_GS_OFFSET;
  int argc;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (list == (WORD_LIST *)0x0) {
    iVar1 = 1;
    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {
      iVar1 = 2;
      format = (char *)dcgettext(0,"missing `]\'",5);
      builtin_error(format);
    }
  }
  else {
    margv = make_builtin_argv(list,&argc);
    iVar1 = test_command(argc,margv);
    free(margv);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

undefined4 test_builtin(int param_1)

{
  void *__ptr;
  undefined4 uVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined4 local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 == 0) {
    uVar1 = 1;
    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {
      uVar1 = 2;
      uVar2 = dcgettext(0,"missing `]\'",5);
      builtin_error(uVar2);
    }
  }
  else {
    __ptr = (void *)make_builtin_argv(param_1,&local_14);
    uVar1 = test_command(local_14,__ptr);
    free(__ptr);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x9dc78
SUB ESP,0x10
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0xc],ECX
XOR ECX,ECX
MOV EAX,dword ptr [ESP + 0x20]
TEST EAX,EAX
JZ 0x000ac3e8
SUB ESP,0x8
LEA EDX,[ESP + 0x10]
PUSH EDX
PUSH EAX
CALL 0x0009bc20
MOV EDI,EAX
POP EAX
POP EDX
PUSH EDI
PUSH dword ptr [ESP + 0x14]
CALL 0x00080cb0
MOV dword ptr [ESP],EDI
MOV ESI,EAX
CALL 0x0002f200
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,ESI
JNZ 0x000ac425
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
LEA EAX,[EBX + 0x8dec]
MOV ESI,0x1
MOV EAX,dword ptr [EAX]
CMP byte ptr [EAX],0x5b
JNZ 0x000ac3cf
CMP byte ptr [EAX + 0x1],0x0
JNZ 0x000ac3cf
SUB ESP,0x4
LEA EAX,[EBX + 0xfffa78bb]
MOV ESI,0x2
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x0002f380
MOV dword ptr [ESP],EAX
CALL 0x0009b430
ADD ESP,0x10
JMP 0x000ac3cf
CALL 0x000ecc40
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 test_builtin(int param_1)\n\n{\n  void *__ptr;\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}\n\n" comment (function_definition "undefined4 test_builtin(int param_1)\n\n{\n  void *__ptr;\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" type_identifier (function_declarator "test_builtin(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  void *__ptr;\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }" { (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) (if_statement "if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }" if (parenthesized_expression "((*this_command_name == '[') && (this_command_name[1] == '\0'))" ( (binary_expression "(*this_command_name == '[') && (this_command_name[1] == '\0')" (parenthesized_expression "(*this_command_name == '[')" ( (binary_expression "*this_command_name == '['" (pointer_expression "*this_command_name" * identifier) == (char_literal "'['" ' character ')) )) && (parenthesized_expression "(this_command_name[1] == '\0')" ( (binary_expression "this_command_name[1] == '\0'" (subscript_expression "this_command_name[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }" { (expression_statement "uVar1 = 2;" (assignment_expression "uVar1 = 2" identifier = number_literal) ;) (expression_statement "uVar2 = dcgettext(0,"missing `]\'",5);" (assignment_expression "uVar2 = dcgettext(0,"missing `]\'",5)" identifier = (call_expression "dcgettext(0,"missing `]\'",5)" identifier (argument_list "(0,"missing `]\'",5)" ( number_literal , (string_literal ""missing `]\'"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "builtin_error(uVar2);" (call_expression "builtin_error(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) })) }) (else_clause "else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }" else (compound_statement "{\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }" { (expression_statement "__ptr = (void *)make_builtin_argv(param_1,&local_14);" (assignment_expression "__ptr = (void *)make_builtin_argv(param_1,&local_14)" identifier = (cast_expression "(void *)make_builtin_argv(param_1,&local_14)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "make_builtin_argv(param_1,&local_14)" identifier (argument_list "(param_1,&local_14)" ( identifier , (pointer_expression "&local_14" & identifier) ))))) ;) (expression_statement "uVar1 = test_command(local_14,__ptr);" (assignment_expression "uVar1 = test_command(local_14,__ptr)" identifier = (call_expression "test_command(local_14,__ptr)" identifier (argument_list "(local_14,__ptr)" ( identifier , identifier )))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar1;\n  }" { (return_statement "return uVar1;" return identifier ;) })) comment (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint test_builtin(WORD_LIST *list)\n\n{\n  char **margv;\n  int iVar1;\n  char *format;\n  int in_GS_OFFSET;\n  int argc;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (list == (WORD_LIST *)0x0) {\n    iVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      iVar1 = 2;\n      format = (char *)dcgettext(0,"missing `]\'",5);\n      builtin_error(format);\n    }\n  }\n  else {\n    margv = make_builtin_argv(list,&argc);\n    iVar1 = test_command(argc,margv);\n    free(margv);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int test_builtin(WORD_LIST *list)\n\n{\n  char **margv;\n  int iVar1;\n  char *format;\n  int in_GS_OFFSET;\n  int argc;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (list == (WORD_LIST *)0x0) {\n    iVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      iVar1 = 2;\n      format = (char *)dcgettext(0,"missing `]\'",5);\n      builtin_error(format);\n    }\n  }\n  else {\n    margv = make_builtin_argv(list,&argc);\n    iVar1 = test_command(argc,margv);\n    free(margv);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "test_builtin(WORD_LIST *list)" identifier (parameter_list "(WORD_LIST *list)" ( (parameter_declaration "WORD_LIST *list" type_identifier (pointer_declarator "*list" * identifier)) ))) (compound_statement "{\n  char **margv;\n  int iVar1;\n  char *format;\n  int in_GS_OFFSET;\n  int argc;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (list == (WORD_LIST *)0x0) {\n    iVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      iVar1 = 2;\n      format = (char *)dcgettext(0,"missing `]\'",5);\n      builtin_error(format);\n    }\n  }\n  else {\n    margv = make_builtin_argv(list,&argc);\n    iVar1 = test_command(argc,margv);\n    free(margv);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "char **margv;" primitive_type (pointer_declarator "**margv" * (pointer_declarator "*margv" * identifier)) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *format;" primitive_type (pointer_declarator "*format" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int argc;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (list == (WORD_LIST *)0x0) {\n    iVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      iVar1 = 2;\n      format = (char *)dcgettext(0,"missing `]\'",5);\n      builtin_error(format);\n    }\n  }\n  else {\n    margv = make_builtin_argv(list,&argc);\n    iVar1 = test_command(argc,margv);\n    free(margv);\n  }" if (parenthesized_expression "(list == (WORD_LIST *)0x0)" ( (binary_expression "list == (WORD_LIST *)0x0" identifier == (cast_expression "(WORD_LIST *)0x0" ( (type_descriptor "WORD_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      iVar1 = 2;\n      format = (char *)dcgettext(0,"missing `]\'",5);\n      builtin_error(format);\n    }\n  }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      iVar1 = 2;\n      format = (char *)dcgettext(0,"missing `]\'",5);\n      builtin_error(format);\n    }" if (parenthesized_expression "((*this_command_name == '[') && (this_command_name[1] == '\0'))" ( (binary_expression "(*this_command_name == '[') && (this_command_name[1] == '\0')" (parenthesized_expression "(*this_command_name == '[')" ( (binary_expression "*this_command_name == '['" (pointer_expression "*this_command_name" * identifier) == (char_literal "'['" ' character ')) )) && (parenthesized_expression "(this_command_name[1] == '\0')" ( (binary_expression "this_command_name[1] == '\0'" (subscript_expression "this_command_name[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      iVar1 = 2;\n      format = (char *)dcgettext(0,"missing `]\'",5);\n      builtin_error(format);\n    }" { (expression_statement "iVar1 = 2;" (assignment_expression "iVar1 = 2" identifier = number_literal) ;) (expression_statement "format = (char *)dcgettext(0,"missing `]\'",5);" (assignment_expression "format = (char *)dcgettext(0,"missing `]\'",5)" identifier = (cast_expression "(char *)dcgettext(0,"missing `]\'",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"missing `]\'",5)" identifier (argument_list "(0,"missing `]\'",5)" ( number_literal , (string_literal ""missing `]\'"" " string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "builtin_error(format);" (call_expression "builtin_error(format)" identifier (argument_list "(format)" ( identifier ))) ;) })) }) (else_clause "else {\n    margv = make_builtin_argv(list,&argc);\n    iVar1 = test_command(argc,margv);\n    free(margv);\n  }" else (compound_statement "{\n    margv = make_builtin_argv(list,&argc);\n    iVar1 = test_command(argc,margv);\n    free(margv);\n  }" { (expression_statement "margv = make_builtin_argv(list,&argc);" (assignment_expression "margv = make_builtin_argv(list,&argc)" identifier = (call_expression "make_builtin_argv(list,&argc)" identifier (argument_list "(list,&argc)" ( identifier , (pointer_expression "&argc" & identifier) )))) ;) (expression_statement "iVar1 = test_command(argc,margv);" (assignment_expression "iVar1 = test_command(argc,margv)" identifier = (call_expression "test_command(argc,margv)" identifier (argument_list "(argc,margv)" ( identifier , identifier )))) ;) (expression_statement "free(margv);" (call_expression "free(margv)" identifier (argument_list "(margv)" ( identifier ))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined4 test_builtin(int param_1)\n\n{\n  void *__ptr;\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_000ecc40();\n}\n\n" (function_definition "undefined4 test_builtin(int param_1)\n\n{\n  void *__ptr;\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_000ecc40();\n}" type_identifier (function_declarator "test_builtin(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  void *__ptr;\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_000ecc40();\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }" { (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) (if_statement "if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }" if (parenthesized_expression "((*this_command_name == '[') && (this_command_name[1] == '\0'))" ( (binary_expression "(*this_command_name == '[') && (this_command_name[1] == '\0')" (parenthesized_expression "(*this_command_name == '[')" ( (binary_expression "*this_command_name == '['" (pointer_expression "*this_command_name" * identifier) == (char_literal "'['" ' character ')) )) && (parenthesized_expression "(this_command_name[1] == '\0')" ( (binary_expression "this_command_name[1] == '\0'" (subscript_expression "this_command_name[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }" { (expression_statement "uVar1 = 2;" (assignment_expression "uVar1 = 2" identifier = number_literal) ;) (expression_statement "uVar2 = dcgettext(0,"missing `]\'",5);" (assignment_expression "uVar2 = dcgettext(0,"missing `]\'",5)" identifier = (call_expression "dcgettext(0,"missing `]\'",5)" identifier (argument_list "(0,"missing `]\'",5)" ( number_literal , (string_literal ""missing `]\'"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "builtin_error(uVar2);" (call_expression "builtin_error(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) })) }) (else_clause "else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }" else (compound_statement "{\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }" { (expression_statement "__ptr = (void *)make_builtin_argv(param_1,&local_14);" (assignment_expression "__ptr = (void *)make_builtin_argv(param_1,&local_14)" identifier = (cast_expression "(void *)make_builtin_argv(param_1,&local_14)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "make_builtin_argv(param_1,&local_14)" identifier (argument_list "(param_1,&local_14)" ( identifier , (pointer_expression "&local_14" & identifier) ))))) ;) (expression_statement "uVar1 = test_command(local_14,__ptr);" (assignment_expression "uVar1 = test_command(local_14,__ptr)" identifier = (call_expression "test_command(local_14,__ptr)" identifier (argument_list "(local_14,__ptr)" ( identifier , identifier )))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar1;\n  }" { (return_statement "return uVar1;" return identifier ;) })) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 test_builtin(int param_1)\n\n{\n  void *__ptr;\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_000ecc40();\n}" (type_identifier "undefined4") (function_declarator "test_builtin(int param_1)" (identifier "test_builtin") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  void *__ptr;\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_000ecc40();\n}" ({ "{") (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 local_14;" (type_identifier "undefined4") (identifier "local_14") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (param_1 == 0) {\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }\n  else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar1 = 1;\n    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }\n  }" ({ "{") (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" (identifier "uVar1") (= "=") (number_literal "1")) (; ";")) (if_statement "if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }" (if "if") (parenthesized_expression "((*this_command_name == '[') && (this_command_name[1] == '\0'))" (( "(") (binary_expression "(*this_command_name == '[') && (this_command_name[1] == '\0')" (parenthesized_expression "(*this_command_name == '[')" (( "(") (binary_expression "*this_command_name == '['" (pointer_expression "*this_command_name" (* "*") (identifier "this_command_name")) (== "==") (char_literal "'['" (' "'") (character "[") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(this_command_name[1] == '\0')" (( "(") (binary_expression "this_command_name[1] == '\0'" (subscript_expression "this_command_name[1]" (identifier "this_command_name") ([ "[") (number_literal "1") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      uVar1 = 2;\n      uVar2 = dcgettext(0,"missing `]\'",5);\n      builtin_error(uVar2);\n    }" ({ "{") (expression_statement "uVar1 = 2;" (assignment_expression "uVar1 = 2" (identifier "uVar1") (= "=") (number_literal "2")) (; ";")) (expression_statement "uVar2 = dcgettext(0,"missing `]\'",5);" (assignment_expression "uVar2 = dcgettext(0,"missing `]\'",5)" (identifier "uVar2") (= "=") (call_expression "dcgettext(0,"missing `]\'",5)" (identifier "dcgettext") (argument_list "(0,"missing `]\'",5)" (( "(") (number_literal "0") (, ",") (string_literal ""missing `]\'"" (" """) (string_content "missing `]") (escape_sequence "\'") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "builtin_error(uVar2);" (call_expression "builtin_error(uVar2)" (identifier "builtin_error") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }" (else "else") (compound_statement "{\n    __ptr = (void *)make_builtin_argv(param_1,&local_14);\n    uVar1 = test_command(local_14,__ptr);\n    free(__ptr);\n  }" ({ "{") (expression_statement "__ptr = (void *)make_builtin_argv(param_1,&local_14);" (assignment_expression "__ptr = (void *)make_builtin_argv(param_1,&local_14)" (identifier "__ptr") (= "=") (cast_expression "(void *)make_builtin_argv(param_1,&local_14)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "make_builtin_argv(param_1,&local_14)" (identifier "make_builtin_argv") (argument_list "(param_1,&local_14)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_14" (& "&") (identifier "local_14")) () ")"))))) (; ";")) (expression_statement "uVar1 = test_command(local_14,__ptr);" (assignment_expression "uVar1 = test_command(local_14,__ptr)" (identifier "uVar1") (= "=") (call_expression "test_command(local_14,__ptr)" (identifier "test_command") (argument_list "(local_14,__ptr)" (( "(") (identifier "local_14") (, ",") (identifier "__ptr") () ")")))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return uVar1;\n  }" ({ "{") (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" (identifier "FUN_000ecc40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(type_1 *var_2)

{
  char **margv;
  int iVar1;
  char *format;
  int var_1;
  int argc;
  int var_8;
  
  var_8 = *(int *)(var_1 + 0x14);
  if (var_2 == (type_1 *)0x0) {
    iVar1 = 1;
    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {
      iVar1 = 2;
      format = (char *)var_3(0,"missing `]\'",5);
      var_4(format);
    }
  }
  else {
    margv = var_5(var_2,&argc);
    iVar1 = var_6(argc,margv);
    var_7(margv);
  }
  if (var_8 == *(int *)(var_1 + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  var_9();
}


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

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

undefined4 MASKED(int param_1)

{
  void *__ptr;
  undefined4 uVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined4 local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 == 0) {
    uVar1 = 1;
    if ((*this_command_name == '[') && (this_command_name[1] == '\0')) {
      uVar1 = 2;
      uVar2 = dcgettext(0,"missing `]\'",5);
      builtin_error(uVar2);
    }
  }
  else {
    __ptr = (void *)make_builtin_argv(param_1,&local_14);
    uVar1 = test_command(local_14,__ptr);
    free(__ptr);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}

