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

{
  ulong uVar1;
  ssh_channel *c;
  
  uVar1 = ssh_pkt_getuint32(pktin);
  if (ssh->agentfwd_enabled == 0) {
    send_packet(ssh,0x16,1,uVar1,0);
    return;
  }
  c = (ssh_channel *)safemalloc(1,0x5c);
  c->ssh = ssh;
  ssh_channel_init(c);
  c->remoteid = uVar1;
  c->halfopen = 0;
  c->type = 2;
  (c->u).a.pending = (agent_pending_query *)0x0;
  bufchain_init(&(c->u).a.inbuffer);
  send_packet(ssh,0x15,1,c->remoteid,1,c->localid,0);
  return;
}



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

void FUN_00049410(int param_1)

{
  int iVar1;
  int *piVar2;
  
  iVar1 = FUN_00039050();
  if (*(int *)(param_1 + 0x48) == 0) {
    FUN_000483a0(param_1,0x16,1,iVar1,0);
    return;
  }
  piVar2 = (int *)FUN_0002e780(1,0x5c);
  *piVar2 = param_1;
  FUN_0003e960();
  piVar2[1] = iVar1;
  piVar2[4] = 0;
  piVar2[3] = 2;
  piVar2[0x16] = 0;
  FUN_0002e570(piVar2 + 0x13);
  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001c4f0
ADD EBX,0xc7337
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x24]
MOV EDI,dword ptr [ESP + 0x20]
CALL 0x00039050
MOV EBP,EAX
MOV EAX,dword ptr [EDI + 0x48]
TEST EAX,EAX
JNZ 0x00049458
SUB ESP,0xc
PUSH 0x0
PUSH EBP
PUSH 0x1
PUSH 0x16
PUSH EDI
CALL 0x000483a0
ADD ESP,0x20
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0x5c
PUSH 0x1
CALL 0x0002e780
MOV dword ptr [EAX],EDI
MOV ESI,EAX
CALL 0x0003e960
MOV dword ptr [ESI + 0x4],EBP
LEA EAX,[ESI + 0x4c]
MOV dword ptr [ESI + 0x10],0x0
MOV dword ptr [ESI + 0xc],0x2
MOV dword ptr [ESI + 0x58],0x0
MOV dword ptr [ESP],EAX
CALL 0x0002e570
ADD ESP,0xc
PUSH 0x0
PUSH dword ptr [ESI + 0x8]
PUSH 0x1
PUSH dword ptr [ESI + 0x4]
PUSH 0x1
PUSH 0x15
PUSH EDI
CALL 0x000483a0
ADD ESP,0x20
ADD ESP,0xc
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_00049410(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  iVar1 = FUN_00039050();\n  if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }\n  piVar2 = (int *)FUN_0002e780(1,0x5c);\n  *piVar2 = param_1;\n  FUN_0003e960();\n  piVar2[1] = iVar1;\n  piVar2[4] = 0;\n  piVar2[3] = 2;\n  piVar2[0x16] = 0;\n  FUN_0002e570(piVar2 + 0x13);\n  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);\n  return;\n}\n\n" comment (function_definition "void FUN_00049410(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  iVar1 = FUN_00039050();\n  if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }\n  piVar2 = (int *)FUN_0002e780(1,0x5c);\n  *piVar2 = param_1;\n  FUN_0003e960();\n  piVar2[1] = iVar1;\n  piVar2[4] = 0;\n  piVar2[3] = 2;\n  piVar2[0x16] = 0;\n  FUN_0002e570(piVar2 + 0x13);\n  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);\n  return;\n}" primitive_type (function_declarator "FUN_00049410(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  iVar1 = FUN_00039050();\n  if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }\n  piVar2 = (int *)FUN_0002e780(1,0x5c);\n  *piVar2 = param_1;\n  FUN_0003e960();\n  piVar2[1] = iVar1;\n  piVar2[4] = 0;\n  piVar2[3] = 2;\n  piVar2[0x16] = 0;\n  FUN_0002e570(piVar2 + 0x13);\n  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (expression_statement "iVar1 = FUN_00039050();" (assignment_expression "iVar1 = FUN_00039050()" identifier = (call_expression "FUN_00039050()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x48) == 0)" ( (binary_expression "*(int *)(param_1 + 0x48) == 0" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }" { (expression_statement "FUN_000483a0(param_1,0x16,1,iVar1,0);" (call_expression "FUN_000483a0(param_1,0x16,1,iVar1,0)" identifier (argument_list "(param_1,0x16,1,iVar1,0)" ( identifier , number_literal , number_literal , identifier , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "piVar2 = (int *)FUN_0002e780(1,0x5c);" (assignment_expression "piVar2 = (int *)FUN_0002e780(1,0x5c)" identifier = (cast_expression "(int *)FUN_0002e780(1,0x5c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(1,0x5c)" identifier (argument_list "(1,0x5c)" ( number_literal , number_literal ))))) ;) (expression_statement "*piVar2 = param_1;" (assignment_expression "*piVar2 = param_1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "FUN_0003e960();" (call_expression "FUN_0003e960()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar2[1] = iVar1;" (assignment_expression "piVar2[1] = iVar1" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2[4] = 0;" (assignment_expression "piVar2[4] = 0" (subscript_expression "piVar2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[3] = 2;" (assignment_expression "piVar2[3] = 2" (subscript_expression "piVar2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[0x16] = 0;" (assignment_expression "piVar2[0x16] = 0" (subscript_expression "piVar2[0x16]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_0002e570(piVar2 + 0x13);" (call_expression "FUN_0002e570(piVar2 + 0x13)" identifier (argument_list "(piVar2 + 0x13)" ( (binary_expression "piVar2 + 0x13" identifier + number_literal) ))) ;) (expression_statement "FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);" (call_expression "FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0)" identifier (argument_list "(param_1,0x15,1,piVar2[1],1,piVar2[2],0)" ( identifier , number_literal , number_literal , (subscript_expression "piVar2[1]" identifier [ number_literal ]) , number_literal , (subscript_expression "piVar2[2]" identifier [ number_literal ]) , number_literal ))) ;) (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 ssh1_smsg_agent_open(Ssh_conflict ssh,Packet *pktin)\n\n{\n  ulong uVar1;\n  ssh_channel *c;\n  \n  uVar1 = ssh_pkt_getuint32(pktin);\n  if (ssh->agentfwd_enabled == 0) {\n    send_packet(ssh,0x16,1,uVar1,0);\n    return;\n  }\n  c = (ssh_channel *)safemalloc(1,0x5c);\n  c->ssh = ssh;\n  ssh_channel_init(c);\n  c->remoteid = uVar1;\n  c->halfopen = 0;\n  c->type = 2;\n  (c->u).a.pending = (agent_pending_query *)0x0;\n  bufchain_init(&(c->u).a.inbuffer);\n  send_packet(ssh,0x15,1,c->remoteid,1,c->localid,0);\n  return;\n}\n\n" comment comment comment (function_definition "void ssh1_smsg_agent_open(Ssh_conflict ssh,Packet *pktin)\n\n{\n  ulong uVar1;\n  ssh_channel *c;\n  \n  uVar1 = ssh_pkt_getuint32(pktin);\n  if (ssh->agentfwd_enabled == 0) {\n    send_packet(ssh,0x16,1,uVar1,0);\n    return;\n  }\n  c = (ssh_channel *)safemalloc(1,0x5c);\n  c->ssh = ssh;\n  ssh_channel_init(c);\n  c->remoteid = uVar1;\n  c->halfopen = 0;\n  c->type = 2;\n  (c->u).a.pending = (agent_pending_query *)0x0;\n  bufchain_init(&(c->u).a.inbuffer);\n  send_packet(ssh,0x15,1,c->remoteid,1,c->localid,0);\n  return;\n}" primitive_type (function_declarator "ssh1_smsg_agent_open(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  ulong uVar1;\n  ssh_channel *c;\n  \n  uVar1 = ssh_pkt_getuint32(pktin);\n  if (ssh->agentfwd_enabled == 0) {\n    send_packet(ssh,0x16,1,uVar1,0);\n    return;\n  }\n  c = (ssh_channel *)safemalloc(1,0x5c);\n  c->ssh = ssh;\n  ssh_channel_init(c);\n  c->remoteid = uVar1;\n  c->halfopen = 0;\n  c->type = 2;\n  (c->u).a.pending = (agent_pending_query *)0x0;\n  bufchain_init(&(c->u).a.inbuffer);\n  send_packet(ssh,0x15,1,c->remoteid,1,c->localid,0);\n  return;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "ssh_channel *c;" type_identifier (pointer_declarator "*c" * identifier) ;) (expression_statement "uVar1 = ssh_pkt_getuint32(pktin);" (assignment_expression "uVar1 = ssh_pkt_getuint32(pktin)" identifier = (call_expression "ssh_pkt_getuint32(pktin)" identifier (argument_list "(pktin)" ( identifier )))) ;) (if_statement "if (ssh->agentfwd_enabled == 0) {\n    send_packet(ssh,0x16,1,uVar1,0);\n    return;\n  }" if (parenthesized_expression "(ssh->agentfwd_enabled == 0)" ( (binary_expression "ssh->agentfwd_enabled == 0" (field_expression "ssh->agentfwd_enabled" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    send_packet(ssh,0x16,1,uVar1,0);\n    return;\n  }" { (expression_statement "send_packet(ssh,0x16,1,uVar1,0);" (call_expression "send_packet(ssh,0x16,1,uVar1,0)" identifier (argument_list "(ssh,0x16,1,uVar1,0)" ( identifier , number_literal , number_literal , identifier , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "c = (ssh_channel *)safemalloc(1,0x5c);" (assignment_expression "c = (ssh_channel *)safemalloc(1,0x5c)" identifier = (cast_expression "(ssh_channel *)safemalloc(1,0x5c)" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x5c)" identifier (argument_list "(1,0x5c)" ( number_literal , number_literal ))))) ;) (expression_statement "c->ssh = ssh;" (assignment_expression "c->ssh = ssh" (field_expression "c->ssh" identifier -> field_identifier) = identifier) ;) (expression_statement "ssh_channel_init(c);" (call_expression "ssh_channel_init(c)" identifier (argument_list "(c)" ( identifier ))) ;) (expression_statement "c->remoteid = uVar1;" (assignment_expression "c->remoteid = uVar1" (field_expression "c->remoteid" identifier -> field_identifier) = identifier) ;) (expression_statement "c->halfopen = 0;" (assignment_expression "c->halfopen = 0" (field_expression "c->halfopen" identifier -> field_identifier) = number_literal) ;) (expression_statement "c->type = 2;" (assignment_expression "c->type = 2" (field_expression "c->type" identifier -> field_identifier) = number_literal) ;) (expression_statement "(c->u).a.pending = (agent_pending_query *)0x0;" (assignment_expression "(c->u).a.pending = (agent_pending_query *)0x0" (field_expression "(c->u).a.pending" (field_expression "(c->u).a" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (cast_expression "(agent_pending_query *)0x0" ( (type_descriptor "agent_pending_query *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "bufchain_init(&(c->u).a.inbuffer);" (call_expression "bufchain_init(&(c->u).a.inbuffer)" identifier (argument_list "(&(c->u).a.inbuffer)" ( (pointer_expression "&(c->u).a.inbuffer" & (field_expression "(c->u).a.inbuffer" (field_expression "(c->u).a" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ))) ;) (expression_statement "send_packet(ssh,0x15,1,c->remoteid,1,c->localid,0);" (call_expression "send_packet(ssh,0x15,1,c->remoteid,1,c->localid,0)" identifier (argument_list "(ssh,0x15,1,c->remoteid,1,c->localid,0)" ( identifier , number_literal , number_literal , (field_expression "c->remoteid" identifier -> field_identifier) , number_literal , (field_expression "c->localid" identifier -> field_identifier) , number_literal ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00049410(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  iVar1 = FUN_00039050();\n  if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }\n  piVar2 = (int *)FUN_0002e780(1,0x5c);\n  *piVar2 = param_1;\n  FUN_0003e960();\n  piVar2[1] = iVar1;\n  piVar2[4] = 0;\n  piVar2[3] = 2;\n  piVar2[0x16] = 0;\n  FUN_0002e570(piVar2 + 0x13);\n  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);\n  return;\n}\n\n" (function_definition "void FUN_00049410(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  iVar1 = FUN_00039050();\n  if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }\n  piVar2 = (int *)FUN_0002e780(1,0x5c);\n  *piVar2 = param_1;\n  FUN_0003e960();\n  piVar2[1] = iVar1;\n  piVar2[4] = 0;\n  piVar2[3] = 2;\n  piVar2[0x16] = 0;\n  FUN_0002e570(piVar2 + 0x13);\n  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);\n  return;\n}" primitive_type (function_declarator "FUN_00049410(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  iVar1 = FUN_00039050();\n  if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }\n  piVar2 = (int *)FUN_0002e780(1,0x5c);\n  *piVar2 = param_1;\n  FUN_0003e960();\n  piVar2[1] = iVar1;\n  piVar2[4] = 0;\n  piVar2[3] = 2;\n  piVar2[0x16] = 0;\n  FUN_0002e570(piVar2 + 0x13);\n  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (expression_statement "iVar1 = FUN_00039050();" (assignment_expression "iVar1 = FUN_00039050()" identifier = (call_expression "FUN_00039050()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x48) == 0)" ( (binary_expression "*(int *)(param_1 + 0x48) == 0" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }" { (expression_statement "FUN_000483a0(param_1,0x16,1,iVar1,0);" (call_expression "FUN_000483a0(param_1,0x16,1,iVar1,0)" identifier (argument_list "(param_1,0x16,1,iVar1,0)" ( identifier , number_literal , number_literal , identifier , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "piVar2 = (int *)FUN_0002e780(1,0x5c);" (assignment_expression "piVar2 = (int *)FUN_0002e780(1,0x5c)" identifier = (cast_expression "(int *)FUN_0002e780(1,0x5c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(1,0x5c)" identifier (argument_list "(1,0x5c)" ( number_literal , number_literal ))))) ;) (expression_statement "*piVar2 = param_1;" (assignment_expression "*piVar2 = param_1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "FUN_0003e960();" (call_expression "FUN_0003e960()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar2[1] = iVar1;" (assignment_expression "piVar2[1] = iVar1" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2[4] = 0;" (assignment_expression "piVar2[4] = 0" (subscript_expression "piVar2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[3] = 2;" (assignment_expression "piVar2[3] = 2" (subscript_expression "piVar2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[0x16] = 0;" (assignment_expression "piVar2[0x16] = 0" (subscript_expression "piVar2[0x16]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_0002e570(piVar2 + 0x13);" (call_expression "FUN_0002e570(piVar2 + 0x13)" identifier (argument_list "(piVar2 + 0x13)" ( (binary_expression "piVar2 + 0x13" identifier + number_literal) ))) ;) (expression_statement "FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);" (call_expression "FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0)" identifier (argument_list "(param_1,0x15,1,piVar2[1],1,piVar2[2],0)" ( identifier , number_literal , number_literal , (subscript_expression "piVar2[1]" identifier [ number_literal ]) , number_literal , (subscript_expression "piVar2[2]" identifier [ number_literal ]) , number_literal ))) ;) (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 (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (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 ( IDENT , LIT , LIT , IDENT , LIT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , (subscript_expression IDENT [ LIT ]) , LIT , (subscript_expression IDENT [ LIT ]) , LIT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00049410(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  iVar1 = FUN_00039050();\n  if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }\n  piVar2 = (int *)FUN_0002e780(1,0x5c);\n  *piVar2 = param_1;\n  FUN_0003e960();\n  piVar2[1] = iVar1;\n  piVar2[4] = 0;\n  piVar2[3] = 2;\n  piVar2[0x16] = 0;\n  FUN_0002e570(piVar2 + 0x13);\n  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00049410(int param_1)" (identifier "FUN_00049410") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  iVar1 = FUN_00039050();\n  if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }\n  piVar2 = (int *)FUN_0002e780(1,0x5c);\n  *piVar2 = param_1;\n  FUN_0003e960();\n  piVar2[1] = iVar1;\n  piVar2[4] = 0;\n  piVar2[3] = 2;\n  piVar2[0x16] = 0;\n  FUN_0002e570(piVar2 + 0x13);\n  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (expression_statement "iVar1 = FUN_00039050();" (assignment_expression "iVar1 = FUN_00039050()" (identifier "iVar1") (= "=") (call_expression "FUN_00039050()" (identifier "FUN_00039050") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*(int *)(param_1 + 0x48) == 0) {\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x48) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x48) == 0" (pointer_expression "*(int *)(param_1 + 0x48)" (* "*") (cast_expression "(int *)(param_1 + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_000483a0(param_1,0x16,1,iVar1,0);\n    return;\n  }" ({ "{") (expression_statement "FUN_000483a0(param_1,0x16,1,iVar1,0);" (call_expression "FUN_000483a0(param_1,0x16,1,iVar1,0)" (identifier "FUN_000483a0") (argument_list "(param_1,0x16,1,iVar1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0x16") (, ",") (number_literal "1") (, ",") (identifier "iVar1") (, ",") (number_literal "0") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "piVar2 = (int *)FUN_0002e780(1,0x5c);" (assignment_expression "piVar2 = (int *)FUN_0002e780(1,0x5c)" (identifier "piVar2") (= "=") (cast_expression "(int *)FUN_0002e780(1,0x5c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002e780(1,0x5c)" (identifier "FUN_0002e780") (argument_list "(1,0x5c)" (( "(") (number_literal "1") (, ",") (number_literal "0x5c") () ")"))))) (; ";")) (expression_statement "*piVar2 = param_1;" (assignment_expression "*piVar2 = param_1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "FUN_0003e960();" (call_expression "FUN_0003e960()" (identifier "FUN_0003e960") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar2[1] = iVar1;" (assignment_expression "piVar2[1] = iVar1" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "piVar2[4] = 0;" (assignment_expression "piVar2[4] = 0" (subscript_expression "piVar2[4]" (identifier "piVar2") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2[3] = 2;" (assignment_expression "piVar2[3] = 2" (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "2")) (; ";")) (expression_statement "piVar2[0x16] = 0;" (assignment_expression "piVar2[0x16] = 0" (subscript_expression "piVar2[0x16]" (identifier "piVar2") ([ "[") (number_literal "0x16") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_0002e570(piVar2 + 0x13);" (call_expression "FUN_0002e570(piVar2 + 0x13)" (identifier "FUN_0002e570") (argument_list "(piVar2 + 0x13)" (( "(") (binary_expression "piVar2 + 0x13" (identifier "piVar2") (+ "+") (number_literal "0x13")) () ")"))) (; ";")) (expression_statement "FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);" (call_expression "FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0)" (identifier "FUN_000483a0") (argument_list "(param_1,0x15,1,piVar2[1],1,piVar2[2],0)" (( "(") (identifier "param_1") (, ",") (number_literal "0x15") (, ",") (number_literal "1") (, ",") (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (, ",") (number_literal "1") (, ",") (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (, ",") (number_literal "0") () ")"))) (; ";")) (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 uVar1;
  type_4 *c;
  
  uVar1 = var_1(pktin);
  if (ssh->agentfwd_enabled == 0) {
    var_2(ssh,0x16,1,uVar1,0);
    return;
  }
  c = (type_4 *)var_3(1,0x5c);
  c->ssh = ssh;
  var_4(c);
  c->remoteid = uVar1;
  c->halfopen = 0;
  c->type = 2;
  (c->u).a.pending = (type_5 *)0x0;
  var_5(&(c->u).a.inbuffer);
  var_2(ssh,0x15,1,c->remoteid,1,c->localid,0);
  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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (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 (identifier) (number_literal) (number_literal) (identifier) (number_literal)))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (subscript_expression argument: (identifier) index: (number_literal)) (number_literal) (subscript_expression argument: (identifier) index: (number_literal)) (number_literal)))) (return_statement))))

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

void MASKED(int param_1)

{
  int iVar1;
  int *piVar2;
  
  iVar1 = FUN_00039050();
  if (*(int *)(param_1 + 0x48) == 0) {
    FUN_000483a0(param_1,0x16,1,iVar1,0);
    return;
  }
  piVar2 = (int *)FUN_0002e780(1,0x5c);
  *piVar2 = param_1;
  FUN_0003e960();
  piVar2[1] = iVar1;
  piVar2[4] = 0;
  piVar2[3] = 2;
  piVar2[0x16] = 0;
  FUN_0002e570(piVar2 + 0x13);
  FUN_000483a0(param_1,0x15,1,piVar2[1],1,piVar2[2],0);
  return;
}

