
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Unknown calling convention */

int unbind_nameref(char *name)

{
  SHELL_VAR *pSVar1;
  int iVar2;
  uint uVar3;
  
  pSVar1 = var_lookup(name,shell_variables);
  uVar3 = 0;
  if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar3 = pSVar1->attributes & 0x800, uVar3 != 0)) {
    iVar2 = makunbound(name,shell_variables);
    return iVar2;
  }
  return uVar3;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

uint unbind_nameref(undefined4 param_1)

{
  int iVar1;
  uint uVar2;
  
  iVar1 = var_lookup(param_1,shell_variables);
  uVar2 = 0;
  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {
    uVar2 = makunbound(param_1,shell_variables);
    return uVar2;
  }
  return uVar2;
}


PUSH ESI
CALL 0x0003363d
ADD ESI,0xf2d8a
PUSH EBX
SUB ESP,0xc
MOV EBX,dword ptr [ESP + 0x18]
PUSH dword ptr [ESI + 0x5d10]
PUSH EBX
CALL 0x00051b30
ADD ESP,0x10
XOR EDX,EDX
TEST EAX,EAX
JZ 0x000572a4
MOV EDX,dword ptr [EAX + 0x14]
AND EDX,0x800
JNZ 0x000572b0
ADD ESP,0x4
MOV EAX,EDX
POP EBX
POP ESI
RET
SUB ESP,0x8
PUSH dword ptr [ESI + 0x5d10]
PUSH EBX
CALL 0x00056f60
ADD ESP,0x10
ADD ESP,0x4
MOV EDX,EAX
MOV EAX,EDX
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nuint unbind_nameref(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = var_lookup(param_1,shell_variables);\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }\n  return uVar2;\n}\n\n" comment (function_definition "uint unbind_nameref(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = var_lookup(param_1,shell_variables);\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "unbind_nameref(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = var_lookup(param_1,shell_variables);\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = var_lookup(param_1,shell_variables);" (assignment_expression "iVar1 = var_lookup(param_1,shell_variables)" identifier = (call_expression "var_lookup(param_1,shell_variables)" identifier (argument_list "(param_1,shell_variables)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }" if (parenthesized_expression "((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0))" ( (binary_expression "(iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)" ( (comma_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0" (assignment_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 0x800" identifier = (binary_expression "*(uint *)(iVar1 + 0x14) & 0x800" (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) & number_literal)) , (binary_expression "uVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }" { (expression_statement "uVar2 = makunbound(param_1,shell_variables);" (assignment_expression "uVar2 = makunbound(param_1,shell_variables)" identifier = (call_expression "makunbound(param_1,shell_variables)" identifier (argument_list "(param_1,shell_variables)" ( identifier , identifier )))) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* WARNING: Unknown calling convention */\n\nint unbind_nameref(char *name)\n\n{\n  SHELL_VAR *pSVar1;\n  int iVar2;\n  uint uVar3;\n  \n  pSVar1 = var_lookup(name,shell_variables);\n  uVar3 = 0;\n  if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar3 = pSVar1->attributes & 0x800, uVar3 != 0)) {\n    iVar2 = makunbound(name,shell_variables);\n    return iVar2;\n  }\n  return uVar3;\n}\n\n" comment comment (function_definition "int unbind_nameref(char *name)\n\n{\n  SHELL_VAR *pSVar1;\n  int iVar2;\n  uint uVar3;\n  \n  pSVar1 = var_lookup(name,shell_variables);\n  uVar3 = 0;\n  if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar3 = pSVar1->attributes & 0x800, uVar3 != 0)) {\n    iVar2 = makunbound(name,shell_variables);\n    return iVar2;\n  }\n  return uVar3;\n}" primitive_type (function_declarator "unbind_nameref(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  uint uVar3;\n  \n  pSVar1 = var_lookup(name,shell_variables);\n  uVar3 = 0;\n  if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar3 = pSVar1->attributes & 0x800, uVar3 != 0)) {\n    iVar2 = makunbound(name,shell_variables);\n    return iVar2;\n  }\n  return uVar3;\n}" { (declaration "SHELL_VAR *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "pSVar1 = var_lookup(name,shell_variables);" (assignment_expression "pSVar1 = var_lookup(name,shell_variables)" identifier = (call_expression "var_lookup(name,shell_variables)" identifier (argument_list "(name,shell_variables)" ( identifier , identifier )))) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar3 = pSVar1->attributes & 0x800, uVar3 != 0)) {\n    iVar2 = makunbound(name,shell_variables);\n    return iVar2;\n  }" if (parenthesized_expression "((pSVar1 != (SHELL_VAR *)0x0) && (uVar3 = pSVar1->attributes & 0x800, uVar3 != 0))" ( (binary_expression "(pSVar1 != (SHELL_VAR *)0x0) && (uVar3 = pSVar1->attributes & 0x800, uVar3 != 0)" (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)) )) && (parenthesized_expression "(uVar3 = pSVar1->attributes & 0x800, uVar3 != 0)" ( (comma_expression "uVar3 = pSVar1->attributes & 0x800, uVar3 != 0" (assignment_expression "uVar3 = pSVar1->attributes & 0x800" identifier = (binary_expression "pSVar1->attributes & 0x800" (field_expression "pSVar1->attributes" identifier -> field_identifier) & number_literal)) , (binary_expression "uVar3 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    iVar2 = makunbound(name,shell_variables);\n    return iVar2;\n  }" { (expression_statement "iVar2 = makunbound(name,shell_variables);" (assignment_expression "iVar2 = makunbound(name,shell_variables)" identifier = (call_expression "makunbound(name,shell_variables)" identifier (argument_list "(name,shell_variables)" ( identifier , identifier )))) ;) (return_statement "return iVar2;" return identifier ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "uint unbind_nameref(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = var_lookup(param_1,shell_variables);\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }\n  return uVar2;\n}\n\n" (function_definition "uint unbind_nameref(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = var_lookup(param_1,shell_variables);\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "unbind_nameref(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = var_lookup(param_1,shell_variables);\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = var_lookup(param_1,shell_variables);" (assignment_expression "iVar1 = var_lookup(param_1,shell_variables)" identifier = (call_expression "var_lookup(param_1,shell_variables)" identifier (argument_list "(param_1,shell_variables)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }" if (parenthesized_expression "((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0))" ( (binary_expression "(iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)" ( (comma_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0" (assignment_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 0x800" identifier = (binary_expression "*(uint *)(iVar1 + 0x14) & 0x800" (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) & number_literal)) , (binary_expression "uVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }" { (expression_statement "uVar2 = makunbound(param_1,shell_variables);" (assignment_expression "uVar2 = makunbound(param_1,shell_variables)" identifier = (call_expression "makunbound(param_1,shell_variables)" identifier (argument_list "(param_1,shell_variables)" ( identifier , identifier )))) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT)) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (return_statement return IDENT ;) })) (return_statement return IDENT ;) })))
(function_definition "uint unbind_nameref(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = var_lookup(param_1,shell_variables);\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }\n  return uVar2;\n}" (type_identifier "uint") (function_declarator "unbind_nameref(undefined4 param_1)" (identifier "unbind_nameref") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = var_lookup(param_1,shell_variables);\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = var_lookup(param_1,shell_variables);" (assignment_expression "iVar1 = var_lookup(param_1,shell_variables)" (identifier "iVar1") (= "=") (call_expression "var_lookup(param_1,shell_variables)" (identifier "var_lookup") (argument_list "(param_1,shell_variables)" (( "(") (identifier "param_1") (, ",") (identifier "shell_variables") () ")")))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }" (if "if") (parenthesized_expression "((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0))" (( "(") (binary_expression "(iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)" (( "(") (comma_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0" (assignment_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 0x800" (identifier "uVar2") (= "=") (binary_expression "*(uint *)(iVar1 + 0x14) & 0x800" (pointer_expression "*(uint *)(iVar1 + 0x14)" (* "*") (cast_expression "(uint *)(iVar1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")")))) (& "&") (number_literal "0x800"))) (, ",") (binary_expression "uVar2 != 0" (identifier "uVar2") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    uVar2 = makunbound(param_1,shell_variables);\n    return uVar2;\n  }" ({ "{") (expression_statement "uVar2 = makunbound(param_1,shell_variables);" (assignment_expression "uVar2 = makunbound(param_1,shell_variables)" (identifier "uVar2") (= "=") (call_expression "makunbound(param_1,shell_variables)" (identifier "makunbound") (argument_list "(param_1,shell_variables)" (( "(") (identifier "param_1") (, ",") (identifier "shell_variables") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Unknown calling convention */

int function_1(char *name)

{
  type_1 *var_2;
  int iVar2;
  type_2 var_3;
  
  var_2 = var_1(name,shell_variables);
  var_3 = 0;
  if ((var_2 != (type_1 *)0x0) && (var_3 = var_2->attributes & 0x800, var_3 != 0)) {
    iVar2 = var_4(name,shell_variables);
    return iVar2;
  }
  return var_3;
}


(translation_unit (function_definition type: (type_identifier) 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: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (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: (binary_expression left: (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))))) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (return_statement (identifier)))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

uint MASKED(undefined4 param_1)

{
  int iVar1;
  uint uVar2;
  
  iVar1 = var_lookup(param_1,shell_variables);
  uVar2 = 0;
  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 0x800, uVar2 != 0)) {
    uVar2 = makunbound(param_1,shell_variables);
    return uVar2;
  }
  return uVar2;
}

