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

char * __regparm3 savestring(char *start,int len)

{
  char *__dest;
  
  __dest = (char *)xmalloc(len + 1);
  memcpy(__dest,start,len);
  __dest[len] = '\0';
  return __dest;
}



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

void * __regparm3 FUN_000209e0(void *param_1,size_t param_2)

{
  void *__dest;
  
  __dest = (void *)xmalloc(param_2 + 1);
  memcpy(__dest,param_1,param_2);
  *(undefined1 *)((int)__dest + param_2) = 0;
  return __dest;
}


PUSH EBP
MOV EBP,EAX
LEA EAX,[EDX + 0x1]
PUSH EDI
MOV EDI,EDX
PUSH ESI
PUSH EBX
CALL 0x000166c0
ADD EBX,0x1f610
SUB ESP,0x18
PUSH EAX
CALL 0x000132e0
ADD ESP,0xc
PUSH EDI
MOV ESI,EAX
PUSH EBP
PUSH EAX
CALL 0x00013130
MOV byte ptr [ESI + EDI*0x1],0x0
ADD ESP,0x1c
MOV EAX,ESI
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\nvoid * __regparm3 FUN_000209e0(void *param_1,size_t param_2)\n\n{\n  void *__dest;\n  \n  __dest = (void *)xmalloc(param_2 + 1);\n  memcpy(__dest,param_1,param_2);\n  *(undefined1 *)((int)__dest + param_2) = 0;\n  return __dest;\n}\n\n" comment (function_definition "void * __regparm3 FUN_000209e0(void *param_1,size_t param_2)\n\n{\n  void *__dest;\n  \n  __dest = (void *)xmalloc(param_2 + 1);\n  memcpy(__dest,param_1,param_2);\n  *(undefined1 *)((int)__dest + param_2) = 0;\n  return __dest;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_000209e0(void *param_1,size_t param_2)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_000209e0(void *param_1,size_t param_2)" identifier (parameter_list "(void *param_1,size_t param_2)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) )))) (compound_statement "{\n  void *__dest;\n  \n  __dest = (void *)xmalloc(param_2 + 1);\n  memcpy(__dest,param_1,param_2);\n  *(undefined1 *)((int)__dest + param_2) = 0;\n  return __dest;\n}" { (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__dest = (void *)xmalloc(param_2 + 1);" (assignment_expression "__dest = (void *)xmalloc(param_2 + 1)" identifier = (cast_expression "(void *)xmalloc(param_2 + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(param_2 + 1)" identifier (argument_list "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) ))))) ;) (expression_statement "memcpy(__dest,param_1,param_2);" (call_expression "memcpy(__dest,param_1,param_2)" identifier (argument_list "(__dest,param_1,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((int)__dest + param_2) = 0;" (assignment_expression "*(undefined1 *)((int)__dest + param_2) = 0" (pointer_expression "*(undefined1 *)((int)__dest + param_2)" * (cast_expression "(undefined1 *)((int)__dest + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__dest + param_2)" ( (binary_expression "(int)__dest + param_2" (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = number_literal) ;) (return_statement "return __dest;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 savestring(char *start,int len)\n\n{\n  char *__dest;\n  \n  __dest = (char *)xmalloc(len + 1);\n  memcpy(__dest,start,len);\n  __dest[len] = '\0';\n  return __dest;\n}\n\n" comment (function_definition "char * __regparm3 savestring(char *start,int len)\n\n{\n  char *__dest;\n  \n  __dest = (char *)xmalloc(len + 1);\n  memcpy(__dest,start,len);\n  __dest[len] = '\0';\n  return __dest;\n}" primitive_type (pointer_declarator "* __regparm3 savestring(char *start,int len)" * (ERROR "__regparm3" identifier) (function_declarator "savestring(char *start,int len)" identifier (parameter_list "(char *start,int len)" ( (parameter_declaration "char *start" primitive_type (pointer_declarator "*start" * identifier)) , (parameter_declaration "int len" primitive_type identifier) )))) (compound_statement "{\n  char *__dest;\n  \n  __dest = (char *)xmalloc(len + 1);\n  memcpy(__dest,start,len);\n  __dest[len] = '\0';\n  return __dest;\n}" { (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__dest = (char *)xmalloc(len + 1);" (assignment_expression "__dest = (char *)xmalloc(len + 1)" identifier = (cast_expression "(char *)xmalloc(len + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(len + 1)" identifier (argument_list "(len + 1)" ( (binary_expression "len + 1" identifier + number_literal) ))))) ;) (expression_statement "memcpy(__dest,start,len);" (call_expression "memcpy(__dest,start,len)" identifier (argument_list "(__dest,start,len)" ( identifier , identifier , identifier ))) ;) (expression_statement "__dest[len] = '\0';" (assignment_expression "__dest[len] = '\0'" (subscript_expression "__dest[len]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return __dest;" return identifier ;) })))
(translation_unit "void * __regparm3 FUN_000209e0(void *param_1,size_t param_2)\n\n{\n  void *__dest;\n  \n  __dest = (void *)xmalloc(param_2 + 1);\n  memcpy(__dest,param_1,param_2);\n  *(undefined1 *)((int)__dest + param_2) = 0;\n  return __dest;\n}\n\n" (function_definition "void * __regparm3 FUN_000209e0(void *param_1,size_t param_2)\n\n{\n  void *__dest;\n  \n  __dest = (void *)xmalloc(param_2 + 1);\n  memcpy(__dest,param_1,param_2);\n  *(undefined1 *)((int)__dest + param_2) = 0;\n  return __dest;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_000209e0(void *param_1,size_t param_2)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_000209e0(void *param_1,size_t param_2)" identifier (parameter_list "(void *param_1,size_t param_2)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) )))) (compound_statement "{\n  void *__dest;\n  \n  __dest = (void *)xmalloc(param_2 + 1);\n  memcpy(__dest,param_1,param_2);\n  *(undefined1 *)((int)__dest + param_2) = 0;\n  return __dest;\n}" { (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__dest = (void *)xmalloc(param_2 + 1);" (assignment_expression "__dest = (void *)xmalloc(param_2 + 1)" identifier = (cast_expression "(void *)xmalloc(param_2 + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(param_2 + 1)" identifier (argument_list "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) ))))) ;) (expression_statement "memcpy(__dest,param_1,param_2);" (call_expression "memcpy(__dest,param_1,param_2)" identifier (argument_list "(__dest,param_1,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((int)__dest + param_2) = 0;" (assignment_expression "*(undefined1 *)((int)__dest + param_2) = 0" (pointer_expression "*(undefined1 *)((int)__dest + param_2)" * (cast_expression "(undefined1 *)((int)__dest + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__dest + param_2)" ( (binary_expression "(int)__dest + param_2" (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = number_literal) ;) (return_statement "return __dest;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "void * __regparm3 FUN_000209e0(void *param_1,size_t param_2)\n\n{\n  void *__dest;\n  \n  __dest = (void *)xmalloc(param_2 + 1);\n  memcpy(__dest,param_1,param_2);\n  *(undefined1 *)((int)__dest + param_2) = 0;\n  return __dest;\n}" (primitive_type "void") (pointer_declarator "* __regparm3 FUN_000209e0(void *param_1,size_t param_2)" (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000209e0(void *param_1,size_t param_2)" (identifier "FUN_000209e0") (parameter_list "(void *param_1,size_t param_2)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "size_t param_2" (primitive_type "size_t") (identifier "param_2")) () ")")))) (compound_statement "{\n  void *__dest;\n  \n  __dest = (void *)xmalloc(param_2 + 1);\n  memcpy(__dest,param_1,param_2);\n  *(undefined1 *)((int)__dest + param_2) = 0;\n  return __dest;\n}" ({ "{") (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (expression_statement "__dest = (void *)xmalloc(param_2 + 1);" (assignment_expression "__dest = (void *)xmalloc(param_2 + 1)" (identifier "__dest") (= "=") (cast_expression "(void *)xmalloc(param_2 + 1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(param_2 + 1)" (identifier "xmalloc") (argument_list "(param_2 + 1)" (( "(") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "memcpy(__dest,param_1,param_2);" (call_expression "memcpy(__dest,param_1,param_2)" (identifier "memcpy") (argument_list "(__dest,param_1,param_2)" (( "(") (identifier "__dest") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "*(undefined1 *)((int)__dest + param_2) = 0;" (assignment_expression "*(undefined1 *)((int)__dest + param_2) = 0" (pointer_expression "*(undefined1 *)((int)__dest + param_2)" (* "*") (cast_expression "(undefined1 *)((int)__dest + param_2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__dest + param_2)" (( "(") (binary_expression "(int)__dest + param_2" (cast_expression "(int)__dest" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__dest")) (+ "+") (identifier "param_2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return __dest;" (return "return") (identifier "__dest") (; ";")) (} "}")))

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

char * __regparm3 function_1(char *start,int var_2)

{
  char *__dest;
  
  __dest = (char *)var_1(var_2 + 1);
  var_3(__dest,start,var_2);
  __dest[var_2] = '\0';
  return __dest;
}


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

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

void * __regparm3 MASKED(void *param_1,size_t param_2)

{
  void *__dest;
  
  __dest = (void *)xmalloc(param_2 + 1);
  memcpy(__dest,param_1,param_2);
  *(undefined1 *)((int)__dest + param_2) = 0;
  return __dest;
}

