
/* WARNING: Unknown calling convention */

int addbyter(int output,FILE *data)

{
  nsprintf *infop;
  uchar outc;
  
  if (data->_IO_read_ptr < data->_IO_read_end) {
    **(undefined1 **)data = (char)output;
    *(long *)data = *(long *)data + 1;
    data->_IO_read_ptr = data->_IO_read_ptr + 1;
    return output & 0xff;
  }
  return -1;
}



ulong FUN_00127329(byte param_1,long *param_2)

{
  if ((ulong)param_2[1] < (ulong)param_2[2]) {
    *(byte *)*param_2 = param_1;
    *param_2 = *param_2 + 1;
    param_2[1] = param_2[1] + 1;
    return (ulong)param_1;
  }
  return 0xffffffff;
}


MOV RAX,qword ptr [RSI + 0x10]
CMP qword ptr [RSI + 0x8],RAX
JNC 0x00127347
MOV RAX,qword ptr [RSI]
MOV byte ptr [RAX],DIL
ADD qword ptr [RSI],0x1
ADD qword ptr [RSI + 0x8],0x1
MOVZX EAX,DIL
RET
MOV EAX,0xffffffff
RET
(translation_unit "ulong FUN_00127329(byte param_1,long *param_2)\n\n{\n  if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "ulong FUN_00127329(byte param_1,long *param_2)\n\n{\n  if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_00127329(byte param_1,long *param_2)" identifier (parameter_list "(byte param_1,long *param_2)" ( (parameter_declaration "byte param_1" type_identifier identifier) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }\n  return 0xffffffff;\n}" { (if_statement "if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }" if (parenthesized_expression "((ulong)param_2[1] < (ulong)param_2[2])" ( (binary_expression "(ulong)param_2[1] < (ulong)param_2[2]" (cast_expression "(ulong)param_2[1]" ( (type_descriptor "ulong" type_identifier) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) < (cast_expression "(ulong)param_2[2]" ( (type_descriptor "ulong" type_identifier) ) (subscript_expression "param_2[2]" identifier [ number_literal ]))) )) (compound_statement "{\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }" { (expression_statement "*(byte *)*param_2 = param_1;" (assignment_expression "*(byte *)*param_2 = param_1" (pointer_expression "*(byte *)*param_2" * (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) = identifier) ;) (expression_statement "*param_2 = *param_2 + 1;" (assignment_expression "*param_2 = *param_2 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "*param_2 + 1" (pointer_expression "*param_2" * identifier) + number_literal)) ;) (expression_statement "param_2[1] = param_2[1] + 1;" (assignment_expression "param_2[1] = param_2[1] + 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "param_2[1] + 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) + number_literal)) ;) (return_statement "return (ulong)param_1;" return (cast_expression "(ulong)param_1" ( (type_descriptor "ulong" type_identifier) ) identifier) ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint addbyter(int output,FILE *data)\n\n{\n  nsprintf *infop;\n  uchar outc;\n  \n  if (data->_IO_read_ptr < data->_IO_read_end) {\n    **(undefined1 **)data = (char)output;\n    *(long *)data = *(long *)data + 1;\n    data->_IO_read_ptr = data->_IO_read_ptr + 1;\n    return output & 0xff;\n  }\n  return -1;\n}\n\n" comment (function_definition "int addbyter(int output,FILE *data)\n\n{\n  nsprintf *infop;\n  uchar outc;\n  \n  if (data->_IO_read_ptr < data->_IO_read_end) {\n    **(undefined1 **)data = (char)output;\n    *(long *)data = *(long *)data + 1;\n    data->_IO_read_ptr = data->_IO_read_ptr + 1;\n    return output & 0xff;\n  }\n  return -1;\n}" primitive_type (function_declarator "addbyter(int output,FILE *data)" identifier (parameter_list "(int output,FILE *data)" ( (parameter_declaration "int output" primitive_type identifier) , (parameter_declaration "FILE *data" type_identifier (pointer_declarator "*data" * identifier)) ))) (compound_statement "{\n  nsprintf *infop;\n  uchar outc;\n  \n  if (data->_IO_read_ptr < data->_IO_read_end) {\n    **(undefined1 **)data = (char)output;\n    *(long *)data = *(long *)data + 1;\n    data->_IO_read_ptr = data->_IO_read_ptr + 1;\n    return output & 0xff;\n  }\n  return -1;\n}" { (declaration "nsprintf *infop;" type_identifier (pointer_declarator "*infop" * identifier) ;) (declaration "uchar outc;" type_identifier identifier ;) (if_statement "if (data->_IO_read_ptr < data->_IO_read_end) {\n    **(undefined1 **)data = (char)output;\n    *(long *)data = *(long *)data + 1;\n    data->_IO_read_ptr = data->_IO_read_ptr + 1;\n    return output & 0xff;\n  }" if (parenthesized_expression "(data->_IO_read_ptr < data->_IO_read_end)" ( (binary_expression "data->_IO_read_ptr < data->_IO_read_end" (field_expression "data->_IO_read_ptr" identifier -> field_identifier) < (field_expression "data->_IO_read_end" identifier -> field_identifier)) )) (compound_statement "{\n    **(undefined1 **)data = (char)output;\n    *(long *)data = *(long *)data + 1;\n    data->_IO_read_ptr = data->_IO_read_ptr + 1;\n    return output & 0xff;\n  }" { (expression_statement "**(undefined1 **)data = (char)output;" (assignment_expression "**(undefined1 **)data = (char)output" (pointer_expression "**(undefined1 **)data" * (pointer_expression "*(undefined1 **)data" * (cast_expression "(undefined1 **)data" ( (type_descriptor "undefined1 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) = (cast_expression "(char)output" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "*(long *)data = *(long *)data + 1;" (assignment_expression "*(long *)data = *(long *)data + 1" (pointer_expression "*(long *)data" * (cast_expression "(long *)data" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "*(long *)data + 1" (pointer_expression "*(long *)data" * (cast_expression "(long *)data" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal)) ;) (expression_statement "data->_IO_read_ptr = data->_IO_read_ptr + 1;" (assignment_expression "data->_IO_read_ptr = data->_IO_read_ptr + 1" (field_expression "data->_IO_read_ptr" identifier -> field_identifier) = (binary_expression "data->_IO_read_ptr + 1" (field_expression "data->_IO_read_ptr" identifier -> field_identifier) + number_literal)) ;) (return_statement "return output & 0xff;" return (binary_expression "output & 0xff" identifier & number_literal) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "ulong FUN_00127329(byte param_1,long *param_2)\n\n{\n  if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "ulong FUN_00127329(byte param_1,long *param_2)\n\n{\n  if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_00127329(byte param_1,long *param_2)" identifier (parameter_list "(byte param_1,long *param_2)" ( (parameter_declaration "byte param_1" type_identifier identifier) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }\n  return 0xffffffff;\n}" { (if_statement "if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }" if (parenthesized_expression "((ulong)param_2[1] < (ulong)param_2[2])" ( (binary_expression "(ulong)param_2[1] < (ulong)param_2[2]" (cast_expression "(ulong)param_2[1]" ( (type_descriptor "ulong" type_identifier) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) < (cast_expression "(ulong)param_2[2]" ( (type_descriptor "ulong" type_identifier) ) (subscript_expression "param_2[2]" identifier [ number_literal ]))) )) (compound_statement "{\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }" { (expression_statement "*(byte *)*param_2 = param_1;" (assignment_expression "*(byte *)*param_2 = param_1" (pointer_expression "*(byte *)*param_2" * (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) = identifier) ;) (expression_statement "*param_2 = *param_2 + 1;" (assignment_expression "*param_2 = *param_2 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "*param_2 + 1" (pointer_expression "*param_2" * identifier) + number_literal)) ;) (expression_statement "param_2[1] = param_2[1] + 1;" (assignment_expression "param_2[1] = param_2[1] + 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "param_2[1] + 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) + number_literal)) ;) (return_statement "return (ulong)param_1;" return (cast_expression "(ulong)param_1" ( (type_descriptor "ulong" type_identifier) ) identifier) ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) (return_statement return (cast_expression ( (type_descriptor TYPE) ) IDENT) ;) })) (return_statement return LIT ;) })))
(function_definition "ulong FUN_00127329(byte param_1,long *param_2)\n\n{\n  if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }\n  return 0xffffffff;\n}" (type_identifier "ulong") (function_declarator "FUN_00127329(byte param_1,long *param_2)" (identifier "FUN_00127329") (parameter_list "(byte param_1,long *param_2)" (( "(") (parameter_declaration "byte param_1" (type_identifier "byte") (identifier "param_1")) (, ",") (parameter_declaration "long *param_2" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }\n  return 0xffffffff;\n}" ({ "{") (if_statement "if ((ulong)param_2[1] < (ulong)param_2[2]) {\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }" (if "if") (parenthesized_expression "((ulong)param_2[1] < (ulong)param_2[2])" (( "(") (binary_expression "(ulong)param_2[1] < (ulong)param_2[2]" (cast_expression "(ulong)param_2[1]" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (< "<") (cast_expression "(ulong)param_2[2]" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")))) () ")")) (compound_statement "{\n    *(byte *)*param_2 = param_1;\n    *param_2 = *param_2 + 1;\n    param_2[1] = param_2[1] + 1;\n    return (ulong)param_1;\n  }" ({ "{") (expression_statement "*(byte *)*param_2 = param_1;" (assignment_expression "*(byte *)*param_2 = param_1" (pointer_expression "*(byte *)*param_2" (* "*") (cast_expression "(byte *)*param_2" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (= "=") (identifier "param_1")) (; ";")) (expression_statement "*param_2 = *param_2 + 1;" (assignment_expression "*param_2 = *param_2 + 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "*param_2 + 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_2[1] = param_2[1] + 1;" (assignment_expression "param_2[1] = param_2[1] + 1" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_2[1] + 1" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "1"))) (; ";")) (return_statement "return (ulong)param_1;" (return "return") (cast_expression "(ulong)param_1" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "param_1")) (; ";")) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(int var_1,type_1 *data)

{
  type_2 *infop;
  type_3 outc;
  
  if (data->_IO_read_ptr < data->_IO_read_end) {
    **(type_4 **)data = (char)var_1;
    *(long *)data = *(long *)data + 1;
    data->_IO_read_ptr = data->_IO_read_ptr + 1;
    return var_1 & 0xff;
  }
  return -1;
}


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

ulong MASKED(byte param_1,long *param_2)

{
  if ((ulong)param_2[1] < (ulong)param_2[2]) {
    *(byte *)*param_2 = param_1;
    *param_2 = *param_2 + 1;
    param_2[1] = param_2[1] + 1;
    return (ulong)param_1;
  }
  return 0xffffffff;
}

