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

void __regparm3 remember_Btype(work_stuff *work,char *start,int len,int index)

{
  int iVar1;
  void *__dest;
  
  __dest = xmalloc(len + 1);
  memcpy(__dest,start,len);
  iVar1 = work->options;
  *(undefined1 *)((int)__dest + len) = 0;
  *(void **)(iVar1 + index * 4) = __dest;
  return;
}



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

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

{
  int iVar1;
  void *__dest;
  
  __dest = (void *)FUN_0017e6b0(param_3 + 1);
  memcpy(__dest,param_2,param_3);
  iVar1 = *param_1;
  *(undefined1 *)((int)__dest + param_3) = 0;
  *(void **)(iVar1 + param_4 * 4) = __dest;
  return;
}


PUSH EBP
MOV EBP,EAX
LEA EAX,[ECX + 0x1]
PUSH EDI
MOV EDI,ECX
PUSH ESI
PUSH EBX
CALL 0x00032730
ADD EBX,0x19a5a0
SUB ESP,0x28
MOV dword ptr [ESP + 0x18],EDX
PUSH EAX
CALL 0x0017e6b0
ADD ESP,0xc
PUSH EDI
MOV EDX,dword ptr [ESP + 0x14]
MOV ESI,EAX
PUSH EDX
PUSH EAX
CALL 0x000265c0
MOV EAX,dword ptr [EBP]
MOV EDX,dword ptr [ESP + 0x40]
MOV byte ptr [ESI + EDI*0x1],0x0
MOV dword ptr [EAX + EDX*0x4],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_00167a50(int *param_1,void *param_2,size_t param_3,int param_4)\n\n{\n  int iVar1;\n  void *__dest;\n  \n  __dest = (void *)FUN_0017e6b0(param_3 + 1);\n  memcpy(__dest,param_2,param_3);\n  iVar1 = *param_1;\n  *(undefined1 *)((int)__dest + param_3) = 0;\n  *(void **)(iVar1 + param_4 * 4) = __dest;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00167a50(int *param_1,void *param_2,size_t param_3,int param_4)\n\n{\n  int iVar1;\n  void *__dest;\n  \n  __dest = (void *)FUN_0017e6b0(param_3 + 1);\n  memcpy(__dest,param_2,param_3);\n  iVar1 = *param_1;\n  *(undefined1 *)((int)__dest + param_3) = 0;\n  *(void **)(iVar1 + param_4 * 4) = __dest;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00167a50(int *param_1,void *param_2,size_t param_3,int param_4)" identifier (parameter_list "(int *param_1,void *param_2,size_t param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  void *__dest;\n  \n  __dest = (void *)FUN_0017e6b0(param_3 + 1);\n  memcpy(__dest,param_2,param_3);\n  iVar1 = *param_1;\n  *(undefined1 *)((int)__dest + param_3) = 0;\n  *(void **)(iVar1 + param_4 * 4) = __dest;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__dest = (void *)FUN_0017e6b0(param_3 + 1);" (assignment_expression "__dest = (void *)FUN_0017e6b0(param_3 + 1)" identifier = (cast_expression "(void *)FUN_0017e6b0(param_3 + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0017e6b0(param_3 + 1)" identifier (argument_list "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) ))))) ;) (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 "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * 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) ;) (expression_statement "*(void **)(iVar1 + param_4 * 4) = __dest;" (assignment_expression "*(void **)(iVar1 + param_4 * 4) = __dest" (pointer_expression "*(void **)(iVar1 + param_4 * 4)" * (cast_expression "(void **)(iVar1 + param_4 * 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + param_4 * 4)" ( (binary_expression "iVar1 + param_4 * 4" identifier + (binary_expression "param_4 * 4" 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 remember_Btype(work_stuff *work,char *start,int len,int index)\n\n{\n  int iVar1;\n  void *__dest;\n  \n  __dest = xmalloc(len + 1);\n  memcpy(__dest,start,len);\n  iVar1 = work->options;\n  *(undefined1 *)((int)__dest + len) = 0;\n  *(void **)(iVar1 + index * 4) = __dest;\n  return;\n}\n\n" comment (function_definition "void __regparm3 remember_Btype(work_stuff *work,char *start,int len,int index)\n\n{\n  int iVar1;\n  void *__dest;\n  \n  __dest = xmalloc(len + 1);\n  memcpy(__dest,start,len);\n  iVar1 = work->options;\n  *(undefined1 *)((int)__dest + len) = 0;\n  *(void **)(iVar1 + index * 4) = __dest;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "remember_Btype(work_stuff *work,char *start,int len,int index)" identifier (parameter_list "(work_stuff *work,char *start,int len,int index)" ( (parameter_declaration "work_stuff *work" type_identifier (pointer_declarator "*work" * identifier)) , (parameter_declaration "char *start" primitive_type (pointer_declarator "*start" * identifier)) , (parameter_declaration "int len" primitive_type identifier) , (parameter_declaration "int index" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  void *__dest;\n  \n  __dest = xmalloc(len + 1);\n  memcpy(__dest,start,len);\n  iVar1 = work->options;\n  *(undefined1 *)((int)__dest + len) = 0;\n  *(void **)(iVar1 + index * 4) = __dest;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__dest = xmalloc(len + 1);" (assignment_expression "__dest = xmalloc(len + 1)" identifier = (call_expression "xmalloc(len + 1)" identifier (argument_list "(len + 1)" ( (binary_expression "len + 1" identifier + number_literal) )))) ;) (expression_statement "memcpy(__dest,start,len);" (call_expression "memcpy(__dest,start,len)" identifier (argument_list "(__dest,start,len)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar1 = work->options;" (assignment_expression "iVar1 = work->options" identifier = (field_expression "work->options" identifier -> field_identifier)) ;) (expression_statement "*(undefined1 *)((int)__dest + len) = 0;" (assignment_expression "*(undefined1 *)((int)__dest + len) = 0" (pointer_expression "*(undefined1 *)((int)__dest + len)" * (cast_expression "(undefined1 *)((int)__dest + len)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__dest + len)" ( (binary_expression "(int)__dest + len" (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "*(void **)(iVar1 + index * 4) = __dest;" (assignment_expression "*(void **)(iVar1 + index * 4) = __dest" (pointer_expression "*(void **)(iVar1 + index * 4)" * (cast_expression "(void **)(iVar1 + index * 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + index * 4)" ( (binary_expression "iVar1 + index * 4" identifier + (binary_expression "index * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00167a50(int *param_1,void *param_2,size_t param_3,int param_4)\n\n{\n  int iVar1;\n  void *__dest;\n  \n  __dest = (void *)FUN_0017e6b0(param_3 + 1);\n  memcpy(__dest,param_2,param_3);\n  iVar1 = *param_1;\n  *(undefined1 *)((int)__dest + param_3) = 0;\n  *(void **)(iVar1 + param_4 * 4) = __dest;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00167a50(int *param_1,void *param_2,size_t param_3,int param_4)\n\n{\n  int iVar1;\n  void *__dest;\n  \n  __dest = (void *)FUN_0017e6b0(param_3 + 1);\n  memcpy(__dest,param_2,param_3);\n  iVar1 = *param_1;\n  *(undefined1 *)((int)__dest + param_3) = 0;\n  *(void **)(iVar1 + param_4 * 4) = __dest;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00167a50(int *param_1,void *param_2,size_t param_3,int param_4)" identifier (parameter_list "(int *param_1,void *param_2,size_t param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  void *__dest;\n  \n  __dest = (void *)FUN_0017e6b0(param_3 + 1);\n  memcpy(__dest,param_2,param_3);\n  iVar1 = *param_1;\n  *(undefined1 *)((int)__dest + param_3) = 0;\n  *(void **)(iVar1 + param_4 * 4) = __dest;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__dest = (void *)FUN_0017e6b0(param_3 + 1);" (assignment_expression "__dest = (void *)FUN_0017e6b0(param_3 + 1)" identifier = (cast_expression "(void *)FUN_0017e6b0(param_3 + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0017e6b0(param_3 + 1)" identifier (argument_list "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) ))))) ;) (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 "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * 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) ;) (expression_statement "*(void **)(iVar1 + param_4 * 4) = __dest;" (assignment_expression "*(void **)(iVar1 + param_4 * 4) = __dest" (pointer_expression "*(void **)(iVar1 + param_4 * 4)" * (cast_expression "(void **)(iVar1 + param_4 * 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + param_4 * 4)" ( (binary_expression "iVar1 + param_4 * 4" identifier + (binary_expression "param_4 * 4" identifier * number_literal)) )))) = identifier) ;) (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)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * 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) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00167a50(int *param_1,void *param_2,size_t param_3,int param_4)\n\n{\n  int iVar1;\n  void *__dest;\n  \n  __dest = (void *)FUN_0017e6b0(param_3 + 1);\n  memcpy(__dest,param_2,param_3);\n  iVar1 = *param_1;\n  *(undefined1 *)((int)__dest + param_3) = 0;\n  *(void **)(iVar1 + param_4 * 4) = __dest;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00167a50(int *param_1,void *param_2,size_t param_3,int param_4)" (identifier "FUN_00167a50") (parameter_list "(int *param_1,void *param_2,size_t param_3,int param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (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")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  void *__dest;\n  \n  __dest = (void *)FUN_0017e6b0(param_3 + 1);\n  memcpy(__dest,param_2,param_3);\n  iVar1 = *param_1;\n  *(undefined1 *)((int)__dest + param_3) = 0;\n  *(void **)(iVar1 + param_4 * 4) = __dest;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (expression_statement "__dest = (void *)FUN_0017e6b0(param_3 + 1);" (assignment_expression "__dest = (void *)FUN_0017e6b0(param_3 + 1)" (identifier "__dest") (= "=") (cast_expression "(void *)FUN_0017e6b0(param_3 + 1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0017e6b0(param_3 + 1)" (identifier "FUN_0017e6b0") (argument_list "(param_3 + 1)" (( "(") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (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 "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (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")) (; ";")) (expression_statement "*(void **)(iVar1 + param_4 * 4) = __dest;" (assignment_expression "*(void **)(iVar1 + param_4 * 4) = __dest" (pointer_expression "*(void **)(iVar1 + param_4 * 4)" (* "*") (cast_expression "(void **)(iVar1 + param_4 * 4)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar1 + param_4 * 4)" (( "(") (binary_expression "iVar1 + param_4 * 4" (identifier "iVar1") (+ "+") (binary_expression "param_4 * 4" (identifier "param_4") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "__dest")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *work,char *start,int var_2,int var_5)

{
  int var_4;
  void *__dest;
  
  __dest = var_1(var_2 + 1);
  var_3(__dest,start,var_2);
  var_4 = work->options;
  *(type_2 *)((int)__dest + var_2) = 0;
  *(void **)(var_4 + var_5 * 4) = __dest;
  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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (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))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (identifier))) (return_statement))))

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

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

{
  int iVar1;
  void *__dest;
  
  __dest = (void *)FUN_0017e6b0(param_3 + 1);
  memcpy(__dest,param_2,param_3);
  iVar1 = *param_1;
  *(undefined1 *)((int)__dest + param_3) = 0;
  *(void **)(iVar1 + param_4 * 4) = __dest;
  return;
}

