
char * parse_gnu_debugaltlink(dwarf_section *section,void *data)

{
  ulong uVar1;
  size_t __maxlen;
  uchar *__string;
  size_t sVar2;
  ulong *puVar3;
  
  __maxlen = section->size;
  __string = section->start;
  sVar2 = strnlen((char *)__string,__maxlen);
  uVar1 = sVar2 + 1;
  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {
    puVar3 = (ulong *)calloc(1,0x10);
    if (puVar3 != (ulong *)0x0) {
      *puVar3 = __maxlen - uVar1;
      puVar3[1] = (ulong)(__string + uVar1);
      *(ulong **)data = puVar3;
      return (char *)__string;
    }
  }
  return (char *)0x0;
}



char * FUN_0010eb30(long param_1,undefined8 *param_2)

{
  ulong uVar1;
  size_t __maxlen;
  char *__string;
  size_t sVar2;
  ulong *puVar3;
  
  __maxlen = *(size_t *)(param_1 + 0x30);
  __string = *(char **)(param_1 + 0x20);
  sVar2 = strnlen(__string,__maxlen);
  uVar1 = sVar2 + 1;
  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {
    puVar3 = (ulong *)calloc(1,0x10);
    if (puVar3 != (ulong *)0x0) {
      *puVar3 = __maxlen - uVar1;
      puVar3[1] = (ulong)(__string + uVar1);
      *param_2 = puVar3;
      return __string;
    }
  }
  return (char *)0x0;
}


PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,qword ptr [RDI + 0x30]
MOV R13,qword ptr [RDI + 0x20]
MOV RSI,RBP
MOV RDI,R13
CALL 0x00107340
LEA RBX,[RAX + 0x1]
CMP RBP,RBX
JBE 0x0010eb98
SUB RBP,RBX
CMP RBP,0x13
JBE 0x0010eb98
MOV ESI,0x10
MOV EDI,0x1
CALL 0x00107430
TEST RAX,RAX
JZ 0x0010eb98
ADD RBX,R13
MOV qword ptr [RAX],RBP
MOV qword ptr [RAX + 0x8],RBX
MOV qword ptr [R12],RAX
ADD RSP,0x8
MOV RAX,R13
POP RBX
POP RBP
POP R12
POP R13
RET
ADD RSP,0x8
XOR R13D,R13D
POP RBX
MOV RAX,R13
POP RBP
POP R12
POP R13
RET
(translation_unit "char * FUN_0010eb30(long param_1,undefined8 *param_2)\n\n{\n  ulong uVar1;\n  size_t __maxlen;\n  char *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = *(size_t *)(param_1 + 0x30);\n  __string = *(char **)(param_1 + 0x20);\n  sVar2 = strnlen(__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }\n  return (char *)0x0;\n}\n\n" (function_definition "char * FUN_0010eb30(long param_1,undefined8 *param_2)\n\n{\n  ulong uVar1;\n  size_t __maxlen;\n  char *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = *(size_t *)(param_1 + 0x30);\n  __string = *(char **)(param_1 + 0x20);\n  sVar2 = strnlen(__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }\n  return (char *)0x0;\n}" primitive_type (pointer_declarator "* FUN_0010eb30(long param_1,undefined8 *param_2)" * (function_declarator "FUN_0010eb30(long param_1,undefined8 *param_2)" identifier (parameter_list "(long param_1,undefined8 *param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  ulong uVar1;\n  size_t __maxlen;\n  char *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = *(size_t *)(param_1 + 0x30);\n  __string = *(char **)(param_1 + 0x20);\n  sVar2 = strnlen(__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }\n  return (char *)0x0;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "size_t __maxlen;" primitive_type identifier ;) (declaration "char *__string;" primitive_type (pointer_declarator "*__string" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "ulong *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "__maxlen = *(size_t *)(param_1 + 0x30);" (assignment_expression "__maxlen = *(size_t *)(param_1 + 0x30)" identifier = (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "__string = *(char **)(param_1 + 0x20);" (assignment_expression "__string = *(char **)(param_1 + 0x20)" identifier = (pointer_expression "*(char **)(param_1 + 0x20)" * (cast_expression "(char **)(param_1 + 0x20)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) ;) (expression_statement "sVar2 = strnlen(__string,__maxlen);" (assignment_expression "sVar2 = strnlen(__string,__maxlen)" identifier = (call_expression "strnlen(__string,__maxlen)" identifier (argument_list "(__string,__maxlen)" ( identifier , identifier )))) ;) (expression_statement "uVar1 = sVar2 + 1;" (assignment_expression "uVar1 = sVar2 + 1" identifier = (binary_expression "sVar2 + 1" identifier + number_literal)) ;) (if_statement "if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }" if (parenthesized_expression "((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1))" ( (binary_expression "(uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)" (parenthesized_expression "(uVar1 < __maxlen)" ( (binary_expression "uVar1 < __maxlen" identifier < identifier) )) && (parenthesized_expression "(0x13 < __maxlen - uVar1)" ( (binary_expression "0x13 < __maxlen - uVar1" number_literal < (binary_expression "__maxlen - uVar1" identifier - identifier)) ))) )) (compound_statement "{\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }" { (expression_statement "puVar3 = (ulong *)calloc(1,0x10);" (assignment_expression "puVar3 = (ulong *)calloc(1,0x10)" identifier = (cast_expression "(ulong *)calloc(1,0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "calloc(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (if_statement "if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }" if (parenthesized_expression "(puVar3 != (ulong *)0x0)" ( (binary_expression "puVar3 != (ulong *)0x0" identifier != (cast_expression "(ulong *)0x0" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }" { (expression_statement "*puVar3 = __maxlen - uVar1;" (assignment_expression "*puVar3 = __maxlen - uVar1" (pointer_expression "*puVar3" * identifier) = (binary_expression "__maxlen - uVar1" identifier - identifier)) ;) (expression_statement "puVar3[1] = (ulong)(__string + uVar1);" (assignment_expression "puVar3[1] = (ulong)(__string + uVar1)" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = (call_expression "(ulong)(__string + uVar1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(__string + uVar1)" ( (binary_expression "__string + uVar1" identifier + identifier) )))) ;) (expression_statement "*param_2 = puVar3;" (assignment_expression "*param_2 = puVar3" (pointer_expression "*param_2" * identifier) = identifier) ;) (return_statement "return __string;" return identifier ;) })) })) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "char * parse_gnu_debugaltlink(dwarf_section *section,void *data)\n\n{\n  ulong uVar1;\n  size_t __maxlen;\n  uchar *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = section->size;\n  __string = section->start;\n  sVar2 = strnlen((char *)__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *(ulong **)data = puVar3;\n      return (char *)__string;\n    }\n  }\n  return (char *)0x0;\n}\n\n" (function_definition "char * parse_gnu_debugaltlink(dwarf_section *section,void *data)\n\n{\n  ulong uVar1;\n  size_t __maxlen;\n  uchar *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = section->size;\n  __string = section->start;\n  sVar2 = strnlen((char *)__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *(ulong **)data = puVar3;\n      return (char *)__string;\n    }\n  }\n  return (char *)0x0;\n}" primitive_type (pointer_declarator "* parse_gnu_debugaltlink(dwarf_section *section,void *data)" * (function_declarator "parse_gnu_debugaltlink(dwarf_section *section,void *data)" identifier (parameter_list "(dwarf_section *section,void *data)" ( (parameter_declaration "dwarf_section *section" type_identifier (pointer_declarator "*section" * identifier)) , (parameter_declaration "void *data" primitive_type (pointer_declarator "*data" * identifier)) )))) (compound_statement "{\n  ulong uVar1;\n  size_t __maxlen;\n  uchar *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = section->size;\n  __string = section->start;\n  sVar2 = strnlen((char *)__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *(ulong **)data = puVar3;\n      return (char *)__string;\n    }\n  }\n  return (char *)0x0;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "size_t __maxlen;" primitive_type identifier ;) (declaration "uchar *__string;" type_identifier (pointer_declarator "*__string" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "ulong *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "__maxlen = section->size;" (assignment_expression "__maxlen = section->size" identifier = (field_expression "section->size" identifier -> field_identifier)) ;) (expression_statement "__string = section->start;" (assignment_expression "__string = section->start" identifier = (field_expression "section->start" identifier -> field_identifier)) ;) (expression_statement "sVar2 = strnlen((char *)__string,__maxlen);" (assignment_expression "sVar2 = strnlen((char *)__string,__maxlen)" identifier = (call_expression "strnlen((char *)__string,__maxlen)" identifier (argument_list "((char *)__string,__maxlen)" ( (cast_expression "(char *)__string" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier )))) ;) (expression_statement "uVar1 = sVar2 + 1;" (assignment_expression "uVar1 = sVar2 + 1" identifier = (binary_expression "sVar2 + 1" identifier + number_literal)) ;) (if_statement "if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *(ulong **)data = puVar3;\n      return (char *)__string;\n    }\n  }" if (parenthesized_expression "((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1))" ( (binary_expression "(uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)" (parenthesized_expression "(uVar1 < __maxlen)" ( (binary_expression "uVar1 < __maxlen" identifier < identifier) )) && (parenthesized_expression "(0x13 < __maxlen - uVar1)" ( (binary_expression "0x13 < __maxlen - uVar1" number_literal < (binary_expression "__maxlen - uVar1" identifier - identifier)) ))) )) (compound_statement "{\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *(ulong **)data = puVar3;\n      return (char *)__string;\n    }\n  }" { (expression_statement "puVar3 = (ulong *)calloc(1,0x10);" (assignment_expression "puVar3 = (ulong *)calloc(1,0x10)" identifier = (cast_expression "(ulong *)calloc(1,0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "calloc(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (if_statement "if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *(ulong **)data = puVar3;\n      return (char *)__string;\n    }" if (parenthesized_expression "(puVar3 != (ulong *)0x0)" ( (binary_expression "puVar3 != (ulong *)0x0" identifier != (cast_expression "(ulong *)0x0" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *(ulong **)data = puVar3;\n      return (char *)__string;\n    }" { (expression_statement "*puVar3 = __maxlen - uVar1;" (assignment_expression "*puVar3 = __maxlen - uVar1" (pointer_expression "*puVar3" * identifier) = (binary_expression "__maxlen - uVar1" identifier - identifier)) ;) (expression_statement "puVar3[1] = (ulong)(__string + uVar1);" (assignment_expression "puVar3[1] = (ulong)(__string + uVar1)" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = (call_expression "(ulong)(__string + uVar1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(__string + uVar1)" ( (binary_expression "__string + uVar1" identifier + identifier) )))) ;) (expression_statement "*(ulong **)data = puVar3;" (assignment_expression "*(ulong **)data = puVar3" (pointer_expression "*(ulong **)data" * (cast_expression "(ulong **)data" ( (type_descriptor "ulong **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (return_statement "return (char *)__string;" return (cast_expression "(char *)__string" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) ;) })) })) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "char * FUN_0010eb30(long param_1,undefined8 *param_2)\n\n{\n  ulong uVar1;\n  size_t __maxlen;\n  char *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = *(size_t *)(param_1 + 0x30);\n  __string = *(char **)(param_1 + 0x20);\n  sVar2 = strnlen(__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }\n  return (char *)0x0;\n}\n\n" (function_definition "char * FUN_0010eb30(long param_1,undefined8 *param_2)\n\n{\n  ulong uVar1;\n  size_t __maxlen;\n  char *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = *(size_t *)(param_1 + 0x30);\n  __string = *(char **)(param_1 + 0x20);\n  sVar2 = strnlen(__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }\n  return (char *)0x0;\n}" primitive_type (pointer_declarator "* FUN_0010eb30(long param_1,undefined8 *param_2)" * (function_declarator "FUN_0010eb30(long param_1,undefined8 *param_2)" identifier (parameter_list "(long param_1,undefined8 *param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  ulong uVar1;\n  size_t __maxlen;\n  char *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = *(size_t *)(param_1 + 0x30);\n  __string = *(char **)(param_1 + 0x20);\n  sVar2 = strnlen(__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }\n  return (char *)0x0;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "size_t __maxlen;" primitive_type identifier ;) (declaration "char *__string;" primitive_type (pointer_declarator "*__string" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "ulong *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "__maxlen = *(size_t *)(param_1 + 0x30);" (assignment_expression "__maxlen = *(size_t *)(param_1 + 0x30)" identifier = (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "__string = *(char **)(param_1 + 0x20);" (assignment_expression "__string = *(char **)(param_1 + 0x20)" identifier = (pointer_expression "*(char **)(param_1 + 0x20)" * (cast_expression "(char **)(param_1 + 0x20)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) ;) (expression_statement "sVar2 = strnlen(__string,__maxlen);" (assignment_expression "sVar2 = strnlen(__string,__maxlen)" identifier = (call_expression "strnlen(__string,__maxlen)" identifier (argument_list "(__string,__maxlen)" ( identifier , identifier )))) ;) (expression_statement "uVar1 = sVar2 + 1;" (assignment_expression "uVar1 = sVar2 + 1" identifier = (binary_expression "sVar2 + 1" identifier + number_literal)) ;) (if_statement "if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }" if (parenthesized_expression "((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1))" ( (binary_expression "(uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)" (parenthesized_expression "(uVar1 < __maxlen)" ( (binary_expression "uVar1 < __maxlen" identifier < identifier) )) && (parenthesized_expression "(0x13 < __maxlen - uVar1)" ( (binary_expression "0x13 < __maxlen - uVar1" number_literal < (binary_expression "__maxlen - uVar1" identifier - identifier)) ))) )) (compound_statement "{\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }" { (expression_statement "puVar3 = (ulong *)calloc(1,0x10);" (assignment_expression "puVar3 = (ulong *)calloc(1,0x10)" identifier = (cast_expression "(ulong *)calloc(1,0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "calloc(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (if_statement "if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }" if (parenthesized_expression "(puVar3 != (ulong *)0x0)" ( (binary_expression "puVar3 != (ulong *)0x0" identifier != (cast_expression "(ulong *)0x0" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }" { (expression_statement "*puVar3 = __maxlen - uVar1;" (assignment_expression "*puVar3 = __maxlen - uVar1" (pointer_expression "*puVar3" * identifier) = (binary_expression "__maxlen - uVar1" identifier - identifier)) ;) (expression_statement "puVar3[1] = (ulong)(__string + uVar1);" (assignment_expression "puVar3[1] = (ulong)(__string + uVar1)" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = (call_expression "(ulong)(__string + uVar1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(__string + uVar1)" ( (binary_expression "__string + uVar1" identifier + identifier) )))) ;) (expression_statement "*param_2 = puVar3;" (assignment_expression "*param_2 = puVar3" (pointer_expression "*param_2" * identifier) = identifier) ;) (return_statement "return __string;" return identifier ;) })) })) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return IDENT ;) })) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "char * FUN_0010eb30(long param_1,undefined8 *param_2)\n\n{\n  ulong uVar1;\n  size_t __maxlen;\n  char *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = *(size_t *)(param_1 + 0x30);\n  __string = *(char **)(param_1 + 0x20);\n  sVar2 = strnlen(__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }\n  return (char *)0x0;\n}" (primitive_type "char") (pointer_declarator "* FUN_0010eb30(long param_1,undefined8 *param_2)" (* "*") (function_declarator "FUN_0010eb30(long param_1,undefined8 *param_2)" (identifier "FUN_0010eb30") (parameter_list "(long param_1,undefined8 *param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 *param_2" (type_identifier "undefined8") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  ulong uVar1;\n  size_t __maxlen;\n  char *__string;\n  size_t sVar2;\n  ulong *puVar3;\n  \n  __maxlen = *(size_t *)(param_1 + 0x30);\n  __string = *(char **)(param_1 + 0x20);\n  sVar2 = strnlen(__string,__maxlen);\n  uVar1 = sVar2 + 1;\n  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }\n  return (char *)0x0;\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "size_t __maxlen;" (primitive_type "size_t") (identifier "__maxlen") (; ";")) (declaration "char *__string;" (primitive_type "char") (pointer_declarator "*__string" (* "*") (identifier "__string")) (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "ulong *puVar3;" (type_identifier "ulong") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (expression_statement "__maxlen = *(size_t *)(param_1 + 0x30);" (assignment_expression "__maxlen = *(size_t *)(param_1 + 0x30)" (identifier "__maxlen") (= "=") (pointer_expression "*(size_t *)(param_1 + 0x30)" (* "*") (cast_expression "(size_t *)(param_1 + 0x30)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (expression_statement "__string = *(char **)(param_1 + 0x20);" (assignment_expression "__string = *(char **)(param_1 + 0x20)" (identifier "__string") (= "=") (pointer_expression "*(char **)(param_1 + 0x20)" (* "*") (cast_expression "(char **)(param_1 + 0x20)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")"))))) (; ";")) (expression_statement "sVar2 = strnlen(__string,__maxlen);" (assignment_expression "sVar2 = strnlen(__string,__maxlen)" (identifier "sVar2") (= "=") (call_expression "strnlen(__string,__maxlen)" (identifier "strnlen") (argument_list "(__string,__maxlen)" (( "(") (identifier "__string") (, ",") (identifier "__maxlen") () ")")))) (; ";")) (expression_statement "uVar1 = sVar2 + 1;" (assignment_expression "uVar1 = sVar2 + 1" (identifier "uVar1") (= "=") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }" (if "if") (parenthesized_expression "((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1))" (( "(") (binary_expression "(uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)" (parenthesized_expression "(uVar1 < __maxlen)" (( "(") (binary_expression "uVar1 < __maxlen" (identifier "uVar1") (< "<") (identifier "__maxlen")) () ")")) (&& "&&") (parenthesized_expression "(0x13 < __maxlen - uVar1)" (( "(") (binary_expression "0x13 < __maxlen - uVar1" (number_literal "0x13") (< "<") (binary_expression "__maxlen - uVar1" (identifier "__maxlen") (- "-") (identifier "uVar1"))) () ")"))) () ")")) (compound_statement "{\n    puVar3 = (ulong *)calloc(1,0x10);\n    if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }\n  }" ({ "{") (expression_statement "puVar3 = (ulong *)calloc(1,0x10);" (assignment_expression "puVar3 = (ulong *)calloc(1,0x10)" (identifier "puVar3") (= "=") (cast_expression "(ulong *)calloc(1,0x10)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "calloc(1,0x10)" (identifier "calloc") (argument_list "(1,0x10)" (( "(") (number_literal "1") (, ",") (number_literal "0x10") () ")"))))) (; ";")) (if_statement "if (puVar3 != (ulong *)0x0) {\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }" (if "if") (parenthesized_expression "(puVar3 != (ulong *)0x0)" (( "(") (binary_expression "puVar3 != (ulong *)0x0" (identifier "puVar3") (!= "!=") (cast_expression "(ulong *)0x0" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *puVar3 = __maxlen - uVar1;\n      puVar3[1] = (ulong)(__string + uVar1);\n      *param_2 = puVar3;\n      return __string;\n    }" ({ "{") (expression_statement "*puVar3 = __maxlen - uVar1;" (assignment_expression "*puVar3 = __maxlen - uVar1" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (binary_expression "__maxlen - uVar1" (identifier "__maxlen") (- "-") (identifier "uVar1"))) (; ";")) (expression_statement "puVar3[1] = (ulong)(__string + uVar1);" (assignment_expression "puVar3[1] = (ulong)(__string + uVar1)" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (call_expression "(ulong)(__string + uVar1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(__string + uVar1)" (( "(") (binary_expression "__string + uVar1" (identifier "__string") (+ "+") (identifier "uVar1")) () ")")))) (; ";")) (expression_statement "*param_2 = puVar3;" (assignment_expression "*param_2 = puVar3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "puVar3")) (; ";")) (return_statement "return __string;" (return "return") (identifier "__string") (; ";")) (} "}"))) (} "}"))) (return_statement "return (char *)0x0;" (return "return") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

char * function_1(type_1 *section,void *data)

{
  type_2 var_3;
  size_t var_4;
  type_3 *var_7;
  size_t var_2;
  type_2 *var_6;
  
  var_4 = section->size;
  var_7 = section->start;
  var_2 = var_1((char *)var_7,var_4);
  var_3 = var_2 + 1;
  if ((var_3 < var_4) && (0x13 < var_4 - var_3)) {
    var_6 = (type_2 *)var_5(1,0x10);
    if (var_6 != (type_2 *)0x0) {
      *var_6 = var_4 - var_3;
      var_6[1] = (type_2)(var_7 + var_3);
      *(type_2 **)data = var_6;
      return (char *)var_7;
    }
  }
  return (char *)0x0;
}


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

char * MASKED(long param_1,undefined8 *param_2)

{
  ulong uVar1;
  size_t __maxlen;
  char *__string;
  size_t sVar2;
  ulong *puVar3;
  
  __maxlen = *(size_t *)(param_1 + 0x30);
  __string = *(char **)(param_1 + 0x20);
  sVar2 = strnlen(__string,__maxlen);
  uVar1 = sVar2 + 1;
  if ((uVar1 < __maxlen) && (0x13 < __maxlen - uVar1)) {
    puVar3 = (ulong *)calloc(1,0x10);
    if (puVar3 != (ulong *)0x0) {
      *puVar3 = __maxlen - uVar1;
      puVar3[1] = (ulong)(__string + uVar1);
      *param_2 = puVar3;
      return __string;
    }
  }
  return (char *)0x0;
}

