
void * get_ssh_string(int *datalen,void **data,int *stringlen)

{
  uint uVar1;
  byte *pbVar2;
  uint uVar3;
  
  if (*datalen < 4) {
    return (void *)0x0;
  }
  pbVar2 = (byte *)*data;
  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;
  uVar1 = *datalen - 4;
  if (uVar3 <= uVar1) {
    *datalen = uVar1 - uVar3;
    *data = (void *)((long)*data + (ulong)uVar3 + 4);
    *stringlen = uVar3;
    return pbVar2 + 4;
  }
  return (void *)0x0;
}



byte * FUN_0010e252(int *param_1,long *param_2,uint *param_3)

{
  uint uVar1;
  byte *pbVar2;
  uint uVar3;
  
  if (*param_1 < 4) {
    return (byte *)0x0;
  }
  pbVar2 = (byte *)*param_2;
  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;
  uVar1 = *param_1 - 4;
  if (uVar3 <= uVar1) {
    *param_1 = uVar1 - uVar3;
    *param_2 = *param_2 + (ulong)uVar3 + 4;
    *param_3 = uVar3;
    return pbVar2 + 4;
  }
  return (byte *)0x0;
}


MOV R8D,dword ptr [RDI]
CMP R8D,0x3
JLE 0x0010e2a6
MOV RAX,qword ptr [RSI]
MOVZX ECX,byte ptr [RAX]
SHL ECX,0x18
MOVZX R9D,byte ptr [RAX + 0x1]
SHL R9D,0x10
OR ECX,R9D
MOVZX R9D,byte ptr [RAX + 0x3]
OR ECX,R9D
MOVZX R9D,byte ptr [RAX + 0x2]
SHL R9D,0x8
OR ECX,R9D
LEA R9D,[R8 + -0x4]
CMP R9D,ECX
JC 0x0010e2ac
ADD RAX,0x4
MOV R8D,R9D
SUB R8D,ECX
MOV dword ptr [RDI],R8D
MOV EDI,ECX
ADD RDI,0x4
ADD qword ptr [RSI],RDI
MOV dword ptr [RDX],ECX
RET
MOV EAX,0x0
RET
MOV EAX,0x0
RET
(translation_unit "byte * FUN_0010e252(int *param_1,long *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*param_1 < 4) {\n    return (byte *)0x0;\n  }\n  pbVar2 = (byte *)*param_2;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *param_1 - 4;\n  if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }\n  return (byte *)0x0;\n}\n\n" (function_definition "byte * FUN_0010e252(int *param_1,long *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*param_1 < 4) {\n    return (byte *)0x0;\n  }\n  pbVar2 = (byte *)*param_2;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *param_1 - 4;\n  if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }\n  return (byte *)0x0;\n}" type_identifier (pointer_declarator "* FUN_0010e252(int *param_1,long *param_2,uint *param_3)" * (function_declarator "FUN_0010e252(int *param_1,long *param_2,uint *param_3)" identifier (parameter_list "(int *param_1,long *param_2,uint *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) )))) (compound_statement "{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*param_1 < 4) {\n    return (byte *)0x0;\n  }\n  pbVar2 = (byte *)*param_2;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *param_1 - 4;\n  if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }\n  return (byte *)0x0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (*param_1 < 4) {\n    return (byte *)0x0;\n  }" if (parenthesized_expression "(*param_1 < 4)" ( (binary_expression "*param_1 < 4" (pointer_expression "*param_1" * identifier) < number_literal) )) (compound_statement "{\n    return (byte *)0x0;\n  }" { (return_statement "return (byte *)0x0;" return (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pbVar2 = (byte *)*param_2;" (assignment_expression "pbVar2 = (byte *)*param_2" identifier = (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;" (assignment_expression "uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8" identifier = (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3]" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10" (binary_expression "(uint)*pbVar2 << 0x18" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)pbVar2[1] << 0x10" (cast_expression "(uint)pbVar2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)pbVar2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar2[2] << 8" (cast_expression "(uint)pbVar2[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[2]" identifier [ number_literal ])) << number_literal))) ;) (expression_statement "uVar1 = *param_1 - 4;" (assignment_expression "uVar1 = *param_1 - 4" identifier = (binary_expression "*param_1 - 4" (pointer_expression "*param_1" * identifier) - number_literal)) ;) (if_statement "if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }" if (parenthesized_expression "(uVar3 <= uVar1)" ( (binary_expression "uVar3 <= uVar1" identifier <= identifier) )) (compound_statement "{\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }" { (expression_statement "*param_1 = uVar1 - uVar3;" (assignment_expression "*param_1 = uVar1 - uVar3" (pointer_expression "*param_1" * identifier) = (binary_expression "uVar1 - uVar3" identifier - identifier)) ;) (expression_statement "*param_2 = *param_2 + (ulong)uVar3 + 4;" (assignment_expression "*param_2 = *param_2 + (ulong)uVar3 + 4" (pointer_expression "*param_2" * identifier) = (binary_expression "*param_2 + (ulong)uVar3 + 4" (binary_expression "*param_2 + (ulong)uVar3" (pointer_expression "*param_2" * identifier) + (cast_expression "(ulong)uVar3" ( (type_descriptor "ulong" type_identifier) ) identifier)) + number_literal)) ;) (expression_statement "*param_3 = uVar3;" (assignment_expression "*param_3 = uVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return pbVar2 + 4;" return (binary_expression "pbVar2 + 4" identifier + number_literal) ;) })) (return_statement "return (byte *)0x0;" return (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "void * get_ssh_string(int *datalen,void **data,int *stringlen)\n\n{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*datalen < 4) {\n    return (void *)0x0;\n  }\n  pbVar2 = (byte *)*data;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *datalen - 4;\n  if (uVar3 <= uVar1) {\n    *datalen = uVar1 - uVar3;\n    *data = (void *)((long)*data + (ulong)uVar3 + 4);\n    *stringlen = uVar3;\n    return pbVar2 + 4;\n  }\n  return (void *)0x0;\n}\n\n" (function_definition "void * get_ssh_string(int *datalen,void **data,int *stringlen)\n\n{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*datalen < 4) {\n    return (void *)0x0;\n  }\n  pbVar2 = (byte *)*data;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *datalen - 4;\n  if (uVar3 <= uVar1) {\n    *datalen = uVar1 - uVar3;\n    *data = (void *)((long)*data + (ulong)uVar3 + 4);\n    *stringlen = uVar3;\n    return pbVar2 + 4;\n  }\n  return (void *)0x0;\n}" primitive_type (pointer_declarator "* get_ssh_string(int *datalen,void **data,int *stringlen)" * (function_declarator "get_ssh_string(int *datalen,void **data,int *stringlen)" identifier (parameter_list "(int *datalen,void **data,int *stringlen)" ( (parameter_declaration "int *datalen" primitive_type (pointer_declarator "*datalen" * identifier)) , (parameter_declaration "void **data" primitive_type (pointer_declarator "**data" * (pointer_declarator "*data" * identifier))) , (parameter_declaration "int *stringlen" primitive_type (pointer_declarator "*stringlen" * identifier)) )))) (compound_statement "{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*datalen < 4) {\n    return (void *)0x0;\n  }\n  pbVar2 = (byte *)*data;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *datalen - 4;\n  if (uVar3 <= uVar1) {\n    *datalen = uVar1 - uVar3;\n    *data = (void *)((long)*data + (ulong)uVar3 + 4);\n    *stringlen = uVar3;\n    return pbVar2 + 4;\n  }\n  return (void *)0x0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (*datalen < 4) {\n    return (void *)0x0;\n  }" if (parenthesized_expression "(*datalen < 4)" ( (binary_expression "*datalen < 4" (pointer_expression "*datalen" * identifier) < number_literal) )) (compound_statement "{\n    return (void *)0x0;\n  }" { (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pbVar2 = (byte *)*data;" (assignment_expression "pbVar2 = (byte *)*data" identifier = (cast_expression "(byte *)*data" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*data" * identifier))) ;) (expression_statement "uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;" (assignment_expression "uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8" identifier = (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3]" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10" (binary_expression "(uint)*pbVar2 << 0x18" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)pbVar2[1] << 0x10" (cast_expression "(uint)pbVar2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)pbVar2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar2[2] << 8" (cast_expression "(uint)pbVar2[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[2]" identifier [ number_literal ])) << number_literal))) ;) (expression_statement "uVar1 = *datalen - 4;" (assignment_expression "uVar1 = *datalen - 4" identifier = (binary_expression "*datalen - 4" (pointer_expression "*datalen" * identifier) - number_literal)) ;) (if_statement "if (uVar3 <= uVar1) {\n    *datalen = uVar1 - uVar3;\n    *data = (void *)((long)*data + (ulong)uVar3 + 4);\n    *stringlen = uVar3;\n    return pbVar2 + 4;\n  }" if (parenthesized_expression "(uVar3 <= uVar1)" ( (binary_expression "uVar3 <= uVar1" identifier <= identifier) )) (compound_statement "{\n    *datalen = uVar1 - uVar3;\n    *data = (void *)((long)*data + (ulong)uVar3 + 4);\n    *stringlen = uVar3;\n    return pbVar2 + 4;\n  }" { (expression_statement "*datalen = uVar1 - uVar3;" (assignment_expression "*datalen = uVar1 - uVar3" (pointer_expression "*datalen" * identifier) = (binary_expression "uVar1 - uVar3" identifier - identifier)) ;) (expression_statement "*data = (void *)((long)*data + (ulong)uVar3 + 4);" (assignment_expression "*data = (void *)((long)*data + (ulong)uVar3 + 4)" (pointer_expression "*data" * identifier) = (cast_expression "(void *)((long)*data + (ulong)uVar3 + 4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)*data + (ulong)uVar3 + 4)" ( (binary_expression "(long)*data + (ulong)uVar3 + 4" (binary_expression "(long)*data + (ulong)uVar3" (cast_expression "(long)*data" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*data" * identifier)) + (cast_expression "(ulong)uVar3" ( (type_descriptor "ulong" type_identifier) ) identifier)) + number_literal) )))) ;) (expression_statement "*stringlen = uVar3;" (assignment_expression "*stringlen = uVar3" (pointer_expression "*stringlen" * identifier) = identifier) ;) (return_statement "return pbVar2 + 4;" return (binary_expression "pbVar2 + 4" identifier + number_literal) ;) })) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "byte * FUN_0010e252(int *param_1,long *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*param_1 < 4) {\n    return (byte *)0x0;\n  }\n  pbVar2 = (byte *)*param_2;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *param_1 - 4;\n  if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }\n  return (byte *)0x0;\n}\n\n" (function_definition "byte * FUN_0010e252(int *param_1,long *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*param_1 < 4) {\n    return (byte *)0x0;\n  }\n  pbVar2 = (byte *)*param_2;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *param_1 - 4;\n  if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }\n  return (byte *)0x0;\n}" type_identifier (pointer_declarator "* FUN_0010e252(int *param_1,long *param_2,uint *param_3)" * (function_declarator "FUN_0010e252(int *param_1,long *param_2,uint *param_3)" identifier (parameter_list "(int *param_1,long *param_2,uint *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) )))) (compound_statement "{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*param_1 < 4) {\n    return (byte *)0x0;\n  }\n  pbVar2 = (byte *)*param_2;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *param_1 - 4;\n  if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }\n  return (byte *)0x0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (*param_1 < 4) {\n    return (byte *)0x0;\n  }" if (parenthesized_expression "(*param_1 < 4)" ( (binary_expression "*param_1 < 4" (pointer_expression "*param_1" * identifier) < number_literal) )) (compound_statement "{\n    return (byte *)0x0;\n  }" { (return_statement "return (byte *)0x0;" return (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pbVar2 = (byte *)*param_2;" (assignment_expression "pbVar2 = (byte *)*param_2" identifier = (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;" (assignment_expression "uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8" identifier = (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3]" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10" (binary_expression "(uint)*pbVar2 << 0x18" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)pbVar2[1] << 0x10" (cast_expression "(uint)pbVar2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)pbVar2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar2[2] << 8" (cast_expression "(uint)pbVar2[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar2[2]" identifier [ number_literal ])) << number_literal))) ;) (expression_statement "uVar1 = *param_1 - 4;" (assignment_expression "uVar1 = *param_1 - 4" identifier = (binary_expression "*param_1 - 4" (pointer_expression "*param_1" * identifier) - number_literal)) ;) (if_statement "if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }" if (parenthesized_expression "(uVar3 <= uVar1)" ( (binary_expression "uVar3 <= uVar1" identifier <= identifier) )) (compound_statement "{\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }" { (expression_statement "*param_1 = uVar1 - uVar3;" (assignment_expression "*param_1 = uVar1 - uVar3" (pointer_expression "*param_1" * identifier) = (binary_expression "uVar1 - uVar3" identifier - identifier)) ;) (expression_statement "*param_2 = *param_2 + (ulong)uVar3 + 4;" (assignment_expression "*param_2 = *param_2 + (ulong)uVar3 + 4" (pointer_expression "*param_2" * identifier) = (binary_expression "*param_2 + (ulong)uVar3 + 4" (binary_expression "*param_2 + (ulong)uVar3" (pointer_expression "*param_2" * identifier) + (cast_expression "(ulong)uVar3" ( (type_descriptor "ulong" type_identifier) ) identifier)) + number_literal)) ;) (expression_statement "*param_3 = uVar3;" (assignment_expression "*param_3 = uVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return pbVar2 + 4;" return (binary_expression "pbVar2 + 4" identifier + number_literal) ;) })) (return_statement "return (byte *)0x0;" return (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) < LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) << LIT) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) << LIT)) | (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) << LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (binary_expression (pointer_expression * IDENT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return (binary_expression IDENT + LIT) ;) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "byte * FUN_0010e252(int *param_1,long *param_2,uint *param_3)\n\n{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*param_1 < 4) {\n    return (byte *)0x0;\n  }\n  pbVar2 = (byte *)*param_2;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *param_1 - 4;\n  if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }\n  return (byte *)0x0;\n}" (type_identifier "byte") (pointer_declarator "* FUN_0010e252(int *param_1,long *param_2,uint *param_3)" (* "*") (function_declarator "FUN_0010e252(int *param_1,long *param_2,uint *param_3)" (identifier "FUN_0010e252") (parameter_list "(int *param_1,long *param_2,uint *param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long *param_2" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint *param_3" (type_identifier "uint") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")")))) (compound_statement "{\n  uint uVar1;\n  byte *pbVar2;\n  uint uVar3;\n  \n  if (*param_1 < 4) {\n    return (byte *)0x0;\n  }\n  pbVar2 = (byte *)*param_2;\n  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;\n  uVar1 = *param_1 - 4;\n  if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }\n  return (byte *)0x0;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (if_statement "if (*param_1 < 4) {\n    return (byte *)0x0;\n  }" (if "if") (parenthesized_expression "(*param_1 < 4)" (( "(") (binary_expression "*param_1 < 4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (< "<") (number_literal "4")) () ")")) (compound_statement "{\n    return (byte *)0x0;\n  }" ({ "{") (return_statement "return (byte *)0x0;" (return "return") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "pbVar2 = (byte *)*param_2;" (assignment_expression "pbVar2 = (byte *)*param_2" (identifier "pbVar2") (= "=") (cast_expression "(byte *)*param_2" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;" (assignment_expression "uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8" (identifier "uVar3") (= "=") (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3]" (binary_expression "(uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10" (binary_expression "(uint)*pbVar2 << 0x18" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar2")) (<< "<<") (number_literal "0x18")) (| "|") (binary_expression "(uint)pbVar2[1] << 0x10" (cast_expression "(uint)pbVar2[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar2[1]" (identifier "pbVar2") ([ "[") (number_literal "1") (] "]"))) (<< "<<") (number_literal "0x10"))) (| "|") (cast_expression "(uint)pbVar2[3]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar2[3]" (identifier "pbVar2") ([ "[") (number_literal "3") (] "]")))) (| "|") (binary_expression "(uint)pbVar2[2] << 8" (cast_expression "(uint)pbVar2[2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar2[2]" (identifier "pbVar2") ([ "[") (number_literal "2") (] "]"))) (<< "<<") (number_literal "8")))) (; ";")) (expression_statement "uVar1 = *param_1 - 4;" (assignment_expression "uVar1 = *param_1 - 4" (identifier "uVar1") (= "=") (binary_expression "*param_1 - 4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (- "-") (number_literal "4"))) (; ";")) (if_statement "if (uVar3 <= uVar1) {\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }" (if "if") (parenthesized_expression "(uVar3 <= uVar1)" (( "(") (binary_expression "uVar3 <= uVar1" (identifier "uVar3") (<= "<=") (identifier "uVar1")) () ")")) (compound_statement "{\n    *param_1 = uVar1 - uVar3;\n    *param_2 = *param_2 + (ulong)uVar3 + 4;\n    *param_3 = uVar3;\n    return pbVar2 + 4;\n  }" ({ "{") (expression_statement "*param_1 = uVar1 - uVar3;" (assignment_expression "*param_1 = uVar1 - uVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "uVar1 - uVar3" (identifier "uVar1") (- "-") (identifier "uVar3"))) (; ";")) (expression_statement "*param_2 = *param_2 + (ulong)uVar3 + 4;" (assignment_expression "*param_2 = *param_2 + (ulong)uVar3 + 4" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "*param_2 + (ulong)uVar3 + 4" (binary_expression "*param_2 + (ulong)uVar3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (cast_expression "(ulong)uVar3" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar3"))) (+ "+") (number_literal "4"))) (; ";")) (expression_statement "*param_3 = uVar3;" (assignment_expression "*param_3 = uVar3" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "uVar3")) (; ";")) (return_statement "return pbVar2 + 4;" (return "return") (binary_expression "pbVar2 + 4" (identifier "pbVar2") (+ "+") (number_literal "4")) (; ";")) (} "}"))) (return_statement "return (byte *)0x0;" (return "return") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

void * function_1(int *datalen,void **data,int *stringlen)

{
  type_1 var_3;
  type_2 *var_1;
  type_1 var_2;
  
  if (*datalen < 4) {
    return (void *)0x0;
  }
  var_1 = (type_2 *)*data;
  var_2 = (type_1)*var_1 << 0x18 | (type_1)var_1[1] << 0x10 | (type_1)var_1[3] | (type_1)var_1[2] << 8;
  var_3 = *datalen - 4;
  if (var_2 <= var_3) {
    *datalen = var_3 - var_2;
    *data = (void *)((long)*data + (type_3)var_2 + 4);
    *stringlen = var_2;
    return var_1 + 4;
  }
  return (void *)0x0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)) right: (number_literal)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (number_literal))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal)))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (binary_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (binary_expression left: (identifier) right: (number_literal))))) (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))))

byte * MASKED(int *param_1,long *param_2,uint *param_3)

{
  uint uVar1;
  byte *pbVar2;
  uint uVar3;
  
  if (*param_1 < 4) {
    return (byte *)0x0;
  }
  pbVar2 = (byte *)*param_2;
  uVar3 = (uint)*pbVar2 << 0x18 | (uint)pbVar2[1] << 0x10 | (uint)pbVar2[3] | (uint)pbVar2[2] << 8;
  uVar1 = *param_1 - 4;
  if (uVar3 <= uVar1) {
    *param_1 = uVar1 - uVar3;
    *param_2 = *param_2 + (ulong)uVar3 + 4;
    *param_3 = uVar3;
    return pbVar2 + 4;
  }
  return (byte *)0x0;
}

