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

void ck_fwrite(void *ptr,size_t size,size_t nmemb,FILE *stream)

{
  size_t sVar1;
  int *piVar2;
  char *pcVar3;
  char *pcVar4;
  char *str;
  
  clearerr_unlocked((FILE *)stream);
  if (size != 0) {
    sVar1 = fwrite_unlocked(ptr,size,nmemb,(FILE *)stream);
    if (nmemb != sVar1) {
      piVar2 = __errno_location();
      pcVar3 = rpl_strerror(*piVar2);
      pcVar4 = utils_fp_name(stream);
      str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",
                               "couldn\'t write %llu items to %s: %s",nmemb,5);
                    /* WARNING: Subroutine does not return */
      panic(str,nmemb,0,pcVar4,pcVar3);
    }
  }
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_0001a640(void *param_1,size_t param_2,size_t param_3,FILE *param_4)

{
  size_t sVar1;
  int *piVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  
  clearerr_unlocked(param_4);
  if (param_2 != 0) {
    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);
    if (param_3 != sVar1) {
      piVar2 = __errno_location();
      uVar3 = FUN_00025660(*piVar2);
      uVar4 = FUN_0001a240();
      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",
                         "couldn\'t write %llu items to %s: %s",param_3,5);
                    /* WARNING: Subroutine does not return */
      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);
    }
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x1c]
CALL 0x00012c30
ADD EBX,0x169b4
MOV EDI,dword ptr [ESP + 0x14]
SUB ESP,0xc
PUSH ESI
CALL 0x00012540
ADD ESP,0x10
TEST EDI,EDI
JZ 0x0001a67e
PUSH ESI
PUSH dword ptr [ESP + 0x1c]
PUSH EDI
PUSH dword ptr [ESP + 0x1c]
CALL 0x000124f0
ADD ESP,0x10
CMP dword ptr [ESP + 0x18],EAX
JNZ 0x0001a682
POP EBX
POP ESI
POP EDI
RET
CALL 0x000124b0
SUB ESP,0xc
PUSH dword ptr [EAX]
CALL 0x00025660
MOV EDI,EAX
MOV EAX,ESI
CALL 0x0001a240
MOV dword ptr [ESP],0x5
MOV ESI,EAX
LEA EAX,[EBX + 0xffff6e18]
PUSH dword ptr [ESP + 0x28]
PUSH EAX
LEA EAX,[EBX + 0xffff6e3c]
PUSH EAX
PUSH 0x0
CALL 0x00012690
ADD ESP,0x14
XOR EBX,EBX
PUSH EDI
PUSH ESI
MOV ECX,dword ptr [ESP + 0x2c]
PUSH EBX
PUSH ECX
PUSH EAX
CALL 0x0001a340
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0001a640(void *param_1,size_t param_2,size_t param_3,FILE *param_4)\n\n{\n  size_t sVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  \n  clearerr_unlocked(param_4);\n  if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    /* WARNING: Subroutine does not return */\n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_0001a640(void *param_1,size_t param_2,size_t param_3,FILE *param_4)\n\n{\n  size_t sVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  \n  clearerr_unlocked(param_4);\n  if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    /* WARNING: Subroutine does not return */\n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0001a640(void *param_1,size_t param_2,size_t param_3,FILE *param_4)" identifier (parameter_list "(void *param_1,size_t param_2,size_t param_3,FILE *param_4)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "FILE *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  \n  clearerr_unlocked(param_4);\n  if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    /* WARNING: Subroutine does not return */\n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }\n  return;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "clearerr_unlocked(param_4);" (call_expression "clearerr_unlocked(param_4)" identifier (argument_list "(param_4)" ( identifier ))) ;) (if_statement "if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    /* WARNING: Subroutine does not return */\n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    /* WARNING: Subroutine does not return */\n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }" { (expression_statement "sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);" (assignment_expression "sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4)" identifier = (call_expression "fwrite_unlocked(param_1,param_2,param_3,param_4)" identifier (argument_list "(param_1,param_2,param_3,param_4)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    /* WARNING: Subroutine does not return */\n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }" if (parenthesized_expression "(param_3 != sVar1)" ( (binary_expression "param_3 != sVar1" identifier != identifier) )) (compound_statement "{\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    /* WARNING: Subroutine does not return */\n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = FUN_00025660(*piVar2);" (assignment_expression "uVar3 = FUN_00025660(*piVar2)" identifier = (call_expression "FUN_00025660(*piVar2)" identifier (argument_list "(*piVar2)" ( (pointer_expression "*piVar2" * identifier) )))) ;) (expression_statement "uVar4 = FUN_0001a240();" (assignment_expression "uVar4 = FUN_0001a240()" identifier = (call_expression "FUN_0001a240()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);" (assignment_expression "uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5)" identifier = (call_expression "dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5)" identifier (argument_list "(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5)" ( number_literal , (string_literal ""couldn\'t write %llu item to %s: %s"" " string_content escape_sequence string_content ") , (string_literal ""couldn\'t write %llu items to %s: %s"" " string_content escape_sequence string_content ") , identifier , number_literal )))) ;) comment (expression_statement "FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);" (call_expression "FUN_0001a340(uVar5,param_3,0,uVar4,uVar3)" identifier (argument_list "(uVar5,param_3,0,uVar4,uVar3)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid ck_fwrite(void *ptr,size_t size,size_t nmemb,FILE *stream)\n\n{\n  size_t sVar1;\n  int *piVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char *str;\n  \n  clearerr_unlocked((FILE *)stream);\n  if (size != 0) {\n    sVar1 = fwrite_unlocked(ptr,size,nmemb,(FILE *)stream);\n    if (nmemb != sVar1) {\n      piVar2 = __errno_location();\n      pcVar3 = rpl_strerror(*piVar2);\n      pcVar4 = utils_fp_name(stream);\n      str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5);\n                    /* WARNING: Subroutine does not return */\n      panic(str,nmemb,0,pcVar4,pcVar3);\n    }\n  }\n  return;\n}\n\n" comment comment (function_definition "void ck_fwrite(void *ptr,size_t size,size_t nmemb,FILE *stream)\n\n{\n  size_t sVar1;\n  int *piVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char *str;\n  \n  clearerr_unlocked((FILE *)stream);\n  if (size != 0) {\n    sVar1 = fwrite_unlocked(ptr,size,nmemb,(FILE *)stream);\n    if (nmemb != sVar1) {\n      piVar2 = __errno_location();\n      pcVar3 = rpl_strerror(*piVar2);\n      pcVar4 = utils_fp_name(stream);\n      str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5);\n                    /* WARNING: Subroutine does not return */\n      panic(str,nmemb,0,pcVar4,pcVar3);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "ck_fwrite(void *ptr,size_t size,size_t nmemb,FILE *stream)" identifier (parameter_list "(void *ptr,size_t size,size_t nmemb,FILE *stream)" ( (parameter_declaration "void *ptr" primitive_type (pointer_declarator "*ptr" * identifier)) , (parameter_declaration "size_t size" primitive_type identifier) , (parameter_declaration "size_t nmemb" primitive_type identifier) , (parameter_declaration "FILE *stream" type_identifier (pointer_declarator "*stream" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  int *piVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char *str;\n  \n  clearerr_unlocked((FILE *)stream);\n  if (size != 0) {\n    sVar1 = fwrite_unlocked(ptr,size,nmemb,(FILE *)stream);\n    if (nmemb != sVar1) {\n      piVar2 = __errno_location();\n      pcVar3 = rpl_strerror(*piVar2);\n      pcVar4 = utils_fp_name(stream);\n      str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5);\n                    /* WARNING: Subroutine does not return */\n      panic(str,nmemb,0,pcVar4,pcVar3);\n    }\n  }\n  return;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *str;" primitive_type (pointer_declarator "*str" * identifier) ;) (expression_statement "clearerr_unlocked((FILE *)stream);" (call_expression "clearerr_unlocked((FILE *)stream)" identifier (argument_list "((FILE *)stream)" ( (cast_expression "(FILE *)stream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (if_statement "if (size != 0) {\n    sVar1 = fwrite_unlocked(ptr,size,nmemb,(FILE *)stream);\n    if (nmemb != sVar1) {\n      piVar2 = __errno_location();\n      pcVar3 = rpl_strerror(*piVar2);\n      pcVar4 = utils_fp_name(stream);\n      str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5);\n                    /* WARNING: Subroutine does not return */\n      panic(str,nmemb,0,pcVar4,pcVar3);\n    }\n  }" if (parenthesized_expression "(size != 0)" ( (binary_expression "size != 0" identifier != number_literal) )) (compound_statement "{\n    sVar1 = fwrite_unlocked(ptr,size,nmemb,(FILE *)stream);\n    if (nmemb != sVar1) {\n      piVar2 = __errno_location();\n      pcVar3 = rpl_strerror(*piVar2);\n      pcVar4 = utils_fp_name(stream);\n      str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5);\n                    /* WARNING: Subroutine does not return */\n      panic(str,nmemb,0,pcVar4,pcVar3);\n    }\n  }" { (expression_statement "sVar1 = fwrite_unlocked(ptr,size,nmemb,(FILE *)stream);" (assignment_expression "sVar1 = fwrite_unlocked(ptr,size,nmemb,(FILE *)stream)" identifier = (call_expression "fwrite_unlocked(ptr,size,nmemb,(FILE *)stream)" identifier (argument_list "(ptr,size,nmemb,(FILE *)stream)" ( identifier , identifier , identifier , (cast_expression "(FILE *)stream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (nmemb != sVar1) {\n      piVar2 = __errno_location();\n      pcVar3 = rpl_strerror(*piVar2);\n      pcVar4 = utils_fp_name(stream);\n      str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5);\n                    /* WARNING: Subroutine does not return */\n      panic(str,nmemb,0,pcVar4,pcVar3);\n    }" if (parenthesized_expression "(nmemb != sVar1)" ( (binary_expression "nmemb != sVar1" identifier != identifier) )) (compound_statement "{\n      piVar2 = __errno_location();\n      pcVar3 = rpl_strerror(*piVar2);\n      pcVar4 = utils_fp_name(stream);\n      str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5);\n                    /* WARNING: Subroutine does not return */\n      panic(str,nmemb,0,pcVar4,pcVar3);\n    }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = rpl_strerror(*piVar2);" (assignment_expression "pcVar3 = rpl_strerror(*piVar2)" identifier = (call_expression "rpl_strerror(*piVar2)" identifier (argument_list "(*piVar2)" ( (pointer_expression "*piVar2" * identifier) )))) ;) (expression_statement "pcVar4 = utils_fp_name(stream);" (assignment_expression "pcVar4 = utils_fp_name(stream)" identifier = (call_expression "utils_fp_name(stream)" identifier (argument_list "(stream)" ( identifier )))) ;) (expression_statement "str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5);" (assignment_expression "str = (char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5)" identifier = (cast_expression "(char *)dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5)" identifier (argument_list "(0,"couldn\'t write %llu item to %s: %s",\n                               "couldn\'t write %llu items to %s: %s",nmemb,5)" ( number_literal , (string_literal ""couldn\'t write %llu item to %s: %s"" " string_content escape_sequence string_content ") , (string_literal ""couldn\'t write %llu items to %s: %s"" " string_content escape_sequence string_content ") , identifier , number_literal ))))) ;) comment (expression_statement "panic(str,nmemb,0,pcVar4,pcVar3);" (call_expression "panic(str,nmemb,0,pcVar4,pcVar3)" identifier (argument_list "(str,nmemb,0,pcVar4,pcVar3)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0001a640(void *param_1,size_t param_2,size_t param_3,FILE *param_4)\n\n{\n  size_t sVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  \n  clearerr_unlocked(param_4);\n  if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_0001a640(void *param_1,size_t param_2,size_t param_3,FILE *param_4)\n\n{\n  size_t sVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  \n  clearerr_unlocked(param_4);\n  if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0001a640(void *param_1,size_t param_2,size_t param_3,FILE *param_4)" identifier (parameter_list "(void *param_1,size_t param_2,size_t param_3,FILE *param_4)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "FILE *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  \n  clearerr_unlocked(param_4);\n  if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }\n  return;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "clearerr_unlocked(param_4);" (call_expression "clearerr_unlocked(param_4)" identifier (argument_list "(param_4)" ( identifier ))) ;) (if_statement "if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }" { (expression_statement "sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);" (assignment_expression "sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4)" identifier = (call_expression "fwrite_unlocked(param_1,param_2,param_3,param_4)" identifier (argument_list "(param_1,param_2,param_3,param_4)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }" if (parenthesized_expression "(param_3 != sVar1)" ( (binary_expression "param_3 != sVar1" identifier != identifier) )) (compound_statement "{\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = FUN_00025660(*piVar2);" (assignment_expression "uVar3 = FUN_00025660(*piVar2)" identifier = (call_expression "FUN_00025660(*piVar2)" identifier (argument_list "(*piVar2)" ( (pointer_expression "*piVar2" * identifier) )))) ;) (expression_statement "uVar4 = FUN_0001a240();" (assignment_expression "uVar4 = FUN_0001a240()" identifier = (call_expression "FUN_0001a240()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);" (assignment_expression "uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5)" identifier = (call_expression "dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5)" identifier (argument_list "(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5)" ( number_literal , (string_literal ""couldn\'t write %llu item to %s: %s"" " string_content escape_sequence string_content ") , (string_literal ""couldn\'t write %llu items to %s: %s"" " string_content escape_sequence string_content ") , identifier , number_literal )))) ;) (expression_statement "FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);" (call_expression "FUN_0001a340(uVar5,param_3,0,uVar4,uVar3)" identifier (argument_list "(uVar5,param_3,0,uVar4,uVar3)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence string_content ") , (string_literal " string_content escape_sequence string_content ") , IDENT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT , IDENT ))) ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_0001a640(void *param_1,size_t param_2,size_t param_3,FILE *param_4)\n\n{\n  size_t sVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  \n  clearerr_unlocked(param_4);\n  if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0001a640(void *param_1,size_t param_2,size_t param_3,FILE *param_4)" (identifier "FUN_0001a640") (parameter_list "(void *param_1,size_t param_2,size_t param_3,FILE *param_4)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "size_t param_2" (primitive_type "size_t") (identifier "param_2")) (, ",") (parameter_declaration "size_t param_3" (primitive_type "size_t") (identifier "param_3")) (, ",") (parameter_declaration "FILE *param_4" (type_identifier "FILE") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  size_t sVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  \n  clearerr_unlocked(param_4);\n  if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }\n  return;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (expression_statement "clearerr_unlocked(param_4);" (call_expression "clearerr_unlocked(param_4)" (identifier "clearerr_unlocked") (argument_list "(param_4)" (( "(") (identifier "param_4") () ")"))) (; ";")) (if_statement "if (param_2 != 0) {\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);\n    if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }\n  }" ({ "{") (expression_statement "sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);" (assignment_expression "sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4)" (identifier "sVar1") (= "=") (call_expression "fwrite_unlocked(param_1,param_2,param_3,param_4)" (identifier "fwrite_unlocked") (argument_list "(param_1,param_2,param_3,param_4)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (param_3 != sVar1) {\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }" (if "if") (parenthesized_expression "(param_3 != sVar1)" (( "(") (binary_expression "param_3 != sVar1" (identifier "param_3") (!= "!=") (identifier "sVar1")) () ")")) (compound_statement "{\n      piVar2 = __errno_location();\n      uVar3 = FUN_00025660(*piVar2);\n      uVar4 = FUN_0001a240();\n      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);\n                    \n      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);\n    }" ({ "{") (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" (identifier "piVar2") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar3 = FUN_00025660(*piVar2);" (assignment_expression "uVar3 = FUN_00025660(*piVar2)" (identifier "uVar3") (= "=") (call_expression "FUN_00025660(*piVar2)" (identifier "FUN_00025660") (argument_list "(*piVar2)" (( "(") (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) () ")")))) (; ";")) (expression_statement "uVar4 = FUN_0001a240();" (assignment_expression "uVar4 = FUN_0001a240()" (identifier "uVar4") (= "=") (call_expression "FUN_0001a240()" (identifier "FUN_0001a240") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5);" (assignment_expression "uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5)" (identifier "uVar5") (= "=") (call_expression "dcngettext(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5)" (identifier "dcngettext") (argument_list "(0,"couldn\'t write %llu item to %s: %s",\n                         "couldn\'t write %llu items to %s: %s",param_3,5)" (( "(") (number_literal "0") (, ",") (string_literal ""couldn\'t write %llu item to %s: %s"" (" """) (string_content "couldn") (escape_sequence "\'") (string_content "t write %llu item to %s: %s") (" """)) (, ",") (string_literal ""couldn\'t write %llu items to %s: %s"" (" """) (string_content "couldn") (escape_sequence "\'") (string_content "t write %llu items to %s: %s") (" """)) (, ",") (identifier "param_3") (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);" (call_expression "FUN_0001a340(uVar5,param_3,0,uVar4,uVar3)" (identifier "FUN_0001a340") (argument_list "(uVar5,param_3,0,uVar4,uVar3)" (( "(") (identifier "uVar5") (, ",") (identifier "param_3") (, ",") (number_literal "0") (, ",") (identifier "uVar4") (, ",") (identifier "uVar3") () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(void *ptr,size_t var_2,size_t var_4,type_1 *stream)

{
  size_t var_5;
  int *piVar2;
  char *pcVar3;
  char *pcVar4;
  char *str;
  
  var_1((type_1 *)stream);
  if (var_2 != 0) {
    var_5 = var_3(ptr,var_2,var_4,(type_1 *)stream);
    if (var_4 != var_5) {
      piVar2 = var_6();
      pcVar3 = var_7(*piVar2);
      pcVar4 = var_8(stream);
      str = (char *)var_9(0,"couldn\'t write %llu item to %s: %s",
                               "couldn\'t write %llu items to %s: %s",var_4,5);
                    /* WARNING: Subroutine does not return */
      var_10(str,var_4,0,pcVar4,pcVar3);
    }
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content) (escape_sequence) (string_content)) (string_literal (string_content) (escape_sequence) (string_content)) (identifier) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (identifier) (identifier)))))))) (return_statement))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(void *param_1,size_t param_2,size_t param_3,FILE *param_4)

{
  size_t sVar1;
  int *piVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  
  clearerr_unlocked(param_4);
  if (param_2 != 0) {
    sVar1 = fwrite_unlocked(param_1,param_2,param_3,param_4);
    if (param_3 != sVar1) {
      piVar2 = __errno_location();
      uVar3 = FUN_00025660(*piVar2);
      uVar4 = FUN_0001a240();
      uVar5 = dcngettext(0,"couldn\'t write %llu item to %s: %s",
                         "couldn\'t write %llu items to %s: %s",param_3,5);
                    /* WARNING: Subroutine does not return */
      FUN_0001a340(uVar5,param_3,0,uVar4,uVar3);
    }
  }
  return;
}

