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

void * mmalloca(size_t n)

{
  void *pvVar1;
  uint uVar2;
  void *pvVar3;
  
  if (n < 0xfffffff0) {
    pvVar1 = malloc(n + 0x10);
    if (pvVar1 != (void *)0x0) {
      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;
      pvVar3 = (void *)(uVar2 + 8);
      *(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1;
      return pvVar3;
    }
  }
  return (void *)0x0;
}



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

int FUN_0001e5a0(uint param_1)

{
  void *pvVar1;
  uint uVar2;
  int iVar3;
  
  if (param_1 < 0xfffffff0) {
    pvVar1 = malloc(param_1 + 0x10);
    if (pvVar1 != (void *)0x0) {
      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;
      iVar3 = uVar2 + 8;
      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;
      return iVar3;
    }
  }
  return 0;
}


PUSH EBX
CALL 0x00013670
ADD EBX,0x98be
SUB ESP,0x8
MOV EAX,dword ptr [ESP + 0x10]
ADD EAX,0x10
JC 0x0001e5e0
SUB ESP,0xc
PUSH EAX
CALL 0x000122a0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001e5e0
LEA EDX,[EAX + 0x8]
AND EDX,0xfffffff0
ADD EDX,0x8
MOV ECX,EDX
SUB ECX,EAX
MOV EAX,EDX
MOV byte ptr [EDX + -0x1],CL
ADD ESP,0x8
POP EBX
RET
XOR EDX,EDX
ADD ESP,0x8
MOV EAX,EDX
POP EBX
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0001e5a0(uint param_1)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "int FUN_0001e5a0(uint param_1)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }\n  return 0;\n}" primitive_type (function_declarator "FUN_0001e5a0(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  void *pvVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }\n  return 0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }" if (parenthesized_expression "(param_1 < 0xfffffff0)" ( (binary_expression "param_1 < 0xfffffff0" identifier < number_literal) )) (compound_statement "{\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }" { (expression_statement "pvVar1 = malloc(param_1 + 0x10);" (assignment_expression "pvVar1 = malloc(param_1 + 0x10)" identifier = (call_expression "malloc(param_1 + 0x10)" identifier (argument_list "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }" if (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)) )) (compound_statement "{\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }" { (expression_statement "uVar2 = (int)pvVar1 + 8U & 0xfffffff0;" (assignment_expression "uVar2 = (int)pvVar1 + 8U & 0xfffffff0" identifier = (binary_expression "(int)pvVar1 + 8U & 0xfffffff0" (binary_expression "(int)pvVar1 + 8U" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) & number_literal)) ;) (expression_statement "iVar3 = uVar2 + 8;" (assignment_expression "iVar3 = uVar2 + 8" identifier = (binary_expression "uVar2 + 8" identifier + number_literal)) ;) (expression_statement "*(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;" (assignment_expression "*(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1" (pointer_expression "*(char *)(uVar2 + 7)" * (cast_expression "(char *)(uVar2 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 + 7)" ( (binary_expression "uVar2 + 7" identifier + number_literal) )))) = (binary_expression "(char)iVar3 - (char)pvVar1" (cast_expression "(char)iVar3" ( (type_descriptor "char" primitive_type) ) identifier) - (cast_expression "(char)pvVar1" ( (type_descriptor "char" primitive_type) ) identifier))) ;) (return_statement "return iVar3;" return identifier ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid * mmalloca(size_t n)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  void *pvVar3;\n  \n  if (n < 0xfffffff0) {\n    pvVar1 = malloc(n + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      pvVar3 = (void *)(uVar2 + 8);\n      *(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1;\n      return pvVar3;\n    }\n  }\n  return (void *)0x0;\n}\n\n" comment comment (function_definition "void * mmalloca(size_t n)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  void *pvVar3;\n  \n  if (n < 0xfffffff0) {\n    pvVar1 = malloc(n + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      pvVar3 = (void *)(uVar2 + 8);\n      *(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1;\n      return pvVar3;\n    }\n  }\n  return (void *)0x0;\n}" primitive_type (pointer_declarator "* mmalloca(size_t n)" * (function_declarator "mmalloca(size_t n)" identifier (parameter_list "(size_t n)" ( (parameter_declaration "size_t n" primitive_type identifier) )))) (compound_statement "{\n  void *pvVar1;\n  uint uVar2;\n  void *pvVar3;\n  \n  if (n < 0xfffffff0) {\n    pvVar1 = malloc(n + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      pvVar3 = (void *)(uVar2 + 8);\n      *(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1;\n      return pvVar3;\n    }\n  }\n  return (void *)0x0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (if_statement "if (n < 0xfffffff0) {\n    pvVar1 = malloc(n + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      pvVar3 = (void *)(uVar2 + 8);\n      *(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1;\n      return pvVar3;\n    }\n  }" if (parenthesized_expression "(n < 0xfffffff0)" ( (binary_expression "n < 0xfffffff0" identifier < number_literal) )) (compound_statement "{\n    pvVar1 = malloc(n + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      pvVar3 = (void *)(uVar2 + 8);\n      *(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1;\n      return pvVar3;\n    }\n  }" { (expression_statement "pvVar1 = malloc(n + 0x10);" (assignment_expression "pvVar1 = malloc(n + 0x10)" identifier = (call_expression "malloc(n + 0x10)" identifier (argument_list "(n + 0x10)" ( (binary_expression "n + 0x10" identifier + number_literal) )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      pvVar3 = (void *)(uVar2 + 8);\n      *(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1;\n      return pvVar3;\n    }" if (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)) )) (compound_statement "{\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      pvVar3 = (void *)(uVar2 + 8);\n      *(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1;\n      return pvVar3;\n    }" { (expression_statement "uVar2 = (int)pvVar1 + 8U & 0xfffffff0;" (assignment_expression "uVar2 = (int)pvVar1 + 8U & 0xfffffff0" identifier = (binary_expression "(int)pvVar1 + 8U & 0xfffffff0" (binary_expression "(int)pvVar1 + 8U" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) & number_literal)) ;) (expression_statement "pvVar3 = (void *)(uVar2 + 8);" (assignment_expression "pvVar3 = (void *)(uVar2 + 8)" identifier = (cast_expression "(void *)(uVar2 + 8)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 + 8)" ( (binary_expression "uVar2 + 8" identifier + number_literal) )))) ;) (expression_statement "*(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1;" (assignment_expression "*(char *)(uVar2 + 7) = (char)pvVar3 - (char)pvVar1" (pointer_expression "*(char *)(uVar2 + 7)" * (cast_expression "(char *)(uVar2 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 + 7)" ( (binary_expression "uVar2 + 7" identifier + number_literal) )))) = (binary_expression "(char)pvVar3 - (char)pvVar1" (cast_expression "(char)pvVar3" ( (type_descriptor "char" primitive_type) ) identifier) - (cast_expression "(char)pvVar1" ( (type_descriptor "char" primitive_type) ) identifier))) ;) (return_statement "return pvVar3;" return identifier ;) })) })) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "int FUN_0001e5a0(uint param_1)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "int FUN_0001e5a0(uint param_1)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }\n  return 0;\n}" primitive_type (function_declarator "FUN_0001e5a0(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  void *pvVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }\n  return 0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }" if (parenthesized_expression "(param_1 < 0xfffffff0)" ( (binary_expression "param_1 < 0xfffffff0" identifier < number_literal) )) (compound_statement "{\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }" { (expression_statement "pvVar1 = malloc(param_1 + 0x10);" (assignment_expression "pvVar1 = malloc(param_1 + 0x10)" identifier = (call_expression "malloc(param_1 + 0x10)" identifier (argument_list "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }" if (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)) )) (compound_statement "{\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }" { (expression_statement "uVar2 = (int)pvVar1 + 8U & 0xfffffff0;" (assignment_expression "uVar2 = (int)pvVar1 + 8U & 0xfffffff0" identifier = (binary_expression "(int)pvVar1 + 8U & 0xfffffff0" (binary_expression "(int)pvVar1 + 8U" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) & number_literal)) ;) (expression_statement "iVar3 = uVar2 + 8;" (assignment_expression "iVar3 = uVar2 + 8" identifier = (binary_expression "uVar2 + 8" identifier + number_literal)) ;) (expression_statement "*(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;" (assignment_expression "*(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1" (pointer_expression "*(char *)(uVar2 + 7)" * (cast_expression "(char *)(uVar2 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 + 7)" ( (binary_expression "uVar2 + 7" identifier + number_literal) )))) = (binary_expression "(char)iVar3 - (char)pvVar1" (cast_expression "(char)iVar3" ( (type_descriptor "char" primitive_type) ) identifier) - (cast_expression "(char)pvVar1" ( (type_descriptor "char" primitive_type) ) identifier))) ;) (return_statement "return iVar3;" return identifier ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (return_statement return IDENT ;) })) })) (return_statement return LIT ;) })))
(function_definition "int FUN_0001e5a0(uint param_1)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }\n  return 0;\n}" (primitive_type "int") (function_declarator "FUN_0001e5a0(uint param_1)" (identifier "FUN_0001e5a0") (parameter_list "(uint param_1)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) () ")"))) (compound_statement "{\n  void *pvVar1;\n  uint uVar2;\n  int iVar3;\n  \n  if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (if_statement "if (param_1 < 0xfffffff0) {\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }" (if "if") (parenthesized_expression "(param_1 < 0xfffffff0)" (( "(") (binary_expression "param_1 < 0xfffffff0" (identifier "param_1") (< "<") (number_literal "0xfffffff0")) () ")")) (compound_statement "{\n    pvVar1 = malloc(param_1 + 0x10);\n    if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }\n  }" ({ "{") (expression_statement "pvVar1 = malloc(param_1 + 0x10);" (assignment_expression "pvVar1 = malloc(param_1 + 0x10)" (identifier "pvVar1") (= "=") (call_expression "malloc(param_1 + 0x10)" (identifier "malloc") (argument_list "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (; ";")) (if_statement "if (pvVar1 != (void *)0x0) {\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }" (if "if") (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"))) () ")")) (compound_statement "{\n      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;\n      iVar3 = uVar2 + 8;\n      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;\n      return iVar3;\n    }" ({ "{") (expression_statement "uVar2 = (int)pvVar1 + 8U & 0xfffffff0;" (assignment_expression "uVar2 = (int)pvVar1 + 8U & 0xfffffff0" (identifier "uVar2") (= "=") (binary_expression "(int)pvVar1 + 8U & 0xfffffff0" (binary_expression "(int)pvVar1 + 8U" (cast_expression "(int)pvVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar1")) (+ "+") (number_literal "8U")) (& "&") (number_literal "0xfffffff0"))) (; ";")) (expression_statement "iVar3 = uVar2 + 8;" (assignment_expression "iVar3 = uVar2 + 8" (identifier "iVar3") (= "=") (binary_expression "uVar2 + 8" (identifier "uVar2") (+ "+") (number_literal "8"))) (; ";")) (expression_statement "*(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;" (assignment_expression "*(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1" (pointer_expression "*(char *)(uVar2 + 7)" (* "*") (cast_expression "(char *)(uVar2 + 7)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar2 + 7)" (( "(") (binary_expression "uVar2 + 7" (identifier "uVar2") (+ "+") (number_literal "7")) () ")")))) (= "=") (binary_expression "(char)iVar3 - (char)pvVar1" (cast_expression "(char)iVar3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar3")) (- "-") (cast_expression "(char)pvVar1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "pvVar1")))) (; ";")) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

void * function_1(size_t var_1)

{
  void *var_3;
  type_1 var_4;
  void *pvVar3;
  
  if (var_1 < 0xfffffff0) {
    var_3 = var_2(var_1 + 0x10);
    if (var_3 != (void *)0x0) {
      var_4 = (int)var_3 + 8U & 0xfffffff0;
      pvVar3 = (void *)(var_4 + 8);
      *(char *)(var_4 + 7) = (char)pvVar3 - (char)var_3;
      return pvVar3;
    }
  }
  return (void *)0x0;
}


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

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

int MASKED(uint param_1)

{
  void *pvVar1;
  uint uVar2;
  int iVar3;
  
  if (param_1 < 0xfffffff0) {
    pvVar1 = malloc(param_1 + 0x10);
    if (pvVar1 != (void *)0x0) {
      uVar2 = (int)pvVar1 + 8U & 0xfffffff0;
      iVar3 = uVar2 + 8;
      *(char *)(uVar2 + 7) = (char)iVar3 - (char)pvVar1;
      return iVar3;
    }
  }
  return 0;
}

