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

char * __regparm2 sqlite3DbStrNDup(sqlite3 *db,char *z,u64 n)

{
  char *__dest;
  u64 in_stack_ffffffd4;
  
  if (z == (char *)0x0) {
    __dest = (char *)0x0;
  }
  else {
    __dest = (char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4);
    if (__dest != (char *)0x0) {
      memcpy(__dest,z,(size_t)n);
      __dest[(size_t)n] = '\0';
    }
  }
  return __dest;
}



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

void * __regparm2 FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)

{
  void *__dest;
  
  if (param_2 == (void *)0x0) {
    __dest = (void *)0x0;
  }
  else {
    __dest = (void *)FUN_0002e2d0();
    if (__dest != (void *)0x0) {
      memcpy(__dest,param_2,param_3);
      *(undefined1 *)((int)__dest + param_3) = 0;
    }
  }
  return __dest;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001d810
ADD EBX,0xaf3c7
SUB ESP,0x1c
TEST EDX,EDX
MOV EDI,dword ptr [ESP + 0x30]
MOV EBP,dword ptr [ESP + 0x34]
JZ 0x0002ec98
MOV ESI,EDX
MOV EDX,EDI
MOV ECX,EBP
ADD EDX,0x1
ADC ECX,0x0
CALL 0x0002e2d0
TEST EAX,EAX
MOV EDX,EAX
JZ 0x0002ec8a
MOV dword ptr [ESP + 0x8],EDI
MOV dword ptr [ESP + 0xc],EBP
SUB ESP,0x4
PUSH dword ptr [ESP + 0xc]
PUSH ESI
PUSH EAX
MOV dword ptr [ESP + 0x18],EAX
CALL 0x00016490
MOV EDX,dword ptr [ESP + 0x18]
ADD ESP,0x10
MOV byte ptr [EDX + EDI*0x1],0x0
ADD ESP,0x1c
MOV EAX,EDX
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR EDX,EDX
JMP 0x0002ec8a
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * __regparm2 FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }\n  return __dest;\n}\n\n" comment (function_definition "void * __regparm2 FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }\n  return __dest;\n}" primitive_type (pointer_declarator "* __regparm2 FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)" * (ERROR "__regparm2" identifier) (function_declarator "FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)" identifier (parameter_list "(undefined4 param_1,void *param_2,size_t param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) )))) (compound_statement "{\n  void *__dest;\n  \n  if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }\n  return __dest;\n}" { (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (if_statement "if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }" if (parenthesized_expression "(param_2 == (void *)0x0)" ( (binary_expression "param_2 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    __dest = (void *)0x0;\n  }" { (expression_statement "__dest = (void *)0x0;" (assignment_expression "__dest = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }" else (compound_statement "{\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }" { (expression_statement "__dest = (void *)FUN_0002e2d0();" (assignment_expression "__dest = (void *)FUN_0002e2d0()" identifier = (cast_expression "(void *)FUN_0002e2d0()" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e2d0()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }" { (expression_statement "memcpy(__dest,param_2,param_3);" (call_expression "memcpy(__dest,param_2,param_3)" identifier (argument_list "(__dest,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((int)__dest + param_3) = 0;" (assignment_expression "*(undefined1 *)((int)__dest + param_3) = 0" (pointer_expression "*(undefined1 *)((int)__dest + param_3)" * (cast_expression "(undefined1 *)((int)__dest + param_3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__dest + param_3)" ( (binary_expression "(int)__dest + param_3" (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 * __regparm2 sqlite3DbStrNDup(sqlite3 *db,char *z,u64 n)\n\n{\n  char *__dest;\n  u64 in_stack_ffffffd4;\n  \n  if (z == (char *)0x0) {\n    __dest = (char *)0x0;\n  }\n  else {\n    __dest = (char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4);\n    if (__dest != (char *)0x0) {\n      memcpy(__dest,z,(size_t)n);\n      __dest[(size_t)n] = '\0';\n    }\n  }\n  return __dest;\n}\n\n" comment (function_definition "char * __regparm2 sqlite3DbStrNDup(sqlite3 *db,char *z,u64 n)\n\n{\n  char *__dest;\n  u64 in_stack_ffffffd4;\n  \n  if (z == (char *)0x0) {\n    __dest = (char *)0x0;\n  }\n  else {\n    __dest = (char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4);\n    if (__dest != (char *)0x0) {\n      memcpy(__dest,z,(size_t)n);\n      __dest[(size_t)n] = '\0';\n    }\n  }\n  return __dest;\n}" primitive_type (pointer_declarator "* __regparm2 sqlite3DbStrNDup(sqlite3 *db,char *z,u64 n)" * (ERROR "__regparm2" identifier) (function_declarator "sqlite3DbStrNDup(sqlite3 *db,char *z,u64 n)" identifier (parameter_list "(sqlite3 *db,char *z,u64 n)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "char *z" primitive_type (pointer_declarator "*z" * identifier)) , (parameter_declaration "u64 n" type_identifier identifier) )))) (compound_statement "{\n  char *__dest;\n  u64 in_stack_ffffffd4;\n  \n  if (z == (char *)0x0) {\n    __dest = (char *)0x0;\n  }\n  else {\n    __dest = (char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4);\n    if (__dest != (char *)0x0) {\n      memcpy(__dest,z,(size_t)n);\n      __dest[(size_t)n] = '\0';\n    }\n  }\n  return __dest;\n}" { (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "u64 in_stack_ffffffd4;" type_identifier identifier ;) (if_statement "if (z == (char *)0x0) {\n    __dest = (char *)0x0;\n  }\n  else {\n    __dest = (char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4);\n    if (__dest != (char *)0x0) {\n      memcpy(__dest,z,(size_t)n);\n      __dest[(size_t)n] = '\0';\n    }\n  }" if (parenthesized_expression "(z == (char *)0x0)" ( (binary_expression "z == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    __dest = (char *)0x0;\n  }" { (expression_statement "__dest = (char *)0x0;" (assignment_expression "__dest = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    __dest = (char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4);\n    if (__dest != (char *)0x0) {\n      memcpy(__dest,z,(size_t)n);\n      __dest[(size_t)n] = '\0';\n    }\n  }" else (compound_statement "{\n    __dest = (char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4);\n    if (__dest != (char *)0x0) {\n      memcpy(__dest,z,(size_t)n);\n      __dest[(size_t)n] = '\0';\n    }\n  }" { (expression_statement "__dest = (char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4);" (assignment_expression "__dest = (char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4)" identifier = (cast_expression "(char *)sqlite3DbMallocRawNN(db,in_stack_ffffffd4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3DbMallocRawNN(db,in_stack_ffffffd4)" identifier (argument_list "(db,in_stack_ffffffd4)" ( identifier , identifier ))))) ;) (if_statement "if (__dest != (char *)0x0) {\n      memcpy(__dest,z,(size_t)n);\n      __dest[(size_t)n] = '\0';\n    }" if (parenthesized_expression "(__dest != (char *)0x0)" ( (binary_expression "__dest != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(__dest,z,(size_t)n);\n      __dest[(size_t)n] = '\0';\n    }" { (expression_statement "memcpy(__dest,z,(size_t)n);" (call_expression "memcpy(__dest,z,(size_t)n)" identifier (argument_list "(__dest,z,(size_t)n)" ( identifier , identifier , (cast_expression "(size_t)n" ( (type_descriptor "size_t" primitive_type) ) identifier) ))) ;) (expression_statement "__dest[(size_t)n] = '\0';" (assignment_expression "__dest[(size_t)n] = '\0'" (subscript_expression "__dest[(size_t)n]" identifier [ (cast_expression "(size_t)n" ( (type_descriptor "size_t" primitive_type) ) identifier) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) })) }))) (return_statement "return __dest;" return identifier ;) })))
(translation_unit "void * __regparm2 FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }\n  return __dest;\n}\n\n" (function_definition "void * __regparm2 FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }\n  return __dest;\n}" primitive_type (pointer_declarator "* __regparm2 FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)" * (ERROR "__regparm2" identifier) (function_declarator "FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)" identifier (parameter_list "(undefined4 param_1,void *param_2,size_t param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) )))) (compound_statement "{\n  void *__dest;\n  \n  if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }\n  return __dest;\n}" { (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (if_statement "if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }" if (parenthesized_expression "(param_2 == (void *)0x0)" ( (binary_expression "param_2 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    __dest = (void *)0x0;\n  }" { (expression_statement "__dest = (void *)0x0;" (assignment_expression "__dest = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }" else (compound_statement "{\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }" { (expression_statement "__dest = (void *)FUN_0002e2d0();" (assignment_expression "__dest = (void *)FUN_0002e2d0()" identifier = (cast_expression "(void *)FUN_0002e2d0()" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e2d0()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }" { (expression_statement "memcpy(__dest,param_2,param_3);" (call_expression "memcpy(__dest,param_2,param_3)" identifier (argument_list "(__dest,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((int)__dest + param_3) = 0;" (assignment_expression "*(undefined1 *)((int)__dest + param_3) = 0" (pointer_expression "*(undefined1 *)((int)__dest + param_3)" * (cast_expression "(undefined1 *)((int)__dest + param_3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__dest + param_3)" ( (binary_expression "(int)__dest + param_3" (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 IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (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 * __regparm2 FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }\n  return __dest;\n}" (primitive_type "void") (pointer_declarator "* __regparm2 FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)" (* "*") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_0002ec30(undefined4 param_1,void *param_2,size_t param_3)" (identifier "FUN_0002ec30") (parameter_list "(undefined4 param_1,void *param_2,size_t param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "size_t param_3" (primitive_type "size_t") (identifier "param_3")) () ")")))) (compound_statement "{\n  void *__dest;\n  \n  if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }\n  return __dest;\n}" ({ "{") (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (if_statement "if (param_2 == (void *)0x0) {\n    __dest = (void *)0x0;\n  }\n  else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 == (void *)0x0)" (( "(") (binary_expression "param_2 == (void *)0x0" (identifier "param_2") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    __dest = (void *)0x0;\n  }" ({ "{") (expression_statement "__dest = (void *)0x0;" (assignment_expression "__dest = (void *)0x0" (identifier "__dest") (= "=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }" (else "else") (compound_statement "{\n    __dest = (void *)FUN_0002e2d0();\n    if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }\n  }" ({ "{") (expression_statement "__dest = (void *)FUN_0002e2d0();" (assignment_expression "__dest = (void *)FUN_0002e2d0()" (identifier "__dest") (= "=") (cast_expression "(void *)FUN_0002e2d0()" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002e2d0()" (identifier "FUN_0002e2d0") (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (__dest != (void *)0x0) {\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }" (if "if") (parenthesized_expression "(__dest != (void *)0x0)" (( "(") (binary_expression "__dest != (void *)0x0" (identifier "__dest") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      memcpy(__dest,param_2,param_3);\n      *(undefined1 *)((int)__dest + param_3) = 0;\n    }" ({ "{") (expression_statement "memcpy(__dest,param_2,param_3);" (call_expression "memcpy(__dest,param_2,param_3)" (identifier "memcpy") (argument_list "(__dest,param_2,param_3)" (( "(") (identifier "__dest") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "*(undefined1 *)((int)__dest + param_3) = 0;" (assignment_expression "*(undefined1 *)((int)__dest + param_3) = 0" (pointer_expression "*(undefined1 *)((int)__dest + param_3)" (* "*") (cast_expression "(undefined1 *)((int)__dest + param_3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__dest + param_3)" (( "(") (binary_expression "(int)__dest + param_3" (cast_expression "(int)__dest" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__dest")) (+ "+") (identifier "param_3")) () ")")))) (= "=") (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 * __regparm2 function_1(type_1 *db,char *var_1,type_2 n)

{
  char *var_3;
  type_2 in_stack_ffffffd4;
  
  if (var_1 == (char *)0x0) {
    var_3 = (char *)0x0;
  }
  else {
    var_3 = (char *)var_2(db,in_stack_ffffffd4);
    if (var_3 != (char *)0x0) {
      var_4(var_3,var_1,(size_t)n);
      var_3[(size_t)n] = '\0';
    }
  }
  return var_3;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (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))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (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))))) 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))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (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 * __regparm2 MASKED(undefined4 param_1,void *param_2,size_t param_3)

{
  void *__dest;
  
  if (param_2 == (void *)0x0) {
    __dest = (void *)0x0;
  }
  else {
    __dest = (void *)FUN_0002e2d0();
    if (__dest != (void *)0x0) {
      memcpy(__dest,param_2,param_3);
      *(undefined1 *)((int)__dest + param_3) = 0;
    }
  }
  return __dest;
}

