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

void ssh2_msg_channel_open_failure(Ssh_conflict ssh,Packet *pktin)

{
  ssh_channel *e;
  char *ptr;
  
  e = ssh_channel_msg(ssh,pktin);
  if (e != (ssh_channel *)0x0) {
    if (e->halfopen == 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");
    }
    if (e->type == 3) {
      ptr = ssh2_channel_open_failure_error_text(pktin);
      logeventf(ssh,"Forwarded connection refused by server: %s",ptr);
      safefree(ptr);
      pfd_close((PortForwarding *)(e->u).a.inbuffer.head);
    }
    else if (e->type != 5) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,
                    "ssh2_msg_channel_open_failure");
    }
    del234(ssh->channels,e);
    safefree(e);
  }
  return;
}



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

void FUN_0004ff00(int param_1)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = FUN_0004f670();
  if (iVar1 != 0) {
    if (*(int *)(iVar1 + 0x10) == 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");
    }
    if (*(int *)(iVar1 + 0xc) == 3) {
      uVar2 = FUN_00043a20();
      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);
      FUN_00032b40(uVar2);
      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));
    }
    else if (*(int *)(iVar1 + 0xc) != 5) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,
                    "ssh2_msg_channel_open_failure");
    }
    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);
    FUN_00032b40(iVar1);
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001c520
ADD EBX,0xea847
SUB ESP,0xc
MOV EDI,dword ptr [ESP + 0x20]
MOV EDX,dword ptr [ESP + 0x24]
MOV EAX,EDI
CALL 0x0004f670
TEST EAX,EAX
JZ 0x0004ff59
MOV EDX,dword ptr [EAX + 0x10]
MOV ESI,EAX
TEST EDX,EDX
JZ 0x0004ffb9
MOV EAX,dword ptr [EAX + 0xc]
CMP EAX,0x3
JZ 0x0004ff68
CMP EAX,0x5
JNZ 0x0004ff9a
SUB ESP,0x8
PUSH ESI
PUSH dword ptr [EDI + 0x124]
CALL 0x0009ef40
MOV dword ptr [ESP],ESI
CALL 0x00032b40
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0x24]
CALL 0x00043a20
SUB ESP,0x4
PUSH EAX
MOV EBP,EAX
LEA EAX,[EBX + 0xfffa9ed8]
PUSH EAX
PUSH EDI
CALL 0x0003f420
MOV dword ptr [ESP],EBP
CALL 0x00032b40
POP EAX
PUSH dword ptr [ESI + 0x4c]
CALL 0x00034460
ADD ESP,0x10
JMP 0x0004ff3f
LEA EAX,[EBX + 0xfffaae54]
PUSH EAX
LEA EAX,[EBX + 0xfffa6c1f]
PUSH 0x217c
PUSH EAX
LEA EAX,[EBX + 0xfffa9f04]
PUSH EAX
CALL 0x0001c000
LEA EAX,[EBX + 0xfffaae54]
PUSH EAX
LEA EAX,[EBX + 0xfffa6c1f]
PUSH 0x2163
PUSH EAX
LEA EAX,[EBX + 0xfffa79a1]
PUSH EAX
CALL 0x0001c000
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0004ff00(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_0004f670();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_0004ff00(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_0004f670();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0004ff00(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_0004f670();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_0004f670();" (assignment_expression "iVar1 = FUN_0004f670()" identifier = (call_expression "FUN_0004f670()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }" { (if_statement "if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0x10) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x10) == 0" (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }" { comment (expression_statement "__assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");" (call_expression "__assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure")" identifier (argument_list "("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure")" ( (string_literal ""c->halfopen"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_failure"" " string_content ") ))) ;) })) (if_statement "if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 3)" ( (binary_expression "*(int *)(iVar1 + 0xc) == 3" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }" { (expression_statement "uVar2 = FUN_00043a20();" (assignment_expression "uVar2 = FUN_00043a20()" identifier = (call_expression "FUN_00043a20()" identifier (argument_list "()" ( )))) ;) (expression_statement "FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);" (call_expression "FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2)" identifier (argument_list "(param_1,"Forwarded connection refused by server: %s",uVar2)" ( identifier , (string_literal ""Forwarded connection refused by server: %s"" " string_content ") , identifier ))) ;) (expression_statement "FUN_00032b40(uVar2);" (call_expression "FUN_00032b40(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));" (call_expression "FUN_00034460(*(undefined4 *)(iVar1 + 0x4c))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x4c))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x4c)" * (cast_expression "(undefined4 *)(iVar1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) ))) ;) }) (else_clause "else if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" else (if_statement "if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 5)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 5" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" { comment (expression_statement "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");" (call_expression "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure")" identifier (argument_list "("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure")" ( (string_literal ""!\"Funny channel type in ssh2_msg_channel_open_failure\""" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_failure"" " string_content ") ))) ;) })))) (expression_statement "FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);" (call_expression "FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x124),iVar1)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x124)" * (cast_expression "(undefined4 *)(param_1 + 0x124)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "FUN_00032b40(iVar1);" (call_expression "FUN_00032b40(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh2_msg_channel_open_failure(Ssh_conflict ssh,Packet *pktin)\n\n{\n  ssh_channel *e;\n  char *ptr;\n  \n  e = ssh_channel_msg(ssh,pktin);\n  if (e != (ssh_channel *)0x0) {\n    if (e->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (e->type == 3) {\n      ptr = ssh2_channel_open_failure_error_text(pktin);\n      logeventf(ssh,"Forwarded connection refused by server: %s",ptr);\n      safefree(ptr);\n      pfd_close((PortForwarding *)(e->u).a.inbuffer.head);\n    }\n    else if (e->type != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    del234(ssh->channels,e);\n    safefree(e);\n  }\n  return;\n}\n\n" comment comment comment (function_definition "void ssh2_msg_channel_open_failure(Ssh_conflict ssh,Packet *pktin)\n\n{\n  ssh_channel *e;\n  char *ptr;\n  \n  e = ssh_channel_msg(ssh,pktin);\n  if (e != (ssh_channel *)0x0) {\n    if (e->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (e->type == 3) {\n      ptr = ssh2_channel_open_failure_error_text(pktin);\n      logeventf(ssh,"Forwarded connection refused by server: %s",ptr);\n      safefree(ptr);\n      pfd_close((PortForwarding *)(e->u).a.inbuffer.head);\n    }\n    else if (e->type != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    del234(ssh->channels,e);\n    safefree(e);\n  }\n  return;\n}" primitive_type (function_declarator "ssh2_msg_channel_open_failure(Ssh_conflict ssh,Packet *pktin)" identifier (parameter_list "(Ssh_conflict ssh,Packet *pktin)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "Packet *pktin" type_identifier (pointer_declarator "*pktin" * identifier)) ))) (compound_statement "{\n  ssh_channel *e;\n  char *ptr;\n  \n  e = ssh_channel_msg(ssh,pktin);\n  if (e != (ssh_channel *)0x0) {\n    if (e->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (e->type == 3) {\n      ptr = ssh2_channel_open_failure_error_text(pktin);\n      logeventf(ssh,"Forwarded connection refused by server: %s",ptr);\n      safefree(ptr);\n      pfd_close((PortForwarding *)(e->u).a.inbuffer.head);\n    }\n    else if (e->type != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    del234(ssh->channels,e);\n    safefree(e);\n  }\n  return;\n}" { (declaration "ssh_channel *e;" type_identifier (pointer_declarator "*e" * identifier) ;) (declaration "char *ptr;" primitive_type (pointer_declarator "*ptr" * identifier) ;) (expression_statement "e = ssh_channel_msg(ssh,pktin);" (assignment_expression "e = ssh_channel_msg(ssh,pktin)" identifier = (call_expression "ssh_channel_msg(ssh,pktin)" identifier (argument_list "(ssh,pktin)" ( identifier , identifier )))) ;) (if_statement "if (e != (ssh_channel *)0x0) {\n    if (e->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (e->type == 3) {\n      ptr = ssh2_channel_open_failure_error_text(pktin);\n      logeventf(ssh,"Forwarded connection refused by server: %s",ptr);\n      safefree(ptr);\n      pfd_close((PortForwarding *)(e->u).a.inbuffer.head);\n    }\n    else if (e->type != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    del234(ssh->channels,e);\n    safefree(e);\n  }" if (parenthesized_expression "(e != (ssh_channel *)0x0)" ( (binary_expression "e != (ssh_channel *)0x0" identifier != (cast_expression "(ssh_channel *)0x0" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (e->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (e->type == 3) {\n      ptr = ssh2_channel_open_failure_error_text(pktin);\n      logeventf(ssh,"Forwarded connection refused by server: %s",ptr);\n      safefree(ptr);\n      pfd_close((PortForwarding *)(e->u).a.inbuffer.head);\n    }\n    else if (e->type != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    del234(ssh->channels,e);\n    safefree(e);\n  }" { (if_statement "if (e->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }" if (parenthesized_expression "(e->halfopen == 0)" ( (binary_expression "e->halfopen == 0" (field_expression "e->halfopen" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }" { comment (expression_statement "__assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");" (call_expression "__assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure")" identifier (argument_list "("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure")" ( (string_literal ""c->halfopen"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_failure"" " string_content ") ))) ;) })) (if_statement "if (e->type == 3) {\n      ptr = ssh2_channel_open_failure_error_text(pktin);\n      logeventf(ssh,"Forwarded connection refused by server: %s",ptr);\n      safefree(ptr);\n      pfd_close((PortForwarding *)(e->u).a.inbuffer.head);\n    }\n    else if (e->type != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" if (parenthesized_expression "(e->type == 3)" ( (binary_expression "e->type == 3" (field_expression "e->type" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      ptr = ssh2_channel_open_failure_error_text(pktin);\n      logeventf(ssh,"Forwarded connection refused by server: %s",ptr);\n      safefree(ptr);\n      pfd_close((PortForwarding *)(e->u).a.inbuffer.head);\n    }" { (expression_statement "ptr = ssh2_channel_open_failure_error_text(pktin);" (assignment_expression "ptr = ssh2_channel_open_failure_error_text(pktin)" identifier = (call_expression "ssh2_channel_open_failure_error_text(pktin)" identifier (argument_list "(pktin)" ( identifier )))) ;) (expression_statement "logeventf(ssh,"Forwarded connection refused by server: %s",ptr);" (call_expression "logeventf(ssh,"Forwarded connection refused by server: %s",ptr)" identifier (argument_list "(ssh,"Forwarded connection refused by server: %s",ptr)" ( identifier , (string_literal ""Forwarded connection refused by server: %s"" " string_content ") , identifier ))) ;) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) (expression_statement "pfd_close((PortForwarding *)(e->u).a.inbuffer.head);" (call_expression "pfd_close((PortForwarding *)(e->u).a.inbuffer.head)" identifier (argument_list "((PortForwarding *)(e->u).a.inbuffer.head)" ( (cast_expression "(PortForwarding *)(e->u).a.inbuffer.head" ( (type_descriptor "PortForwarding *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(e->u).a.inbuffer.head" (field_expression "(e->u).a.inbuffer" (field_expression "(e->u).a" (parenthesized_expression "(e->u)" ( (field_expression "e->u" identifier -> field_identifier) )) . field_identifier) . field_identifier) . field_identifier)) ))) ;) }) (else_clause "else if (e->type != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" else (if_statement "if (e->type != 5) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" if (parenthesized_expression "(e->type != 5)" ( (binary_expression "e->type != 5" (field_expression "e->type" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" { comment (expression_statement "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");" (call_expression "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure")" identifier (argument_list "("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure")" ( (string_literal ""!\"Funny channel type in ssh2_msg_channel_open_failure\""" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_failure"" " string_content ") ))) ;) })))) (expression_statement "del234(ssh->channels,e);" (call_expression "del234(ssh->channels,e)" identifier (argument_list "(ssh->channels,e)" ( (field_expression "ssh->channels" identifier -> field_identifier) , identifier ))) ;) (expression_statement "safefree(e);" (call_expression "safefree(e)" identifier (argument_list "(e)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0004ff00(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_0004f670();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }\n  return;\n}\n\n" (function_definition "void FUN_0004ff00(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_0004f670();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0004ff00(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_0004f670();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_0004f670();" (assignment_expression "iVar1 = FUN_0004f670()" identifier = (call_expression "FUN_0004f670()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }" { (if_statement "if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0x10) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x10) == 0" (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }" { (expression_statement "__assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");" (call_expression "__assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure")" identifier (argument_list "("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure")" ( (string_literal ""c->halfopen"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_failure"" " string_content ") ))) ;) })) (if_statement "if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 3)" ( (binary_expression "*(int *)(iVar1 + 0xc) == 3" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }" { (expression_statement "uVar2 = FUN_00043a20();" (assignment_expression "uVar2 = FUN_00043a20()" identifier = (call_expression "FUN_00043a20()" identifier (argument_list "()" ( )))) ;) (expression_statement "FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);" (call_expression "FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2)" identifier (argument_list "(param_1,"Forwarded connection refused by server: %s",uVar2)" ( identifier , (string_literal ""Forwarded connection refused by server: %s"" " string_content ") , identifier ))) ;) (expression_statement "FUN_00032b40(uVar2);" (call_expression "FUN_00032b40(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));" (call_expression "FUN_00034460(*(undefined4 *)(iVar1 + 0x4c))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x4c))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x4c)" * (cast_expression "(undefined4 *)(iVar1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) ))) ;) }) (else_clause "else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" else (if_statement "if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 5)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 5" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" { (expression_statement "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");" (call_expression "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure")" identifier (argument_list "("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure")" ( (string_literal ""!\"Funny channel type in ssh2_msg_channel_open_failure\""" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_failure"" " string_content ") ))) ;) })))) (expression_statement "FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);" (call_expression "FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x124),iVar1)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x124)" * (cast_expression "(undefined4 *)(param_1 + 0x124)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "FUN_00032b40(iVar1);" (call_expression "FUN_00032b40(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(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 ( )))) ;) (if_statement if (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 ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (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 (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) }) (else_clause else (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 ( (string_literal " string_content escape_sequence string_content escape_sequence ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })))) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_0004ff00(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_0004f670();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0004ff00(int param_1)" (identifier "FUN_0004ff00") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_0004f670();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = FUN_0004f670();" (assignment_expression "iVar1 = FUN_0004f670()" (identifier "iVar1") (= "=") (call_expression "FUN_0004f670()" (identifier "FUN_0004f670") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }\n    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);\n    FUN_00032b40(iVar1);\n  }" ({ "{") (if_statement "if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0x10) == 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0x10) == 0" (pointer_expression "*(int *)(iVar1 + 0x10)" (* "*") (cast_expression "(int *)(iVar1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");\n    }" ({ "{") (expression_statement "__assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");" (call_expression "__assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure")" (identifier "__assert_fail") (argument_list "("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure")" (( "(") (string_literal ""c->halfopen"" (" """) (string_content "c->halfopen") (" """)) (, ",") (string_literal ""ssh.c"" (" """) (string_content "ssh.c") (" """)) (, ",") (number_literal "0x2163") (, ",") (string_literal ""ssh2_msg_channel_open_failure"" (" """) (string_content "ssh2_msg_channel_open_failure") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (*(int *)(iVar1 + 0xc) == 3) {\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }\n    else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 3)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) == 3" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "3")) () ")")) (compound_statement "{\n      uVar2 = FUN_00043a20();\n      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);\n      FUN_00032b40(uVar2);\n      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));\n    }" ({ "{") (expression_statement "uVar2 = FUN_00043a20();" (assignment_expression "uVar2 = FUN_00043a20()" (identifier "uVar2") (= "=") (call_expression "FUN_00043a20()" (identifier "FUN_00043a20") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);" (call_expression "FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2)" (identifier "FUN_0003f420") (argument_list "(param_1,"Forwarded connection refused by server: %s",uVar2)" (( "(") (identifier "param_1") (, ",") (string_literal ""Forwarded connection refused by server: %s"" (" """) (string_content "Forwarded connection refused by server: %s") (" """)) (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "FUN_00032b40(uVar2);" (call_expression "FUN_00032b40(uVar2)" (identifier "FUN_00032b40") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));" (call_expression "FUN_00034460(*(undefined4 *)(iVar1 + 0x4c))" (identifier "FUN_00034460") (argument_list "(*(undefined4 *)(iVar1 + 0x4c))" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0x4c)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4c)" (( "(") (binary_expression "iVar1 + 0x4c" (identifier "iVar1") (+ "+") (number_literal "0x4c")) () ")")))) () ")"))) (; ";")) (} "}")) (else_clause "else if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" (else "else") (if_statement "if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 5)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) != 5" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "5")) () ")")) (compound_statement "{\n                    \n      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");\n    }" ({ "{") (expression_statement "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure");" (call_expression "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure")" (identifier "__assert_fail") (argument_list "("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,\n                    "ssh2_msg_channel_open_failure")" (( "(") (string_literal ""!\"Funny channel type in ssh2_msg_channel_open_failure\""" (" """) (string_content "!") (escape_sequence "\"") (string_content "Funny channel type in ssh2_msg_channel_open_failure") (escape_sequence "\"") (" """)) (, ",") (string_literal ""ssh.c"" (" """) (string_content "ssh.c") (" """)) (, ",") (number_literal "0x217c") (, ",") (string_literal ""ssh2_msg_channel_open_failure"" (" """) (string_content "ssh2_msg_channel_open_failure") (" """)) () ")"))) (; ";")) (} "}"))))) (expression_statement "FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);" (call_expression "FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1)" (identifier "FUN_0009ef40") (argument_list "(*(undefined4 *)(param_1 + 0x124),iVar1)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x124)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x124)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x124)" (( "(") (binary_expression "param_1 + 0x124" (identifier "param_1") (+ "+") (number_literal "0x124")) () ")")))) (, ",") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "FUN_00032b40(iVar1);" (call_expression "FUN_00032b40(iVar1)" (identifier "FUN_00032b40") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 ssh,type_2 *pktin)

{
  type_3 *var_2;
  char *ptr;
  
  var_2 = var_1(ssh,pktin);
  if (var_2 != (type_3 *)0x0) {
    if (var_2->halfopen == 0) {
                    /* WARNING: Subroutine does not return */
      var_3("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");
    }
    if (var_2->type == 3) {
      ptr = var_4(pktin);
      var_5(ssh,"Forwarded connection refused by server: %s",ptr);
      var_6(ptr);
      var_7((type_4 *)(var_2->u).a.inbuffer.head);
    }
    else if (var_2->type != 5) {
                    /* WARNING: Subroutine does not return */
      var_3("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,
                    "ssh2_msg_channel_open_failure");
    }
    var_8(ssh->channels,var_2);
    var_6(var_2);
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (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)))) (if_statement condition: (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 (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (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 (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (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))))))))) alternative: (else_clause (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 (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))))) (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))))) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (return_statement))))

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

void MASKED(int param_1)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = FUN_0004f670();
  if (iVar1 != 0) {
    if (*(int *)(iVar1 + 0x10) == 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("c->halfopen","ssh.c",0x2163,"ssh2_msg_channel_open_failure");
    }
    if (*(int *)(iVar1 + 0xc) == 3) {
      uVar2 = FUN_00043a20();
      FUN_0003f420(param_1,"Forwarded connection refused by server: %s",uVar2);
      FUN_00032b40(uVar2);
      FUN_00034460(*(undefined4 *)(iVar1 + 0x4c));
    }
    else if (*(int *)(iVar1 + 0xc) != 5) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_failure\"","ssh.c",0x217c,
                    "ssh2_msg_channel_open_failure");
    }
    FUN_0009ef40(*(undefined4 *)(param_1 + 0x124),iVar1);
    FUN_00032b40(iVar1);
  }
  return;
}

