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

void __regparm3 fts_lfree(FTSENT *head)

{
  _ftsent *p_Var1;
  
  if (head != (FTSENT *)0x0) {
    do {
      p_Var1 = head->fts_link;
      if ((DIR *)head->fts_dirp != (DIR *)0x0) {
        closedir((DIR *)head->fts_dirp);
      }
      free(head);
      head = p_Var1;
    } while (p_Var1 != (_ftsent *)0x0);
  }
  return;
}



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

void __regparm3 FUN_00018960(void *param_1)

{
  void *pvVar1;
  
  if (param_1 != (void *)0x0) {
    do {
      pvVar1 = *(void **)((int)param_1 + 8);
      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {
        closedir(*(DIR **)((int)param_1 + 0xc));
      }
      free(param_1);
      param_1 = pvVar1;
    } while (pvVar1 != (void *)0x0);
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00012a00
ADD EBX,0xb698
TEST EAX,EAX
JZ 0x000189a0
MOV ESI,EAX
LEA ESI,[ESI]
MOV EAX,dword ptr [ESI + 0xc]
MOV EDI,dword ptr [ESI + 0x8]
TEST EAX,EAX
JZ 0x0001898e
SUB ESP,0xc
PUSH EAX
CALL 0x00012520
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
MOV ESI,EDI
CALL 0x00012590
ADD ESP,0x10
TEST EDI,EDI
JNZ 0x00018978
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00018960(void *param_1)\n\n{\n  void *pvVar1;\n  \n  if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00018960(void *param_1)\n\n{\n  void *pvVar1;\n  \n  if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00018960(void *param_1)" identifier (parameter_list "(void *param_1)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  \n  if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (if_statement "if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" if (parenthesized_expression "(param_1 != (void *)0x0)" ( (binary_expression "param_1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" { (do_statement "do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);" do (compound_statement "{\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    }" { (expression_statement "pvVar1 = *(void **)((int)param_1 + 8);" (assignment_expression "pvVar1 = *(void **)((int)param_1 + 8)" identifier = (pointer_expression "*(void **)((int)param_1 + 8)" * (cast_expression "(void **)((int)param_1 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 8)" ( (binary_expression "(int)param_1 + 8" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (if_statement "if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }" if (parenthesized_expression "(*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0)" ( (binary_expression "*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0" (pointer_expression "*(DIR **)((int)param_1 + 0xc)" * (cast_expression "(DIR **)((int)param_1 + 0xc)" ( (type_descriptor "DIR **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0xc)" ( (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(DIR *)0x0" ( (type_descriptor "DIR *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }" { (expression_statement "closedir(*(DIR **)((int)param_1 + 0xc));" (call_expression "closedir(*(DIR **)((int)param_1 + 0xc))" identifier (argument_list "(*(DIR **)((int)param_1 + 0xc))" ( (pointer_expression "*(DIR **)((int)param_1 + 0xc)" * (cast_expression "(DIR **)((int)param_1 + 0xc)" ( (type_descriptor "DIR **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0xc)" ( (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "param_1 = pvVar1;" (assignment_expression "param_1 = pvVar1" identifier = identifier) ;) }) while (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) 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 fts_lfree(FTSENT *head)\n\n{\n  _ftsent *p_Var1;\n  \n  if (head != (FTSENT *)0x0) {\n    do {\n      p_Var1 = head->fts_link;\n      if ((DIR *)head->fts_dirp != (DIR *)0x0) {\n        closedir((DIR *)head->fts_dirp);\n      }\n      free(head);\n      head = p_Var1;\n    } while (p_Var1 != (_ftsent *)0x0);\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 fts_lfree(FTSENT *head)\n\n{\n  _ftsent *p_Var1;\n  \n  if (head != (FTSENT *)0x0) {\n    do {\n      p_Var1 = head->fts_link;\n      if ((DIR *)head->fts_dirp != (DIR *)0x0) {\n        closedir((DIR *)head->fts_dirp);\n      }\n      free(head);\n      head = p_Var1;\n    } while (p_Var1 != (_ftsent *)0x0);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "fts_lfree(FTSENT *head)" identifier (parameter_list "(FTSENT *head)" ( (parameter_declaration "FTSENT *head" type_identifier (pointer_declarator "*head" * identifier)) ))) (compound_statement "{\n  _ftsent *p_Var1;\n  \n  if (head != (FTSENT *)0x0) {\n    do {\n      p_Var1 = head->fts_link;\n      if ((DIR *)head->fts_dirp != (DIR *)0x0) {\n        closedir((DIR *)head->fts_dirp);\n      }\n      free(head);\n      head = p_Var1;\n    } while (p_Var1 != (_ftsent *)0x0);\n  }\n  return;\n}" { (declaration "_ftsent *p_Var1;" type_identifier (pointer_declarator "*p_Var1" * identifier) ;) (if_statement "if (head != (FTSENT *)0x0) {\n    do {\n      p_Var1 = head->fts_link;\n      if ((DIR *)head->fts_dirp != (DIR *)0x0) {\n        closedir((DIR *)head->fts_dirp);\n      }\n      free(head);\n      head = p_Var1;\n    } while (p_Var1 != (_ftsent *)0x0);\n  }" if (parenthesized_expression "(head != (FTSENT *)0x0)" ( (binary_expression "head != (FTSENT *)0x0" identifier != (cast_expression "(FTSENT *)0x0" ( (type_descriptor "FTSENT *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      p_Var1 = head->fts_link;\n      if ((DIR *)head->fts_dirp != (DIR *)0x0) {\n        closedir((DIR *)head->fts_dirp);\n      }\n      free(head);\n      head = p_Var1;\n    } while (p_Var1 != (_ftsent *)0x0);\n  }" { (do_statement "do {\n      p_Var1 = head->fts_link;\n      if ((DIR *)head->fts_dirp != (DIR *)0x0) {\n        closedir((DIR *)head->fts_dirp);\n      }\n      free(head);\n      head = p_Var1;\n    } while (p_Var1 != (_ftsent *)0x0);" do (compound_statement "{\n      p_Var1 = head->fts_link;\n      if ((DIR *)head->fts_dirp != (DIR *)0x0) {\n        closedir((DIR *)head->fts_dirp);\n      }\n      free(head);\n      head = p_Var1;\n    }" { (expression_statement "p_Var1 = head->fts_link;" (assignment_expression "p_Var1 = head->fts_link" identifier = (field_expression "head->fts_link" identifier -> field_identifier)) ;) (if_statement "if ((DIR *)head->fts_dirp != (DIR *)0x0) {\n        closedir((DIR *)head->fts_dirp);\n      }" if (parenthesized_expression "((DIR *)head->fts_dirp != (DIR *)0x0)" ( (binary_expression "(DIR *)head->fts_dirp != (DIR *)0x0" (cast_expression "(DIR *)head->fts_dirp" ( (type_descriptor "DIR *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "head->fts_dirp" identifier -> field_identifier)) != (cast_expression "(DIR *)0x0" ( (type_descriptor "DIR *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        closedir((DIR *)head->fts_dirp);\n      }" { (expression_statement "closedir((DIR *)head->fts_dirp);" (call_expression "closedir((DIR *)head->fts_dirp)" identifier (argument_list "((DIR *)head->fts_dirp)" ( (cast_expression "(DIR *)head->fts_dirp" ( (type_descriptor "DIR *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "head->fts_dirp" identifier -> field_identifier)) ))) ;) })) (expression_statement "free(head);" (call_expression "free(head)" identifier (argument_list "(head)" ( identifier ))) ;) (expression_statement "head = p_Var1;" (assignment_expression "head = p_Var1" identifier = identifier) ;) }) while (parenthesized_expression "(p_Var1 != (_ftsent *)0x0)" ( (binary_expression "p_Var1 != (_ftsent *)0x0" identifier != (cast_expression "(_ftsent *)0x0" ( (type_descriptor "_ftsent *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00018960(void *param_1)\n\n{\n  void *pvVar1;\n  \n  if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00018960(void *param_1)\n\n{\n  void *pvVar1;\n  \n  if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00018960(void *param_1)" identifier (parameter_list "(void *param_1)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  \n  if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (if_statement "if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" if (parenthesized_expression "(param_1 != (void *)0x0)" ( (binary_expression "param_1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" { (do_statement "do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);" do (compound_statement "{\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    }" { (expression_statement "pvVar1 = *(void **)((int)param_1 + 8);" (assignment_expression "pvVar1 = *(void **)((int)param_1 + 8)" identifier = (pointer_expression "*(void **)((int)param_1 + 8)" * (cast_expression "(void **)((int)param_1 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 8)" ( (binary_expression "(int)param_1 + 8" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (if_statement "if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }" if (parenthesized_expression "(*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0)" ( (binary_expression "*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0" (pointer_expression "*(DIR **)((int)param_1 + 0xc)" * (cast_expression "(DIR **)((int)param_1 + 0xc)" ( (type_descriptor "DIR **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0xc)" ( (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(DIR *)0x0" ( (type_descriptor "DIR *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }" { (expression_statement "closedir(*(DIR **)((int)param_1 + 0xc));" (call_expression "closedir(*(DIR **)((int)param_1 + 0xc))" identifier (argument_list "(*(DIR **)((int)param_1 + 0xc))" ( (pointer_expression "*(DIR **)((int)param_1 + 0xc)" * (cast_expression "(DIR **)((int)param_1 + 0xc)" ( (type_descriptor "DIR **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0xc)" ( (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "param_1 = pvVar1;" (assignment_expression "param_1 = pvVar1" identifier = identifier) ;) }) while (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00018960(void *param_1)\n\n{\n  void *pvVar1;\n  \n  if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00018960(void *param_1)" (identifier "FUN_00018960") (parameter_list "(void *param_1)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  void *pvVar1;\n  \n  if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return;\n}" ({ "{") (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (if_statement "if (param_1 != (void *)0x0) {\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" (if "if") (parenthesized_expression "(param_1 != (void *)0x0)" (( "(") (binary_expression "param_1 != (void *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" ({ "{") (do_statement "do {\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    } while (pvVar1 != (void *)0x0);" (do "do") (compound_statement "{\n      pvVar1 = *(void **)((int)param_1 + 8);\n      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }\n      free(param_1);\n      param_1 = pvVar1;\n    }" ({ "{") (expression_statement "pvVar1 = *(void **)((int)param_1 + 8);" (assignment_expression "pvVar1 = *(void **)((int)param_1 + 8)" (identifier "pvVar1") (= "=") (pointer_expression "*(void **)((int)param_1 + 8)" (* "*") (cast_expression "(void **)((int)param_1 + 8)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 8)" (( "(") (binary_expression "(int)param_1 + 8" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }" (if "if") (parenthesized_expression "(*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0)" (( "(") (binary_expression "*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0" (pointer_expression "*(DIR **)((int)param_1 + 0xc)" (* "*") (cast_expression "(DIR **)((int)param_1 + 0xc)" (( "(") (type_descriptor "DIR **" (type_identifier "DIR") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 0xc)" (( "(") (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (cast_expression "(DIR *)0x0" (( "(") (type_descriptor "DIR *" (type_identifier "DIR") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        closedir(*(DIR **)((int)param_1 + 0xc));\n      }" ({ "{") (expression_statement "closedir(*(DIR **)((int)param_1 + 0xc));" (call_expression "closedir(*(DIR **)((int)param_1 + 0xc))" (identifier "closedir") (argument_list "(*(DIR **)((int)param_1 + 0xc))" (( "(") (pointer_expression "*(DIR **)((int)param_1 + 0xc)" (* "*") (cast_expression "(DIR **)((int)param_1 + 0xc)" (( "(") (type_descriptor "DIR **" (type_identifier "DIR") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 0xc)" (( "(") (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "free(param_1);" (call_expression "free(param_1)" (identifier "free") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "param_1 = pvVar1;" (assignment_expression "param_1 = pvVar1" (identifier "param_1") (= "=") (identifier "pvVar1")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pvVar1 != (void *)0x0)" (( "(") (binary_expression "pvVar1 != (void *)0x0" (identifier "pvVar1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}"))) (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 *var_1)

{
  type_2 *var_4;
  
  if (var_1 != (type_1 *)0x0) {
    do {
      var_4 = var_1->fts_link;
      if ((type_3 *)var_1->fts_dirp != (type_3 *)0x0) {
        var_2((type_3 *)var_1->fts_dirp);
      }
      var_3(var_1);
      var_1 = var_4;
    } while (var_4 != (type_2 *)0x0);
  }
  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))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))))) (return_statement))))

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

void __regparm3 MASKED(void *param_1)

{
  void *pvVar1;
  
  if (param_1 != (void *)0x0) {
    do {
      pvVar1 = *(void **)((int)param_1 + 8);
      if (*(DIR **)((int)param_1 + 0xc) != (DIR *)0x0) {
        closedir(*(DIR **)((int)param_1 + 0xc));
      }
      free(param_1);
      param_1 = pvVar1;
    } while (pvVar1 != (void *)0x0);
  }
  return;
}

