
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void ssh2_setup_agent(ssh_channel *c,Packet *pktin,void *ctx)

{
  Ssh_conflict ssh;
  Packet *pkt;
  
  ssh = c->ssh;
  if (ctx == (void *)0x0) {
    ctx = safemalloc(1,4);
    *(undefined4 *)ctx = 0;
  }
  else {
                    /* WARNING: Load size is inaccurate */
    if (*ctx != 0) {
      if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {
        if (pktin->type == 99) {
          logevent(ssh->frontend,"Agent forwarding enabled");
          ssh->agentfwd_enabled = 1;
        }
        else {
          logevent(ssh->frontend,"Agent forwarding refused");
        }
      }
      safefree(ctx);
      return;
    }
  }
  logevent(ssh->frontend,"Requesting OpenSSH-style agent forwarding");
  pkt = ssh2_chanreq_init(ssh->mainchan,"auth-agent-req@openssh.com",ssh2_setup_agent,ctx);
  ssh2_pkt_send(ssh,pkt);
  *(undefined4 *)ctx = 0x237f;
  return;
}



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

void FUN_00046a50(int *param_1,int param_2,int *param_3)

{
  int iVar1;
  
  iVar1 = *param_1;
  if (param_3 == (int *)0x0) {
    param_3 = (int *)FUN_0002e780(1,4);
    *param_3 = 0;
  }
  else if (*param_3 != 0) {
    if ((*param_3 == 0x237f) && (param_2 != 0)) {
      if (*(int *)(param_2 + 8) == 99) {
        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");
        *(undefined4 *)(iVar1 + 0x48) = 1;
      }
      else {
        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");
      }
    }
    FUN_0002f010(param_3);
    return;
  }
  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");
  FUN_0003d0d0(param_3);
  FUN_000460b0();
  *param_3 = 0x237f;
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EAX,dword ptr [ESP + 0x10]
CALL 0x0001c4f0
ADD EBX,0xc9cf4
MOV ESI,dword ptr [ESP + 0x18]
MOV EDI,dword ptr [EAX]
TEST ESI,ESI
JZ 0x00046ac0
MOV EAX,dword ptr [ESI]
TEST EAX,EAX
JZ 0x00046ad7
CMP EAX,0x237f
JZ 0x00046a90
SUB ESP,0xc
PUSH ESI
CALL 0x0002f010
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
MOV EAX,dword ptr [ESP + 0x14]
TEST EAX,EAX
JZ 0x00046a79
MOV ECX,dword ptr [ESP + 0x14]
MOV EAX,dword ptr [EDI + 0x110]
CMP dword ptr [ECX + 0x8],0x63
JZ 0x00046b20
SUB ESP,0x8
LEA EDX,[EBX + 0xfffae896]
PUSH EDX
PUSH EAX
CALL 0x00092cc0
ADD ESP,0x10
JMP 0x00046a79
SUB ESP,0x8
PUSH 0x4
PUSH 0x1
CALL 0x0002e780
ADD ESP,0x10
MOV dword ptr [EAX],0x0
MOV ESI,EAX
SUB ESP,0x8
LEA EAX,[EBX + 0xfffb0dec]
PUSH EAX
PUSH dword ptr [EDI + 0x110]
CALL 0x00092cc0
MOV EAX,dword ptr [EDI + 0x128]
MOV dword ptr [ESP],ESI
LEA ECX,[EBX + 0xfff36300]
LEA EDX,[EBX + 0xfffae862]
CALL 0x0003d0d0
MOV EDX,EAX
MOV EAX,EDI
CALL 0x000460b0
ADD ESP,0x10
MOV dword ptr [ESI],0x237f
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x8
LEA EDX,[EBX + 0xfffae87d]
PUSH EDX
PUSH EAX
CALL 0x00092cc0
MOV dword ptr [EDI + 0x48],0x1
ADD ESP,0x10
JMP 0x00046a79
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00046a50(int *param_1,int param_2,int *param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_1;\n  if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }\n  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");\n  FUN_0003d0d0(param_3);\n  FUN_000460b0();\n  *param_3 = 0x237f;\n  return;\n}\n\n" comment (function_definition "void FUN_00046a50(int *param_1,int param_2,int *param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_1;\n  if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }\n  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");\n  FUN_0003d0d0(param_3);\n  FUN_000460b0();\n  *param_3 = 0x237f;\n  return;\n}" primitive_type (function_declarator "FUN_00046a50(int *param_1,int param_2,int *param_3)" identifier (parameter_list "(int *param_1,int param_2,int *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *param_1;\n  if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }\n  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");\n  FUN_0003d0d0(param_3);\n  FUN_000460b0();\n  *param_3 = 0x237f;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" if (parenthesized_expression "(param_3 == (int *)0x0)" ( (binary_expression "param_3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }" { (expression_statement "param_3 = (int *)FUN_0002e780(1,4);" (assignment_expression "param_3 = (int *)FUN_0002e780(1,4)" identifier = (cast_expression "(int *)FUN_0002e780(1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(1,4)" identifier (argument_list "(1,4)" ( number_literal , number_literal ))))) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) }) (else_clause "else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" else (if_statement "if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" if (parenthesized_expression "(*param_3 != 0)" ( (binary_expression "*param_3 != 0" (pointer_expression "*param_3" * identifier) != number_literal) )) (compound_statement "{\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" { (if_statement "if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }" if (parenthesized_expression "((*param_3 == 0x237f) && (param_2 != 0))" ( (binary_expression "(*param_3 == 0x237f) && (param_2 != 0)" (parenthesized_expression "(*param_3 == 0x237f)" ( (binary_expression "*param_3 == 0x237f" (pointer_expression "*param_3" * identifier) == number_literal) )) && (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }" { (if_statement "if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }" if (parenthesized_expression "(*(int *)(param_2 + 8) == 99)" ( (binary_expression "*(int *)(param_2 + 8) == 99" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }" { (expression_statement "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");" (call_expression "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled")" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled")" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x110)" * (cast_expression "(undefined4 *)(iVar1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x110)" ( (binary_expression "iVar1 + 0x110" identifier + number_literal) )))) , (string_literal ""Agent forwarding enabled"" " string_content ") ))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x48) = 1;" (assignment_expression "*(undefined4 *)(iVar1 + 0x48) = 1" (pointer_expression "*(undefined4 *)(iVar1 + 0x48)" * (cast_expression "(undefined4 *)(iVar1 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x48)" ( (binary_expression "iVar1 + 0x48" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }" else (compound_statement "{\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }" { (expression_statement "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");" (call_expression "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused")" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused")" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x110)" * (cast_expression "(undefined4 *)(iVar1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x110)" ( (binary_expression "iVar1 + 0x110" identifier + number_literal) )))) , (string_literal ""Agent forwarding refused"" " string_content ") ))) ;) }))) })) (expression_statement "FUN_0002f010(param_3);" (call_expression "FUN_0002f010(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) (return_statement "return;" return ;) })))) (expression_statement "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");" (call_expression "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding")" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding")" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x110)" * (cast_expression "(undefined4 *)(iVar1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x110)" ( (binary_expression "iVar1 + 0x110" identifier + number_literal) )))) , (string_literal ""Requesting OpenSSH-style agent forwarding"" " string_content ") ))) ;) (expression_statement "FUN_0003d0d0(param_3);" (call_expression "FUN_0003d0d0(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) (expression_statement "FUN_000460b0();" (call_expression "FUN_000460b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "*param_3 = 0x237f;" (assignment_expression "*param_3 = 0x237f" (pointer_expression "*param_3" * identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh2_setup_agent(ssh_channel *c,Packet *pktin,void *ctx)\n\n{\n  Ssh_conflict ssh;\n  Packet *pkt;\n  \n  ssh = c->ssh;\n  if (ctx == (void *)0x0) {\n    ctx = safemalloc(1,4);\n    *(undefined4 *)ctx = 0;\n  }\n  else {\n                    /* WARNING: Load size is inaccurate */\n    if (*ctx != 0) {\n      if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }\n      safefree(ctx);\n      return;\n    }\n  }\n  logevent(ssh->frontend,"Requesting OpenSSH-style agent forwarding");\n  pkt = ssh2_chanreq_init(ssh->mainchan,"auth-agent-req@openssh.com",ssh2_setup_agent,ctx);\n  ssh2_pkt_send(ssh,pkt);\n  *(undefined4 *)ctx = 0x237f;\n  return;\n}\n\n" comment comment (function_definition "void ssh2_setup_agent(ssh_channel *c,Packet *pktin,void *ctx)\n\n{\n  Ssh_conflict ssh;\n  Packet *pkt;\n  \n  ssh = c->ssh;\n  if (ctx == (void *)0x0) {\n    ctx = safemalloc(1,4);\n    *(undefined4 *)ctx = 0;\n  }\n  else {\n                    /* WARNING: Load size is inaccurate */\n    if (*ctx != 0) {\n      if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }\n      safefree(ctx);\n      return;\n    }\n  }\n  logevent(ssh->frontend,"Requesting OpenSSH-style agent forwarding");\n  pkt = ssh2_chanreq_init(ssh->mainchan,"auth-agent-req@openssh.com",ssh2_setup_agent,ctx);\n  ssh2_pkt_send(ssh,pkt);\n  *(undefined4 *)ctx = 0x237f;\n  return;\n}" primitive_type (function_declarator "ssh2_setup_agent(ssh_channel *c,Packet *pktin,void *ctx)" identifier (parameter_list "(ssh_channel *c,Packet *pktin,void *ctx)" ( (parameter_declaration "ssh_channel *c" type_identifier (pointer_declarator "*c" * identifier)) , (parameter_declaration "Packet *pktin" type_identifier (pointer_declarator "*pktin" * identifier)) , (parameter_declaration "void *ctx" primitive_type (pointer_declarator "*ctx" * identifier)) ))) (compound_statement "{\n  Ssh_conflict ssh;\n  Packet *pkt;\n  \n  ssh = c->ssh;\n  if (ctx == (void *)0x0) {\n    ctx = safemalloc(1,4);\n    *(undefined4 *)ctx = 0;\n  }\n  else {\n                    /* WARNING: Load size is inaccurate */\n    if (*ctx != 0) {\n      if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }\n      safefree(ctx);\n      return;\n    }\n  }\n  logevent(ssh->frontend,"Requesting OpenSSH-style agent forwarding");\n  pkt = ssh2_chanreq_init(ssh->mainchan,"auth-agent-req@openssh.com",ssh2_setup_agent,ctx);\n  ssh2_pkt_send(ssh,pkt);\n  *(undefined4 *)ctx = 0x237f;\n  return;\n}" { (declaration "Ssh_conflict ssh;" type_identifier identifier ;) (declaration "Packet *pkt;" type_identifier (pointer_declarator "*pkt" * identifier) ;) (expression_statement "ssh = c->ssh;" (assignment_expression "ssh = c->ssh" identifier = (field_expression "c->ssh" identifier -> field_identifier)) ;) (if_statement "if (ctx == (void *)0x0) {\n    ctx = safemalloc(1,4);\n    *(undefined4 *)ctx = 0;\n  }\n  else {\n                    /* WARNING: Load size is inaccurate */\n    if (*ctx != 0) {\n      if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }\n      safefree(ctx);\n      return;\n    }\n  }" if (parenthesized_expression "(ctx == (void *)0x0)" ( (binary_expression "ctx == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ctx = safemalloc(1,4);\n    *(undefined4 *)ctx = 0;\n  }" { (expression_statement "ctx = safemalloc(1,4);" (assignment_expression "ctx = safemalloc(1,4)" identifier = (call_expression "safemalloc(1,4)" identifier (argument_list "(1,4)" ( number_literal , number_literal )))) ;) (expression_statement "*(undefined4 *)ctx = 0;" (assignment_expression "*(undefined4 *)ctx = 0" (pointer_expression "*(undefined4 *)ctx" * (cast_expression "(undefined4 *)ctx" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) }) (else_clause "else {\n                    /* WARNING: Load size is inaccurate */\n    if (*ctx != 0) {\n      if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }\n      safefree(ctx);\n      return;\n    }\n  }" else (compound_statement "{\n                    /* WARNING: Load size is inaccurate */\n    if (*ctx != 0) {\n      if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }\n      safefree(ctx);\n      return;\n    }\n  }" { comment (if_statement "if (*ctx != 0) {\n      if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }\n      safefree(ctx);\n      return;\n    }" if (parenthesized_expression "(*ctx != 0)" ( (binary_expression "*ctx != 0" (pointer_expression "*ctx" * identifier) != number_literal) )) (compound_statement "{\n      if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }\n      safefree(ctx);\n      return;\n    }" { (if_statement "if ((*ctx == 0x237f) && (pktin != (Packet *)0x0)) {\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }" if (parenthesized_expression "((*ctx == 0x237f) && (pktin != (Packet *)0x0))" ( (binary_expression "(*ctx == 0x237f) && (pktin != (Packet *)0x0)" (parenthesized_expression "(*ctx == 0x237f)" ( (binary_expression "*ctx == 0x237f" (pointer_expression "*ctx" * identifier) == number_literal) )) && (parenthesized_expression "(pktin != (Packet *)0x0)" ( (binary_expression "pktin != (Packet *)0x0" identifier != (cast_expression "(Packet *)0x0" ( (type_descriptor "Packet *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }\n      }" { (if_statement "if (pktin->type == 99) {\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }\n        else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }" if (parenthesized_expression "(pktin->type == 99)" ( (binary_expression "pktin->type == 99" (field_expression "pktin->type" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n          logevent(ssh->frontend,"Agent forwarding enabled");\n          ssh->agentfwd_enabled = 1;\n        }" { (expression_statement "logevent(ssh->frontend,"Agent forwarding enabled");" (call_expression "logevent(ssh->frontend,"Agent forwarding enabled")" identifier (argument_list "(ssh->frontend,"Agent forwarding enabled")" ( (field_expression "ssh->frontend" identifier -> field_identifier) , (string_literal ""Agent forwarding enabled"" " string_content ") ))) ;) (expression_statement "ssh->agentfwd_enabled = 1;" (assignment_expression "ssh->agentfwd_enabled = 1" (field_expression "ssh->agentfwd_enabled" identifier -> field_identifier) = number_literal) ;) }) (else_clause "else {\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }" else (compound_statement "{\n          logevent(ssh->frontend,"Agent forwarding refused");\n        }" { (expression_statement "logevent(ssh->frontend,"Agent forwarding refused");" (call_expression "logevent(ssh->frontend,"Agent forwarding refused")" identifier (argument_list "(ssh->frontend,"Agent forwarding refused")" ( (field_expression "ssh->frontend" identifier -> field_identifier) , (string_literal ""Agent forwarding refused"" " string_content ") ))) ;) }))) })) (expression_statement "safefree(ctx);" (call_expression "safefree(ctx)" identifier (argument_list "(ctx)" ( identifier ))) ;) (return_statement "return;" return ;) })) }))) (expression_statement "logevent(ssh->frontend,"Requesting OpenSSH-style agent forwarding");" (call_expression "logevent(ssh->frontend,"Requesting OpenSSH-style agent forwarding")" identifier (argument_list "(ssh->frontend,"Requesting OpenSSH-style agent forwarding")" ( (field_expression "ssh->frontend" identifier -> field_identifier) , (string_literal ""Requesting OpenSSH-style agent forwarding"" " string_content ") ))) ;) (expression_statement "pkt = ssh2_chanreq_init(ssh->mainchan,"auth-agent-req@openssh.com",ssh2_setup_agent,ctx);" (assignment_expression "pkt = ssh2_chanreq_init(ssh->mainchan,"auth-agent-req@openssh.com",ssh2_setup_agent,ctx)" identifier = (call_expression "ssh2_chanreq_init(ssh->mainchan,"auth-agent-req@openssh.com",ssh2_setup_agent,ctx)" identifier (argument_list "(ssh->mainchan,"auth-agent-req@openssh.com",ssh2_setup_agent,ctx)" ( (field_expression "ssh->mainchan" identifier -> field_identifier) , (string_literal ""auth-agent-req@openssh.com"" " string_content ") , identifier , identifier )))) ;) (expression_statement "ssh2_pkt_send(ssh,pkt);" (call_expression "ssh2_pkt_send(ssh,pkt)" identifier (argument_list "(ssh,pkt)" ( identifier , identifier ))) ;) (expression_statement "*(undefined4 *)ctx = 0x237f;" (assignment_expression "*(undefined4 *)ctx = 0x237f" (pointer_expression "*(undefined4 *)ctx" * (cast_expression "(undefined4 *)ctx" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00046a50(int *param_1,int param_2,int *param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_1;\n  if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }\n  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");\n  FUN_0003d0d0(param_3);\n  FUN_000460b0();\n  *param_3 = 0x237f;\n  return;\n}\n\n" (function_definition "void FUN_00046a50(int *param_1,int param_2,int *param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_1;\n  if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }\n  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");\n  FUN_0003d0d0(param_3);\n  FUN_000460b0();\n  *param_3 = 0x237f;\n  return;\n}" primitive_type (function_declarator "FUN_00046a50(int *param_1,int param_2,int *param_3)" identifier (parameter_list "(int *param_1,int param_2,int *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *param_1;\n  if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }\n  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");\n  FUN_0003d0d0(param_3);\n  FUN_000460b0();\n  *param_3 = 0x237f;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" if (parenthesized_expression "(param_3 == (int *)0x0)" ( (binary_expression "param_3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }" { (expression_statement "param_3 = (int *)FUN_0002e780(1,4);" (assignment_expression "param_3 = (int *)FUN_0002e780(1,4)" identifier = (cast_expression "(int *)FUN_0002e780(1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(1,4)" identifier (argument_list "(1,4)" ( number_literal , number_literal ))))) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) }) (else_clause "else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" else (if_statement "if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" if (parenthesized_expression "(*param_3 != 0)" ( (binary_expression "*param_3 != 0" (pointer_expression "*param_3" * identifier) != number_literal) )) (compound_statement "{\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" { (if_statement "if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }" if (parenthesized_expression "((*param_3 == 0x237f) && (param_2 != 0))" ( (binary_expression "(*param_3 == 0x237f) && (param_2 != 0)" (parenthesized_expression "(*param_3 == 0x237f)" ( (binary_expression "*param_3 == 0x237f" (pointer_expression "*param_3" * identifier) == number_literal) )) && (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }" { (if_statement "if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }" if (parenthesized_expression "(*(int *)(param_2 + 8) == 99)" ( (binary_expression "*(int *)(param_2 + 8) == 99" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }" { (expression_statement "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");" (call_expression "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled")" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled")" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x110)" * (cast_expression "(undefined4 *)(iVar1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x110)" ( (binary_expression "iVar1 + 0x110" identifier + number_literal) )))) , (string_literal ""Agent forwarding enabled"" " string_content ") ))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x48) = 1;" (assignment_expression "*(undefined4 *)(iVar1 + 0x48) = 1" (pointer_expression "*(undefined4 *)(iVar1 + 0x48)" * (cast_expression "(undefined4 *)(iVar1 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x48)" ( (binary_expression "iVar1 + 0x48" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }" else (compound_statement "{\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }" { (expression_statement "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");" (call_expression "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused")" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused")" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x110)" * (cast_expression "(undefined4 *)(iVar1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x110)" ( (binary_expression "iVar1 + 0x110" identifier + number_literal) )))) , (string_literal ""Agent forwarding refused"" " string_content ") ))) ;) }))) })) (expression_statement "FUN_0002f010(param_3);" (call_expression "FUN_0002f010(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) (return_statement "return;" return ;) })))) (expression_statement "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");" (call_expression "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding")" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding")" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x110)" * (cast_expression "(undefined4 *)(iVar1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x110)" ( (binary_expression "iVar1 + 0x110" identifier + number_literal) )))) , (string_literal ""Requesting OpenSSH-style agent forwarding"" " string_content ") ))) ;) (expression_statement "FUN_0003d0d0(param_3);" (call_expression "FUN_0003d0d0(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) (expression_statement "FUN_000460b0();" (call_expression "FUN_000460b0()" identifier (argument_list "()" ( ))) ;) (expression_statement "*param_3 = 0x237f;" (assignment_expression "*param_3 = 0x237f" (pointer_expression "*param_3" * identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (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 == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content ") ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content ") ))) ;) }))) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content ") ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_00046a50(int *param_1,int param_2,int *param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_1;\n  if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }\n  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");\n  FUN_0003d0d0(param_3);\n  FUN_000460b0();\n  *param_3 = 0x237f;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00046a50(int *param_1,int param_2,int *param_3)" (identifier "FUN_00046a50") (parameter_list "(int *param_1,int param_2,int *param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *param_1;\n  if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }\n  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");\n  FUN_0003d0d0(param_3);\n  FUN_000460b0();\n  *param_3 = 0x237f;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (param_3 == (int *)0x0) {\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }\n  else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" (if "if") (parenthesized_expression "(param_3 == (int *)0x0)" (( "(") (binary_expression "param_3 == (int *)0x0" (identifier "param_3") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    param_3 = (int *)FUN_0002e780(1,4);\n    *param_3 = 0;\n  }" ({ "{") (expression_statement "param_3 = (int *)FUN_0002e780(1,4);" (assignment_expression "param_3 = (int *)FUN_0002e780(1,4)" (identifier "param_3") (= "=") (cast_expression "(int *)FUN_0002e780(1,4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002e780(1,4)" (identifier "FUN_0002e780") (argument_list "(1,4)" (( "(") (number_literal "1") (, ",") (number_literal "4") () ")"))))) (; ";")) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" (else "else") (if_statement "if (*param_3 != 0) {\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" (if "if") (parenthesized_expression "(*param_3 != 0)" (( "(") (binary_expression "*param_3 != 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }\n    FUN_0002f010(param_3);\n    return;\n  }" ({ "{") (if_statement "if ((*param_3 == 0x237f) && (param_2 != 0)) {\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }" (if "if") (parenthesized_expression "((*param_3 == 0x237f) && (param_2 != 0))" (( "(") (binary_expression "(*param_3 == 0x237f) && (param_2 != 0)" (parenthesized_expression "(*param_3 == 0x237f)" (( "(") (binary_expression "*param_3 == 0x237f" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (== "==") (number_literal "0x237f")) () ")")) (&& "&&") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }\n    }" ({ "{") (if_statement "if (*(int *)(param_2 + 8) == 99) {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }\n      else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }" (if "if") (parenthesized_expression "(*(int *)(param_2 + 8) == 99)" (( "(") (binary_expression "*(int *)(param_2 + 8) == 99" (pointer_expression "*(int *)(param_2 + 8)" (* "*") (cast_expression "(int *)(param_2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (== "==") (number_literal "99")) () ")")) (compound_statement "{\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");\n        *(undefined4 *)(iVar1 + 0x48) = 1;\n      }" ({ "{") (expression_statement "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");" (call_expression "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled")" (identifier "FUN_00092cc0") (argument_list "(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled")" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0x110)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x110)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x110)" (( "(") (binary_expression "iVar1 + 0x110" (identifier "iVar1") (+ "+") (number_literal "0x110")) () ")")))) (, ",") (string_literal ""Agent forwarding enabled"" (" """) (string_content "Agent forwarding enabled") (" """)) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x48) = 1;" (assignment_expression "*(undefined4 *)(iVar1 + 0x48) = 1" (pointer_expression "*(undefined4 *)(iVar1 + 0x48)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x48)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x48)" (( "(") (binary_expression "iVar1 + 0x48" (identifier "iVar1") (+ "+") (number_literal "0x48")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }" (else "else") (compound_statement "{\n        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");\n      }" ({ "{") (expression_statement "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");" (call_expression "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused")" (identifier "FUN_00092cc0") (argument_list "(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused")" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0x110)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x110)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x110)" (( "(") (binary_expression "iVar1 + 0x110" (identifier "iVar1") (+ "+") (number_literal "0x110")) () ")")))) (, ",") (string_literal ""Agent forwarding refused"" (" """) (string_content "Agent forwarding refused") (" """)) () ")"))) (; ";")) (} "}")))) (} "}"))) (expression_statement "FUN_0002f010(param_3);" (call_expression "FUN_0002f010(param_3)" (identifier "FUN_0002f010") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))))) (expression_statement "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");" (call_expression "FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding")" (identifier "FUN_00092cc0") (argument_list "(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding")" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0x110)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x110)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x110)" (( "(") (binary_expression "iVar1 + 0x110" (identifier "iVar1") (+ "+") (number_literal "0x110")) () ")")))) (, ",") (string_literal ""Requesting OpenSSH-style agent forwarding"" (" """) (string_content "Requesting OpenSSH-style agent forwarding") (" """)) () ")"))) (; ";")) (expression_statement "FUN_0003d0d0(param_3);" (call_expression "FUN_0003d0d0(param_3)" (identifier "FUN_0003d0d0") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")"))) (; ";")) (expression_statement "FUN_000460b0();" (call_expression "FUN_000460b0()" (identifier "FUN_000460b0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*param_3 = 0x237f;" (assignment_expression "*param_3 = 0x237f" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0x237f")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void function_1(type_1 *c,type_2 *var_3,void *var_1)

{
  type_3 ssh;
  type_2 *pkt;
  
  ssh = c->ssh;
  if (var_1 == (void *)0x0) {
    var_1 = var_2(1,4);
    *(type_4 *)var_1 = 0;
  }
  else {
                    /* WARNING: Load size is inaccurate */
    if (*var_1 != 0) {
      if ((*var_1 == 0x237f) && (var_3 != (type_2 *)0x0)) {
        if (var_3->type == 99) {
          var_4(ssh->frontend,"Agent forwarding enabled");
          ssh->agentfwd_enabled = 1;
        }
        else {
          var_4(ssh->frontend,"Agent forwarding refused");
        }
      }
      var_5(var_1);
      return;
    }
  }
  var_4(ssh->frontend,"Requesting OpenSSH-style agent forwarding");
  pkt = var_6(ssh->mainchan,"auth-agent-req@openssh.com",function_1,var_1);
  var_7(ssh,pkt);
  *(type_4 *)var_1 = 0x237f;
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (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: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))) consequence: (compound_statement (expression_statement (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))))) (string_literal (string_content))))) (expression_statement (assignment_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)))) alternative: (else_clause (compound_statement (expression_statement (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))))) (string_literal (string_content)))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))) (expression_statement (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))))) (string_literal (string_content))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement))))

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

void MASKED(int *param_1,int param_2,int *param_3)

{
  int iVar1;
  
  iVar1 = *param_1;
  if (param_3 == (int *)0x0) {
    param_3 = (int *)FUN_0002e780(1,4);
    *param_3 = 0;
  }
  else if (*param_3 != 0) {
    if ((*param_3 == 0x237f) && (param_2 != 0)) {
      if (*(int *)(param_2 + 8) == 99) {
        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding enabled");
        *(undefined4 *)(iVar1 + 0x48) = 1;
      }
      else {
        FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Agent forwarding refused");
      }
    }
    FUN_0002f010(param_3);
    return;
  }
  FUN_00092cc0(*(undefined4 *)(iVar1 + 0x110),"Requesting OpenSSH-style agent forwarding");
  FUN_0003d0d0(param_3);
  FUN_000460b0();
  *param_3 = 0x237f;
  return;
}

