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

ptrdiff_t __xargmatch_internal
                    (char *context,char *arg,char **arglist,char *vallist,size_t valsize,
                    argmatch_exit_fn exit_fn)

{
  ptrdiff_t problem;
  
  problem = argmatch(arg,arglist,vallist,valsize);
  if (problem < 0) {
    argmatch_invalid(context,arg,problem);
    argmatch_valid(arglist,vallist,valsize);
    (*exit_fn)();
    problem = -1;
  }
  return problem;
}



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

int FUN_000144c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
                undefined4 param_5,code *param_6)

{
  int iVar1;
  
  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);
  if (iVar1 < 0) {
    FUN_00014320(param_1,param_2,iVar1);
    FUN_000143a0(param_3,param_4,param_5);
    (*param_6)();
    iVar1 = -1;
  }
  return iVar1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00012c30
ADD EBX,0x10b37
SUB ESP,0xc
MOV EBP,dword ptr [ESP + 0x24]
MOV ESI,dword ptr [ESP + 0x2c]
MOV EDI,dword ptr [ESP + 0x30]
PUSH EDI
PUSH ESI
PUSH dword ptr [ESP + 0x30]
PUSH EBP
CALL 0x00014200
ADD ESP,0x10
TEST EAX,EAX
JS 0x00014500
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH EAX
PUSH EBP
PUSH dword ptr [ESP + 0x2c]
CALL 0x00014320
ADD ESP,0xc
PUSH EDI
PUSH ESI
PUSH dword ptr [ESP + 0x34]
CALL 0x000143a0
CALL dword ptr [ESP + 0x44]
ADD ESP,0x10
MOV EAX,0xffffffff
JMP 0x000144f1
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_000144c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);\n  if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int FUN_000144c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);\n  if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_000144c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "code *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);\n  if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);" (assignment_expression "iVar1 = FUN_00014200(param_2,param_3,param_4,param_5)" identifier = (call_expression "FUN_00014200(param_2,param_3,param_4,param_5)" identifier (argument_list "(param_2,param_3,param_4,param_5)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }" { (expression_statement "FUN_00014320(param_1,param_2,iVar1);" (call_expression "FUN_00014320(param_1,param_2,iVar1)" identifier (argument_list "(param_1,param_2,iVar1)" ( identifier , identifier , identifier ))) ;) (expression_statement "FUN_000143a0(param_3,param_4,param_5);" (call_expression "FUN_000143a0(param_3,param_4,param_5)" identifier (argument_list "(param_3,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (expression_statement "(*param_6)();" (call_expression "(*param_6)()" (parenthesized_expression "(*param_6)" ( (pointer_expression "*param_6" * identifier) )) (argument_list "()" ( ))) ;) (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nptrdiff_t __xargmatch_internal\n                    (char *context,char *arg,char **arglist,char *vallist,size_t valsize,\n                    argmatch_exit_fn exit_fn)\n\n{\n  ptrdiff_t problem;\n  \n  problem = argmatch(arg,arglist,vallist,valsize);\n  if (problem < 0) {\n    argmatch_invalid(context,arg,problem);\n    argmatch_valid(arglist,vallist,valsize);\n    (*exit_fn)();\n    problem = -1;\n  }\n  return problem;\n}\n\n" comment comment (function_definition "ptrdiff_t __xargmatch_internal\n                    (char *context,char *arg,char **arglist,char *vallist,size_t valsize,\n                    argmatch_exit_fn exit_fn)\n\n{\n  ptrdiff_t problem;\n  \n  problem = argmatch(arg,arglist,vallist,valsize);\n  if (problem < 0) {\n    argmatch_invalid(context,arg,problem);\n    argmatch_valid(arglist,vallist,valsize);\n    (*exit_fn)();\n    problem = -1;\n  }\n  return problem;\n}" primitive_type (function_declarator "__xargmatch_internal\n                    (char *context,char *arg,char **arglist,char *vallist,size_t valsize,\n                    argmatch_exit_fn exit_fn)" identifier (parameter_list "(char *context,char *arg,char **arglist,char *vallist,size_t valsize,\n                    argmatch_exit_fn exit_fn)" ( (parameter_declaration "char *context" primitive_type (pointer_declarator "*context" * identifier)) , (parameter_declaration "char *arg" primitive_type (pointer_declarator "*arg" * identifier)) , (parameter_declaration "char **arglist" primitive_type (pointer_declarator "**arglist" * (pointer_declarator "*arglist" * identifier))) , (parameter_declaration "char *vallist" primitive_type (pointer_declarator "*vallist" * identifier)) , (parameter_declaration "size_t valsize" primitive_type identifier) , (parameter_declaration "argmatch_exit_fn exit_fn" type_identifier identifier) ))) (compound_statement "{\n  ptrdiff_t problem;\n  \n  problem = argmatch(arg,arglist,vallist,valsize);\n  if (problem < 0) {\n    argmatch_invalid(context,arg,problem);\n    argmatch_valid(arglist,vallist,valsize);\n    (*exit_fn)();\n    problem = -1;\n  }\n  return problem;\n}" { (declaration "ptrdiff_t problem;" primitive_type identifier ;) (expression_statement "problem = argmatch(arg,arglist,vallist,valsize);" (assignment_expression "problem = argmatch(arg,arglist,vallist,valsize)" identifier = (call_expression "argmatch(arg,arglist,vallist,valsize)" identifier (argument_list "(arg,arglist,vallist,valsize)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (problem < 0) {\n    argmatch_invalid(context,arg,problem);\n    argmatch_valid(arglist,vallist,valsize);\n    (*exit_fn)();\n    problem = -1;\n  }" if (parenthesized_expression "(problem < 0)" ( (binary_expression "problem < 0" identifier < number_literal) )) (compound_statement "{\n    argmatch_invalid(context,arg,problem);\n    argmatch_valid(arglist,vallist,valsize);\n    (*exit_fn)();\n    problem = -1;\n  }" { (expression_statement "argmatch_invalid(context,arg,problem);" (call_expression "argmatch_invalid(context,arg,problem)" identifier (argument_list "(context,arg,problem)" ( identifier , identifier , identifier ))) ;) (expression_statement "argmatch_valid(arglist,vallist,valsize);" (call_expression "argmatch_valid(arglist,vallist,valsize)" identifier (argument_list "(arglist,vallist,valsize)" ( identifier , identifier , identifier ))) ;) (expression_statement "(*exit_fn)();" (call_expression "(*exit_fn)()" (parenthesized_expression "(*exit_fn)" ( (pointer_expression "*exit_fn" * identifier) )) (argument_list "()" ( ))) ;) (expression_statement "problem = -1;" (assignment_expression "problem = -1" identifier = number_literal) ;) })) (return_statement "return problem;" return identifier ;) })))
(translation_unit "int FUN_000144c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);\n  if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_000144c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);\n  if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_000144c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "code *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);\n  if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);" (assignment_expression "iVar1 = FUN_00014200(param_2,param_3,param_4,param_5)" identifier = (call_expression "FUN_00014200(param_2,param_3,param_4,param_5)" identifier (argument_list "(param_2,param_3,param_4,param_5)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }" { (expression_statement "FUN_00014320(param_1,param_2,iVar1);" (call_expression "FUN_00014320(param_1,param_2,iVar1)" identifier (argument_list "(param_1,param_2,iVar1)" ( identifier , identifier , identifier ))) ;) (expression_statement "FUN_000143a0(param_3,param_4,param_5);" (call_expression "FUN_000143a0(param_3,param_4,param_5)" identifier (argument_list "(param_3,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (expression_statement "(*param_6)();" (call_expression "(*param_6)()" (parenthesized_expression "(*param_6)" ( (pointer_expression "*param_6" * identifier) )) (argument_list "()" ( ))) ;) (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_000144c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);\n  if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_000144c0(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)" (identifier "FUN_000144c0") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,code *param_6)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "code *param_6" (type_identifier "code") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);\n  if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);" (assignment_expression "iVar1 = FUN_00014200(param_2,param_3,param_4,param_5)" (identifier "iVar1") (= "=") (call_expression "FUN_00014200(param_2,param_3,param_4,param_5)" (identifier "FUN_00014200") (argument_list "(param_2,param_3,param_4,param_5)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if (iVar1 < 0) {\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_00014320(param_1,param_2,iVar1);\n    FUN_000143a0(param_3,param_4,param_5);\n    (*param_6)();\n    iVar1 = -1;\n  }" ({ "{") (expression_statement "FUN_00014320(param_1,param_2,iVar1);" (call_expression "FUN_00014320(param_1,param_2,iVar1)" (identifier "FUN_00014320") (argument_list "(param_1,param_2,iVar1)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "FUN_000143a0(param_3,param_4,param_5);" (call_expression "FUN_000143a0(param_3,param_4,param_5)" (identifier "FUN_000143a0") (argument_list "(param_3,param_4,param_5)" (( "(") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (expression_statement "(*param_6)();" (call_expression "(*param_6)()" (parenthesized_expression "(*param_6)" (( "(") (pointer_expression "*param_6" (* "*") (identifier "param_6")) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" (identifier "iVar1") (= "=") (number_literal "-1")) (; ";")) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

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

ptrdiff_t function_1
                    (char *context,char *arg,char **arglist,char *vallist,size_t valsize,
                    type_1 exit_fn)

{
  ptrdiff_t var_2;
  
  var_2 = var_1(arg,arglist,vallist,valsize);
  if (var_2 < 0) {
    var_3(context,arg,var_2);
    var_4(arglist,vallist,valsize);
    (*exit_fn)();
    var_2 = -1;
  }
  return var_2;
}


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

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

int MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
                undefined4 param_5,code *param_6)

{
  int iVar1;
  
  iVar1 = FUN_00014200(param_2,param_3,param_4,param_5);
  if (iVar1 < 0) {
    FUN_00014320(param_1,param_2,iVar1);
    FUN_000143a0(param_3,param_4,param_5);
    (*param_6)();
    iVar1 = -1;
  }
  return iVar1;
}

