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

void MHD_pool_destroy(MemoryPool *pool)

{
  if (pool != (MemoryPool *)0x0) {
    if (pool->is_mmap == 0) {
      free(pool->memory);
    }
    else {
      munmap(pool->memory,pool->size);
    }
    free(pool);
  }
  return;
}



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

void FUN_00020e70(undefined4 *param_1)

{
  if (param_1 != (undefined4 *)0x0) {
    if (param_1[4] == 0) {
      free((void *)*param_1);
    }
    else {
      munmap((void *)*param_1,param_1[1]);
    }
    free(param_1);
  }
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00013810
ADD EBX,0x12f69
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
TEST ESI,ESI
JZ 0x00020eac
MOV EDX,dword ptr [ESI + 0x10]
MOV EAX,dword ptr [ESI]
TEST EDX,EDX
JZ 0x00020eb8
SUB ESP,0x8
PUSH dword ptr [ESI + 0x4]
PUSH EAX
CALL 0x000135b0
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x000137d0
ADD ESP,0x10
ADD ESP,0x4
POP EBX
POP ESI
RET
SUB ESP,0xc
PUSH EAX
CALL 0x000137d0
ADD ESP,0x10
JMP 0x00020ea0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00020e70(undefined4 *param_1)\n\n{\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_00020e70(undefined4 *param_1)\n\n{\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00020e70(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }\n  return;\n}" { (if_statement "if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }" if (parenthesized_expression "(param_1 != (undefined4 *)0x0)" ( (binary_expression "param_1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }" { (if_statement "if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }" if (parenthesized_expression "(param_1[4] == 0)" ( (binary_expression "param_1[4] == 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      free((void *)*param_1);\n    }" { (expression_statement "free((void *)*param_1);" (call_expression "free((void *)*param_1)" identifier (argument_list "((void *)*param_1)" ( (cast_expression "(void *)*param_1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) ))) ;) }) (else_clause "else {\n      munmap((void *)*param_1,param_1[1]);\n    }" else (compound_statement "{\n      munmap((void *)*param_1,param_1[1]);\n    }" { (expression_statement "munmap((void *)*param_1,param_1[1]);" (call_expression "munmap((void *)*param_1,param_1[1])" identifier (argument_list "((void *)*param_1,param_1[1])" ( (cast_expression "(void *)*param_1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) , (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) }))) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (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 MHD_pool_destroy(MemoryPool *pool)\n\n{\n  if (pool != (MemoryPool *)0x0) {\n    if (pool->is_mmap == 0) {\n      free(pool->memory);\n    }\n    else {\n      munmap(pool->memory,pool->size);\n    }\n    free(pool);\n  }\n  return;\n}\n\n" comment comment (function_definition "void MHD_pool_destroy(MemoryPool *pool)\n\n{\n  if (pool != (MemoryPool *)0x0) {\n    if (pool->is_mmap == 0) {\n      free(pool->memory);\n    }\n    else {\n      munmap(pool->memory,pool->size);\n    }\n    free(pool);\n  }\n  return;\n}" primitive_type (function_declarator "MHD_pool_destroy(MemoryPool *pool)" identifier (parameter_list "(MemoryPool *pool)" ( (parameter_declaration "MemoryPool *pool" type_identifier (pointer_declarator "*pool" * identifier)) ))) (compound_statement "{\n  if (pool != (MemoryPool *)0x0) {\n    if (pool->is_mmap == 0) {\n      free(pool->memory);\n    }\n    else {\n      munmap(pool->memory,pool->size);\n    }\n    free(pool);\n  }\n  return;\n}" { (if_statement "if (pool != (MemoryPool *)0x0) {\n    if (pool->is_mmap == 0) {\n      free(pool->memory);\n    }\n    else {\n      munmap(pool->memory,pool->size);\n    }\n    free(pool);\n  }" if (parenthesized_expression "(pool != (MemoryPool *)0x0)" ( (binary_expression "pool != (MemoryPool *)0x0" identifier != (cast_expression "(MemoryPool *)0x0" ( (type_descriptor "MemoryPool *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (pool->is_mmap == 0) {\n      free(pool->memory);\n    }\n    else {\n      munmap(pool->memory,pool->size);\n    }\n    free(pool);\n  }" { (if_statement "if (pool->is_mmap == 0) {\n      free(pool->memory);\n    }\n    else {\n      munmap(pool->memory,pool->size);\n    }" if (parenthesized_expression "(pool->is_mmap == 0)" ( (binary_expression "pool->is_mmap == 0" (field_expression "pool->is_mmap" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      free(pool->memory);\n    }" { (expression_statement "free(pool->memory);" (call_expression "free(pool->memory)" identifier (argument_list "(pool->memory)" ( (field_expression "pool->memory" identifier -> field_identifier) ))) ;) }) (else_clause "else {\n      munmap(pool->memory,pool->size);\n    }" else (compound_statement "{\n      munmap(pool->memory,pool->size);\n    }" { (expression_statement "munmap(pool->memory,pool->size);" (call_expression "munmap(pool->memory,pool->size)" identifier (argument_list "(pool->memory,pool->size)" ( (field_expression "pool->memory" identifier -> field_identifier) , (field_expression "pool->size" identifier -> field_identifier) ))) ;) }))) (expression_statement "free(pool);" (call_expression "free(pool)" identifier (argument_list "(pool)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00020e70(undefined4 *param_1)\n\n{\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }\n  return;\n}\n\n" (function_definition "void FUN_00020e70(undefined4 *param_1)\n\n{\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00020e70(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }\n  return;\n}" { (if_statement "if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }" if (parenthesized_expression "(param_1 != (undefined4 *)0x0)" ( (binary_expression "param_1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }" { (if_statement "if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }" if (parenthesized_expression "(param_1[4] == 0)" ( (binary_expression "param_1[4] == 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      free((void *)*param_1);\n    }" { (expression_statement "free((void *)*param_1);" (call_expression "free((void *)*param_1)" identifier (argument_list "((void *)*param_1)" ( (cast_expression "(void *)*param_1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) ))) ;) }) (else_clause "else {\n      munmap((void *)*param_1,param_1[1]);\n    }" else (compound_statement "{\n      munmap((void *)*param_1,param_1[1]);\n    }" { (expression_statement "munmap((void *)*param_1,param_1[1]);" (call_expression "munmap((void *)*param_1,param_1[1])" identifier (argument_list "((void *)*param_1,param_1[1])" ( (cast_expression "(void *)*param_1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) , (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) }))) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) , (subscript_expression IDENT [ LIT ]) ))) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00020e70(undefined4 *param_1)\n\n{\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00020e70(undefined4 *param_1)" (identifier "FUN_00020e70") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }\n  return;\n}" ({ "{") (if_statement "if (param_1 != (undefined4 *)0x0) {\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }" (if "if") (parenthesized_expression "(param_1 != (undefined4 *)0x0)" (( "(") (binary_expression "param_1 != (undefined4 *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }\n    free(param_1);\n  }" ({ "{") (if_statement "if (param_1[4] == 0) {\n      free((void *)*param_1);\n    }\n    else {\n      munmap((void *)*param_1,param_1[1]);\n    }" (if "if") (parenthesized_expression "(param_1[4] == 0)" (( "(") (binary_expression "param_1[4] == 0" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      free((void *)*param_1);\n    }" ({ "{") (expression_statement "free((void *)*param_1);" (call_expression "free((void *)*param_1)" (identifier "free") (argument_list "((void *)*param_1)" (( "(") (cast_expression "(void *)*param_1" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")"))) (; ";")) (} "}")) (else_clause "else {\n      munmap((void *)*param_1,param_1[1]);\n    }" (else "else") (compound_statement "{\n      munmap((void *)*param_1,param_1[1]);\n    }" ({ "{") (expression_statement "munmap((void *)*param_1,param_1[1]);" (call_expression "munmap((void *)*param_1,param_1[1])" (identifier "munmap") (argument_list "((void *)*param_1,param_1[1])" (( "(") (cast_expression "(void *)*param_1" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (, ",") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (} "}")))) (expression_statement "free(param_1);" (call_expression "free(param_1)" (identifier "free") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (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 *var_1)

{
  if (var_1 != (type_1 *)0x0) {
    if (var_1->is_mmap == 0) {
      var_2(var_1->memory);
    }
    else {
      var_3(var_1->memory,var_1->size);
    }
    var_2(var_1);
  }
  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 (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))) (subscript_expression argument: (identifier) index: (number_literal)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (return_statement))))

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

void MASKED(undefined4 *param_1)

{
  if (param_1 != (undefined4 *)0x0) {
    if (param_1[4] == 0) {
      free((void *)*param_1);
    }
    else {
      munmap((void *)*param_1,param_1[1]);
    }
    free(param_1);
  }
  return;
}

