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

void set_maxchild(int nchild)

{
  if ((set_maxchild::lmaxchild < 0) &&
     (set_maxchild::lmaxchild = getmaxchild(), set_maxchild::lmaxchild < 0)) {
    set_maxchild::lmaxchild = 0x20;
  }
  js.c_childmax = set_maxchild::lmaxchild;
  if ((set_maxchild::lmaxchild <= nchild) && (js.c_childmax = 0x8000, nchild < 0x8001)) {
    js.c_childmax = nchild;
  }
  return;
}



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

void set_maxchild(int param_1)

{
  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {
    DAT_0014a780 = 0x20;
  }
  js = DAT_0014a780;
  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {
    js = param_1;
  }
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0xe5cb9
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [EBX + 0x780]
TEST EAX,EAX
JS 0x00064380
CMP ESI,EAX
JL 0x00064370
CMP ESI,0x8000
MOV EAX,0x8000
CMOVLE EAX,ESI
MOV dword ptr [EBX + 0x7c0],EAX
ADD ESP,0x4
POP EBX
POP ESI
RET
CALL 0x000bbec0
TEST EAX,EAX
JNS 0x0006439a
MOV dword ptr [EBX + 0x780],0x20
MOV EAX,0x20
JMP 0x0006435e
MOV dword ptr [EBX + 0x780],EAX
JMP 0x0006435e
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid set_maxchild(int param_1)\n\n{\n  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }\n  js = DAT_0014a780;\n  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }\n  return;\n}\n\n" comment (function_definition "void set_maxchild(int param_1)\n\n{\n  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }\n  js = DAT_0014a780;\n  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }\n  return;\n}" primitive_type (function_declarator "set_maxchild(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }\n  js = DAT_0014a780;\n  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }\n  return;\n}" { (if_statement "if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }" if (parenthesized_expression "((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0))" ( (binary_expression "(DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)" (parenthesized_expression "(DAT_0014a780 < 0)" ( (binary_expression "DAT_0014a780 < 0" identifier < number_literal) )) && (parenthesized_expression "(DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)" ( (comma_expression "DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0" (assignment_expression "DAT_0014a780 = getmaxchild()" identifier = (call_expression "getmaxchild()" identifier (argument_list "()" ( )))) , (binary_expression "DAT_0014a780 < 0" identifier < number_literal)) ))) )) (compound_statement "{\n    DAT_0014a780 = 0x20;\n  }" { (expression_statement "DAT_0014a780 = 0x20;" (assignment_expression "DAT_0014a780 = 0x20" identifier = number_literal) ;) })) (expression_statement "js = DAT_0014a780;" (assignment_expression "js = DAT_0014a780" identifier = identifier) ;) (if_statement "if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }" if (parenthesized_expression "((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001))" ( (binary_expression "(DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)" (parenthesized_expression "(DAT_0014a780 <= param_1)" ( (binary_expression "DAT_0014a780 <= param_1" identifier <= identifier) )) && (parenthesized_expression "(js = 0x8000, param_1 < 0x8001)" ( (comma_expression "js = 0x8000, param_1 < 0x8001" (assignment_expression "js = 0x8000" identifier = number_literal) , (binary_expression "param_1 < 0x8001" identifier < number_literal)) ))) )) (compound_statement "{\n    js = param_1;\n  }" { (expression_statement "js = param_1;" (assignment_expression "js = param_1" identifier = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid set_maxchild(int nchild)\n\n{\n  if ((set_maxchild::lmaxchild < 0) &&\n     (set_maxchild::lmaxchild = getmaxchild(), set_maxchild::lmaxchild < 0)) {\n    set_maxchild::lmaxchild = 0x20;\n  }\n  js.c_childmax = set_maxchild::lmaxchild;\n  if ((set_maxchild::lmaxchild <= nchild) && (js.c_childmax = 0x8000, nchild < 0x8001)) {\n    js.c_childmax = nchild;\n  }\n  return;\n}\n\n" comment (function_definition "void set_maxchild(int nchild)\n\n{\n  if ((set_maxchild::lmaxchild < 0) &&\n     (set_maxchild::lmaxchild = getmaxchild(), set_maxchild::lmaxchild < 0)) {\n    set_maxchild::lmaxchild = 0x20;\n  }\n  js.c_childmax = set_maxchild::lmaxchild;\n  if ((set_maxchild::lmaxchild <= nchild) && (js.c_childmax = 0x8000, nchild < 0x8001)) {\n    js.c_childmax = nchild;\n  }\n  return;\n}" primitive_type (function_declarator "set_maxchild(int nchild)" identifier (parameter_list "(int nchild)" ( (parameter_declaration "int nchild" primitive_type identifier) ))) (compound_statement "{\n  if ((set_maxchild::lmaxchild < 0) &&\n     (set_maxchild::lmaxchild = getmaxchild(), set_maxchild::lmaxchild < 0)) {\n    set_maxchild::lmaxchild = 0x20;\n  }\n  js.c_childmax = set_maxchild::lmaxchild;\n  if ((set_maxchild::lmaxchild <= nchild) && (js.c_childmax = 0x8000, nchild < 0x8001)) {\n    js.c_childmax = nchild;\n  }\n  return;\n}" { (if_statement "if ((set_maxchild::lmaxchild < 0) &&\n     (set_maxchild::lmaxchild = getmaxchild(), set_maxchild::lmaxchild < 0)) {\n    set_maxchild::lmaxchild = 0x20;\n  }" if (parenthesized_expression "((set_maxchild::lmaxchild < 0) &&\n     (set_maxchild::lmaxchild = getmaxchild(), set_maxchild::lmaxchild < 0))" ( (binary_expression "(set_maxchild::lmaxchild < 0) &&\n     (set_maxchild::lmaxchild = getmaxchild(), set_maxchild::lmaxchild < 0)" (parenthesized_expression "(set_maxchild::lmaxchild < 0)" ( (binary_expression "set_maxchild::lmaxchild < 0" identifier (ERROR "::lmaxchild" : : identifier) < number_literal) )) && (parenthesized_expression "(set_maxchild::lmaxchild = getmaxchild(), set_maxchild::lmaxchild < 0)" ( (ERROR "set_maxchild::lmaxchild = getmaxchild(), set_maxchild::" (comma_expression "set_maxchild::lmaxchild = getmaxchild(), set_maxchild" (assignment_expression "set_maxchild::lmaxchild = getmaxchild()" identifier (ERROR "::lmaxchild" : : identifier) = (call_expression "getmaxchild()" identifier (argument_list "()" ( )))) , identifier) : :) (binary_expression "lmaxchild < 0" identifier < number_literal) ))) )) (compound_statement "{\n    set_maxchild::lmaxchild = 0x20;\n  }" { (labeled_statement "set_maxchild::lmaxchild = 0x20;" statement_identifier : (ERROR ":" :) (expression_statement "lmaxchild = 0x20;" (assignment_expression "lmaxchild = 0x20" identifier = number_literal) ;)) })) (expression_statement "js.c_childmax = set_maxchild::lmaxchild;" (assignment_expression "js.c_childmax = set_maxchild" (field_expression "js.c_childmax" identifier . field_identifier) = identifier) (ERROR "::lmaxchild" : : identifier) ;) (if_statement "if ((set_maxchild::lmaxchild <= nchild) && (js.c_childmax = 0x8000, nchild < 0x8001)) {\n    js.c_childmax = nchild;\n  }" if (parenthesized_expression "((set_maxchild::lmaxchild <= nchild) && (js.c_childmax = 0x8000, nchild < 0x8001))" ( (binary_expression "(set_maxchild::lmaxchild <= nchild) && (js.c_childmax = 0x8000, nchild < 0x8001)" (parenthesized_expression "(set_maxchild::lmaxchild <= nchild)" ( (binary_expression "set_maxchild::lmaxchild <= nchild" identifier (ERROR "::lmaxchild" : : identifier) <= identifier) )) && (parenthesized_expression "(js.c_childmax = 0x8000, nchild < 0x8001)" ( (comma_expression "js.c_childmax = 0x8000, nchild < 0x8001" (assignment_expression "js.c_childmax = 0x8000" (field_expression "js.c_childmax" identifier . field_identifier) = number_literal) , (binary_expression "nchild < 0x8001" identifier < number_literal)) ))) )) (compound_statement "{\n    js.c_childmax = nchild;\n  }" { (expression_statement "js.c_childmax = nchild;" (assignment_expression "js.c_childmax = nchild" (field_expression "js.c_childmax" identifier . field_identifier) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void set_maxchild(int param_1)\n\n{\n  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }\n  js = DAT_0014a780;\n  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }\n  return;\n}\n\n" (function_definition "void set_maxchild(int param_1)\n\n{\n  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }\n  js = DAT_0014a780;\n  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }\n  return;\n}" primitive_type (function_declarator "set_maxchild(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }\n  js = DAT_0014a780;\n  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }\n  return;\n}" { (if_statement "if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }" if (parenthesized_expression "((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0))" ( (binary_expression "(DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)" (parenthesized_expression "(DAT_0014a780 < 0)" ( (binary_expression "DAT_0014a780 < 0" identifier < number_literal) )) && (parenthesized_expression "(DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)" ( (comma_expression "DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0" (assignment_expression "DAT_0014a780 = getmaxchild()" identifier = (call_expression "getmaxchild()" identifier (argument_list "()" ( )))) , (binary_expression "DAT_0014a780 < 0" identifier < number_literal)) ))) )) (compound_statement "{\n    DAT_0014a780 = 0x20;\n  }" { (expression_statement "DAT_0014a780 = 0x20;" (assignment_expression "DAT_0014a780 = 0x20" identifier = number_literal) ;) })) (expression_statement "js = DAT_0014a780;" (assignment_expression "js = DAT_0014a780" identifier = identifier) ;) (if_statement "if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }" if (parenthesized_expression "((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001))" ( (binary_expression "(DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)" (parenthesized_expression "(DAT_0014a780 <= param_1)" ( (binary_expression "DAT_0014a780 <= param_1" identifier <= identifier) )) && (parenthesized_expression "(js = 0x8000, param_1 < 0x8001)" ( (comma_expression "js = 0x8000, param_1 < 0x8001" (assignment_expression "js = 0x8000" identifier = number_literal) , (binary_expression "param_1 < 0x8001" identifier < number_literal)) ))) )) (compound_statement "{\n    js = param_1;\n  }" { (expression_statement "js = param_1;" (assignment_expression "js = param_1" identifier = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (binary_expression IDENT < LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression IDENT < LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (return_statement return ;) })))
(function_definition "void set_maxchild(int param_1)\n\n{\n  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }\n  js = DAT_0014a780;\n  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "set_maxchild(int param_1)" (identifier "set_maxchild") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }\n  js = DAT_0014a780;\n  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }\n  return;\n}" ({ "{") (if_statement "if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {\n    DAT_0014a780 = 0x20;\n  }" (if "if") (parenthesized_expression "((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0))" (( "(") (binary_expression "(DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)" (parenthesized_expression "(DAT_0014a780 < 0)" (( "(") (binary_expression "DAT_0014a780 < 0" (identifier "DAT_0014a780") (< "<") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)" (( "(") (comma_expression "DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0" (assignment_expression "DAT_0014a780 = getmaxchild()" (identifier "DAT_0014a780") (= "=") (call_expression "getmaxchild()" (identifier "getmaxchild") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "DAT_0014a780 < 0" (identifier "DAT_0014a780") (< "<") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    DAT_0014a780 = 0x20;\n  }" ({ "{") (expression_statement "DAT_0014a780 = 0x20;" (assignment_expression "DAT_0014a780 = 0x20" (identifier "DAT_0014a780") (= "=") (number_literal "0x20")) (; ";")) (} "}"))) (expression_statement "js = DAT_0014a780;" (assignment_expression "js = DAT_0014a780" (identifier "js") (= "=") (identifier "DAT_0014a780")) (; ";")) (if_statement "if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {\n    js = param_1;\n  }" (if "if") (parenthesized_expression "((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001))" (( "(") (binary_expression "(DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)" (parenthesized_expression "(DAT_0014a780 <= param_1)" (( "(") (binary_expression "DAT_0014a780 <= param_1" (identifier "DAT_0014a780") (<= "<=") (identifier "param_1")) () ")")) (&& "&&") (parenthesized_expression "(js = 0x8000, param_1 < 0x8001)" (( "(") (comma_expression "js = 0x8000, param_1 < 0x8001" (assignment_expression "js = 0x8000" (identifier "js") (= "=") (number_literal "0x8000")) (, ",") (binary_expression "param_1 < 0x8001" (identifier "param_1") (< "<") (number_literal "0x8001"))) () ")"))) () ")")) (compound_statement "{\n    js = param_1;\n  }" ({ "{") (expression_statement "js = param_1;" (assignment_expression "js = param_1" (identifier "js") (= "=") (identifier "param_1")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(int var_2)

{
  if ((function_1::var_1 < 0) &&
     (function_1::var_1 = getmaxchild(), function_1::var_1 < 0)) {
    set_maxchild::var_1 = 0x20;
  }
  js.c_childmax = function_1::var_1;
  if ((function_1::var_1 <= var_2) && (js.c_childmax = 0x8000, var_2 < 0x8001)) {
    js.c_childmax = var_2;
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (return_statement))))

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

void MASKED(int param_1)

{
  if ((DAT_0014a780 < 0) && (DAT_0014a780 = getmaxchild(), DAT_0014a780 < 0)) {
    DAT_0014a780 = 0x20;
  }
  js = DAT_0014a780;
  if ((DAT_0014a780 <= param_1) && (js = 0x8000, param_1 < 0x8001)) {
    js = param_1;
  }
  return;
}

