
char * savestring(char *start,int len)

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



void FUN_00110540(void *param_1,int param_2)

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


PUSH RBP
MOV RBP,RDI
PUSH RBX
MOVSXD RBX,ESI
LEA EDI,[RBX + 0x1]
MOVSXD RDI,EDI
SUB RSP,0x8
CALL 0x00104370
MOV RDX,RBX
MOV RSI,RBP
MOV RDI,RAX
CALL 0x00104510
MOV byte ptr [RAX + RBX*0x1],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
(translation_unit "void FUN_00110540(void *param_1,int param_2)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = (void *)xmalloc((long)(param_2 + 1));\n  pvVar1 = memcpy(pvVar1,param_1,(long)param_2);\n  *(undefined1 *)((long)pvVar1 + (long)param_2) = 0;\n  return;\n}\n\n" (function_definition "void FUN_00110540(void *param_1,int param_2)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = (void *)xmalloc((long)(param_2 + 1));\n  pvVar1 = memcpy(pvVar1,param_1,(long)param_2);\n  *(undefined1 *)((long)pvVar1 + (long)param_2) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_00110540(void *param_1,int param_2)" identifier (parameter_list "(void *param_1,int param_2)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  \n  pvVar1 = (void *)xmalloc((long)(param_2 + 1));\n  pvVar1 = memcpy(pvVar1,param_1,(long)param_2);\n  *(undefined1 *)((long)pvVar1 + (long)param_2) = 0;\n  return;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (expression_statement "pvVar1 = (void *)xmalloc((long)(param_2 + 1));" (assignment_expression "pvVar1 = (void *)xmalloc((long)(param_2 + 1))" identifier = (cast_expression "(void *)xmalloc((long)(param_2 + 1))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc((long)(param_2 + 1))" identifier (argument_list "((long)(param_2 + 1))" ( (cast_expression "(long)(param_2 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) ))) ))))) ;) (expression_statement "pvVar1 = memcpy(pvVar1,param_1,(long)param_2);" (assignment_expression "pvVar1 = memcpy(pvVar1,param_1,(long)param_2)" identifier = (call_expression "memcpy(pvVar1,param_1,(long)param_2)" identifier (argument_list "(pvVar1,param_1,(long)param_2)" ( identifier , identifier , (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (expression_statement "*(undefined1 *)((long)pvVar1 + (long)param_2) = 0;" (assignment_expression "*(undefined1 *)((long)pvVar1 + (long)param_2) = 0" (pointer_expression "*(undefined1 *)((long)pvVar1 + (long)param_2)" * (cast_expression "(undefined1 *)((long)pvVar1 + (long)param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pvVar1 + (long)param_2)" ( (binary_expression "(long)pvVar1 + (long)param_2" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "char * savestring(char *start,int len)\n\n{\n  void *__dest;\n  char *pcVar1;\n  \n  __dest = (void *)xmalloc((long)(len + 1));\n  pcVar1 = (char *)memcpy(__dest,start,(long)len);\n  pcVar1[len] = '\0';\n  return pcVar1;\n}\n\n" (function_definition "char * savestring(char *start,int len)\n\n{\n  void *__dest;\n  char *pcVar1;\n  \n  __dest = (void *)xmalloc((long)(len + 1));\n  pcVar1 = (char *)memcpy(__dest,start,(long)len);\n  pcVar1[len] = '\0';\n  return pcVar1;\n}" primitive_type (pointer_declarator "* savestring(char *start,int len)" * (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  void *__dest;\n  char *pcVar1;\n  \n  __dest = (void *)xmalloc((long)(len + 1));\n  pcVar1 = (char *)memcpy(__dest,start,(long)len);\n  pcVar1[len] = '\0';\n  return pcVar1;\n}" { (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (expression_statement "__dest = (void *)xmalloc((long)(len + 1));" (assignment_expression "__dest = (void *)xmalloc((long)(len + 1))" identifier = (cast_expression "(void *)xmalloc((long)(len + 1))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc((long)(len + 1))" identifier (argument_list "((long)(len + 1))" ( (cast_expression "(long)(len + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(len + 1)" ( (binary_expression "len + 1" identifier + number_literal) ))) ))))) ;) (expression_statement "pcVar1 = (char *)memcpy(__dest,start,(long)len);" (assignment_expression "pcVar1 = (char *)memcpy(__dest,start,(long)len)" identifier = (cast_expression "(char *)memcpy(__dest,start,(long)len)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "memcpy(__dest,start,(long)len)" identifier (argument_list "(__dest,start,(long)len)" ( identifier , identifier , (cast_expression "(long)len" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))))) ;) (expression_statement "pcVar1[len] = '\0';" (assignment_expression "pcVar1[len] = '\0'" (subscript_expression "pcVar1[len]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "void FUN_00110540(void *param_1,int param_2)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = (void *)xmalloc((long)(param_2 + 1));\n  pvVar1 = memcpy(pvVar1,param_1,(long)param_2);\n  *(undefined1 *)((long)pvVar1 + (long)param_2) = 0;\n  return;\n}\n\n" (function_definition "void FUN_00110540(void *param_1,int param_2)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = (void *)xmalloc((long)(param_2 + 1));\n  pvVar1 = memcpy(pvVar1,param_1,(long)param_2);\n  *(undefined1 *)((long)pvVar1 + (long)param_2) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_00110540(void *param_1,int param_2)" identifier (parameter_list "(void *param_1,int param_2)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  \n  pvVar1 = (void *)xmalloc((long)(param_2 + 1));\n  pvVar1 = memcpy(pvVar1,param_1,(long)param_2);\n  *(undefined1 *)((long)pvVar1 + (long)param_2) = 0;\n  return;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (expression_statement "pvVar1 = (void *)xmalloc((long)(param_2 + 1));" (assignment_expression "pvVar1 = (void *)xmalloc((long)(param_2 + 1))" identifier = (cast_expression "(void *)xmalloc((long)(param_2 + 1))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc((long)(param_2 + 1))" identifier (argument_list "((long)(param_2 + 1))" ( (cast_expression "(long)(param_2 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) ))) ))))) ;) (expression_statement "pvVar1 = memcpy(pvVar1,param_1,(long)param_2);" (assignment_expression "pvVar1 = memcpy(pvVar1,param_1,(long)param_2)" identifier = (call_expression "memcpy(pvVar1,param_1,(long)param_2)" identifier (argument_list "(pvVar1,param_1,(long)param_2)" ( identifier , identifier , (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (expression_statement "*(undefined1 *)((long)pvVar1 + (long)param_2) = 0;" (assignment_expression "*(undefined1 *)((long)pvVar1 + (long)param_2) = 0" (pointer_expression "*(undefined1 *)((long)pvVar1 + (long)param_2)" * (cast_expression "(undefined1 *)((long)pvVar1 + (long)param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pvVar1 + (long)param_2)" ( (binary_expression "(long)pvVar1 + (long)param_2" (cast_expression "(long)pvVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (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 ( (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_00110540(void *param_1,int param_2)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = (void *)xmalloc((long)(param_2 + 1));\n  pvVar1 = memcpy(pvVar1,param_1,(long)param_2);\n  *(undefined1 *)((long)pvVar1 + (long)param_2) = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00110540(void *param_1,int param_2)" (identifier "FUN_00110540") (parameter_list "(void *param_1,int param_2)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  void *pvVar1;\n  \n  pvVar1 = (void *)xmalloc((long)(param_2 + 1));\n  pvVar1 = memcpy(pvVar1,param_1,(long)param_2);\n  *(undefined1 *)((long)pvVar1 + (long)param_2) = 0;\n  return;\n}" ({ "{") (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (expression_statement "pvVar1 = (void *)xmalloc((long)(param_2 + 1));" (assignment_expression "pvVar1 = (void *)xmalloc((long)(param_2 + 1))" (identifier "pvVar1") (= "=") (cast_expression "(void *)xmalloc((long)(param_2 + 1))" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc((long)(param_2 + 1))" (identifier "xmalloc") (argument_list "((long)(param_2 + 1))" (( "(") (cast_expression "(long)(param_2 + 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(param_2 + 1)" (( "(") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1")) () ")"))) () ")"))))) (; ";")) (expression_statement "pvVar1 = memcpy(pvVar1,param_1,(long)param_2);" (assignment_expression "pvVar1 = memcpy(pvVar1,param_1,(long)param_2)" (identifier "pvVar1") (= "=") (call_expression "memcpy(pvVar1,param_1,(long)param_2)" (identifier "memcpy") (argument_list "(pvVar1,param_1,(long)param_2)" (( "(") (identifier "pvVar1") (, ",") (identifier "param_1") (, ",") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "*(undefined1 *)((long)pvVar1 + (long)param_2) = 0;" (assignment_expression "*(undefined1 *)((long)pvVar1 + (long)param_2) = 0" (pointer_expression "*(undefined1 *)((long)pvVar1 + (long)param_2)" (* "*") (cast_expression "(undefined1 *)((long)pvVar1 + (long)param_2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)pvVar1 + (long)param_2)" (( "(") (binary_expression "(long)pvVar1 + (long)param_2" (cast_expression "(long)pvVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pvVar1")) (+ "+") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2"))) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

char * function_1(char *start,int var_2)

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


(translation_unit (function_definition type: (primitive_type) 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 (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (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: (sized_type_specifier)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))))) right: (number_literal))) (return_statement))))

void MASKED(void *param_1,int param_2)

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

