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

void sv_funcnest(char *name)

{
  SHELL_VAR *pSVar1;
  int iVar2;
  int in_GS_OFFSET;
  intmax_t num;
  int local_10;
  undefined4 uStack_8;
  
  uStack_8 = 0x52096;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  pSVar1 = find_variable(name);
  if (pSVar1 != (SHELL_VAR *)0x0) {
    iVar2 = legal_number(pSVar1->value,&num);
    if (iVar2 != 0) {
      funcnest_max = (int)num;
      goto LAB_000520de;
    }
  }
  funcnest_max = 0;
LAB_000520de:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void sv_funcnest(undefined4 param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined4 local_1c [3];
  int local_10;
  undefined4 uStack_8;
  
  uStack_8 = 0x52096;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = find_variable(param_1);
  if (iVar1 != 0) {
    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);
    if (iVar1 != 0) {
      funcnest_max = local_1c[0];
      goto LAB_000520de;
    }
  }
  funcnest_max = 0;
LAB_000520de:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}


PUSH EBX
CALL 0x00031ed0
ADD EBX,0xf7f6a
SUB ESP,0x24
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x18],EAX
XOR EAX,EAX
PUSH dword ptr [ESP + 0x2c]
CALL 0x00051fa0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000520d2
SUB ESP,0x8
LEA EDX,[ESP + 0x8]
PUSH EDX
PUSH dword ptr [EAX + 0x4]
CALL 0x00041140
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000520f0
LEA EAX,[EBX + 0x5ca4]
MOV dword ptr [EAX],0x0
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x000520fd
ADD ESP,0x18
POP EBX
RET
LEA EAX,[EBX + 0x5ca4]
MOV EDX,dword ptr [ESP]
MOV dword ptr [EAX],EDX
JMP 0x000520de
CALL 0x000ecc40
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid sv_funcnest(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = find_variable(param_1);\n  if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}\n\n" comment (function_definition "void sv_funcnest(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = find_variable(param_1);\n  if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" primitive_type (function_declarator "sv_funcnest(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = find_variable(param_1);\n  if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_1c [3];" type_identifier (array_declarator "local_1c [3]" identifier [ number_literal ]) ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_8;" type_identifier identifier ;) (expression_statement "uStack_8 = 0x52096;" (assignment_expression "uStack_8 = 0x52096" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = find_variable(param_1);" (assignment_expression "iVar1 = find_variable(param_1)" identifier = (call_expression "find_variable(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }" { (expression_statement "iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);" (assignment_expression "iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c)" identifier = (call_expression "legal_number(*(undefined4 *)(iVar1 + 4),local_1c)" identifier (argument_list "(*(undefined4 *)(iVar1 + 4),local_1c)" ( (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }" { (expression_statement "funcnest_max = local_1c[0];" (assignment_expression "funcnest_max = local_1c[0]" identifier = (subscript_expression "local_1c[0]" identifier [ number_literal ])) ;) (goto_statement "goto LAB_000520de;" goto statement_identifier ;) })) })) (expression_statement "funcnest_max = 0;" (assignment_expression "funcnest_max = 0" identifier = number_literal) ;) (labeled_statement "LAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" statement_identifier : (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) }))) comment (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid sv_funcnest(char *name)\n\n{\n  SHELL_VAR *pSVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  intmax_t num;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  pSVar1 = find_variable(name);\n  if (pSVar1 != (SHELL_VAR *)0x0) {\n    iVar2 = legal_number(pSVar1->value,&num);\n    if (iVar2 != 0) {\n      funcnest_max = (int)num;\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "void sv_funcnest(char *name)\n\n{\n  SHELL_VAR *pSVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  intmax_t num;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  pSVar1 = find_variable(name);\n  if (pSVar1 != (SHELL_VAR *)0x0) {\n    iVar2 = legal_number(pSVar1->value,&num);\n    if (iVar2 != 0) {\n      funcnest_max = (int)num;\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "sv_funcnest(char *name)" identifier (parameter_list "(char *name)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) ))) (compound_statement "{\n  SHELL_VAR *pSVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  intmax_t num;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  pSVar1 = find_variable(name);\n  if (pSVar1 != (SHELL_VAR *)0x0) {\n    iVar2 = legal_number(pSVar1->value,&num);\n    if (iVar2 != 0) {\n      funcnest_max = (int)num;\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "SHELL_VAR *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "intmax_t num;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_8;" type_identifier identifier ;) (expression_statement "uStack_8 = 0x52096;" (assignment_expression "uStack_8 = 0x52096" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "pSVar1 = find_variable(name);" (assignment_expression "pSVar1 = find_variable(name)" identifier = (call_expression "find_variable(name)" identifier (argument_list "(name)" ( identifier )))) ;) (if_statement "if (pSVar1 != (SHELL_VAR *)0x0) {\n    iVar2 = legal_number(pSVar1->value,&num);\n    if (iVar2 != 0) {\n      funcnest_max = (int)num;\n      goto LAB_000520de;\n    }\n  }" if (parenthesized_expression "(pSVar1 != (SHELL_VAR *)0x0)" ( (binary_expression "pSVar1 != (SHELL_VAR *)0x0" identifier != (cast_expression "(SHELL_VAR *)0x0" ( (type_descriptor "SHELL_VAR *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = legal_number(pSVar1->value,&num);\n    if (iVar2 != 0) {\n      funcnest_max = (int)num;\n      goto LAB_000520de;\n    }\n  }" { (expression_statement "iVar2 = legal_number(pSVar1->value,&num);" (assignment_expression "iVar2 = legal_number(pSVar1->value,&num)" identifier = (call_expression "legal_number(pSVar1->value,&num)" identifier (argument_list "(pSVar1->value,&num)" ( (field_expression "pSVar1->value" identifier -> field_identifier) , (pointer_expression "&num" & identifier) )))) ;) (if_statement "if (iVar2 != 0) {\n      funcnest_max = (int)num;\n      goto LAB_000520de;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      funcnest_max = (int)num;\n      goto LAB_000520de;\n    }" { (expression_statement "funcnest_max = (int)num;" (assignment_expression "funcnest_max = (int)num" identifier = (cast_expression "(int)num" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (goto_statement "goto LAB_000520de;" goto statement_identifier ;) })) })) (expression_statement "funcnest_max = 0;" (assignment_expression "funcnest_max = 0" identifier = number_literal) ;) (labeled_statement "LAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" statement_identifier : (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void sv_funcnest(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = find_variable(param_1);\n  if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}\n\n" (function_definition "void sv_funcnest(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = find_variable(param_1);\n  if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}" primitive_type (function_declarator "sv_funcnest(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = find_variable(param_1);\n  if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_1c [3];" type_identifier (array_declarator "local_1c [3]" identifier [ number_literal ]) ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_8;" type_identifier identifier ;) (expression_statement "uStack_8 = 0x52096;" (assignment_expression "uStack_8 = 0x52096" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = find_variable(param_1);" (assignment_expression "iVar1 = find_variable(param_1)" identifier = (call_expression "find_variable(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }" { (expression_statement "iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);" (assignment_expression "iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c)" identifier = (call_expression "legal_number(*(undefined4 *)(iVar1 + 4),local_1c)" identifier (argument_list "(*(undefined4 *)(iVar1 + 4),local_1c)" ( (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }" { (expression_statement "funcnest_max = local_1c[0];" (assignment_expression "funcnest_max = local_1c[0]" identifier = (subscript_expression "local_1c[0]" identifier [ number_literal ])) ;) (goto_statement "goto LAB_000520de;" goto statement_identifier ;) })) })) (expression_statement "funcnest_max = 0;" (assignment_expression "funcnest_max = 0" identifier = number_literal) ;) (labeled_statement "LAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" statement_identifier : (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) }))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void sv_funcnest(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = find_variable(param_1);\n  if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}" (primitive_type "void") (function_declarator "sv_funcnest(undefined4 param_1)" (identifier "sv_funcnest") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x52096;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = find_variable(param_1);\n  if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }\n  funcnest_max = 0;\nLAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 local_1c [3];" (type_identifier "undefined4") (array_declarator "local_1c [3]" (identifier "local_1c") ([ "[") (number_literal "3") (] "]")) (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (declaration "undefined4 uStack_8;" (type_identifier "undefined4") (identifier "uStack_8") (; ";")) (expression_statement "uStack_8 = 0x52096;" (assignment_expression "uStack_8 = 0x52096" (identifier "uStack_8") (= "=") (number_literal "0x52096")) (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar1 = find_variable(param_1);" (assignment_expression "iVar1 = find_variable(param_1)" (identifier "iVar1") (= "=") (call_expression "find_variable(param_1)" (identifier "find_variable") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);\n    if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }\n  }" ({ "{") (expression_statement "iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);" (assignment_expression "iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c)" (identifier "iVar1") (= "=") (call_expression "legal_number(*(undefined4 *)(iVar1 + 4),local_1c)" (identifier "legal_number") (argument_list "(*(undefined4 *)(iVar1 + 4),local_1c)" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 4)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (, ",") (identifier "local_1c") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      funcnest_max = local_1c[0];\n      goto LAB_000520de;\n    }" ({ "{") (expression_statement "funcnest_max = local_1c[0];" (assignment_expression "funcnest_max = local_1c[0]" (identifier "funcnest_max") (= "=") (subscript_expression "local_1c[0]" (identifier "local_1c") ([ "[") (number_literal "0") (] "]"))) (; ";")) (goto_statement "goto LAB_000520de;" (goto "goto") (statement_identifier "LAB_000520de") (; ";")) (} "}"))) (} "}"))) (expression_statement "funcnest_max = 0;" (assignment_expression "funcnest_max = 0" (identifier "funcnest_max") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_000520de:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (statement_identifier "LAB_000520de") (: ":") (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}")))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" (identifier "FUN_000ecc40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void function_1(char *name)

{
  type_1 *var_3;
  int var_5;
  int var_1;
  type_2 num;
  int var_6;
  type_3 uStack_8;
  
  uStack_8 = 0x52096;
  var_6 = *(int *)(var_1 + 0x14);
  var_3 = var_2(name);
  if (var_3 != (type_1 *)0x0) {
    var_5 = var_4(var_3->value,&num);
    if (var_5 != 0) {
      funcnest_max = (int)num;
      goto LAB_000520de;
    }
  }
  funcnest_max = 0;
LAB_000520de:
  if (var_6 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_7();
}


(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: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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 (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (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))))))) consequence: (compound_statement (return_statement)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

void MASKED(undefined4 param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined4 local_1c [3];
  int local_10;
  undefined4 uStack_8;
  
  uStack_8 = 0x52096;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = find_variable(param_1);
  if (iVar1 != 0) {
    iVar1 = legal_number(*(undefined4 *)(iVar1 + 4),local_1c);
    if (iVar1 != 0) {
      funcnest_max = local_1c[0];
      goto LAB_000520de;
    }
  }
  funcnest_max = 0;
LAB_000520de:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}

