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

void * x2realloc(void *p,size_t *pn)

{
  void *pvVar1;
  size_t n;
  
  n = *pn;
  if (p == (void *)0x0) {
    if (n == 0) {
      n = 0x40;
    }
    else if ((int)n < 0) goto LAB_00024f92;
  }
  else {
    if (0x55555553 < n) {
LAB_00024f92:
                    /* WARNING: Subroutine does not return */
      xalloc_die();
    }
    n = (n >> 1) + 1 + n;
  }
  *pn = n;
  pvVar1 = xrealloc(p,n);
  return pvVar1;
}



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

void FUN_00024f40(int param_1,uint *param_2)

{
  uint uVar1;
  
  uVar1 = *param_2;
  if (param_1 == 0) {
    if (uVar1 == 0) {
      uVar1 = 0x40;
    }
    else if ((int)uVar1 < 0) goto LAB_00024f92;
  }
  else {
    if (0x55555553 < uVar1) {
LAB_00024f92:
                    /* WARNING: Subroutine does not return */
      FUN_00025080(0x24f47);
    }
    uVar1 = (uVar1 >> 1) + 1 + uVar1;
  }
  *param_2 = uVar1;
  FUN_00024e10(param_1,uVar1);
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00013960
ADD EBX,0x180b9
SUB ESP,0x4
MOV ECX,dword ptr [ESP + 0x14]
MOV EDX,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [ECX]
TEST EDX,EDX
JZ 0x00024f80
CMP EAX,0x55555553
JA 0x00024f92
MOV ESI,EAX
SHR ESI,0x1
LEA EAX,[ESI + EAX*0x1 + 0x1]
SUB ESP,0x8
MOV dword ptr [ECX],EAX
PUSH EAX
PUSH EDX
CALL 0x00024e10
ADD ESP,0x14
POP EBX
POP ESI
RET
TEST EAX,EAX
JNZ 0x00024f90
MOV EAX,0x40
JMP 0x00024f6d
JNS 0x00024f6d
CALL 0x00025080
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00024f40(int param_1,uint *param_2)\n\n{\n  uint uVar1;\n  \n  uVar1 = *param_2;\n  if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }\n  *param_2 = uVar1;\n  FUN_00024e10(param_1,uVar1);\n  return;\n}\n\n" comment (function_definition "void FUN_00024f40(int param_1,uint *param_2)\n\n{\n  uint uVar1;\n  \n  uVar1 = *param_2;\n  if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }\n  *param_2 = uVar1;\n  FUN_00024e10(param_1,uVar1);\n  return;\n}" primitive_type (function_declarator "FUN_00024f40(int param_1,uint *param_2)" identifier (parameter_list "(int param_1,uint *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = *param_2;\n  if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }\n  *param_2 = uVar1;\n  FUN_00024e10(param_1,uVar1);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *param_2;" (assignment_expression "uVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }" { (if_statement "if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = 0x40;\n    }" { (expression_statement "uVar1 = 0x40;" (assignment_expression "uVar1 = 0x40" identifier = number_literal) ;) }) (else_clause "else if ((int)uVar1 < 0) goto LAB_00024f92;" else (if_statement "if ((int)uVar1 < 0) goto LAB_00024f92;" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (goto_statement "goto LAB_00024f92;" goto statement_identifier ;)))) }) (else_clause "else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }" else (compound_statement "{\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }" { (if_statement "if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      FUN_00025080(0x24f47);\n    }" if (parenthesized_expression "(0x55555553 < uVar1)" ( (binary_expression "0x55555553 < uVar1" number_literal < identifier) )) (compound_statement "{\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      FUN_00025080(0x24f47);\n    }" { (labeled_statement "LAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      FUN_00025080(0x24f47);" statement_identifier : comment (expression_statement "FUN_00025080(0x24f47);" (call_expression "FUN_00025080(0x24f47)" identifier (argument_list "(0x24f47)" ( number_literal ))) ;)) })) (expression_statement "uVar1 = (uVar1 >> 1) + 1 + uVar1;" (assignment_expression "uVar1 = (uVar1 >> 1) + 1 + uVar1" identifier = (binary_expression "(uVar1 >> 1) + 1 + uVar1" (binary_expression "(uVar1 >> 1) + 1" (parenthesized_expression "(uVar1 >> 1)" ( (binary_expression "uVar1 >> 1" identifier >> number_literal) )) + number_literal) + identifier)) ;) }))) (expression_statement "*param_2 = uVar1;" (assignment_expression "*param_2 = uVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "FUN_00024e10(param_1,uVar1);" (call_expression "FUN_00024e10(param_1,uVar1)" identifier (argument_list "(param_1,uVar1)" ( identifier , 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 * x2realloc(void *p,size_t *pn)\n\n{\n  void *pvVar1;\n  size_t n;\n  \n  n = *pn;\n  if (p == (void *)0x0) {\n    if (n == 0) {\n      n = 0x40;\n    }\n    else if ((int)n < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < n) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = (n >> 1) + 1 + n;\n  }\n  *pn = n;\n  pvVar1 = xrealloc(p,n);\n  return pvVar1;\n}\n\n" comment comment (function_definition "void * x2realloc(void *p,size_t *pn)\n\n{\n  void *pvVar1;\n  size_t n;\n  \n  n = *pn;\n  if (p == (void *)0x0) {\n    if (n == 0) {\n      n = 0x40;\n    }\n    else if ((int)n < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < n) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = (n >> 1) + 1 + n;\n  }\n  *pn = n;\n  pvVar1 = xrealloc(p,n);\n  return pvVar1;\n}" primitive_type (pointer_declarator "* x2realloc(void *p,size_t *pn)" * (function_declarator "x2realloc(void *p,size_t *pn)" identifier (parameter_list "(void *p,size_t *pn)" ( (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "size_t *pn" primitive_type (pointer_declarator "*pn" * identifier)) )))) (compound_statement "{\n  void *pvVar1;\n  size_t n;\n  \n  n = *pn;\n  if (p == (void *)0x0) {\n    if (n == 0) {\n      n = 0x40;\n    }\n    else if ((int)n < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < n) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = (n >> 1) + 1 + n;\n  }\n  *pn = n;\n  pvVar1 = xrealloc(p,n);\n  return pvVar1;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "size_t n;" primitive_type identifier ;) (expression_statement "n = *pn;" (assignment_expression "n = *pn" identifier = (pointer_expression "*pn" * identifier)) ;) (if_statement "if (p == (void *)0x0) {\n    if (n == 0) {\n      n = 0x40;\n    }\n    else if ((int)n < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < n) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = (n >> 1) + 1 + n;\n  }" if (parenthesized_expression "(p == (void *)0x0)" ( (binary_expression "p == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (n == 0) {\n      n = 0x40;\n    }\n    else if ((int)n < 0) goto LAB_00024f92;\n  }" { (if_statement "if (n == 0) {\n      n = 0x40;\n    }\n    else if ((int)n < 0) goto LAB_00024f92;" if (parenthesized_expression "(n == 0)" ( (binary_expression "n == 0" identifier == number_literal) )) (compound_statement "{\n      n = 0x40;\n    }" { (expression_statement "n = 0x40;" (assignment_expression "n = 0x40" identifier = number_literal) ;) }) (else_clause "else if ((int)n < 0) goto LAB_00024f92;" else (if_statement "if ((int)n < 0) goto LAB_00024f92;" if (parenthesized_expression "((int)n < 0)" ( (binary_expression "(int)n < 0" (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (goto_statement "goto LAB_00024f92;" goto statement_identifier ;)))) }) (else_clause "else {\n    if (0x55555553 < n) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = (n >> 1) + 1 + n;\n  }" else (compound_statement "{\n    if (0x55555553 < n) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = (n >> 1) + 1 + n;\n  }" { (if_statement "if (0x55555553 < n) {\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" if (parenthesized_expression "(0x55555553 < n)" ( (binary_expression "0x55555553 < n" number_literal < identifier) )) (compound_statement "{\nLAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" { (labeled_statement "LAB_00024f92:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();" statement_identifier : comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;)) })) (expression_statement "n = (n >> 1) + 1 + n;" (assignment_expression "n = (n >> 1) + 1 + n" identifier = (binary_expression "(n >> 1) + 1 + n" (binary_expression "(n >> 1) + 1" (parenthesized_expression "(n >> 1)" ( (binary_expression "n >> 1" identifier >> number_literal) )) + number_literal) + identifier)) ;) }))) (expression_statement "*pn = n;" (assignment_expression "*pn = n" (pointer_expression "*pn" * identifier) = identifier) ;) (expression_statement "pvVar1 = xrealloc(p,n);" (assignment_expression "pvVar1 = xrealloc(p,n)" identifier = (call_expression "xrealloc(p,n)" identifier (argument_list "(p,n)" ( identifier , identifier )))) ;) (return_statement "return pvVar1;" return identifier ;) })))
(translation_unit "void FUN_00024f40(int param_1,uint *param_2)\n\n{\n  uint uVar1;\n  \n  uVar1 = *param_2;\n  if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }\n  *param_2 = uVar1;\n  FUN_00024e10(param_1,uVar1);\n  return;\n}\n\n" (function_definition "void FUN_00024f40(int param_1,uint *param_2)\n\n{\n  uint uVar1;\n  \n  uVar1 = *param_2;\n  if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }\n  *param_2 = uVar1;\n  FUN_00024e10(param_1,uVar1);\n  return;\n}" primitive_type (function_declarator "FUN_00024f40(int param_1,uint *param_2)" identifier (parameter_list "(int param_1,uint *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = *param_2;\n  if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }\n  *param_2 = uVar1;\n  FUN_00024e10(param_1,uVar1);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *param_2;" (assignment_expression "uVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }" { (if_statement "if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = 0x40;\n    }" { (expression_statement "uVar1 = 0x40;" (assignment_expression "uVar1 = 0x40" identifier = number_literal) ;) }) (else_clause "else if ((int)uVar1 < 0) goto LAB_00024f92;" else (if_statement "if ((int)uVar1 < 0) goto LAB_00024f92;" if (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (goto_statement "goto LAB_00024f92;" goto statement_identifier ;)))) }) (else_clause "else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }" else (compound_statement "{\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }" { (if_statement "if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }" if (parenthesized_expression "(0x55555553 < uVar1)" ( (binary_expression "0x55555553 < uVar1" number_literal < identifier) )) (compound_statement "{\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }" { (labeled_statement "LAB_00024f92:\n                    \n      FUN_00025080(0x24f47);" statement_identifier : (expression_statement "FUN_00025080(0x24f47);" (call_expression "FUN_00025080(0x24f47)" identifier (argument_list "(0x24f47)" ( number_literal ))) ;)) })) (expression_statement "uVar1 = (uVar1 >> 1) + 1 + uVar1;" (assignment_expression "uVar1 = (uVar1 >> 1) + 1 + uVar1" identifier = (binary_expression "(uVar1 >> 1) + 1 + uVar1" (binary_expression "(uVar1 >> 1) + 1" (parenthesized_expression "(uVar1 >> 1)" ( (binary_expression "uVar1 >> 1" identifier >> number_literal) )) + number_literal) + identifier)) ;) }))) (expression_statement "*param_2 = uVar1;" (assignment_expression "*param_2 = uVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "FUN_00024e10(param_1,uVar1);" (call_expression "FUN_00024e10(param_1,uVar1)" identifier (argument_list "(param_1,uVar1)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (goto_statement goto statement_identifier ;)))) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT >> LIT) )) + LIT) + IDENT)) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00024f40(int param_1,uint *param_2)\n\n{\n  uint uVar1;\n  \n  uVar1 = *param_2;\n  if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }\n  *param_2 = uVar1;\n  FUN_00024e10(param_1,uVar1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00024f40(int param_1,uint *param_2)" (identifier "FUN_00024f40") (parameter_list "(int param_1,uint *param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint *param_2" (type_identifier "uint") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = *param_2;\n  if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }\n  *param_2 = uVar1;\n  FUN_00024e10(param_1,uVar1);\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = *param_2;" (assignment_expression "uVar1 = *param_2" (identifier "uVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (param_1 == 0) {\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }\n  else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;\n  }" ({ "{") (if_statement "if (uVar1 == 0) {\n      uVar1 = 0x40;\n    }\n    else if ((int)uVar1 < 0) goto LAB_00024f92;" (if "if") (parenthesized_expression "(uVar1 == 0)" (( "(") (binary_expression "uVar1 == 0" (identifier "uVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar1 = 0x40;\n    }" ({ "{") (expression_statement "uVar1 = 0x40;" (assignment_expression "uVar1 = 0x40" (identifier "uVar1") (= "=") (number_literal "0x40")) (; ";")) (} "}")) (else_clause "else if ((int)uVar1 < 0) goto LAB_00024f92;" (else "else") (if_statement "if ((int)uVar1 < 0) goto LAB_00024f92;" (if "if") (parenthesized_expression "((int)uVar1 < 0)" (( "(") (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (< "<") (number_literal "0")) () ")")) (goto_statement "goto LAB_00024f92;" (goto "goto") (statement_identifier "LAB_00024f92") (; ";"))))) (} "}")) (else_clause "else {\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }" (else "else") (compound_statement "{\n    if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }\n    uVar1 = (uVar1 >> 1) + 1 + uVar1;\n  }" ({ "{") (if_statement "if (0x55555553 < uVar1) {\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }" (if "if") (parenthesized_expression "(0x55555553 < uVar1)" (( "(") (binary_expression "0x55555553 < uVar1" (number_literal "0x55555553") (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\nLAB_00024f92:\n                    \n      FUN_00025080(0x24f47);\n    }" ({ "{") (labeled_statement "LAB_00024f92:\n                    \n      FUN_00025080(0x24f47);" (statement_identifier "LAB_00024f92") (: ":") (expression_statement "FUN_00025080(0x24f47);" (call_expression "FUN_00025080(0x24f47)" (identifier "FUN_00025080") (argument_list "(0x24f47)" (( "(") (number_literal "0x24f47") () ")"))) (; ";"))) (} "}"))) (expression_statement "uVar1 = (uVar1 >> 1) + 1 + uVar1;" (assignment_expression "uVar1 = (uVar1 >> 1) + 1 + uVar1" (identifier "uVar1") (= "=") (binary_expression "(uVar1 >> 1) + 1 + uVar1" (binary_expression "(uVar1 >> 1) + 1" (parenthesized_expression "(uVar1 >> 1)" (( "(") (binary_expression "uVar1 >> 1" (identifier "uVar1") (>> ">>") (number_literal "1")) () ")")) (+ "+") (number_literal "1")) (+ "+") (identifier "uVar1"))) (; ";")) (} "}")))) (expression_statement "*param_2 = uVar1;" (assignment_expression "*param_2 = uVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "FUN_00024e10(param_1,uVar1);" (call_expression "FUN_00024e10(param_1,uVar1)" (identifier "FUN_00024e10") (argument_list "(param_1,uVar1)" (( "(") (identifier "param_1") (, ",") (identifier "uVar1") () ")"))) (; ";")) (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(void *var_1,size_t *pn)

{
  void *pvVar1;
  size_t var_2;
  
  var_2 = *pn;
  if (var_1 == (void *)0x0) {
    if (var_2 == 0) {
      var_2 = 0x40;
    }
    else if ((int)var_2 < 0) goto LAB_00024f92;
  }
  else {
    if (0x55555553 < var_2) {
LAB_00024f92:
                    /* WARNING: Subroutine does not return */
      var_3();
    }
    var_2 = (var_2 >> 1) + 1 + var_2;
  }
  *pn = var_2;
  pvVar1 = var_4(var_1,var_2);
  return pvVar1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)) right: (identifier))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (return_statement))))

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

void MASKED(int param_1,uint *param_2)

{
  uint uVar1;
  
  uVar1 = *param_2;
  if (param_1 == 0) {
    if (uVar1 == 0) {
      uVar1 = 0x40;
    }
    else if ((int)uVar1 < 0) goto LAB_00024f92;
  }
  else {
    if (0x55555553 < uVar1) {
LAB_00024f92:
                    /* WARNING: Subroutine does not return */
      FUN_00025080(0x24f47);
    }
    uVar1 = (uVar1 >> 1) + 1 + uVar1;
  }
  *param_2 = uVar1;
  FUN_00024e10(param_1,uVar1);
  return;
}

