
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int mime_file_seek(void *instream,curl_off_t offset,int whence)

{
  int iVar1;
  FILE *__stream;
  
  __stream = *(FILE **)((int)instream + 0x24);
  if ((whence == 0) && (offset == 0)) {
    if (__stream == (FILE *)0x0) {
      return 0;
    }
  }
  else if (__stream == (FILE *)0x0) {
    __stream = fopen64(*(char **)((int)instream + 0x10),"rb");
    *(FILE **)((int)instream + 0x24) = __stream;
    if (__stream == (FILE *)0x0) {
      return 1;
    }
  }
  iVar1 = fseek(__stream,(long)offset,whence);
  if (iVar1 == 0) {
    return 0;
  }
  return 2;
}



undefined4 __regparm2
FUN_00067710(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)

{
  int iVar1;
  FILE *__stream;
  int unaff_EBX;
  int unaff_retaddr;
  
  entry(param_2,0x67719);
  __stream = *(FILE **)(unaff_retaddr + 0x24);
  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {
    if (__stream == (FILE *)0x0) {
      return 0;
    }
  }
  else if (__stream == (FILE *)0x0) {
    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));
    *(FILE **)(unaff_retaddr + 0x24) = __stream;
    if (__stream == (FILE *)0x0) {
      return 1;
    }
  }
  iVar1 = fseek(__stream,param_3,param_5);
  if (iVar1 == 0) {
    return 0;
  }
  return 2;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x490c7
SUB ESP,0xc
MOV EBP,dword ptr [ESP + 0x20]
MOV ESI,dword ptr [ESP + 0x2c]
MOV EDI,dword ptr [ESP + 0x24]
MOV EDX,dword ptr [ESP + 0x28]
MOV EAX,dword ptr [EBP + 0x24]
TEST ESI,ESI
JNZ 0x00067770
OR EDX,EDI
JNZ 0x00067770
TEST EAX,EAX
JZ 0x00067753
SUB ESP,0x4
PUSH ESI
PUSH EDI
PUSH EAX
CALL 0x00019ec0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00067760
XOR EAX,EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0xc
MOV EAX,0x2
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST EAX,EAX
JNZ 0x00067741
SUB ESP,0x8
LEA EAX,[EBX + 0xfffd683b]
PUSH EAX
PUSH dword ptr [EBP + 0x10]
CALL 0x00018860
ADD ESP,0x10
MOV dword ptr [EBP + 0x24],EAX
TEST EAX,EAX
JNZ 0x00067741
MOV EAX,0x1
JMP 0x00067755
(translation_unit "undefined4 __regparm2\nFUN_00067710(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  FILE *__stream;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x67719);\n  __stream = *(FILE **)(unaff_retaddr + 0x24);\n  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,param_3,param_5);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}\n\n" (function_definition "undefined4 __regparm2\nFUN_00067710(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  FILE *__stream;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x67719);\n  __stream = *(FILE **)(unaff_retaddr + 0x24);\n  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,param_3,param_5);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "FUN_00067710(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  FILE *__stream;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x67719);\n  __stream = *(FILE **)(unaff_retaddr + 0x24);\n  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,param_3,param_5);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (expression_statement "entry(param_2,0x67719);" (call_expression "entry(param_2,0x67719)" identifier (argument_list "(param_2,0x67719)" ( identifier , number_literal ))) ;) (expression_statement "__stream = *(FILE **)(unaff_retaddr + 0x24);" (assignment_expression "__stream = *(FILE **)(unaff_retaddr + 0x24)" identifier = (pointer_expression "*(FILE **)(unaff_retaddr + 0x24)" * (cast_expression "(FILE **)(unaff_retaddr + 0x24)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_retaddr + 0x24)" ( (binary_expression "unaff_retaddr + 0x24" identifier + number_literal) ))))) ;) (if_statement "if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "((param_5 == 0) && (param_4 == 0 && param_3 == 0))" ( (binary_expression "(param_5 == 0) && (param_4 == 0 && param_3 == 0)" (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) && (parenthesized_expression "(param_4 == 0 && param_3 == 0)" ( (binary_expression "param_4 == 0 && param_3 == 0" (binary_expression "param_4 == 0" identifier == number_literal) && (binary_expression "param_3 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }" { (if_statement "if (__stream == (FILE *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" else (if_statement "if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" { (expression_statement "__stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));" (assignment_expression "__stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902))" identifier = (call_expression "fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902))" identifier (argument_list "(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902))" ( (pointer_expression "*(char **)(unaff_retaddr + 0x10)" * (cast_expression "(char **)(unaff_retaddr + 0x10)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_retaddr + 0x10)" ( (binary_expression "unaff_retaddr + 0x10" identifier + number_literal) )))) , (cast_expression "(char *)(unaff_EBX + 0x1f902)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + 0x1f902)" ( (binary_expression "unaff_EBX + 0x1f902" identifier + number_literal) ))) )))) ;) (expression_statement "*(FILE **)(unaff_retaddr + 0x24) = __stream;" (assignment_expression "*(FILE **)(unaff_retaddr + 0x24) = __stream" (pointer_expression "*(FILE **)(unaff_retaddr + 0x24)" * (cast_expression "(FILE **)(unaff_retaddr + 0x24)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_retaddr + 0x24)" ( (binary_expression "unaff_retaddr + 0x24" identifier + number_literal) )))) = identifier) ;) (if_statement "if (__stream == (FILE *)0x0) {\n      return 1;\n    }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) })))) (expression_statement "iVar1 = fseek(__stream,param_3,param_5);" (assignment_expression "iVar1 = fseek(__stream,param_3,param_5)" identifier = (call_expression "fseek(__stream,param_3,param_5)" identifier (argument_list "(__stream,param_3,param_5)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return 2;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint mime_file_seek(void *instream,curl_off_t offset,int whence)\n\n{\n  int iVar1;\n  FILE *__stream;\n  \n  __stream = *(FILE **)((int)instream + 0x24);\n  if ((whence == 0) && (offset == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)((int)instream + 0x10),"rb");\n    *(FILE **)((int)instream + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,(long)offset,whence);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}\n\n" comment comment (function_definition "int mime_file_seek(void *instream,curl_off_t offset,int whence)\n\n{\n  int iVar1;\n  FILE *__stream;\n  \n  __stream = *(FILE **)((int)instream + 0x24);\n  if ((whence == 0) && (offset == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)((int)instream + 0x10),"rb");\n    *(FILE **)((int)instream + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,(long)offset,whence);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}" primitive_type (function_declarator "mime_file_seek(void *instream,curl_off_t offset,int whence)" identifier (parameter_list "(void *instream,curl_off_t offset,int whence)" ( (parameter_declaration "void *instream" primitive_type (pointer_declarator "*instream" * identifier)) , (parameter_declaration "curl_off_t offset" type_identifier identifier) , (parameter_declaration "int whence" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  FILE *__stream;\n  \n  __stream = *(FILE **)((int)instream + 0x24);\n  if ((whence == 0) && (offset == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)((int)instream + 0x10),"rb");\n    *(FILE **)((int)instream + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,(long)offset,whence);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (expression_statement "__stream = *(FILE **)((int)instream + 0x24);" (assignment_expression "__stream = *(FILE **)((int)instream + 0x24)" identifier = (pointer_expression "*(FILE **)((int)instream + 0x24)" * (cast_expression "(FILE **)((int)instream + 0x24)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)instream + 0x24)" ( (binary_expression "(int)instream + 0x24" (cast_expression "(int)instream" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (if_statement "if ((whence == 0) && (offset == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)((int)instream + 0x10),"rb");\n    *(FILE **)((int)instream + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "((whence == 0) && (offset == 0))" ( (binary_expression "(whence == 0) && (offset == 0)" (parenthesized_expression "(whence == 0)" ( (binary_expression "whence == 0" identifier == number_literal) )) && (parenthesized_expression "(offset == 0)" ( (binary_expression "offset == 0" identifier == number_literal) ))) )) (compound_statement "{\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }" { (if_statement "if (__stream == (FILE *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)((int)instream + 0x10),"rb");\n    *(FILE **)((int)instream + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" else (if_statement "if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)((int)instream + 0x10),"rb");\n    *(FILE **)((int)instream + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    __stream = fopen64(*(char **)((int)instream + 0x10),"rb");\n    *(FILE **)((int)instream + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" { (expression_statement "__stream = fopen64(*(char **)((int)instream + 0x10),"rb");" (assignment_expression "__stream = fopen64(*(char **)((int)instream + 0x10),"rb")" identifier = (call_expression "fopen64(*(char **)((int)instream + 0x10),"rb")" identifier (argument_list "(*(char **)((int)instream + 0x10),"rb")" ( (pointer_expression "*(char **)((int)instream + 0x10)" * (cast_expression "(char **)((int)instream + 0x10)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)instream + 0x10)" ( (binary_expression "(int)instream + 0x10" (cast_expression "(int)instream" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) , (string_literal ""rb"" " string_content ") )))) ;) (expression_statement "*(FILE **)((int)instream + 0x24) = __stream;" (assignment_expression "*(FILE **)((int)instream + 0x24) = __stream" (pointer_expression "*(FILE **)((int)instream + 0x24)" * (cast_expression "(FILE **)((int)instream + 0x24)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)instream + 0x24)" ( (binary_expression "(int)instream + 0x24" (cast_expression "(int)instream" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (if_statement "if (__stream == (FILE *)0x0) {\n      return 1;\n    }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) })))) (expression_statement "iVar1 = fseek(__stream,(long)offset,whence);" (assignment_expression "iVar1 = fseek(__stream,(long)offset,whence)" identifier = (call_expression "fseek(__stream,(long)offset,whence)" identifier (argument_list "(__stream,(long)offset,whence)" ( identifier , (cast_expression "(long)offset" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return 2;" return number_literal ;) })))
(translation_unit "undefined4 __regparm2\nFUN_00067710(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  FILE *__stream;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x67719);\n  __stream = *(FILE **)(unaff_retaddr + 0x24);\n  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,param_3,param_5);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}\n\n" (function_definition "undefined4 __regparm2\nFUN_00067710(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  FILE *__stream;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x67719);\n  __stream = *(FILE **)(unaff_retaddr + 0x24);\n  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,param_3,param_5);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "FUN_00067710(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  FILE *__stream;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x67719);\n  __stream = *(FILE **)(unaff_retaddr + 0x24);\n  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,param_3,param_5);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (expression_statement "entry(param_2,0x67719);" (call_expression "entry(param_2,0x67719)" identifier (argument_list "(param_2,0x67719)" ( identifier , number_literal ))) ;) (expression_statement "__stream = *(FILE **)(unaff_retaddr + 0x24);" (assignment_expression "__stream = *(FILE **)(unaff_retaddr + 0x24)" identifier = (pointer_expression "*(FILE **)(unaff_retaddr + 0x24)" * (cast_expression "(FILE **)(unaff_retaddr + 0x24)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_retaddr + 0x24)" ( (binary_expression "unaff_retaddr + 0x24" identifier + number_literal) ))))) ;) (if_statement "if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "((param_5 == 0) && (param_4 == 0 && param_3 == 0))" ( (binary_expression "(param_5 == 0) && (param_4 == 0 && param_3 == 0)" (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) && (parenthesized_expression "(param_4 == 0 && param_3 == 0)" ( (binary_expression "param_4 == 0 && param_3 == 0" (binary_expression "param_4 == 0" identifier == number_literal) && (binary_expression "param_3 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }" { (if_statement "if (__stream == (FILE *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" else (if_statement "if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" { (expression_statement "__stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));" (assignment_expression "__stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902))" identifier = (call_expression "fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902))" identifier (argument_list "(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902))" ( (pointer_expression "*(char **)(unaff_retaddr + 0x10)" * (cast_expression "(char **)(unaff_retaddr + 0x10)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_retaddr + 0x10)" ( (binary_expression "unaff_retaddr + 0x10" identifier + number_literal) )))) , (cast_expression "(char *)(unaff_EBX + 0x1f902)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + 0x1f902)" ( (binary_expression "unaff_EBX + 0x1f902" identifier + number_literal) ))) )))) ;) (expression_statement "*(FILE **)(unaff_retaddr + 0x24) = __stream;" (assignment_expression "*(FILE **)(unaff_retaddr + 0x24) = __stream" (pointer_expression "*(FILE **)(unaff_retaddr + 0x24)" * (cast_expression "(FILE **)(unaff_retaddr + 0x24)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_retaddr + 0x24)" ( (binary_expression "unaff_retaddr + 0x24" identifier + number_literal) )))) = identifier) ;) (if_statement "if (__stream == (FILE *)0x0) {\n      return 1;\n    }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) })))) (expression_statement "iVar1 = fseek(__stream,param_3,param_5);" (assignment_expression "iVar1 = fseek(__stream,param_3,param_5)" identifier = (call_expression "fseek(__stream,param_3,param_5)" identifier (argument_list "(__stream,param_3,param_5)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return 2;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( 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) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression (binary_expression IDENT == LIT) && (binary_expression IDENT == LIT)) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) })))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm2\nFUN_00067710(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  FILE *__stream;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x67719);\n  __stream = *(FILE **)(unaff_retaddr + 0x24);\n  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,param_3,param_5);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}" (type_identifier "undefined4") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_00067710(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)" (identifier "FUN_00067710") (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  FILE *__stream;\n  int unaff_EBX;\n  int unaff_retaddr;\n  \n  entry(param_2,0x67719);\n  __stream = *(FILE **)(unaff_retaddr + 0x24);\n  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }\n  iVar1 = fseek(__stream,param_3,param_5);\n  if (iVar1 == 0) {\n    return 0;\n  }\n  return 2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "FILE *__stream;" (type_identifier "FILE") (pointer_declarator "*__stream" (* "*") (identifier "__stream")) (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "int unaff_retaddr;" (primitive_type "int") (identifier "unaff_retaddr") (; ";")) (expression_statement "entry(param_2,0x67719);" (call_expression "entry(param_2,0x67719)" (identifier "entry") (argument_list "(param_2,0x67719)" (( "(") (identifier "param_2") (, ",") (number_literal "0x67719") () ")"))) (; ";")) (expression_statement "__stream = *(FILE **)(unaff_retaddr + 0x24);" (assignment_expression "__stream = *(FILE **)(unaff_retaddr + 0x24)" (identifier "__stream") (= "=") (pointer_expression "*(FILE **)(unaff_retaddr + 0x24)" (* "*") (cast_expression "(FILE **)(unaff_retaddr + 0x24)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_retaddr + 0x24)" (( "(") (binary_expression "unaff_retaddr + 0x24" (identifier "unaff_retaddr") (+ "+") (number_literal "0x24")) () ")"))))) (; ";")) (if_statement "if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }\n  else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" (if "if") (parenthesized_expression "((param_5 == 0) && (param_4 == 0 && param_3 == 0))" (( "(") (binary_expression "(param_5 == 0) && (param_4 == 0 && param_3 == 0)" (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(param_4 == 0 && param_3 == 0)" (( "(") (binary_expression "param_4 == 0 && param_3 == 0" (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) (&& "&&") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    if (__stream == (FILE *)0x0) {\n      return 0;\n    }\n  }" ({ "{") (if_statement "if (__stream == (FILE *)0x0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(__stream == (FILE *)0x0)" (( "(") (binary_expression "__stream == (FILE *)0x0" (identifier "__stream") (== "==") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}")) (else_clause "else if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" (else "else") (if_statement "if (__stream == (FILE *)0x0) {\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" (if "if") (parenthesized_expression "(__stream == (FILE *)0x0)" (( "(") (binary_expression "__stream == (FILE *)0x0" (identifier "__stream") (== "==") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));\n    *(FILE **)(unaff_retaddr + 0x24) = __stream;\n    if (__stream == (FILE *)0x0) {\n      return 1;\n    }\n  }" ({ "{") (expression_statement "__stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));" (assignment_expression "__stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902))" (identifier "__stream") (= "=") (call_expression "fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902))" (identifier "fopen64") (argument_list "(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902))" (( "(") (pointer_expression "*(char **)(unaff_retaddr + 0x10)" (* "*") (cast_expression "(char **)(unaff_retaddr + 0x10)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_retaddr + 0x10)" (( "(") (binary_expression "unaff_retaddr + 0x10" (identifier "unaff_retaddr") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (cast_expression "(char *)(unaff_EBX + 0x1f902)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EBX + 0x1f902)" (( "(") (binary_expression "unaff_EBX + 0x1f902" (identifier "unaff_EBX") (+ "+") (number_literal "0x1f902")) () ")"))) () ")")))) (; ";")) (expression_statement "*(FILE **)(unaff_retaddr + 0x24) = __stream;" (assignment_expression "*(FILE **)(unaff_retaddr + 0x24) = __stream" (pointer_expression "*(FILE **)(unaff_retaddr + 0x24)" (* "*") (cast_expression "(FILE **)(unaff_retaddr + 0x24)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_retaddr + 0x24)" (( "(") (binary_expression "unaff_retaddr + 0x24" (identifier "unaff_retaddr") (+ "+") (number_literal "0x24")) () ")")))) (= "=") (identifier "__stream")) (; ";")) (if_statement "if (__stream == (FILE *)0x0) {\n      return 1;\n    }" (if "if") (parenthesized_expression "(__stream == (FILE *)0x0)" (( "(") (binary_expression "__stream == (FILE *)0x0" (identifier "__stream") (== "==") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return 1;\n    }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}"))))) (expression_statement "iVar1 = fseek(__stream,param_3,param_5);" (assignment_expression "iVar1 = fseek(__stream,param_3,param_5)" (identifier "iVar1") (= "=") (call_expression "fseek(__stream,param_3,param_5)" (identifier "fseek") (argument_list "(__stream,param_3,param_5)" (( "(") (identifier "__stream") (, ",") (identifier "param_3") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(void *instream,type_1 var_2,int var_1)

{
  int var_6;
  type_2 *var_3;
  
  var_3 = *(type_2 **)((int)instream + 0x24);
  if ((var_1 == 0) && (var_2 == 0)) {
    if (var_3 == (type_2 *)0x0) {
      return 0;
    }
  }
  else if (var_3 == (type_2 *)0x0) {
    var_3 = var_4(*(char **)((int)instream + 0x10),"rb");
    *(type_2 **)((int)instream + 0x24) = var_3;
    if (var_3 == (type_2 *)0x0) {
      return 1;
    }
  }
  var_6 = var_5(var_3,(long)var_2,var_1);
  if (var_6 == 0) {
    return 0;
  }
  return 2;
}


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

undefined4 __regparm2
MASKED(undefined4 param_1,undefined4 param_2,int param_3,int param_4,int param_5)

{
  int iVar1;
  FILE *__stream;
  int unaff_EBX;
  int unaff_retaddr;
  
  entry(param_2,0x67719);
  __stream = *(FILE **)(unaff_retaddr + 0x24);
  if ((param_5 == 0) && (param_4 == 0 && param_3 == 0)) {
    if (__stream == (FILE *)0x0) {
      return 0;
    }
  }
  else if (__stream == (FILE *)0x0) {
    __stream = fopen64(*(char **)(unaff_retaddr + 0x10),(char *)(unaff_EBX + 0x1f902));
    *(FILE **)(unaff_retaddr + 0x24) = __stream;
    if (__stream == (FILE *)0x0) {
      return 1;
    }
  }
  iVar1 = fseek(__stream,param_3,param_5);
  if (iVar1 == 0) {
    return 0;
  }
  return 2;
}

