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

void __regparm3 sqlite3Fts5BufferAppendBlob(int *pRc,Fts5Buffer *pBuf,u32 nData,u8 *pData)

{
  int iVar1;
  
  if (nData != 0) {
    iVar1 = pBuf->n;
    if ((Fts5Buffer *)pBuf->nSpace < (Fts5Buffer *)(iVar1 + nData)) {
      iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData));
      if (iVar1 != 0) {
        return;
      }
      iVar1 = pBuf->n;
    }
    memcpy(pBuf->p + iVar1,pData,nData);
    pBuf->n = pBuf->n + nData;
  }
  return;
}



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

void __regparm3 FUN_00067960(undefined4 param_1,int *param_2,size_t param_3,void *param_4)

{
  int iVar1;
  
  if (param_3 != 0) {
    iVar1 = param_2[1];
    if ((uint)param_2[2] < iVar1 + param_3) {
      iVar1 = FUN_000678b0(iVar1 + param_3);
      if (iVar1 != 0) {
        return;
      }
      iVar1 = param_2[1];
    }
    memcpy((void *)(iVar1 + *param_2),param_4,param_3);
    param_2[1] = param_2[1] + param_3;
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014cf0
ADD EBX,0xe156b
SUB ESP,0xc
TEST ECX,ECX
JZ 0x000679b3
MOV ESI,EDX
MOV EDX,dword ptr [EDX + 0x4]
MOV EDI,ECX
LEA EBP,[EDX + ECX*0x1]
CMP EBP,dword ptr [ESI + 0x8]
JBE 0x0006799d
SUB ESP,0xc
LEA ECX,[ESI + 0x8]
MOV EDX,ESI
PUSH EBP
CALL 0x000678b0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000679b3
MOV EDX,dword ptr [ESI + 0x4]
SUB ESP,0x4
ADD EDX,dword ptr [ESI]
PUSH EDI
PUSH dword ptr [ESP + 0x28]
PUSH EDX
CALL 0x000140d0
ADD dword ptr [ESI + 0x4],EDI
ADD ESP,0x10
ADD ESP,0xc
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_00067960(undefined4 param_1,int *param_2,size_t param_3,void *param_4)\n\n{\n  int iVar1;\n  \n  if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00067960(undefined4 param_1,int *param_2,size_t param_3,void *param_4)\n\n{\n  int iVar1;\n  \n  if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00067960(undefined4 param_1,int *param_2,size_t param_3,void *param_4)" identifier (parameter_list "(undefined4 param_1,int *param_2,size_t param_3,void *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "void *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }" { (expression_statement "iVar1 = param_2[1];" (assignment_expression "iVar1 = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (if_statement "if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }" if (parenthesized_expression "((uint)param_2[2] < iVar1 + param_3)" ( (binary_expression "(uint)param_2[2] < iVar1 + param_3" (cast_expression "(uint)param_2[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_2[2]" identifier [ number_literal ])) < (binary_expression "iVar1 + param_3" identifier + identifier)) )) (compound_statement "{\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }" { (expression_statement "iVar1 = FUN_000678b0(iVar1 + param_3);" (assignment_expression "iVar1 = FUN_000678b0(iVar1 + param_3)" identifier = (call_expression "FUN_000678b0(iVar1 + param_3)" identifier (argument_list "(iVar1 + param_3)" ( (binary_expression "iVar1 + param_3" identifier + identifier) )))) ;) (if_statement "if (iVar1 != 0) {\n        return;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "iVar1 = param_2[1];" (assignment_expression "iVar1 = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) })) (expression_statement "memcpy((void *)(iVar1 + *param_2),param_4,param_3);" (call_expression "memcpy((void *)(iVar1 + *param_2),param_4,param_3)" identifier (argument_list "((void *)(iVar1 + *param_2),param_4,param_3)" ( (cast_expression "(void *)(iVar1 + *param_2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + *param_2)" ( (binary_expression "iVar1 + *param_2" identifier + (pointer_expression "*param_2" * identifier)) ))) , identifier , identifier ))) ;) (expression_statement "param_2[1] = param_2[1] + param_3;" (assignment_expression "param_2[1] = param_2[1] + param_3" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "param_2[1] + param_3" (subscript_expression "param_2[1]" identifier [ number_literal ]) + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 sqlite3Fts5BufferAppendBlob(int *pRc,Fts5Buffer *pBuf,u32 nData,u8 *pData)\n\n{\n  int iVar1;\n  \n  if (nData != 0) {\n    iVar1 = pBuf->n;\n    if ((Fts5Buffer *)pBuf->nSpace < (Fts5Buffer *)(iVar1 + nData)) {\n      iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData));\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = pBuf->n;\n    }\n    memcpy(pBuf->p + iVar1,pData,nData);\n    pBuf->n = pBuf->n + nData;\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 sqlite3Fts5BufferAppendBlob(int *pRc,Fts5Buffer *pBuf,u32 nData,u8 *pData)\n\n{\n  int iVar1;\n  \n  if (nData != 0) {\n    iVar1 = pBuf->n;\n    if ((Fts5Buffer *)pBuf->nSpace < (Fts5Buffer *)(iVar1 + nData)) {\n      iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData));\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = pBuf->n;\n    }\n    memcpy(pBuf->p + iVar1,pData,nData);\n    pBuf->n = pBuf->n + nData;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3Fts5BufferAppendBlob(int *pRc,Fts5Buffer *pBuf,u32 nData,u8 *pData)" identifier (parameter_list "(int *pRc,Fts5Buffer *pBuf,u32 nData,u8 *pData)" ( (parameter_declaration "int *pRc" primitive_type (pointer_declarator "*pRc" * identifier)) , (parameter_declaration "Fts5Buffer *pBuf" type_identifier (pointer_declarator "*pBuf" * identifier)) , (parameter_declaration "u32 nData" type_identifier identifier) , (parameter_declaration "u8 *pData" type_identifier (pointer_declarator "*pData" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  if (nData != 0) {\n    iVar1 = pBuf->n;\n    if ((Fts5Buffer *)pBuf->nSpace < (Fts5Buffer *)(iVar1 + nData)) {\n      iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData));\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = pBuf->n;\n    }\n    memcpy(pBuf->p + iVar1,pData,nData);\n    pBuf->n = pBuf->n + nData;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (nData != 0) {\n    iVar1 = pBuf->n;\n    if ((Fts5Buffer *)pBuf->nSpace < (Fts5Buffer *)(iVar1 + nData)) {\n      iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData));\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = pBuf->n;\n    }\n    memcpy(pBuf->p + iVar1,pData,nData);\n    pBuf->n = pBuf->n + nData;\n  }" if (parenthesized_expression "(nData != 0)" ( (binary_expression "nData != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = pBuf->n;\n    if ((Fts5Buffer *)pBuf->nSpace < (Fts5Buffer *)(iVar1 + nData)) {\n      iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData));\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = pBuf->n;\n    }\n    memcpy(pBuf->p + iVar1,pData,nData);\n    pBuf->n = pBuf->n + nData;\n  }" { (expression_statement "iVar1 = pBuf->n;" (assignment_expression "iVar1 = pBuf->n" identifier = (field_expression "pBuf->n" identifier -> field_identifier)) ;) (if_statement "if ((Fts5Buffer *)pBuf->nSpace < (Fts5Buffer *)(iVar1 + nData)) {\n      iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData));\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = pBuf->n;\n    }" if (parenthesized_expression "((Fts5Buffer *)pBuf->nSpace < (Fts5Buffer *)(iVar1 + nData))" ( (binary_expression "(Fts5Buffer *)pBuf->nSpace < (Fts5Buffer *)(iVar1 + nData)" (cast_expression "(Fts5Buffer *)pBuf->nSpace" ( (type_descriptor "Fts5Buffer *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pBuf->nSpace" identifier -> field_identifier)) < (cast_expression "(Fts5Buffer *)(iVar1 + nData)" ( (type_descriptor "Fts5Buffer *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + nData)" ( (binary_expression "iVar1 + nData" identifier + identifier) )))) )) (compound_statement "{\n      iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData));\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = pBuf->n;\n    }" { (expression_statement "iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData));" (assignment_expression "iVar1 = sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData))" identifier = (call_expression "sqlite3Fts5BufferSize(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData))" identifier (argument_list "(pRc,pBuf,(u32)&pBuf->nSpace,(Fts5Buffer *)(iVar1 + nData))" ( identifier , identifier , (binary_expression "(u32)&pBuf->nSpace" (parenthesized_expression "(u32)" ( identifier )) & (field_expression "pBuf->nSpace" identifier -> field_identifier)) , (cast_expression "(Fts5Buffer *)(iVar1 + nData)" ( (type_descriptor "Fts5Buffer *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + nData)" ( (binary_expression "iVar1 + nData" identifier + identifier) ))) )))) ;) (if_statement "if (iVar1 != 0) {\n        return;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "iVar1 = pBuf->n;" (assignment_expression "iVar1 = pBuf->n" identifier = (field_expression "pBuf->n" identifier -> field_identifier)) ;) })) (expression_statement "memcpy(pBuf->p + iVar1,pData,nData);" (call_expression "memcpy(pBuf->p + iVar1,pData,nData)" identifier (argument_list "(pBuf->p + iVar1,pData,nData)" ( (binary_expression "pBuf->p + iVar1" (field_expression "pBuf->p" identifier -> field_identifier) + identifier) , identifier , identifier ))) ;) (expression_statement "pBuf->n = pBuf->n + nData;" (assignment_expression "pBuf->n = pBuf->n + nData" (field_expression "pBuf->n" identifier -> field_identifier) = (binary_expression "pBuf->n + nData" (field_expression "pBuf->n" identifier -> field_identifier) + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00067960(undefined4 param_1,int *param_2,size_t param_3,void *param_4)\n\n{\n  int iVar1;\n  \n  if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00067960(undefined4 param_1,int *param_2,size_t param_3,void *param_4)\n\n{\n  int iVar1;\n  \n  if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00067960(undefined4 param_1,int *param_2,size_t param_3,void *param_4)" identifier (parameter_list "(undefined4 param_1,int *param_2,size_t param_3,void *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "void *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }" { (expression_statement "iVar1 = param_2[1];" (assignment_expression "iVar1 = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (if_statement "if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }" if (parenthesized_expression "((uint)param_2[2] < iVar1 + param_3)" ( (binary_expression "(uint)param_2[2] < iVar1 + param_3" (cast_expression "(uint)param_2[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_2[2]" identifier [ number_literal ])) < (binary_expression "iVar1 + param_3" identifier + identifier)) )) (compound_statement "{\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }" { (expression_statement "iVar1 = FUN_000678b0(iVar1 + param_3);" (assignment_expression "iVar1 = FUN_000678b0(iVar1 + param_3)" identifier = (call_expression "FUN_000678b0(iVar1 + param_3)" identifier (argument_list "(iVar1 + param_3)" ( (binary_expression "iVar1 + param_3" identifier + identifier) )))) ;) (if_statement "if (iVar1 != 0) {\n        return;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "iVar1 = param_2[1];" (assignment_expression "iVar1 = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) })) (expression_statement "memcpy((void *)(iVar1 + *param_2),param_4,param_3);" (call_expression "memcpy((void *)(iVar1 + *param_2),param_4,param_3)" identifier (argument_list "((void *)(iVar1 + *param_2),param_4,param_3)" ( (cast_expression "(void *)(iVar1 + *param_2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + *param_2)" ( (binary_expression "iVar1 + *param_2" identifier + (pointer_expression "*param_2" * identifier)) ))) , identifier , identifier ))) ;) (expression_statement "param_2[1] = param_2[1] + param_3;" (assignment_expression "param_2[1] = param_2[1] + param_3" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "param_2[1] + param_3" (subscript_expression "param_2[1]" identifier [ number_literal ]) + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < (binary_expression IDENT + IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * IDENT)) ))) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00067960(undefined4 param_1,int *param_2,size_t param_3,void *param_4)\n\n{\n  int iVar1;\n  \n  if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00067960(undefined4 param_1,int *param_2,size_t param_3,void *param_4)" (identifier "FUN_00067960") (parameter_list "(undefined4 param_1,int *param_2,size_t param_3,void *param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "size_t param_3" (primitive_type "size_t") (identifier "param_3")) (, ",") (parameter_declaration "void *param_4" (primitive_type "void") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if (param_3 != 0) {\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = param_2[1];\n    if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }\n    memcpy((void *)(iVar1 + *param_2),param_4,param_3);\n    param_2[1] = param_2[1] + param_3;\n  }" ({ "{") (expression_statement "iVar1 = param_2[1];" (assignment_expression "iVar1 = param_2[1]" (identifier "iVar1") (= "=") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if ((uint)param_2[2] < iVar1 + param_3) {\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }" (if "if") (parenthesized_expression "((uint)param_2[2] < iVar1 + param_3)" (( "(") (binary_expression "(uint)param_2[2] < iVar1 + param_3" (cast_expression "(uint)param_2[2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]"))) (< "<") (binary_expression "iVar1 + param_3" (identifier "iVar1") (+ "+") (identifier "param_3"))) () ")")) (compound_statement "{\n      iVar1 = FUN_000678b0(iVar1 + param_3);\n      if (iVar1 != 0) {\n        return;\n      }\n      iVar1 = param_2[1];\n    }" ({ "{") (expression_statement "iVar1 = FUN_000678b0(iVar1 + param_3);" (assignment_expression "iVar1 = FUN_000678b0(iVar1 + param_3)" (identifier "iVar1") (= "=") (call_expression "FUN_000678b0(iVar1 + param_3)" (identifier "FUN_000678b0") (argument_list "(iVar1 + param_3)" (( "(") (binary_expression "iVar1 + param_3" (identifier "iVar1") (+ "+") (identifier "param_3")) () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n        return;\n      }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar1 = param_2[1];" (assignment_expression "iVar1 = param_2[1]" (identifier "iVar1") (= "=") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (; ";")) (} "}"))) (expression_statement "memcpy((void *)(iVar1 + *param_2),param_4,param_3);" (call_expression "memcpy((void *)(iVar1 + *param_2),param_4,param_3)" (identifier "memcpy") (argument_list "((void *)(iVar1 + *param_2),param_4,param_3)" (( "(") (cast_expression "(void *)(iVar1 + *param_2)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + *param_2)" (( "(") (binary_expression "iVar1 + *param_2" (identifier "iVar1") (+ "+") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) () ")"))) (, ",") (identifier "param_4") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "param_2[1] = param_2[1] + param_3;" (assignment_expression "param_2[1] = param_2[1] + param_3" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_2[1] + param_3" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "param_3"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(int *pRc,type_1 *pBuf,type_2 var_1,type_3 *pData)

{
  int var_2;
  
  if (var_1 != 0) {
    var_2 = pBuf->n;
    if ((type_1 *)pBuf->nSpace < (type_1 *)(var_2 + var_1)) {
      var_2 = var_3(pRc,pBuf,(type_2)&pBuf->nSpace,(type_1 *)(var_2 + var_1));
      if (var_2 != 0) {
        return;
      }
      var_2 = pBuf->n;
    }
    var_4(pBuf->p + var_2,pData,var_1);
    pBuf->n = pBuf->n + var_1;
  }
  return;
}


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

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

void __regparm3 MASKED(undefined4 param_1,int *param_2,size_t param_3,void *param_4)

{
  int iVar1;
  
  if (param_3 != 0) {
    iVar1 = param_2[1];
    if ((uint)param_2[2] < iVar1 + param_3) {
      iVar1 = FUN_000678b0(iVar1 + param_3);
      if (iVar1 != 0) {
        return;
      }
      iVar1 = param_2[1];
    }
    memcpy((void *)(iVar1 + *param_2),param_4,param_3);
    param_2[1] = param_2[1] + param_3;
  }
  return;
}

