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

int agent_exists(void)

{
  char *pcVar1;
  uint uVar2;
  
  pcVar1 = getenv("SSH_AUTH_SOCK");
  uVar2 = 0;
  if (pcVar1 != (char *)0x0) {
    uVar2 = (uint)(*pcVar1 != '\0');
  }
  return uVar2;
}



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

bool FUN_000641c0(void)

{
  char *pcVar1;
  bool bVar2;
  
  pcVar1 = getenv("SSH_AUTH_SOCK");
  bVar2 = false;
  if (pcVar1 != (char *)0x0) {
    bVar2 = *pcVar1 != '\0';
  }
  return bVar2;
}


PUSH EBX
CALL 0x00014970
ADD EBX,0x45bca
SUB ESP,0x14
LEA EAX,[EBX + 0xfffd6768]
PUSH EAX
CALL 0x00014340
ADD ESP,0x10
XOR EDX,EDX
TEST EAX,EAX
JZ 0x000641ec
XOR EDX,EDX
CMP byte ptr [EAX],0x0
SETNZ DL
ADD ESP,0x8
MOV EAX,EDX
POP EBX
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbool FUN_000641c0(void)\n\n{\n  char *pcVar1;\n  bool bVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  bVar2 = false;\n  if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }\n  return bVar2;\n}\n\n" comment (function_definition "bool FUN_000641c0(void)\n\n{\n  char *pcVar1;\n  bool bVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  bVar2 = false;\n  if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }\n  return bVar2;\n}" primitive_type (function_declarator "FUN_000641c0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  char *pcVar1;\n  bool bVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  bVar2 = false;\n  if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }\n  return bVar2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "bool bVar2;" primitive_type identifier ;) (expression_statement "pcVar1 = getenv("SSH_AUTH_SOCK");" (assignment_expression "pcVar1 = getenv("SSH_AUTH_SOCK")" identifier = (call_expression "getenv("SSH_AUTH_SOCK")" identifier (argument_list "("SSH_AUTH_SOCK")" ( (string_literal ""SSH_AUTH_SOCK"" " string_content ") )))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    bVar2 = *pcVar1 != '\0';\n  }" { (expression_statement "bVar2 = *pcVar1 != '\0';" (assignment_expression "bVar2 = *pcVar1 != '\0'" identifier = (binary_expression "*pcVar1 != '\0'" (pointer_expression "*pcVar1" * identifier) != (char_literal "'\0'" ' escape_sequence '))) ;) })) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint agent_exists(void)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  uVar2 = 0;\n  if (pcVar1 != (char *)0x0) {\n    uVar2 = (uint)(*pcVar1 != '\0');\n  }\n  return uVar2;\n}\n\n" comment comment (function_definition "int agent_exists(void)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  uVar2 = 0;\n  if (pcVar1 != (char *)0x0) {\n    uVar2 = (uint)(*pcVar1 != '\0');\n  }\n  return uVar2;\n}" primitive_type (function_declarator "agent_exists(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  char *pcVar1;\n  uint uVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  uVar2 = 0;\n  if (pcVar1 != (char *)0x0) {\n    uVar2 = (uint)(*pcVar1 != '\0');\n  }\n  return uVar2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "pcVar1 = getenv("SSH_AUTH_SOCK");" (assignment_expression "pcVar1 = getenv("SSH_AUTH_SOCK")" identifier = (call_expression "getenv("SSH_AUTH_SOCK")" identifier (argument_list "("SSH_AUTH_SOCK")" ( (string_literal ""SSH_AUTH_SOCK"" " string_content ") )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n    uVar2 = (uint)(*pcVar1 != '\0');\n  }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar2 = (uint)(*pcVar1 != '\0');\n  }" { (expression_statement "uVar2 = (uint)(*pcVar1 != '\0');" (assignment_expression "uVar2 = (uint)(*pcVar1 != '\0')" identifier = (call_expression "(uint)(*pcVar1 != '\0')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*pcVar1 != '\0')" ( (binary_expression "*pcVar1 != '\0'" (pointer_expression "*pcVar1" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )))) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "bool FUN_000641c0(void)\n\n{\n  char *pcVar1;\n  bool bVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  bVar2 = false;\n  if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }\n  return bVar2;\n}\n\n" (function_definition "bool FUN_000641c0(void)\n\n{\n  char *pcVar1;\n  bool bVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  bVar2 = false;\n  if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }\n  return bVar2;\n}" primitive_type (function_declarator "FUN_000641c0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  char *pcVar1;\n  bool bVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  bVar2 = false;\n  if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }\n  return bVar2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "bool bVar2;" primitive_type identifier ;) (expression_statement "pcVar1 = getenv("SSH_AUTH_SOCK");" (assignment_expression "pcVar1 = getenv("SSH_AUTH_SOCK")" identifier = (call_expression "getenv("SSH_AUTH_SOCK")" identifier (argument_list "("SSH_AUTH_SOCK")" ( (string_literal ""SSH_AUTH_SOCK"" " string_content ") )))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    bVar2 = *pcVar1 != '\0';\n  }" { (expression_statement "bVar2 = *pcVar1 != '\0';" (assignment_expression "bVar2 = *pcVar1 != '\0'" identifier = (binary_expression "*pcVar1 != '\0'" (pointer_expression "*pcVar1" * identifier) != (char_literal "'\0'" ' escape_sequence '))) ;) })) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence '))) ;) })) (return_statement return IDENT ;) })))
(function_definition "bool FUN_000641c0(void)\n\n{\n  char *pcVar1;\n  bool bVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  bVar2 = false;\n  if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }\n  return bVar2;\n}" (primitive_type "bool") (function_declarator "FUN_000641c0(void)" (identifier "FUN_000641c0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  char *pcVar1;\n  bool bVar2;\n  \n  pcVar1 = getenv("SSH_AUTH_SOCK");\n  bVar2 = false;\n  if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }\n  return bVar2;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (expression_statement "pcVar1 = getenv("SSH_AUTH_SOCK");" (assignment_expression "pcVar1 = getenv("SSH_AUTH_SOCK")" (identifier "pcVar1") (= "=") (call_expression "getenv("SSH_AUTH_SOCK")" (identifier "getenv") (argument_list "("SSH_AUTH_SOCK")" (( "(") (string_literal ""SSH_AUTH_SOCK"" (" """) (string_content "SSH_AUTH_SOCK") (" """)) () ")")))) (; ";")) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (if_statement "if (pcVar1 != (char *)0x0) {\n    bVar2 = *pcVar1 != '\0';\n  }" (if "if") (parenthesized_expression "(pcVar1 != (char *)0x0)" (( "(") (binary_expression "pcVar1 != (char *)0x0" (identifier "pcVar1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    bVar2 = *pcVar1 != '\0';\n  }" ({ "{") (expression_statement "bVar2 = *pcVar1 != '\0';" (assignment_expression "bVar2 = *pcVar1 != '\0'" (identifier "bVar2") (= "=") (binary_expression "*pcVar1 != '\0'" (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) (; ";")) (} "}"))) (return_statement "return bVar2;" (return "return") (identifier "bVar2") (; ";")) (} "}")))

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

int function_1(void)

{
  char *var_2;
  type_1 uVar2;
  
  var_2 = var_1("SSH_AUTH_SOCK");
  uVar2 = 0;
  if (var_2 != (char *)0x0) {
    uVar2 = (type_1)(*var_2 != '\0');
  }
  return uVar2;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))) (expression_statement (assignment_expression left: (identifier) right: (false))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence))))))) (return_statement (identifier)))))

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

bool MASKED(void)

{
  char *pcVar1;
  bool bVar2;
  
  pcVar1 = getenv("SSH_AUTH_SOCK");
  bVar2 = false;
  if (pcVar1 != (char *)0x0) {
    bVar2 = *pcVar1 != '\0';
  }
  return bVar2;
}

