
int rpl_ioctl(int fd,int request,...)

{
  long lVar1;
  int iVar2;
  long in_FS_OFFSET;
  va_list args;
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  iVar2 = ioctl(fd,(ulong)(uint)request);
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



void FUN_0010c465(int param_1,uint param_2)

{
  long lVar1;
  long in_FS_OFFSET;
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  ioctl(param_1,(ulong)param_2);
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


SUB RSP,0x58
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
LEA RAX,[RSP + 0x60]
MOV qword ptr [RSP + 0x8],RAX
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP],0x18
MOV ESI,ESI
MOV EAX,0x0
CALL 0x001051d0
MOV RCX,qword ptr [RSP + 0x18]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x0010c4ba
ADD RSP,0x58
RET
CALL 0x00105140
(translation_unit "void FUN_0010c465(int param_1,uint param_2)\n\n{\n  long lVar1;\n  long in_FS_OFFSET;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  ioctl(param_1,(ulong)param_2);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "void FUN_0010c465(int param_1,uint param_2)\n\n{\n  long lVar1;\n  long in_FS_OFFSET;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  ioctl(param_1,(ulong)param_2);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_0010c465(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  long in_FS_OFFSET;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  ioctl(param_1,(ulong)param_2);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "ioctl(param_1,(ulong)param_2);" (call_expression "ioctl(param_1,(ulong)param_2)" identifier (argument_list "(param_1,(ulong)param_2)" ( identifier , (cast_expression "(ulong)param_2" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int rpl_ioctl(int fd,int request,...)\n\n{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  va_list args;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar2 = ioctl(fd,(ulong)(uint)request);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int rpl_ioctl(int fd,int request,...)\n\n{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  va_list args;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar2 = ioctl(fd,(ulong)(uint)request);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "rpl_ioctl(int fd,int request,...)" identifier (parameter_list "(int fd,int request,...)" ( (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "int request" primitive_type identifier) , (variadic_parameter "..." ...) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  va_list args;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar2 = ioctl(fd,(ulong)(uint)request);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "va_list args;" type_identifier identifier ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = ioctl(fd,(ulong)(uint)request);" (assignment_expression "iVar2 = ioctl(fd,(ulong)(uint)request)" identifier = (call_expression "ioctl(fd,(ulong)(uint)request)" identifier (argument_list "(fd,(ulong)(uint)request)" ( identifier , (cast_expression "(ulong)(uint)request" ( (type_descriptor "ulong" type_identifier) ) (cast_expression "(uint)request" ( (type_descriptor "uint" type_identifier) ) identifier)) )))) ;) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }" if (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_0010c465(int param_1,uint param_2)\n\n{\n  long lVar1;\n  long in_FS_OFFSET;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  ioctl(param_1,(ulong)param_2);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "void FUN_0010c465(int param_1,uint param_2)\n\n{\n  long lVar1;\n  long in_FS_OFFSET;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  ioctl(param_1,(ulong)param_2);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_0010c465(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  long in_FS_OFFSET;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  ioctl(param_1,(ulong)param_2);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "ioctl(param_1,(ulong)param_2);" (call_expression "ioctl(param_1,(ulong)param_2)" identifier (argument_list "(param_1,(ulong)param_2)" ( identifier , (cast_expression "(ulong)param_2" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_0010c465(int param_1,uint param_2)\n\n{\n  long lVar1;\n  long in_FS_OFFSET;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  ioctl(param_1,(ulong)param_2);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" (primitive_type "void") (function_declarator "FUN_0010c465(int param_1,uint param_2)" (identifier "FUN_0010c465") (parameter_list "(int param_1,uint param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  long lVar1;\n  long in_FS_OFFSET;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  ioctl(param_1,(ulong)param_2);\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "lVar1") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "ioctl(param_1,(ulong)param_2);" (call_expression "ioctl(param_1,(ulong)param_2)" (identifier "ioctl") (argument_list "(param_1,(ulong)param_2)" (( "(") (identifier "param_1") (, ",") (cast_expression "(ulong)param_2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "param_2")) () ")"))) (; ";")) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" (if "if") (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "lVar1 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "lVar1") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

int function_1(int fd,int request,...)

{
  long var_3;
  int iVar2;
  long var_1;
  type_1 args;
  
  var_3 = *(long *)(var_1 + 0x28);
  iVar2 = var_2(fd,(type_2)(type_3)request);
  if (var_3 == *(long *)(var_1 + 0x28)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  var_4();
}


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

void MASKED(int param_1,uint param_2)

{
  long lVar1;
  long in_FS_OFFSET;
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  ioctl(param_1,(ulong)param_2);
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

