
/* 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_response(Ssh_conflict ssh,Packet *pktin)

{
  outstanding_channel_request *ptr;
  ssh_channel *c;
  char *pcVar1;
  
  c = ssh_channel_msg(ssh,pktin);
  if (c != (ssh_channel *)0x0) {
    ptr = (c->v).v2.chanreq_head;
    if (ptr != (outstanding_channel_request *)0x0) {
      (*ptr->handler)(c,pktin,ptr->ctx);
      (c->v).v2.chanreq_head = ptr->next;
      safefree(ptr);
      ssh2_channel_check_close(c);
      return;
    }
    pcVar1 = ssh2_pkt_type(ssh->pkt_kctx,ssh->pkt_actx,pktin->type);
    pcVar1 = dupprintf("Server protocol violation: unexpected %s packet",pcVar1);
    ssh_disconnect(ssh,(char *)0x0,pcVar1,2,0);
    safefree(pcVar1);
  }
  return;
}



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

void FUN_00044da0(undefined4 param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  int iVar2;
  undefined4 uVar3;
  
  iVar2 = FUN_00043d00();
  if (iVar2 != 0) {
    puVar1 = *(undefined4 **)(iVar2 + 0x40);
    if (puVar1 != (undefined4 *)0x0) {
      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);
      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];
      FUN_0001dd30(puVar1);
      FUN_00044960();
      return;
    }
    uVar3 = FUN_00033520();
    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);
    FUN_00043b20(2,0);
    FUN_0001dd30(uVar3);
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x87fc7
SUB ESP,0x1c
MOV ECX,dword ptr [ESP + 0x34]
MOV EBP,dword ptr [ESP + 0x30]
MOV EDX,ECX
MOV EAX,EBP
MOV dword ptr [ESP + 0xc],ECX
CALL 0x00043d00
TEST EAX,EAX
JZ 0x00044e42
MOV EDI,dword ptr [EAX + 0x40]
MOV ESI,EAX
MOV ECX,dword ptr [ESP + 0xc]
TEST EDI,EDI
JZ 0x00044e00
SUB ESP,0x4
PUSH dword ptr [EDI + 0x4]
PUSH ECX
PUSH EAX
CALL dword ptr [EDI]
MOV EAX,dword ptr [EDI + 0x8]
MOV dword ptr [ESI + 0x40],EAX
MOV dword ptr [ESP],EDI
CALL 0x0001dd30
ADD ESP,0x2c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x00044960
MOV ECX,dword ptr [ECX + 0x8]
MOV EDX,dword ptr [EBP + 0x188]
MOV EAX,dword ptr [EBP + 0x184]
CALL 0x00033520
SUB ESP,0x8
PUSH EAX
LEA EAX,[EBX + 0xfffc8660]
PUSH EAX
CALL 0x0001cea0
MOV ESI,EAX
POP EAX
POP EDX
PUSH 0x0
PUSH 0x2
MOV ECX,ESI
XOR EDX,EDX
MOV EAX,EBP
CALL 0x00043b20
MOV dword ptr [ESP],ESI
CALL 0x0001dd30
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00044da0(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar2 = FUN_00043d00();\n  if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_00044da0(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar2 = FUN_00043d00();\n  if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00044da0(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar2 = FUN_00043d00();\n  if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_00043d00();" (assignment_expression "iVar2 = FUN_00043d00()" identifier = (call_expression "FUN_00043d00()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }" { (expression_statement "puVar1 = *(undefined4 **)(iVar2 + 0x40);" (assignment_expression "puVar1 = *(undefined4 **)(iVar2 + 0x40)" identifier = (pointer_expression "*(undefined4 **)(iVar2 + 0x40)" * (cast_expression "(undefined4 **)(iVar2 + 0x40)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x40)" ( (binary_expression "iVar2 + 0x40" identifier + number_literal) ))))) ;) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }" if (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }" { (expression_statement "(*(code *)*puVar1)(iVar2,param_2,puVar1[1]);" (call_expression "(*(code *)*puVar1)(iVar2,param_2,puVar1[1])" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "(iVar2,param_2,puVar1[1])" ( identifier , identifier , (subscript_expression "puVar1[1]" identifier [ number_literal ]) ))) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x40) = puVar1[2];" (assignment_expression "*(undefined4 *)(iVar2 + 0x40) = puVar1[2]" (pointer_expression "*(undefined4 *)(iVar2 + 0x40)" * (cast_expression "(undefined4 *)(iVar2 + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x40)" ( (binary_expression "iVar2 + 0x40" identifier + number_literal) )))) = (subscript_expression "puVar1[2]" identifier [ number_literal ])) ;) (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) (expression_statement "FUN_00044960();" (call_expression "FUN_00044960()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar3 = FUN_00033520();" (assignment_expression "uVar3 = FUN_00033520()" identifier = (call_expression "FUN_00033520()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);" (assignment_expression "uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3)" identifier = (call_expression "FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3)" identifier (argument_list "("Server protocol violation: unexpected %s packet",uVar3)" ( (string_literal ""Server protocol violation: unexpected %s packet"" " string_content ") , identifier )))) ;) (expression_statement "FUN_00043b20(2,0);" (call_expression "FUN_00043b20(2,0)" identifier (argument_list "(2,0)" ( number_literal , number_literal ))) ;) (expression_statement "FUN_0001dd30(uVar3);" (call_expression "FUN_0001dd30(uVar3)" identifier (argument_list "(uVar3)" ( 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_response(Ssh_conflict ssh,Packet *pktin)\n\n{\n  outstanding_channel_request *ptr;\n  ssh_channel *c;\n  char *pcVar1;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if (c != (ssh_channel *)0x0) {\n    ptr = (c->v).v2.chanreq_head;\n    if (ptr != (outstanding_channel_request *)0x0) {\n      (*ptr->handler)(c,pktin,ptr->ctx);\n      (c->v).v2.chanreq_head = ptr->next;\n      safefree(ptr);\n      ssh2_channel_check_close(c);\n      return;\n    }\n    pcVar1 = ssh2_pkt_type(ssh->pkt_kctx,ssh->pkt_actx,pktin->type);\n    pcVar1 = dupprintf("Server protocol violation: unexpected %s packet",pcVar1);\n    ssh_disconnect(ssh,(char *)0x0,pcVar1,2,0);\n    safefree(pcVar1);\n  }\n  return;\n}\n\n" comment comment comment (function_definition "void ssh2_msg_channel_response(Ssh_conflict ssh,Packet *pktin)\n\n{\n  outstanding_channel_request *ptr;\n  ssh_channel *c;\n  char *pcVar1;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if (c != (ssh_channel *)0x0) {\n    ptr = (c->v).v2.chanreq_head;\n    if (ptr != (outstanding_channel_request *)0x0) {\n      (*ptr->handler)(c,pktin,ptr->ctx);\n      (c->v).v2.chanreq_head = ptr->next;\n      safefree(ptr);\n      ssh2_channel_check_close(c);\n      return;\n    }\n    pcVar1 = ssh2_pkt_type(ssh->pkt_kctx,ssh->pkt_actx,pktin->type);\n    pcVar1 = dupprintf("Server protocol violation: unexpected %s packet",pcVar1);\n    ssh_disconnect(ssh,(char *)0x0,pcVar1,2,0);\n    safefree(pcVar1);\n  }\n  return;\n}" primitive_type (function_declarator "ssh2_msg_channel_response(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  outstanding_channel_request *ptr;\n  ssh_channel *c;\n  char *pcVar1;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if (c != (ssh_channel *)0x0) {\n    ptr = (c->v).v2.chanreq_head;\n    if (ptr != (outstanding_channel_request *)0x0) {\n      (*ptr->handler)(c,pktin,ptr->ctx);\n      (c->v).v2.chanreq_head = ptr->next;\n      safefree(ptr);\n      ssh2_channel_check_close(c);\n      return;\n    }\n    pcVar1 = ssh2_pkt_type(ssh->pkt_kctx,ssh->pkt_actx,pktin->type);\n    pcVar1 = dupprintf("Server protocol violation: unexpected %s packet",pcVar1);\n    ssh_disconnect(ssh,(char *)0x0,pcVar1,2,0);\n    safefree(pcVar1);\n  }\n  return;\n}" { (declaration "outstanding_channel_request *ptr;" type_identifier (pointer_declarator "*ptr" * identifier) ;) (declaration "ssh_channel *c;" type_identifier (pointer_declarator "*c" * identifier) ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (expression_statement "c = ssh_channel_msg(ssh,pktin);" (assignment_expression "c = ssh_channel_msg(ssh,pktin)" identifier = (call_expression "ssh_channel_msg(ssh,pktin)" identifier (argument_list "(ssh,pktin)" ( identifier , identifier )))) ;) (if_statement "if (c != (ssh_channel *)0x0) {\n    ptr = (c->v).v2.chanreq_head;\n    if (ptr != (outstanding_channel_request *)0x0) {\n      (*ptr->handler)(c,pktin,ptr->ctx);\n      (c->v).v2.chanreq_head = ptr->next;\n      safefree(ptr);\n      ssh2_channel_check_close(c);\n      return;\n    }\n    pcVar1 = ssh2_pkt_type(ssh->pkt_kctx,ssh->pkt_actx,pktin->type);\n    pcVar1 = dupprintf("Server protocol violation: unexpected %s packet",pcVar1);\n    ssh_disconnect(ssh,(char *)0x0,pcVar1,2,0);\n    safefree(pcVar1);\n  }" if (parenthesized_expression "(c != (ssh_channel *)0x0)" ( (binary_expression "c != (ssh_channel *)0x0" identifier != (cast_expression "(ssh_channel *)0x0" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ptr = (c->v).v2.chanreq_head;\n    if (ptr != (outstanding_channel_request *)0x0) {\n      (*ptr->handler)(c,pktin,ptr->ctx);\n      (c->v).v2.chanreq_head = ptr->next;\n      safefree(ptr);\n      ssh2_channel_check_close(c);\n      return;\n    }\n    pcVar1 = ssh2_pkt_type(ssh->pkt_kctx,ssh->pkt_actx,pktin->type);\n    pcVar1 = dupprintf("Server protocol violation: unexpected %s packet",pcVar1);\n    ssh_disconnect(ssh,(char *)0x0,pcVar1,2,0);\n    safefree(pcVar1);\n  }" { (expression_statement "ptr = (c->v).v2.chanreq_head;" (assignment_expression "ptr = (c->v).v2.chanreq_head" identifier = (field_expression "(c->v).v2.chanreq_head" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ;) (if_statement "if (ptr != (outstanding_channel_request *)0x0) {\n      (*ptr->handler)(c,pktin,ptr->ctx);\n      (c->v).v2.chanreq_head = ptr->next;\n      safefree(ptr);\n      ssh2_channel_check_close(c);\n      return;\n    }" if (parenthesized_expression "(ptr != (outstanding_channel_request *)0x0)" ( (binary_expression "ptr != (outstanding_channel_request *)0x0" identifier != (cast_expression "(outstanding_channel_request *)0x0" ( (type_descriptor "outstanding_channel_request *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (*ptr->handler)(c,pktin,ptr->ctx);\n      (c->v).v2.chanreq_head = ptr->next;\n      safefree(ptr);\n      ssh2_channel_check_close(c);\n      return;\n    }" { (expression_statement "(*ptr->handler)(c,pktin,ptr->ctx);" (call_expression "(*ptr->handler)(c,pktin,ptr->ctx)" (parenthesized_expression "(*ptr->handler)" ( (pointer_expression "*ptr->handler" * (field_expression "ptr->handler" identifier -> field_identifier)) )) (argument_list "(c,pktin,ptr->ctx)" ( identifier , identifier , (field_expression "ptr->ctx" identifier -> field_identifier) ))) ;) (expression_statement "(c->v).v2.chanreq_head = ptr->next;" (assignment_expression "(c->v).v2.chanreq_head = ptr->next" (field_expression "(c->v).v2.chanreq_head" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (field_expression "ptr->next" identifier -> field_identifier)) ;) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) (expression_statement "ssh2_channel_check_close(c);" (call_expression "ssh2_channel_check_close(c)" identifier (argument_list "(c)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "pcVar1 = ssh2_pkt_type(ssh->pkt_kctx,ssh->pkt_actx,pktin->type);" (assignment_expression "pcVar1 = ssh2_pkt_type(ssh->pkt_kctx,ssh->pkt_actx,pktin->type)" identifier = (call_expression "ssh2_pkt_type(ssh->pkt_kctx,ssh->pkt_actx,pktin->type)" identifier (argument_list "(ssh->pkt_kctx,ssh->pkt_actx,pktin->type)" ( (field_expression "ssh->pkt_kctx" identifier -> field_identifier) , (field_expression "ssh->pkt_actx" identifier -> field_identifier) , (field_expression "pktin->type" identifier -> field_identifier) )))) ;) (expression_statement "pcVar1 = dupprintf("Server protocol violation: unexpected %s packet",pcVar1);" (assignment_expression "pcVar1 = dupprintf("Server protocol violation: unexpected %s packet",pcVar1)" identifier = (call_expression "dupprintf("Server protocol violation: unexpected %s packet",pcVar1)" identifier (argument_list "("Server protocol violation: unexpected %s packet",pcVar1)" ( (string_literal ""Server protocol violation: unexpected %s packet"" " string_content ") , identifier )))) ;) (expression_statement "ssh_disconnect(ssh,(char *)0x0,pcVar1,2,0);" (call_expression "ssh_disconnect(ssh,(char *)0x0,pcVar1,2,0)" identifier (argument_list "(ssh,(char *)0x0,pcVar1,2,0)" ( identifier , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , number_literal , number_literal ))) ;) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00044da0(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar2 = FUN_00043d00();\n  if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }\n  return;\n}\n\n" (function_definition "void FUN_00044da0(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar2 = FUN_00043d00();\n  if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00044da0(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar2 = FUN_00043d00();\n  if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_00043d00();" (assignment_expression "iVar2 = FUN_00043d00()" identifier = (call_expression "FUN_00043d00()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }" { (expression_statement "puVar1 = *(undefined4 **)(iVar2 + 0x40);" (assignment_expression "puVar1 = *(undefined4 **)(iVar2 + 0x40)" identifier = (pointer_expression "*(undefined4 **)(iVar2 + 0x40)" * (cast_expression "(undefined4 **)(iVar2 + 0x40)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x40)" ( (binary_expression "iVar2 + 0x40" identifier + number_literal) ))))) ;) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }" if (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }" { (expression_statement "(*(code *)*puVar1)(iVar2,param_2,puVar1[1]);" (call_expression "(*(code *)*puVar1)(iVar2,param_2,puVar1[1])" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "(iVar2,param_2,puVar1[1])" ( identifier , identifier , (subscript_expression "puVar1[1]" identifier [ number_literal ]) ))) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x40) = puVar1[2];" (assignment_expression "*(undefined4 *)(iVar2 + 0x40) = puVar1[2]" (pointer_expression "*(undefined4 *)(iVar2 + 0x40)" * (cast_expression "(undefined4 *)(iVar2 + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x40)" ( (binary_expression "iVar2 + 0x40" identifier + number_literal) )))) = (subscript_expression "puVar1[2]" identifier [ number_literal ])) ;) (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) (expression_statement "FUN_00044960();" (call_expression "FUN_00044960()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar3 = FUN_00033520();" (assignment_expression "uVar3 = FUN_00033520()" identifier = (call_expression "FUN_00033520()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);" (assignment_expression "uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3)" identifier = (call_expression "FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3)" identifier (argument_list "("Server protocol violation: unexpected %s packet",uVar3)" ( (string_literal ""Server protocol violation: unexpected %s packet"" " string_content ") , identifier )))) ;) (expression_statement "FUN_00043b20(2,0);" (call_expression "FUN_00043b20(2,0)" identifier (argument_list "(2,0)" ( number_literal , number_literal ))) ;) (expression_statement "FUN_0001dd30(uVar3);" (call_expression "FUN_0001dd30(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (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 { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( IDENT , IDENT , (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00044da0(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar2 = FUN_00043d00();\n  if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00044da0(undefined4 param_1,undefined4 param_2)" (identifier "FUN_00044da0") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar2 = FUN_00043d00();\n  if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }\n  return;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "iVar2 = FUN_00043d00();" (assignment_expression "iVar2 = FUN_00043d00()" (identifier "iVar2") (= "=") (call_expression "FUN_00043d00()" (identifier "FUN_00043d00") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    puVar1 = *(undefined4 **)(iVar2 + 0x40);\n    if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }\n    uVar3 = FUN_00033520();\n    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);\n    FUN_00043b20(2,0);\n    FUN_0001dd30(uVar3);\n  }" ({ "{") (expression_statement "puVar1 = *(undefined4 **)(iVar2 + 0x40);" (assignment_expression "puVar1 = *(undefined4 **)(iVar2 + 0x40)" (identifier "puVar1") (= "=") (pointer_expression "*(undefined4 **)(iVar2 + 0x40)" (* "*") (cast_expression "(undefined4 **)(iVar2 + 0x40)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar2 + 0x40)" (( "(") (binary_expression "iVar2 + 0x40" (identifier "iVar2") (+ "+") (number_literal "0x40")) () ")"))))) (; ";")) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }" (if "if") (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar1 != (undefined4 *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);\n      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];\n      FUN_0001dd30(puVar1);\n      FUN_00044960();\n      return;\n    }" ({ "{") (expression_statement "(*(code *)*puVar1)(iVar2,param_2,puVar1[1]);" (call_expression "(*(code *)*puVar1)(iVar2,param_2,puVar1[1])" (parenthesized_expression "(*(code *)*puVar1)" (( "(") (pointer_expression "*(code *)*puVar1" (* "*") (cast_expression "(code *)*puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")))) () ")")) (argument_list "(iVar2,param_2,puVar1[1])" (( "(") (identifier "iVar2") (, ",") (identifier "param_2") (, ",") (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + 0x40) = puVar1[2];" (assignment_expression "*(undefined4 *)(iVar2 + 0x40) = puVar1[2]" (pointer_expression "*(undefined4 *)(iVar2 + 0x40)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x40)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x40)" (( "(") (binary_expression "iVar2 + 0x40" (identifier "iVar2") (+ "+") (number_literal "0x40")) () ")")))) (= "=") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" (identifier "FUN_0001dd30") (argument_list "(puVar1)" (( "(") (identifier "puVar1") () ")"))) (; ";")) (expression_statement "FUN_00044960();" (call_expression "FUN_00044960()" (identifier "FUN_00044960") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar3 = FUN_00033520();" (assignment_expression "uVar3 = FUN_00033520()" (identifier "uVar3") (= "=") (call_expression "FUN_00033520()" (identifier "FUN_00033520") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);" (assignment_expression "uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3)" (identifier "uVar3") (= "=") (call_expression "FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3)" (identifier "FUN_0001cea0") (argument_list "("Server protocol violation: unexpected %s packet",uVar3)" (( "(") (string_literal ""Server protocol violation: unexpected %s packet"" (" """) (string_content "Server protocol violation: unexpected %s packet") (" """)) (, ",") (identifier "uVar3") () ")")))) (; ";")) (expression_statement "FUN_00043b20(2,0);" (call_expression "FUN_00043b20(2,0)" (identifier "FUN_00043b20") (argument_list "(2,0)" (( "(") (number_literal "2") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "FUN_0001dd30(uVar3);" (call_expression "FUN_0001dd30(uVar3)" (identifier "FUN_0001dd30") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (} "}"))) (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_3;
  type_4 *var_2;
  char *pcVar1;
  
  var_2 = var_1(ssh,pktin);
  if (var_2 != (type_4 *)0x0) {
    var_3 = (var_2->v).v2.chanreq_head;
    if (var_3 != (type_3 *)0x0) {
      (*var_3->handler)(var_2,pktin,var_3->ctx);
      (var_2->v).v2.chanreq_head = var_3->next;
      var_4(var_3);
      var_5(var_2);
      return;
    }
    pcVar1 = var_6(ssh->pkt_kctx,ssh->pkt_actx,pktin->type);
    pcVar1 = var_7("Server protocol violation: unexpected %s packet",pcVar1);
    var_8(ssh,(char *)0x0,pcVar1,2,0);
    var_4(pcVar1);
  }
  return;
}


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

{
  undefined4 *puVar1;
  int iVar2;
  undefined4 uVar3;
  
  iVar2 = FUN_00043d00();
  if (iVar2 != 0) {
    puVar1 = *(undefined4 **)(iVar2 + 0x40);
    if (puVar1 != (undefined4 *)0x0) {
      (*(code *)*puVar1)(iVar2,param_2,puVar1[1]);
      *(undefined4 *)(iVar2 + 0x40) = puVar1[2];
      FUN_0001dd30(puVar1);
      FUN_00044960();
      return;
    }
    uVar3 = FUN_00033520();
    uVar3 = FUN_0001cea0("Server protocol violation: unexpected %s packet",uVar3);
    FUN_00043b20(2,0);
    FUN_0001dd30(uVar3);
  }
  return;
}

