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

char * make_tempname(char *filename)

{
  char *__template;
  int __fd;
  char *pcVar1;
  
  __template = template_in_dir(filename);
  __fd = mkstemp64(__template);
  if (__fd == -1) {
    pcVar1 = (char *)0x0;
    free(__template);
  }
  else {
    close(__fd);
    pcVar1 = __template;
  }
  return pcVar1;
}



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

char * FUN_00012e30(void)

{
  char *__template;
  int __fd;
  char *pcVar1;
  
  __template = (char *)FUN_00012290(0x12e37);
  __fd = mkstemp64(__template);
  if (__fd == -1) {
    pcVar1 = (char *)0x0;
    free(__template);
  }
  else {
    close(__fd);
    pcVar1 = __template;
  }
  return pcVar1;
}


PUSH ESI
PUSH EBX
CALL 0x00011ca0
ADD EBX,0x61c9
SUB ESP,0x4
MOV EAX,dword ptr [ESP + 0x10]
CALL 0x00012290
SUB ESP,0xc
PUSH EAX
MOV ESI,EAX
CALL 0x00011230
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x00012e70
SUB ESP,0xc
PUSH EAX
CALL 0x00011460
ADD ESP,0x10
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
SUB ESP,0xc
PUSH ESI
XOR ESI,ESI
CALL 0x000110a0
ADD ESP,0x10
JMP 0x00012e68
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * FUN_00012e30(void)\n\n{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = (char *)FUN_00012290(0x12e37);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}\n\n" comment (function_definition "char * FUN_00012e30(void)\n\n{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = (char *)FUN_00012290(0x12e37);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}" primitive_type (pointer_declarator "* FUN_00012e30(void)" * (function_declarator "FUN_00012e30(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = (char *)FUN_00012290(0x12e37);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}" { (declaration "char *__template;" primitive_type (pointer_declarator "*__template" * identifier) ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (expression_statement "__template = (char *)FUN_00012290(0x12e37);" (assignment_expression "__template = (char *)FUN_00012290(0x12e37)" identifier = (cast_expression "(char *)FUN_00012290(0x12e37)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00012290(0x12e37)" identifier (argument_list "(0x12e37)" ( number_literal ))))) ;) (expression_statement "__fd = mkstemp64(__template);" (assignment_expression "__fd = mkstemp64(__template)" identifier = (call_expression "mkstemp64(__template)" identifier (argument_list "(__template)" ( identifier )))) ;) (if_statement "if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }" if (parenthesized_expression "(__fd == -1)" ( (binary_expression "__fd == -1" identifier == number_literal) )) (compound_statement "{\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }" { (expression_statement "pcVar1 = (char *)0x0;" (assignment_expression "pcVar1 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "free(__template);" (call_expression "free(__template)" identifier (argument_list "(__template)" ( identifier ))) ;) }) (else_clause "else {\n    close(__fd);\n    pcVar1 = __template;\n  }" else (compound_statement "{\n    close(__fd);\n    pcVar1 = __template;\n  }" { (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "pcVar1 = __template;" (assignment_expression "pcVar1 = __template" identifier = identifier) ;) }))) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * make_tempname(char *filename)\n\n{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = template_in_dir(filename);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}\n\n" comment comment (function_definition "char * make_tempname(char *filename)\n\n{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = template_in_dir(filename);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}" primitive_type (pointer_declarator "* make_tempname(char *filename)" * (function_declarator "make_tempname(char *filename)" identifier (parameter_list "(char *filename)" ( (parameter_declaration "char *filename" primitive_type (pointer_declarator "*filename" * identifier)) )))) (compound_statement "{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = template_in_dir(filename);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}" { (declaration "char *__template;" primitive_type (pointer_declarator "*__template" * identifier) ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (expression_statement "__template = template_in_dir(filename);" (assignment_expression "__template = template_in_dir(filename)" identifier = (call_expression "template_in_dir(filename)" identifier (argument_list "(filename)" ( identifier )))) ;) (expression_statement "__fd = mkstemp64(__template);" (assignment_expression "__fd = mkstemp64(__template)" identifier = (call_expression "mkstemp64(__template)" identifier (argument_list "(__template)" ( identifier )))) ;) (if_statement "if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }" if (parenthesized_expression "(__fd == -1)" ( (binary_expression "__fd == -1" identifier == number_literal) )) (compound_statement "{\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }" { (expression_statement "pcVar1 = (char *)0x0;" (assignment_expression "pcVar1 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "free(__template);" (call_expression "free(__template)" identifier (argument_list "(__template)" ( identifier ))) ;) }) (else_clause "else {\n    close(__fd);\n    pcVar1 = __template;\n  }" else (compound_statement "{\n    close(__fd);\n    pcVar1 = __template;\n  }" { (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "pcVar1 = __template;" (assignment_expression "pcVar1 = __template" identifier = identifier) ;) }))) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "char * FUN_00012e30(void)\n\n{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = (char *)FUN_00012290(0x12e37);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}\n\n" (function_definition "char * FUN_00012e30(void)\n\n{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = (char *)FUN_00012290(0x12e37);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}" primitive_type (pointer_declarator "* FUN_00012e30(void)" * (function_declarator "FUN_00012e30(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = (char *)FUN_00012290(0x12e37);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}" { (declaration "char *__template;" primitive_type (pointer_declarator "*__template" * identifier) ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (expression_statement "__template = (char *)FUN_00012290(0x12e37);" (assignment_expression "__template = (char *)FUN_00012290(0x12e37)" identifier = (cast_expression "(char *)FUN_00012290(0x12e37)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00012290(0x12e37)" identifier (argument_list "(0x12e37)" ( number_literal ))))) ;) (expression_statement "__fd = mkstemp64(__template);" (assignment_expression "__fd = mkstemp64(__template)" identifier = (call_expression "mkstemp64(__template)" identifier (argument_list "(__template)" ( identifier )))) ;) (if_statement "if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }" if (parenthesized_expression "(__fd == -1)" ( (binary_expression "__fd == -1" identifier == number_literal) )) (compound_statement "{\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }" { (expression_statement "pcVar1 = (char *)0x0;" (assignment_expression "pcVar1 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "free(__template);" (call_expression "free(__template)" identifier (argument_list "(__template)" ( identifier ))) ;) }) (else_clause "else {\n    close(__fd);\n    pcVar1 = __template;\n  }" else (compound_statement "{\n    close(__fd);\n    pcVar1 = __template;\n  }" { (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "pcVar1 = __template;" (assignment_expression "pcVar1 = __template" identifier = identifier) ;) }))) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }))) (return_statement return IDENT ;) })))
(function_definition "char * FUN_00012e30(void)\n\n{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = (char *)FUN_00012290(0x12e37);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}" (primitive_type "char") (pointer_declarator "* FUN_00012e30(void)" (* "*") (function_declarator "FUN_00012e30(void)" (identifier "FUN_00012e30") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")")))) (compound_statement "{\n  char *__template;\n  int __fd;\n  char *pcVar1;\n  \n  __template = (char *)FUN_00012290(0x12e37);\n  __fd = mkstemp64(__template);\n  if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }\n  return pcVar1;\n}" ({ "{") (declaration "char *__template;" (primitive_type "char") (pointer_declarator "*__template" (* "*") (identifier "__template")) (; ";")) (declaration "int __fd;" (primitive_type "int") (identifier "__fd") (; ";")) (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (expression_statement "__template = (char *)FUN_00012290(0x12e37);" (assignment_expression "__template = (char *)FUN_00012290(0x12e37)" (identifier "__template") (= "=") (cast_expression "(char *)FUN_00012290(0x12e37)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00012290(0x12e37)" (identifier "FUN_00012290") (argument_list "(0x12e37)" (( "(") (number_literal "0x12e37") () ")"))))) (; ";")) (expression_statement "__fd = mkstemp64(__template);" (assignment_expression "__fd = mkstemp64(__template)" (identifier "__fd") (= "=") (call_expression "mkstemp64(__template)" (identifier "mkstemp64") (argument_list "(__template)" (( "(") (identifier "__template") () ")")))) (; ";")) (if_statement "if (__fd == -1) {\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }\n  else {\n    close(__fd);\n    pcVar1 = __template;\n  }" (if "if") (parenthesized_expression "(__fd == -1)" (( "(") (binary_expression "__fd == -1" (identifier "__fd") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    pcVar1 = (char *)0x0;\n    free(__template);\n  }" ({ "{") (expression_statement "pcVar1 = (char *)0x0;" (assignment_expression "pcVar1 = (char *)0x0" (identifier "pcVar1") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "free(__template);" (call_expression "free(__template)" (identifier "free") (argument_list "(__template)" (( "(") (identifier "__template") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    close(__fd);\n    pcVar1 = __template;\n  }" (else "else") (compound_statement "{\n    close(__fd);\n    pcVar1 = __template;\n  }" ({ "{") (expression_statement "close(__fd);" (call_expression "close(__fd)" (identifier "close") (argument_list "(__fd)" (( "(") (identifier "__fd") () ")"))) (; ";")) (expression_statement "pcVar1 = __template;" (assignment_expression "pcVar1 = __template" (identifier "pcVar1") (= "=") (identifier "__template")) (; ";")) (} "}")))) (return_statement "return pcVar1;" (return "return") (identifier "pcVar1") (; ";")) (} "}")))

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

char * function_1(char *filename)

{
  char *__template;
  int var_3;
  char *pcVar1;
  
  __template = var_1(filename);
  var_3 = var_2(__template);
  if (var_3 == -1) {
    pcVar1 = (char *)0x0;
    var_4(__template);
  }
  else {
    var_5(var_3);
    pcVar1 = __template;
  }
  return pcVar1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (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 (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) (return_statement (identifier)))))

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

char * MASKED(void)

{
  char *__template;
  int __fd;
  char *pcVar1;
  
  __template = (char *)FUN_00012290(0x12e37);
  __fd = mkstemp64(__template);
  if (__fd == -1) {
    pcVar1 = (char *)0x0;
    free(__template);
  }
  else {
    close(__fd);
    pcVar1 = __template;
  }
  return pcVar1;
}

