
char * getstring(void *data,int datalen)

{
  uint uVar1;
  char *pcVar2;
  uchar *data_1;
  
  if (datalen < 4) {
    return (char *)0x0;
  }
                    /* WARNING: Load size is inaccurate */
  uVar1 = toint((uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |
                (uint)*(byte *)((long)data + 3) | (uint)*(byte *)((long)data + 2) << 8);
  if (((int)uVar1 < 0) || (datalen + -3 <= (int)uVar1)) {
    pcVar2 = (char *)0x0;
  }
  else {
    pcVar2 = dupprintf("%.*s",(ulong)uVar1,(long)data + 4);
  }
  return pcVar2;
}



undefined8 FUN_0014ea99(byte *param_1,int param_2)

{
  int iVar1;
  undefined8 uVar2;
  
  if (param_2 < 4) {
    return 0;
  }
  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |
                       (uint)param_1[2] << 8);
  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {
    uVar2 = 0;
  }
  else {
    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);
  }
  return uVar2;
}


CMP ESI,0x3
JG 0x0014eaa4
MOV EAX,0x0
RET
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBP,ESI
MOV RBX,RDI
MOVZX EDI,byte ptr [RDI]
SHL EDI,0x18
MOVZX EAX,byte ptr [RBX + 0x1]
SHL EAX,0x10
OR EDI,EAX
MOVZX EAX,byte ptr [RBX + 0x3]
OR EDI,EAX
MOVZX EAX,byte ptr [RBX + 0x2]
SHL EAX,0x8
OR EDI,EAX
CALL 0x0010df0d
TEST EAX,EAX
JS 0x0014eafb
SUB EBP,0x3
CMP EAX,EBP
JGE 0x0014eafb
LEA RDX,[RBX + 0x4]
MOV ESI,EAX
LEA RDI,[0x163ca1]
MOV EAX,0x0
CALL 0x0010e862
ADD RSP,0x8
POP RBX
POP RBP
RET
MOV EAX,0x0
JMP 0x0014eaf4
(translation_unit "undefined8 FUN_0014ea99(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_2 < 4) {\n    return 0;\n  }\n  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);\n  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined8 FUN_0014ea99(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_2 < 4) {\n    return 0;\n  }\n  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);\n  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0014ea99(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_2 < 4) {\n    return 0;\n  }\n  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);\n  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (if_statement "if (param_2 < 4) {\n    return 0;\n  }" if (parenthesized_expression "(param_2 < 4)" ( (binary_expression "param_2 < 4" identifier < number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);" (assignment_expression "iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8)" identifier = (call_expression "FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8)" identifier (argument_list "((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8)" ( (binary_expression "(uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8" (binary_expression "(uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3]" (binary_expression "(uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10" (binary_expression "(uint)*param_1 << 0x18" (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)param_1[1] << 0x10" (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)param_1[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) | (binary_expression "(uint)param_1[2] << 8" (cast_expression "(uint)param_1[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) << number_literal)) )))) ;) (if_statement "if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }" if (parenthesized_expression "((iVar1 < 0) || (param_2 + -3 <= iVar1))" ( (binary_expression "(iVar1 < 0) || (param_2 + -3 <= iVar1)" (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) || (parenthesized_expression "(param_2 + -3 <= iVar1)" ( (binary_expression "param_2 + -3 <= iVar1" (binary_expression "param_2 + -3" identifier + number_literal) <= identifier) ))) )) (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }" else (compound_statement "{\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }" { (expression_statement "uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);" (assignment_expression "uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4)" identifier = (call_expression "FUN_0010e862("%.*s",iVar1,param_1 + 4)" identifier (argument_list "("%.*s",iVar1,param_1 + 4)" ( (string_literal ""%.*s"" " string_content ") , identifier , (binary_expression "param_1 + 4" identifier + number_literal) )))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "char * getstring(void *data,int datalen)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  uchar *data_1;\n  \n  if (datalen < 4) {\n    return (char *)0x0;\n  }\n                    /* WARNING: Load size is inaccurate */\n  uVar1 = toint((uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |\n                (uint)*(byte *)((long)data + 3) | (uint)*(byte *)((long)data + 2) << 8);\n  if (((int)uVar1 < 0) || (datalen + -3 <= (int)uVar1)) {\n    pcVar2 = (char *)0x0;\n  }\n  else {\n    pcVar2 = dupprintf("%.*s",(ulong)uVar1,(long)data + 4);\n  }\n  return pcVar2;\n}\n\n" (function_definition "char * getstring(void *data,int datalen)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  uchar *data_1;\n  \n  if (datalen < 4) {\n    return (char *)0x0;\n  }\n                    /* WARNING: Load size is inaccurate */\n  uVar1 = toint((uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |\n                (uint)*(byte *)((long)data + 3) | (uint)*(byte *)((long)data + 2) << 8);\n  if (((int)uVar1 < 0) || (datalen + -3 <= (int)uVar1)) {\n    pcVar2 = (char *)0x0;\n  }\n  else {\n    pcVar2 = dupprintf("%.*s",(ulong)uVar1,(long)data + 4);\n  }\n  return pcVar2;\n}" primitive_type (pointer_declarator "* getstring(void *data,int datalen)" * (function_declarator "getstring(void *data,int datalen)" identifier (parameter_list "(void *data,int datalen)" ( (parameter_declaration "void *data" primitive_type (pointer_declarator "*data" * identifier)) , (parameter_declaration "int datalen" primitive_type identifier) )))) (compound_statement "{\n  uint uVar1;\n  char *pcVar2;\n  uchar *data_1;\n  \n  if (datalen < 4) {\n    return (char *)0x0;\n  }\n                    /* WARNING: Load size is inaccurate */\n  uVar1 = toint((uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |\n                (uint)*(byte *)((long)data + 3) | (uint)*(byte *)((long)data + 2) << 8);\n  if (((int)uVar1 < 0) || (datalen + -3 <= (int)uVar1)) {\n    pcVar2 = (char *)0x0;\n  }\n  else {\n    pcVar2 = dupprintf("%.*s",(ulong)uVar1,(long)data + 4);\n  }\n  return pcVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "uchar *data_1;" type_identifier (pointer_declarator "*data_1" * identifier) ;) (if_statement "if (datalen < 4) {\n    return (char *)0x0;\n  }" if (parenthesized_expression "(datalen < 4)" ( (binary_expression "datalen < 4" identifier < number_literal) )) (compound_statement "{\n    return (char *)0x0;\n  }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) comment (expression_statement "uVar1 = toint((uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |\n                (uint)*(byte *)((long)data + 3) | (uint)*(byte *)((long)data + 2) << 8);" (assignment_expression "uVar1 = toint((uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |\n                (uint)*(byte *)((long)data + 3) | (uint)*(byte *)((long)data + 2) << 8)" identifier = (call_expression "toint((uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |\n                (uint)*(byte *)((long)data + 3) | (uint)*(byte *)((long)data + 2) << 8)" identifier (argument_list "((uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |\n                (uint)*(byte *)((long)data + 3) | (uint)*(byte *)((long)data + 2) << 8)" ( (binary_expression "(uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |\n                (uint)*(byte *)((long)data + 3) | (uint)*(byte *)((long)data + 2) << 8" (binary_expression "(uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10 |\n                (uint)*(byte *)((long)data + 3)" (binary_expression "(uint)*data << 0x18 | (uint)*(byte *)((long)data + 1) << 0x10" (binary_expression "(uint)*data << 0x18" (binary_expression "(uint)*data" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)*(byte *)((long)data + 1) << 0x10" (binary_expression "(uint)*(byte *)((long)data + 1)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)((long)data + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)data + 1)" ( (binary_expression "(long)data + 1" (cast_expression "(long)data" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) << number_literal)) | (binary_expression "(uint)*(byte *)((long)data + 3)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)((long)data + 3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)data + 3)" ( (binary_expression "(long)data + 3" (cast_expression "(long)data" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) | (binary_expression "(uint)*(byte *)((long)data + 2) << 8" (binary_expression "(uint)*(byte *)((long)data + 2)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)((long)data + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)data + 2)" ( (binary_expression "(long)data + 2" (cast_expression "(long)data" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) << number_literal)) )))) ;) (if_statement "if (((int)uVar1 < 0) || (datalen + -3 <= (int)uVar1)) {\n    pcVar2 = (char *)0x0;\n  }\n  else {\n    pcVar2 = dupprintf("%.*s",(ulong)uVar1,(long)data + 4);\n  }" if (parenthesized_expression "(((int)uVar1 < 0) || (datalen + -3 <= (int)uVar1))" ( (binary_expression "((int)uVar1 < 0) || (datalen + -3 <= (int)uVar1)" (parenthesized_expression "((int)uVar1 < 0)" ( (binary_expression "(int)uVar1 < 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "(datalen + -3 <= (int)uVar1)" ( (binary_expression "datalen + -3 <= (int)uVar1" (binary_expression "datalen + -3" identifier + number_literal) <= (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (compound_statement "{\n    pcVar2 = (char *)0x0;\n  }" { (expression_statement "pcVar2 = (char *)0x0;" (assignment_expression "pcVar2 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    pcVar2 = dupprintf("%.*s",(ulong)uVar1,(long)data + 4);\n  }" else (compound_statement "{\n    pcVar2 = dupprintf("%.*s",(ulong)uVar1,(long)data + 4);\n  }" { (expression_statement "pcVar2 = dupprintf("%.*s",(ulong)uVar1,(long)data + 4);" (assignment_expression "pcVar2 = dupprintf("%.*s",(ulong)uVar1,(long)data + 4)" identifier = (call_expression "dupprintf("%.*s",(ulong)uVar1,(long)data + 4)" identifier (argument_list "("%.*s",(ulong)uVar1,(long)data + 4)" ( (string_literal ""%.*s"" " string_content ") , (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier) , (binary_expression "(long)data + 4" (cast_expression "(long)data" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) ;) }))) (return_statement "return pcVar2;" return identifier ;) })))
(translation_unit "undefined8 FUN_0014ea99(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_2 < 4) {\n    return 0;\n  }\n  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);\n  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined8 FUN_0014ea99(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_2 < 4) {\n    return 0;\n  }\n  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);\n  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0014ea99(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_2 < 4) {\n    return 0;\n  }\n  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);\n  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (if_statement "if (param_2 < 4) {\n    return 0;\n  }" if (parenthesized_expression "(param_2 < 4)" ( (binary_expression "param_2 < 4" identifier < number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);" (assignment_expression "iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8)" identifier = (call_expression "FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8)" identifier (argument_list "((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8)" ( (binary_expression "(uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8" (binary_expression "(uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3]" (binary_expression "(uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10" (binary_expression "(uint)*param_1 << 0x18" (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)param_1[1] << 0x10" (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)param_1[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) | (binary_expression "(uint)param_1[2] << 8" (cast_expression "(uint)param_1[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) << number_literal)) )))) ;) (if_statement "if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }" if (parenthesized_expression "((iVar1 < 0) || (param_2 + -3 <= iVar1))" ( (binary_expression "(iVar1 < 0) || (param_2 + -3 <= iVar1)" (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) || (parenthesized_expression "(param_2 + -3 <= iVar1)" ( (binary_expression "param_2 + -3 <= iVar1" (binary_expression "param_2 + -3" identifier + number_literal) <= identifier) ))) )) (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }" else (compound_statement "{\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }" { (expression_statement "uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);" (assignment_expression "uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4)" identifier = (call_expression "FUN_0010e862("%.*s",iVar1,param_1 + 4)" identifier (argument_list "("%.*s",iVar1,param_1 + 4)" ( (string_literal ""%.*s"" " string_content ") , identifier , (binary_expression "param_1 + 4" identifier + number_literal) )))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (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)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) <= IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , (binary_expression IDENT + LIT) )))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined8 FUN_0014ea99(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_2 < 4) {\n    return 0;\n  }\n  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);\n  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }\n  return uVar2;\n}" (type_identifier "undefined8") (function_declarator "FUN_0014ea99(byte *param_1,int param_2)" (identifier "FUN_0014ea99") (parameter_list "(byte *param_1,int param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_2 < 4) {\n    return 0;\n  }\n  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);\n  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (if_statement "if (param_2 < 4) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_2 < 4)" (( "(") (binary_expression "param_2 < 4" (identifier "param_2") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8);" (assignment_expression "iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8)" (identifier "iVar1") (= "=") (call_expression "FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8)" (identifier "FUN_0010df0d") (argument_list "((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8)" (( "(") (binary_expression "(uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |\n                       (uint)param_1[2] << 8" (binary_expression "(uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3]" (binary_expression "(uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10" (binary_expression "(uint)*param_1 << 0x18" (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_1")) (<< "<<") (number_literal "0x18")) (| "|") (binary_expression "(uint)param_1[1] << 0x10" (cast_expression "(uint)param_1[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (<< "<<") (number_literal "0x10"))) (| "|") (cast_expression "(uint)param_1[3]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")))) (| "|") (binary_expression "(uint)param_1[2] << 8" (cast_expression "(uint)param_1[2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (<< "<<") (number_literal "8"))) () ")")))) (; ";")) (if_statement "if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {\n    uVar2 = 0;\n  }\n  else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }" (if "if") (parenthesized_expression "((iVar1 < 0) || (param_2 + -3 <= iVar1))" (( "(") (binary_expression "(iVar1 < 0) || (param_2 + -3 <= iVar1)" (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(param_2 + -3 <= iVar1)" (( "(") (binary_expression "param_2 + -3 <= iVar1" (binary_expression "param_2 + -3" (identifier "param_2") (+ "+") (number_literal "-3")) (<= "<=") (identifier "iVar1")) () ")"))) () ")")) (compound_statement "{\n    uVar2 = 0;\n  }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }" (else "else") (compound_statement "{\n    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);\n  }" ({ "{") (expression_statement "uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);" (assignment_expression "uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4)" (identifier "uVar2") (= "=") (call_expression "FUN_0010e862("%.*s",iVar1,param_1 + 4)" (identifier "FUN_0010e862") (argument_list "("%.*s",iVar1,param_1 + 4)" (( "(") (string_literal ""%.*s"" (" """) (string_content "%.*s") (" """)) (, ",") (identifier "iVar1") (, ",") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (; ";")) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

char * function_1(void *var_3,int var_1)

{
  type_1 uVar1;
  char *pcVar2;
  type_2 *data_1;
  
  if (var_1 < 4) {
    return (char *)0x0;
  }
                    /* WARNING: Load size is inaccurate */
  uVar1 = var_2((type_1)*var_3 << 0x18 | (type_1)*(type_3 *)((long)var_3 + 1) << 0x10 |
                (type_1)*(type_3 *)((long)var_3 + 3) | (type_1)*(type_3 *)((long)var_3 + 2) << 8);
  if (((int)uVar1 < 0) || (var_1 + -3 <= (int)uVar1)) {
    pcVar2 = (char *)0x0;
  }
  else {
    pcVar2 = var_4("%.*s",(type_4)uVar1,(long)var_3 + 4);
  }
  return pcVar2;
}


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

undefined8 MASKED(byte *param_1,int param_2)

{
  int iVar1;
  undefined8 uVar2;
  
  if (param_2 < 4) {
    return 0;
  }
  iVar1 = FUN_0010df0d((uint)*param_1 << 0x18 | (uint)param_1[1] << 0x10 | (uint)param_1[3] |
                       (uint)param_1[2] << 8);
  if ((iVar1 < 0) || (param_2 + -3 <= iVar1)) {
    uVar2 = 0;
  }
  else {
    uVar2 = FUN_0010e862("%.*s",iVar1,param_1 + 4);
  }
  return uVar2;
}

