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

void bufchain_clear(bufchain *ch)

{
  bufchain_granule *__ptr;
  
  __ptr = ch->head;
  while (__ptr != (bufchain_granule *)0x0) {
    ch->head = __ptr->next;
    free(__ptr);
    __ptr = ch->head;
  }
  ch->tail = (bufchain_granule *)0x0;
  ch->buffersize = 0;
  return;
}



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

void FUN_00032650(undefined4 *param_1)

{
  undefined4 *__ptr;
  
  __ptr = (undefined4 *)*param_1;
  while (__ptr != (undefined4 *)0x0) {
    *param_1 = *__ptr;
    free(__ptr);
    __ptr = (undefined4 *)*param_1;
  }
  param_1[1] = 0;
  param_1[2] = 0;
  return;
}


PUSH ESI
PUSH EBX
CALL 0x0001c520
ADD EBX,0x1080f9
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [ESI]
TEST EAX,EAX
JZ 0x00032686
LEA ESI,[ESI]
MOV EDX,dword ptr [EAX]
SUB ESP,0xc
MOV dword ptr [ESI],EDX
PUSH EAX
CALL 0x0001b400
MOV EAX,dword ptr [ESI]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00032670
MOV dword ptr [ESI + 0x4],0x0
MOV dword ptr [ESI + 0x8],0x0
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00032650(undefined4 *param_1)\n\n{\n  undefined4 *__ptr;\n  \n  __ptr = (undefined4 *)*param_1;\n  while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }\n  param_1[1] = 0;\n  param_1[2] = 0;\n  return;\n}\n\n" comment (function_definition "void FUN_00032650(undefined4 *param_1)\n\n{\n  undefined4 *__ptr;\n  \n  __ptr = (undefined4 *)*param_1;\n  while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }\n  param_1[1] = 0;\n  param_1[2] = 0;\n  return;\n}" primitive_type (function_declarator "FUN_00032650(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 *__ptr;\n  \n  __ptr = (undefined4 *)*param_1;\n  while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }\n  param_1[1] = 0;\n  param_1[2] = 0;\n  return;\n}" { (declaration "undefined4 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (expression_statement "__ptr = (undefined4 *)*param_1;" (assignment_expression "__ptr = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (while_statement "while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }" while (parenthesized_expression "(__ptr != (undefined4 *)0x0)" ( (binary_expression "__ptr != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }" { (expression_statement "*param_1 = *__ptr;" (assignment_expression "*param_1 = *__ptr" (pointer_expression "*param_1" * identifier) = (pointer_expression "*__ptr" * identifier)) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "__ptr = (undefined4 *)*param_1;" (assignment_expression "__ptr = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[2] = 0;" (assignment_expression "param_1[2] = 0" (subscript_expression "param_1[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid bufchain_clear(bufchain *ch)\n\n{\n  bufchain_granule *__ptr;\n  \n  __ptr = ch->head;\n  while (__ptr != (bufchain_granule *)0x0) {\n    ch->head = __ptr->next;\n    free(__ptr);\n    __ptr = ch->head;\n  }\n  ch->tail = (bufchain_granule *)0x0;\n  ch->buffersize = 0;\n  return;\n}\n\n" comment comment (function_definition "void bufchain_clear(bufchain *ch)\n\n{\n  bufchain_granule *__ptr;\n  \n  __ptr = ch->head;\n  while (__ptr != (bufchain_granule *)0x0) {\n    ch->head = __ptr->next;\n    free(__ptr);\n    __ptr = ch->head;\n  }\n  ch->tail = (bufchain_granule *)0x0;\n  ch->buffersize = 0;\n  return;\n}" primitive_type (function_declarator "bufchain_clear(bufchain *ch)" identifier (parameter_list "(bufchain *ch)" ( (parameter_declaration "bufchain *ch" type_identifier (pointer_declarator "*ch" * identifier)) ))) (compound_statement "{\n  bufchain_granule *__ptr;\n  \n  __ptr = ch->head;\n  while (__ptr != (bufchain_granule *)0x0) {\n    ch->head = __ptr->next;\n    free(__ptr);\n    __ptr = ch->head;\n  }\n  ch->tail = (bufchain_granule *)0x0;\n  ch->buffersize = 0;\n  return;\n}" { (declaration "bufchain_granule *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (expression_statement "__ptr = ch->head;" (assignment_expression "__ptr = ch->head" identifier = (field_expression "ch->head" identifier -> field_identifier)) ;) (while_statement "while (__ptr != (bufchain_granule *)0x0) {\n    ch->head = __ptr->next;\n    free(__ptr);\n    __ptr = ch->head;\n  }" while (parenthesized_expression "(__ptr != (bufchain_granule *)0x0)" ( (binary_expression "__ptr != (bufchain_granule *)0x0" identifier != (cast_expression "(bufchain_granule *)0x0" ( (type_descriptor "bufchain_granule *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ch->head = __ptr->next;\n    free(__ptr);\n    __ptr = ch->head;\n  }" { (expression_statement "ch->head = __ptr->next;" (assignment_expression "ch->head = __ptr->next" (field_expression "ch->head" identifier -> field_identifier) = (field_expression "__ptr->next" identifier -> field_identifier)) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "__ptr = ch->head;" (assignment_expression "__ptr = ch->head" identifier = (field_expression "ch->head" identifier -> field_identifier)) ;) })) (expression_statement "ch->tail = (bufchain_granule *)0x0;" (assignment_expression "ch->tail = (bufchain_granule *)0x0" (field_expression "ch->tail" identifier -> field_identifier) = (cast_expression "(bufchain_granule *)0x0" ( (type_descriptor "bufchain_granule *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ch->buffersize = 0;" (assignment_expression "ch->buffersize = 0" (field_expression "ch->buffersize" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00032650(undefined4 *param_1)\n\n{\n  undefined4 *__ptr;\n  \n  __ptr = (undefined4 *)*param_1;\n  while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }\n  param_1[1] = 0;\n  param_1[2] = 0;\n  return;\n}\n\n" (function_definition "void FUN_00032650(undefined4 *param_1)\n\n{\n  undefined4 *__ptr;\n  \n  __ptr = (undefined4 *)*param_1;\n  while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }\n  param_1[1] = 0;\n  param_1[2] = 0;\n  return;\n}" primitive_type (function_declarator "FUN_00032650(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 *__ptr;\n  \n  __ptr = (undefined4 *)*param_1;\n  while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }\n  param_1[1] = 0;\n  param_1[2] = 0;\n  return;\n}" { (declaration "undefined4 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (expression_statement "__ptr = (undefined4 *)*param_1;" (assignment_expression "__ptr = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (while_statement "while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }" while (parenthesized_expression "(__ptr != (undefined4 *)0x0)" ( (binary_expression "__ptr != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }" { (expression_statement "*param_1 = *__ptr;" (assignment_expression "*param_1 = *__ptr" (pointer_expression "*param_1" * identifier) = (pointer_expression "*__ptr" * identifier)) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "__ptr = (undefined4 *)*param_1;" (assignment_expression "__ptr = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[2] = 0;" (assignment_expression "param_1[2] = 0" (subscript_expression "param_1[2]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_00032650(undefined4 *param_1)\n\n{\n  undefined4 *__ptr;\n  \n  __ptr = (undefined4 *)*param_1;\n  while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }\n  param_1[1] = 0;\n  param_1[2] = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00032650(undefined4 *param_1)" (identifier "FUN_00032650") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined4 *__ptr;\n  \n  __ptr = (undefined4 *)*param_1;\n  while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }\n  param_1[1] = 0;\n  param_1[2] = 0;\n  return;\n}" ({ "{") (declaration "undefined4 *__ptr;" (type_identifier "undefined4") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (expression_statement "__ptr = (undefined4 *)*param_1;" (assignment_expression "__ptr = (undefined4 *)*param_1" (identifier "__ptr") (= "=") (cast_expression "(undefined4 *)*param_1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (while_statement "while (__ptr != (undefined4 *)0x0) {\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }" (while "while") (parenthesized_expression "(__ptr != (undefined4 *)0x0)" (( "(") (binary_expression "__ptr != (undefined4 *)0x0" (identifier "__ptr") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *param_1 = *__ptr;\n    free(__ptr);\n    __ptr = (undefined4 *)*param_1;\n  }" ({ "{") (expression_statement "*param_1 = *__ptr;" (assignment_expression "*param_1 = *__ptr" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (pointer_expression "*__ptr" (* "*") (identifier "__ptr"))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (expression_statement "__ptr = (undefined4 *)*param_1;" (assignment_expression "__ptr = (undefined4 *)*param_1" (identifier "__ptr") (= "=") (cast_expression "(undefined4 *)*param_1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[2] = 0;" (assignment_expression "param_1[2] = 0" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *ch)

{
  type_2 *var_1;
  
  var_1 = ch->head;
  while (var_1 != (type_2 *)0x0) {
    ch->head = var_1->next;
    var_2(var_1);
    var_1 = ch->head;
  }
  ch->tail = (type_2 *)0x0;
  ch->buffersize = 0;
  return;
}


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

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

void MASKED(undefined4 *param_1)

{
  undefined4 *__ptr;
  
  __ptr = (undefined4 *)*param_1;
  while (__ptr != (undefined4 *)0x0) {
    *param_1 = *__ptr;
    free(__ptr);
    __ptr = (undefined4 *)*param_1;
  }
  param_1[1] = 0;
  param_1[2] = 0;
  return;
}

