
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void ssh2_msg_global_request(Ssh_conflict ssh,Packet *pktin)

{
  uchar uVar1;
  int iVar2;
  Packet *pkt;
  int in_GS_OFFSET;
  char *type;
  int typelen;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  ssh_pkt_getstring(pktin,&type,&typelen);
  iVar2 = pktin->savedpos;
  if ((pktin->length != iVar2 && -1 < pktin->length - iVar2) &&
     (uVar1 = pktin->body[iVar2], pktin->savedpos = iVar2 + 1, uVar1 != '\0')) {
    pkt = ssh2_pkt_init(0x52);
    ssh2_pkt_send(ssh,pkt);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



void FUN_00038850(undefined4 param_1,int *param_2)

{
  int iVar1;
  char cVar2;
  int iVar3;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  FUN_0002b920();
  iVar3 = param_2[6];
  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&
     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {
    FUN_0002e270();
    FUN_00038090();
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f2a0();
}


PUSH ESI
PUSH EBX
SUB ESP,0x14
MOV EBX,dword ptr [ESP + 0x24]
LEA EDX,[ESP + 0x4]
LEA ECX,[ESP + 0x8]
MOV ESI,dword ptr [ESP + 0x20]
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV EAX,EBX
CALL 0x0002b920
MOV EAX,dword ptr [EBX + 0x18]
MOV EDX,dword ptr [EBX]
SUB EDX,EAX
TEST EDX,EDX
JLE 0x00038894
MOV EDX,dword ptr [EBX + 0x14]
MOVZX EDX,byte ptr [EDX + EAX*0x1]
ADD EAX,0x1
MOV dword ptr [EBX + 0x18],EAX
TEST DL,DL
JNZ 0x000388b0
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x000388c5
ADD ESP,0x14
POP EBX
POP ESI
RET
MOV EAX,0x52
CALL 0x0002e270
MOV EDX,EAX
MOV EAX,ESI
CALL 0x00038090
JMP 0x00038894
CALL 0x0006f2a0
(translation_unit "void FUN_00038850(undefined4 param_1,int *param_2)\n\n{\n  int iVar1;\n  char cVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_0002b920();\n  iVar3 = param_2[6];\n  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}\n\n" (function_definition "void FUN_00038850(undefined4 param_1,int *param_2)\n\n{\n  int iVar1;\n  char cVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_0002b920();\n  iVar3 = param_2[6];\n  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}" primitive_type (function_declarator "FUN_00038850(undefined4 param_1,int *param_2)" identifier (parameter_list "(undefined4 param_1,int *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_0002b920();\n  iVar3 = param_2[6];\n  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "FUN_0002b920();" (call_expression "FUN_0002b920()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = param_2[6];" (assignment_expression "iVar3 = param_2[6]" identifier = (subscript_expression "param_2[6]" identifier [ number_literal ])) ;) (if_statement "if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }" if (parenthesized_expression "((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0'))" ( (binary_expression "(*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')" (parenthesized_expression "(*param_2 != iVar3 && -1 < *param_2 - iVar3)" ( (binary_expression "*param_2 != iVar3 && -1 < *param_2 - iVar3" (binary_expression "*param_2 != iVar3" (pointer_expression "*param_2" * identifier) != identifier) && (binary_expression "-1 < *param_2 - iVar3" number_literal < (binary_expression "*param_2 - iVar3" (pointer_expression "*param_2" * identifier) - identifier))) )) && (parenthesized_expression "(cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')" ( (comma_expression "cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0'" (assignment_expression "cVar2 = *(char *)(param_2[5] + iVar3)" identifier = (pointer_expression "*(char *)(param_2[5] + iVar3)" * (cast_expression "(char *)(param_2[5] + iVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[5] + iVar3)" ( (binary_expression "param_2[5] + iVar3" (subscript_expression "param_2[5]" identifier [ number_literal ]) + identifier) ))))) , (comma_expression "param_2[6] = iVar3 + 1, cVar2 != '\0'" (assignment_expression "param_2[6] = iVar3 + 1" (subscript_expression "param_2[6]" identifier [ number_literal ]) = (binary_expression "iVar3 + 1" identifier + number_literal)) , (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')))) ))) )) (compound_statement "{\n    FUN_0002e270();\n    FUN_00038090();\n  }" { (expression_statement "FUN_0002e270();" (call_expression "FUN_0002e270()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00038090();" (call_expression "FUN_00038090()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh2_msg_global_request(Ssh_conflict ssh,Packet *pktin)\n\n{\n  uchar uVar1;\n  int iVar2;\n  Packet *pkt;\n  int in_GS_OFFSET;\n  char *type;\n  int typelen;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  ssh_pkt_getstring(pktin,&type,&typelen);\n  iVar2 = pktin->savedpos;\n  if ((pktin->length != iVar2 && -1 < pktin->length - iVar2) &&\n     (uVar1 = pktin->body[iVar2], pktin->savedpos = iVar2 + 1, uVar1 != '\0')) {\n    pkt = ssh2_pkt_init(0x52);\n    ssh2_pkt_send(ssh,pkt);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "void ssh2_msg_global_request(Ssh_conflict ssh,Packet *pktin)\n\n{\n  uchar uVar1;\n  int iVar2;\n  Packet *pkt;\n  int in_GS_OFFSET;\n  char *type;\n  int typelen;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  ssh_pkt_getstring(pktin,&type,&typelen);\n  iVar2 = pktin->savedpos;\n  if ((pktin->length != iVar2 && -1 < pktin->length - iVar2) &&\n     (uVar1 = pktin->body[iVar2], pktin->savedpos = iVar2 + 1, uVar1 != '\0')) {\n    pkt = ssh2_pkt_init(0x52);\n    ssh2_pkt_send(ssh,pkt);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "ssh2_msg_global_request(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  uchar uVar1;\n  int iVar2;\n  Packet *pkt;\n  int in_GS_OFFSET;\n  char *type;\n  int typelen;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  ssh_pkt_getstring(pktin,&type,&typelen);\n  iVar2 = pktin->savedpos;\n  if ((pktin->length != iVar2 && -1 < pktin->length - iVar2) &&\n     (uVar1 = pktin->body[iVar2], pktin->savedpos = iVar2 + 1, uVar1 != '\0')) {\n    pkt = ssh2_pkt_init(0x52);\n    ssh2_pkt_send(ssh,pkt);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "uchar uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "Packet *pkt;" type_identifier (pointer_declarator "*pkt" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *type;" primitive_type (pointer_declarator "*type" * identifier) ;) (declaration "int typelen;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "ssh_pkt_getstring(pktin,&type,&typelen);" (call_expression "ssh_pkt_getstring(pktin,&type,&typelen)" identifier (argument_list "(pktin,&type,&typelen)" ( identifier , (pointer_expression "&type" & identifier) , (pointer_expression "&typelen" & identifier) ))) ;) (expression_statement "iVar2 = pktin->savedpos;" (assignment_expression "iVar2 = pktin->savedpos" identifier = (field_expression "pktin->savedpos" identifier -> field_identifier)) ;) (if_statement "if ((pktin->length != iVar2 && -1 < pktin->length - iVar2) &&\n     (uVar1 = pktin->body[iVar2], pktin->savedpos = iVar2 + 1, uVar1 != '\0')) {\n    pkt = ssh2_pkt_init(0x52);\n    ssh2_pkt_send(ssh,pkt);\n  }" if (parenthesized_expression "((pktin->length != iVar2 && -1 < pktin->length - iVar2) &&\n     (uVar1 = pktin->body[iVar2], pktin->savedpos = iVar2 + 1, uVar1 != '\0'))" ( (binary_expression "(pktin->length != iVar2 && -1 < pktin->length - iVar2) &&\n     (uVar1 = pktin->body[iVar2], pktin->savedpos = iVar2 + 1, uVar1 != '\0')" (parenthesized_expression "(pktin->length != iVar2 && -1 < pktin->length - iVar2)" ( (binary_expression "pktin->length != iVar2 && -1 < pktin->length - iVar2" (binary_expression "pktin->length != iVar2" (field_expression "pktin->length" identifier -> field_identifier) != identifier) && (binary_expression "-1 < pktin->length - iVar2" number_literal < (binary_expression "pktin->length - iVar2" (field_expression "pktin->length" identifier -> field_identifier) - identifier))) )) && (parenthesized_expression "(uVar1 = pktin->body[iVar2], pktin->savedpos = iVar2 + 1, uVar1 != '\0')" ( (comma_expression "uVar1 = pktin->body[iVar2], pktin->savedpos = iVar2 + 1, uVar1 != '\0'" (assignment_expression "uVar1 = pktin->body[iVar2]" identifier = (subscript_expression "pktin->body[iVar2]" (field_expression "pktin->body" identifier -> field_identifier) [ identifier ])) , (comma_expression "pktin->savedpos = iVar2 + 1, uVar1 != '\0'" (assignment_expression "pktin->savedpos = iVar2 + 1" (field_expression "pktin->savedpos" identifier -> field_identifier) = (binary_expression "iVar2 + 1" identifier + number_literal)) , (binary_expression "uVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')))) ))) )) (compound_statement "{\n    pkt = ssh2_pkt_init(0x52);\n    ssh2_pkt_send(ssh,pkt);\n  }" { (expression_statement "pkt = ssh2_pkt_init(0x52);" (assignment_expression "pkt = ssh2_pkt_init(0x52)" identifier = (call_expression "ssh2_pkt_init(0x52)" identifier (argument_list "(0x52)" ( number_literal )))) ;) (expression_statement "ssh2_pkt_send(ssh,pkt);" (call_expression "ssh2_pkt_send(ssh,pkt)" identifier (argument_list "(ssh,pkt)" ( identifier , identifier ))) ;) })) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_00038850(undefined4 param_1,int *param_2)\n\n{\n  int iVar1;\n  char cVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_0002b920();\n  iVar3 = param_2[6];\n  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}\n\n" (function_definition "void FUN_00038850(undefined4 param_1,int *param_2)\n\n{\n  int iVar1;\n  char cVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_0002b920();\n  iVar3 = param_2[6];\n  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}" primitive_type (function_declarator "FUN_00038850(undefined4 param_1,int *param_2)" identifier (parameter_list "(undefined4 param_1,int *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_0002b920();\n  iVar3 = param_2[6];\n  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "FUN_0002b920();" (call_expression "FUN_0002b920()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = param_2[6];" (assignment_expression "iVar3 = param_2[6]" identifier = (subscript_expression "param_2[6]" identifier [ number_literal ])) ;) (if_statement "if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }" if (parenthesized_expression "((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0'))" ( (binary_expression "(*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')" (parenthesized_expression "(*param_2 != iVar3 && -1 < *param_2 - iVar3)" ( (binary_expression "*param_2 != iVar3 && -1 < *param_2 - iVar3" (binary_expression "*param_2 != iVar3" (pointer_expression "*param_2" * identifier) != identifier) && (binary_expression "-1 < *param_2 - iVar3" number_literal < (binary_expression "*param_2 - iVar3" (pointer_expression "*param_2" * identifier) - identifier))) )) && (parenthesized_expression "(cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')" ( (comma_expression "cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0'" (assignment_expression "cVar2 = *(char *)(param_2[5] + iVar3)" identifier = (pointer_expression "*(char *)(param_2[5] + iVar3)" * (cast_expression "(char *)(param_2[5] + iVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[5] + iVar3)" ( (binary_expression "param_2[5] + iVar3" (subscript_expression "param_2[5]" identifier [ number_literal ]) + identifier) ))))) , (comma_expression "param_2[6] = iVar3 + 1, cVar2 != '\0'" (assignment_expression "param_2[6] = iVar3 + 1" (subscript_expression "param_2[6]" identifier [ number_literal ]) = (binary_expression "iVar3 + 1" identifier + number_literal)) , (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')))) ))) )) (compound_statement "{\n    FUN_0002e270();\n    FUN_00038090();\n  }" { (expression_statement "FUN_0002e270();" (call_expression "FUN_0002e270()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00038090();" (call_expression "FUN_00038090()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * IDENT) != IDENT) && (binary_expression LIT < (binary_expression (pointer_expression * IDENT) - IDENT))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT) ))))) , (comma_expression (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) , (binary_expression IDENT != (char_literal ' escape_sequence ')))) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_00038850(undefined4 param_1,int *param_2)\n\n{\n  int iVar1;\n  char cVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_0002b920();\n  iVar3 = param_2[6];\n  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}" (primitive_type "void") (function_declarator "FUN_00038850(undefined4 param_1,int *param_2)" (identifier "FUN_00038850") (parameter_list "(undefined4 param_1,int *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_0002b920();\n  iVar3 = param_2[6];\n  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f2a0();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "FUN_0002b920();" (call_expression "FUN_0002b920()" (identifier "FUN_0002b920") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar3 = param_2[6];" (assignment_expression "iVar3 = param_2[6]" (identifier "iVar3") (= "=") (subscript_expression "param_2[6]" (identifier "param_2") ([ "[") (number_literal "6") (] "]"))) (; ";")) (if_statement "if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {\n    FUN_0002e270();\n    FUN_00038090();\n  }" (if "if") (parenthesized_expression "((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0'))" (( "(") (binary_expression "(*param_2 != iVar3 && -1 < *param_2 - iVar3) &&\n     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')" (parenthesized_expression "(*param_2 != iVar3 && -1 < *param_2 - iVar3)" (( "(") (binary_expression "*param_2 != iVar3 && -1 < *param_2 - iVar3" (binary_expression "*param_2 != iVar3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (!= "!=") (identifier "iVar3")) (&& "&&") (binary_expression "-1 < *param_2 - iVar3" (number_literal "-1") (< "<") (binary_expression "*param_2 - iVar3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (- "-") (identifier "iVar3")))) () ")")) (&& "&&") (parenthesized_expression "(cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')" (( "(") (comma_expression "cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0'" (assignment_expression "cVar2 = *(char *)(param_2[5] + iVar3)" (identifier "cVar2") (= "=") (pointer_expression "*(char *)(param_2[5] + iVar3)" (* "*") (cast_expression "(char *)(param_2[5] + iVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2[5] + iVar3)" (( "(") (binary_expression "param_2[5] + iVar3" (subscript_expression "param_2[5]" (identifier "param_2") ([ "[") (number_literal "5") (] "]")) (+ "+") (identifier "iVar3")) () ")"))))) (, ",") (comma_expression "param_2[6] = iVar3 + 1, cVar2 != '\0'" (assignment_expression "param_2[6] = iVar3 + 1" (subscript_expression "param_2[6]" (identifier "param_2") ([ "[") (number_literal "6") (] "]")) (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (, ",") (binary_expression "cVar2 != '\0'" (identifier "cVar2") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))))) () ")"))) () ")")) (compound_statement "{\n    FUN_0002e270();\n    FUN_00038090();\n  }" ({ "{") (expression_statement "FUN_0002e270();" (call_expression "FUN_0002e270()" (identifier "FUN_0002e270") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00038090();" (call_expression "FUN_00038090()" (identifier "FUN_00038090") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" (identifier "FUN_0006f2a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* 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_4;
  int var_3;
  type_2 *pkt;
  int var_1;
  char *type;
  int typelen;
  int var_7;
  
  var_7 = *(int *)(var_1 + 0x14);
  var_2(pktin,&type,&typelen);
  var_3 = pktin->savedpos;
  if ((pktin->length != var_3 && -1 < pktin->length - var_3) &&
     (var_4 = pktin->body[var_3], pktin->savedpos = var_3 + 1, var_4 != '\0')) {
    pkt = var_5(0x52);
    var_6(ssh,pkt);
  }
  if (var_7 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_8();
}


(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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)) right: (binary_expression left: (number_literal) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))))) right: (comma_expression left: (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (identifier) right: (char_literal (escape_sequence)))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (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))))))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

void MASKED(undefined4 param_1,int *param_2)

{
  int iVar1;
  char cVar2;
  int iVar3;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  FUN_0002b920();
  iVar3 = param_2[6];
  if ((*param_2 != iVar3 && -1 < *param_2 - iVar3) &&
     (cVar2 = *(char *)(param_2[5] + iVar3), param_2[6] = iVar3 + 1, cVar2 != '\0')) {
    FUN_0002e270();
    FUN_00038090();
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f2a0();
}

