
/* 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;
  
  __dest = (char *)0x0;
  if ((z != (char *)0x0) && (db->mallocFailed == '\0')) {
    __dest = (char *)dbMallocRawFinish(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_00055c60(int param_1,void *param_2,size_t param_3)

{
  void *__dest;
  
  __dest = (void *)0x0;
  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {
    __dest = (void *)FUN_00055c10();
    if (__dest != (void *)0x0) {
      memcpy(__dest,param_2,param_3);
      *(undefined1 *)((int)__dest + param_3) = 0;
    }
  }
  return __dest;
}


PUSH EBP
XOR ECX,ECX
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000172e0
ADD EBX,0x1651bd
SUB ESP,0x1c
MOV EDI,dword ptr [ESP + 0x30]
MOV EBP,dword ptr [ESP + 0x34]
TEST EDX,EDX
JZ 0x00055cb7
CMP byte ptr [EAX + 0x4d],0x0
JNZ 0x00055cb7
MOV ESI,EDX
MOV EDX,EDI
MOV ECX,EBP
ADD EDX,0x1
ADC ECX,0x0
CALL 0x00055c10
MOV ECX,EAX
TEST EAX,EAX
JZ 0x00055cb7
SUB ESP,0x4
PUSH EDI
PUSH ESI
PUSH ECX
MOV dword ptr [ESP + 0x1c],ECX
CALL 0x00015130
MOV ECX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV byte ptr [ECX + EDI*0x1],0x0
ADD ESP,0x1c
MOV EAX,ECX
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 * __regparm2 FUN_00055c60(int param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  __dest = (void *)0x0;\n  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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_00055c60(int param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  __dest = (void *)0x0;\n  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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_00055c60(int param_1,void *param_2,size_t param_3)" * (ERROR "__regparm2" identifier) (function_declarator "FUN_00055c60(int param_1,void *param_2,size_t param_3)" identifier (parameter_list "(int param_1,void *param_2,size_t param_3)" ( (parameter_declaration "int param_1" primitive_type 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  __dest = (void *)0x0;\n  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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) ;) (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)) ;) (if_statement "if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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) && (*(char *)(param_1 + 0x4d) == '\0'))" ( (binary_expression "(param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')" (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)) )) && (parenthesized_expression "(*(char *)(param_1 + 0x4d) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x4d) == '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" * (cast_expression "(char *)(param_1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4d)" ( (binary_expression "param_1 + 0x4d" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    __dest = (void *)FUN_00055c10();\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_00055c10();" (assignment_expression "__dest = (void *)FUN_00055c10()" identifier = (cast_expression "(void *)FUN_00055c10()" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00055c10()" 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  __dest = (char *)0x0;\n  if ((z != (char *)0x0) && (db->mallocFailed == '\0')) {\n    __dest = (char *)dbMallocRawFinish(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  __dest = (char *)0x0;\n  if ((z != (char *)0x0) && (db->mallocFailed == '\0')) {\n    __dest = (char *)dbMallocRawFinish(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  __dest = (char *)0x0;\n  if ((z != (char *)0x0) && (db->mallocFailed == '\0')) {\n    __dest = (char *)dbMallocRawFinish(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 ;) (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)) ;) (if_statement "if ((z != (char *)0x0) && (db->mallocFailed == '\0')) {\n    __dest = (char *)dbMallocRawFinish(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) && (db->mallocFailed == '\0'))" ( (binary_expression "(z != (char *)0x0) && (db->mallocFailed == '\0')" (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)) )) && (parenthesized_expression "(db->mallocFailed == '\0')" ( (binary_expression "db->mallocFailed == '\0'" (field_expression "db->mallocFailed" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    __dest = (char *)dbMallocRawFinish(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 *)dbMallocRawFinish(db,in_stack_ffffffd4);" (assignment_expression "__dest = (char *)dbMallocRawFinish(db,in_stack_ffffffd4)" identifier = (cast_expression "(char *)dbMallocRawFinish(db,in_stack_ffffffd4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dbMallocRawFinish(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_00055c60(int param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  __dest = (void *)0x0;\n  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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_00055c60(int param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  __dest = (void *)0x0;\n  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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_00055c60(int param_1,void *param_2,size_t param_3)" * (ERROR "__regparm2" identifier) (function_declarator "FUN_00055c60(int param_1,void *param_2,size_t param_3)" identifier (parameter_list "(int param_1,void *param_2,size_t param_3)" ( (parameter_declaration "int param_1" primitive_type 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  __dest = (void *)0x0;\n  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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) ;) (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)) ;) (if_statement "if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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) && (*(char *)(param_1 + 0x4d) == '\0'))" ( (binary_expression "(param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')" (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)) )) && (parenthesized_expression "(*(char *)(param_1 + 0x4d) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x4d) == '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" * (cast_expression "(char *)(param_1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4d)" ( (binary_expression "param_1 + 0x4d" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    __dest = (void *)FUN_00055c10();\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_00055c10();" (assignment_expression "__dest = (void *)FUN_00055c10()" identifier = (cast_expression "(void *)FUN_00055c10()" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00055c10()" 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) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) ))) )) (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_00055c60(int param_1,void *param_2,size_t param_3)\n\n{\n  void *__dest;\n  \n  __dest = (void *)0x0;\n  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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_00055c60(int param_1,void *param_2,size_t param_3)" (* "*") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_00055c60(int param_1,void *param_2,size_t param_3)" (identifier "FUN_00055c60") (parameter_list "(int param_1,void *param_2,size_t param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (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  __dest = (void *)0x0;\n  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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")) (; ";")) (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"))) (; ";")) (if_statement "if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {\n    __dest = (void *)FUN_00055c10();\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) && (*(char *)(param_1 + 0x4d) == '\0'))" (( "(") (binary_expression "(param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')" (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"))) () ")")) (&& "&&") (parenthesized_expression "(*(char *)(param_1 + 0x4d) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x4d) == '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" (* "*") (cast_expression "(char *)(param_1 + 0x4d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4d)" (( "(") (binary_expression "param_1 + 0x4d" (identifier "param_1") (+ "+") (number_literal "0x4d")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    __dest = (void *)FUN_00055c10();\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_00055c10();" (assignment_expression "__dest = (void *)FUN_00055c10()" (identifier "__dest") (= "=") (cast_expression "(void *)FUN_00055c10()" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00055c10()" (identifier "FUN_00055c10") (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;
  
  var_3 = (char *)0x0;
  if ((var_1 != (char *)0x0) && (db->mallocFailed == '\0')) {
    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: (primitive_type) 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))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))))) consequence: (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(int param_1,void *param_2,size_t param_3)

{
  void *__dest;
  
  __dest = (void *)0x0;
  if ((param_2 != (void *)0x0) && (*(char *)(param_1 + 0x4d) == '\0')) {
    __dest = (void *)FUN_00055c10();
    if (__dest != (void *)0x0) {
      memcpy(__dest,param_2,param_3);
      *(undefined1 *)((int)__dest + param_3) = 0;
    }
  }
  return __dest;
}

