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

void __regparm3 fts3PoslistCopy(char **pp,char **ppPoslist)

{
  byte bVar1;
  byte *__src;
  char *__dest;
  byte bVar2;
  size_t __n;
  byte *pbVar3;
  
  __src = (byte *)*ppPoslist;
  bVar1 = *__src;
  pbVar3 = __src;
  if (bVar1 != 0) {
    do {
      pbVar3 = pbVar3 + 1;
      bVar2 = bVar1 & 0x80;
      bVar1 = *pbVar3;
    } while (bVar2 != 0 || *pbVar3 != 0);
  }
  __n = (int)(pbVar3 + 1) - (int)__src;
  __dest = *pp;
  memcpy(__dest,__src,__n);
  *pp = __dest + __n;
  *ppPoslist = (char *)(pbVar3 + 1);
  return;
}



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

void __regparm3 FUN_0003f320(int *param_1,undefined4 *param_2)

{
  byte bVar1;
  byte *__src;
  void *__dest;
  byte bVar2;
  size_t __n;
  byte *pbVar3;
  
  __src = (byte *)*param_2;
  bVar1 = *__src;
  pbVar3 = __src;
  if (bVar1 != 0) {
    do {
      pbVar3 = pbVar3 + 1;
      bVar2 = bVar1 & 0x80;
      bVar1 = *pbVar3;
    } while (bVar2 != 0 || *pbVar3 != 0);
  }
  __n = (int)(pbVar3 + 1) - (int)__src;
  __dest = (void *)*param_1;
  memcpy(__dest,__src,__n);
  *param_1 = (int)__dest + __n;
  *param_2 = pbVar3 + 1;
  return;
}


PUSH EBP
MOV EBP,EDX
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00017230
ADD EBX,0x13cafd
SUB ESP,0x1c
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [EDX]
MOVZX EDX,byte ptr [EAX]
MOV ESI,EAX
TEST DL,DL
JZ 0x0003f357
LEA ESI,[ESI]
NOP
ADD ESI,0x1
MOV ECX,EDX
MOVZX EDX,byte ptr [ESI]
AND ECX,0xffffff80
OR CL,DL
JNZ 0x0003f348
ADD ESI,0x1
MOV EDI,dword ptr [ESP + 0x8]
SUB ESP,0x4
MOV EDX,ESI
SUB EDX,EAX
MOV EDI,dword ptr [EDI]
PUSH EDX
MOV dword ptr [ESP + 0x14],EDX
PUSH EAX
PUSH EDI
CALL 0x00015130
MOV EDX,dword ptr [ESP + 0x1c]
MOV EAX,dword ptr [ESP + 0x18]
ADD EDI,EDX
MOV dword ptr [EAX],EDI
MOV dword ptr [EBP],ESI
ADD ESP,0x2c
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_0003f320(int *param_1,undefined4 *param_2)\n\n{\n  byte bVar1;\n  byte *__src;\n  void *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*param_2;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = (void *)*param_1;\n  memcpy(__dest,__src,__n);\n  *param_1 = (int)__dest + __n;\n  *param_2 = pbVar3 + 1;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_0003f320(int *param_1,undefined4 *param_2)\n\n{\n  byte bVar1;\n  byte *__src;\n  void *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*param_2;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = (void *)*param_1;\n  memcpy(__dest,__src,__n);\n  *param_1 = (int)__dest + __n;\n  *param_2 = pbVar3 + 1;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0003f320(int *param_1,undefined4 *param_2)" identifier (parameter_list "(int *param_1,undefined4 *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  byte *__src;\n  void *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*param_2;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = (void *)*param_1;\n  memcpy(__dest,__src,__n);\n  *param_1 = (int)__dest + __n;\n  *param_2 = pbVar3 + 1;\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte *__src;" type_identifier (pointer_declarator "*__src" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (expression_statement "__src = (byte *)*param_2;" (assignment_expression "__src = (byte *)*param_2" identifier = (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "bVar1 = *__src;" (assignment_expression "bVar1 = *__src" identifier = (pointer_expression "*__src" * identifier)) ;) (expression_statement "pbVar3 = __src;" (assignment_expression "pbVar3 = __src" identifier = identifier) ;) (if_statement "if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }" if (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }" { (do_statement "do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);" do (compound_statement "{\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    }" { (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "bVar2 = bVar1 & 0x80;" (assignment_expression "bVar2 = bVar1 & 0x80" identifier = (binary_expression "bVar1 & 0x80" identifier & number_literal)) ;) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) }) while (parenthesized_expression "(bVar2 != 0 || *pbVar3 != 0)" ( (binary_expression "bVar2 != 0 || *pbVar3 != 0" (binary_expression "bVar2 != 0" identifier != number_literal) || (binary_expression "*pbVar3 != 0" (pointer_expression "*pbVar3" * identifier) != number_literal)) )) ;) })) (expression_statement "__n = (int)(pbVar3 + 1) - (int)__src;" (assignment_expression "__n = (int)(pbVar3 + 1) - (int)__src" identifier = (binary_expression "(int)(pbVar3 + 1) - (int)__src" (cast_expression "(int)(pbVar3 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar3 + 1)" ( (binary_expression "pbVar3 + 1" identifier + number_literal) ))) - (cast_expression "(int)__src" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "__dest = (void *)*param_1;" (assignment_expression "__dest = (void *)*param_1" identifier = (cast_expression "(void *)*param_1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "memcpy(__dest,__src,__n);" (call_expression "memcpy(__dest,__src,__n)" identifier (argument_list "(__dest,__src,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "*param_1 = (int)__dest + __n;" (assignment_expression "*param_1 = (int)__dest + __n" (pointer_expression "*param_1" * identifier) = (binary_expression "(int)__dest + __n" (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier) + identifier)) ;) (expression_statement "*param_2 = pbVar3 + 1;" (assignment_expression "*param_2 = pbVar3 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 fts3PoslistCopy(char **pp,char **ppPoslist)\n\n{\n  byte bVar1;\n  byte *__src;\n  char *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*ppPoslist;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = *pp;\n  memcpy(__dest,__src,__n);\n  *pp = __dest + __n;\n  *ppPoslist = (char *)(pbVar3 + 1);\n  return;\n}\n\n" comment (function_definition "void __regparm3 fts3PoslistCopy(char **pp,char **ppPoslist)\n\n{\n  byte bVar1;\n  byte *__src;\n  char *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*ppPoslist;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = *pp;\n  memcpy(__dest,__src,__n);\n  *pp = __dest + __n;\n  *ppPoslist = (char *)(pbVar3 + 1);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "fts3PoslistCopy(char **pp,char **ppPoslist)" identifier (parameter_list "(char **pp,char **ppPoslist)" ( (parameter_declaration "char **pp" primitive_type (pointer_declarator "**pp" * (pointer_declarator "*pp" * identifier))) , (parameter_declaration "char **ppPoslist" primitive_type (pointer_declarator "**ppPoslist" * (pointer_declarator "*ppPoslist" * identifier))) ))) (compound_statement "{\n  byte bVar1;\n  byte *__src;\n  char *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*ppPoslist;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = *pp;\n  memcpy(__dest,__src,__n);\n  *pp = __dest + __n;\n  *ppPoslist = (char *)(pbVar3 + 1);\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte *__src;" type_identifier (pointer_declarator "*__src" * identifier) ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (expression_statement "__src = (byte *)*ppPoslist;" (assignment_expression "__src = (byte *)*ppPoslist" identifier = (cast_expression "(byte *)*ppPoslist" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*ppPoslist" * identifier))) ;) (expression_statement "bVar1 = *__src;" (assignment_expression "bVar1 = *__src" identifier = (pointer_expression "*__src" * identifier)) ;) (expression_statement "pbVar3 = __src;" (assignment_expression "pbVar3 = __src" identifier = identifier) ;) (if_statement "if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }" if (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }" { (do_statement "do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);" do (compound_statement "{\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    }" { (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "bVar2 = bVar1 & 0x80;" (assignment_expression "bVar2 = bVar1 & 0x80" identifier = (binary_expression "bVar1 & 0x80" identifier & number_literal)) ;) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) }) while (parenthesized_expression "(bVar2 != 0 || *pbVar3 != 0)" ( (binary_expression "bVar2 != 0 || *pbVar3 != 0" (binary_expression "bVar2 != 0" identifier != number_literal) || (binary_expression "*pbVar3 != 0" (pointer_expression "*pbVar3" * identifier) != number_literal)) )) ;) })) (expression_statement "__n = (int)(pbVar3 + 1) - (int)__src;" (assignment_expression "__n = (int)(pbVar3 + 1) - (int)__src" identifier = (binary_expression "(int)(pbVar3 + 1) - (int)__src" (cast_expression "(int)(pbVar3 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar3 + 1)" ( (binary_expression "pbVar3 + 1" identifier + number_literal) ))) - (cast_expression "(int)__src" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "__dest = *pp;" (assignment_expression "__dest = *pp" identifier = (pointer_expression "*pp" * identifier)) ;) (expression_statement "memcpy(__dest,__src,__n);" (call_expression "memcpy(__dest,__src,__n)" identifier (argument_list "(__dest,__src,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "*pp = __dest + __n;" (assignment_expression "*pp = __dest + __n" (pointer_expression "*pp" * identifier) = (binary_expression "__dest + __n" identifier + identifier)) ;) (expression_statement "*ppPoslist = (char *)(pbVar3 + 1);" (assignment_expression "*ppPoslist = (char *)(pbVar3 + 1)" (pointer_expression "*ppPoslist" * identifier) = (cast_expression "(char *)(pbVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pbVar3 + 1)" ( (binary_expression "pbVar3 + 1" identifier + number_literal) )))) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0003f320(int *param_1,undefined4 *param_2)\n\n{\n  byte bVar1;\n  byte *__src;\n  void *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*param_2;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = (void *)*param_1;\n  memcpy(__dest,__src,__n);\n  *param_1 = (int)__dest + __n;\n  *param_2 = pbVar3 + 1;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0003f320(int *param_1,undefined4 *param_2)\n\n{\n  byte bVar1;\n  byte *__src;\n  void *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*param_2;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = (void *)*param_1;\n  memcpy(__dest,__src,__n);\n  *param_1 = (int)__dest + __n;\n  *param_2 = pbVar3 + 1;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0003f320(int *param_1,undefined4 *param_2)" identifier (parameter_list "(int *param_1,undefined4 *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  byte *__src;\n  void *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*param_2;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = (void *)*param_1;\n  memcpy(__dest,__src,__n);\n  *param_1 = (int)__dest + __n;\n  *param_2 = pbVar3 + 1;\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte *__src;" type_identifier (pointer_declarator "*__src" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (expression_statement "__src = (byte *)*param_2;" (assignment_expression "__src = (byte *)*param_2" identifier = (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "bVar1 = *__src;" (assignment_expression "bVar1 = *__src" identifier = (pointer_expression "*__src" * identifier)) ;) (expression_statement "pbVar3 = __src;" (assignment_expression "pbVar3 = __src" identifier = identifier) ;) (if_statement "if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }" if (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }" { (do_statement "do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);" do (compound_statement "{\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    }" { (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "bVar2 = bVar1 & 0x80;" (assignment_expression "bVar2 = bVar1 & 0x80" identifier = (binary_expression "bVar1 & 0x80" identifier & number_literal)) ;) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) }) while (parenthesized_expression "(bVar2 != 0 || *pbVar3 != 0)" ( (binary_expression "bVar2 != 0 || *pbVar3 != 0" (binary_expression "bVar2 != 0" identifier != number_literal) || (binary_expression "*pbVar3 != 0" (pointer_expression "*pbVar3" * identifier) != number_literal)) )) ;) })) (expression_statement "__n = (int)(pbVar3 + 1) - (int)__src;" (assignment_expression "__n = (int)(pbVar3 + 1) - (int)__src" identifier = (binary_expression "(int)(pbVar3 + 1) - (int)__src" (cast_expression "(int)(pbVar3 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar3 + 1)" ( (binary_expression "pbVar3 + 1" identifier + number_literal) ))) - (cast_expression "(int)__src" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "__dest = (void *)*param_1;" (assignment_expression "__dest = (void *)*param_1" identifier = (cast_expression "(void *)*param_1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "memcpy(__dest,__src,__n);" (call_expression "memcpy(__dest,__src,__n)" identifier (argument_list "(__dest,__src,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "*param_1 = (int)__dest + __n;" (assignment_expression "*param_1 = (int)__dest + __n" (pointer_expression "*param_1" * identifier) = (binary_expression "(int)__dest + __n" (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier) + identifier)) ;) (expression_statement "*param_2 = pbVar3 + 1;" (assignment_expression "*param_2 = pbVar3 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT != LIT) || (binary_expression (pointer_expression * IDENT) != LIT)) )) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0003f320(int *param_1,undefined4 *param_2)\n\n{\n  byte bVar1;\n  byte *__src;\n  void *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*param_2;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = (void *)*param_1;\n  memcpy(__dest,__src,__n);\n  *param_1 = (int)__dest + __n;\n  *param_2 = pbVar3 + 1;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003f320(int *param_1,undefined4 *param_2)" (identifier "FUN_0003f320") (parameter_list "(int *param_1,undefined4 *param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  byte bVar1;\n  byte *__src;\n  void *__dest;\n  byte bVar2;\n  size_t __n;\n  byte *pbVar3;\n  \n  __src = (byte *)*param_2;\n  bVar1 = *__src;\n  pbVar3 = __src;\n  if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }\n  __n = (int)(pbVar3 + 1) - (int)__src;\n  __dest = (void *)*param_1;\n  memcpy(__dest,__src,__n);\n  *param_1 = (int)__dest + __n;\n  *param_2 = pbVar3 + 1;\n  return;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "byte *__src;" (type_identifier "byte") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (expression_statement "__src = (byte *)*param_2;" (assignment_expression "__src = (byte *)*param_2" (identifier "__src") (= "=") (cast_expression "(byte *)*param_2" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "bVar1 = *__src;" (assignment_expression "bVar1 = *__src" (identifier "bVar1") (= "=") (pointer_expression "*__src" (* "*") (identifier "__src"))) (; ";")) (expression_statement "pbVar3 = __src;" (assignment_expression "pbVar3 = __src" (identifier "pbVar3") (= "=") (identifier "__src")) (; ";")) (if_statement "if (bVar1 != 0) {\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }" (if "if") (parenthesized_expression "(bVar1 != 0)" (( "(") (binary_expression "bVar1 != 0" (identifier "bVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);\n  }" ({ "{") (do_statement "do {\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    } while (bVar2 != 0 || *pbVar3 != 0);" (do "do") (compound_statement "{\n      pbVar3 = pbVar3 + 1;\n      bVar2 = bVar1 & 0x80;\n      bVar1 = *pbVar3;\n    }" ({ "{") (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "bVar2 = bVar1 & 0x80;" (assignment_expression "bVar2 = bVar1 & 0x80" (identifier "bVar2") (= "=") (binary_expression "bVar1 & 0x80" (identifier "bVar1") (& "&") (number_literal "0x80"))) (; ";")) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" (identifier "bVar1") (= "=") (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar2 != 0 || *pbVar3 != 0)" (( "(") (binary_expression "bVar2 != 0 || *pbVar3 != 0" (binary_expression "bVar2 != 0" (identifier "bVar2") (!= "!=") (number_literal "0")) (|| "||") (binary_expression "*pbVar3 != 0" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (!= "!=") (number_literal "0"))) () ")")) (; ";")) (} "}"))) (expression_statement "__n = (int)(pbVar3 + 1) - (int)__src;" (assignment_expression "__n = (int)(pbVar3 + 1) - (int)__src" (identifier "__n") (= "=") (binary_expression "(int)(pbVar3 + 1) - (int)__src" (cast_expression "(int)(pbVar3 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(pbVar3 + 1)" (( "(") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1")) () ")"))) (- "-") (cast_expression "(int)__src" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__src")))) (; ";")) (expression_statement "__dest = (void *)*param_1;" (assignment_expression "__dest = (void *)*param_1" (identifier "__dest") (= "=") (cast_expression "(void *)*param_1" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "memcpy(__dest,__src,__n);" (call_expression "memcpy(__dest,__src,__n)" (identifier "memcpy") (argument_list "(__dest,__src,__n)" (( "(") (identifier "__dest") (, ",") (identifier "__src") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "*param_1 = (int)__dest + __n;" (assignment_expression "*param_1 = (int)__dest + __n" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "(int)__dest + __n" (cast_expression "(int)__dest" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__dest")) (+ "+") (identifier "__n"))) (; ";")) (expression_statement "*param_2 = pbVar3 + 1;" (assignment_expression "*param_2 = pbVar3 + 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(char **pp,char **ppPoslist)

{
  type_1 var_1;
  type_1 *__src;
  char *var_5;
  type_1 var_3;
  size_t var_6;
  type_1 *var_2;
  
  __src = (type_1 *)*ppPoslist;
  var_1 = *__src;
  var_2 = __src;
  if (var_1 != 0) {
    do {
      var_2 = var_2 + 1;
      var_3 = var_1 & 0x80;
      var_1 = *var_2;
    } while (var_3 != 0 || *var_2 != 0);
  }
  var_6 = (int)(var_2 + 1) - (int)__src;
  var_5 = *pp;
  var_4(var_5,__src,var_6);
  *pp = var_5 + var_6;
  *ppPoslist = (char *)(var_2 + 1);
  return;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) (return_statement))))

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

void __regparm3 MASKED(int *param_1,undefined4 *param_2)

{
  byte bVar1;
  byte *__src;
  void *__dest;
  byte bVar2;
  size_t __n;
  byte *pbVar3;
  
  __src = (byte *)*param_2;
  bVar1 = *__src;
  pbVar3 = __src;
  if (bVar1 != 0) {
    do {
      pbVar3 = pbVar3 + 1;
      bVar2 = bVar1 & 0x80;
      bVar1 = *pbVar3;
    } while (bVar2 != 0 || *pbVar3 != 0);
  }
  __n = (int)(pbVar3 + 1) - (int)__src;
  __dest = (void *)*param_1;
  memcpy(__dest,__src,__n);
  *param_1 = (int)__dest + __n;
  *param_2 = pbVar3 + 1;
  return;
}

