
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Unknown calling convention */

z_size_t gzfwrite(voidpc buf,z_size_t size,z_size_t nitems,gzFile file)

{
  z_size_t zVar1;
  uint len;
  
  len = 0;
  if ((((file != (gzFile)0x0) && (file[1].have == 0x79b1)) && ((int)file[5].pos == 0)) &&
     (size != 0)) {
    len = nitems * size;
    if (len / size == nitems) {
      if (len != 0) {
        zVar1 = gz_write((gz_statep)file,buf,len);
        len = zVar1 / size;
      }
    }
    else {
      gz_error((gz_statep)file,-2,"request does not fit in a size_t");
      len = 0;
    }
  }
  return len;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

uint gzfwrite(undefined4 param_1,uint param_2,uint param_3,int param_4)

{
  uint uVar1;
  
  uVar1 = 0;
  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))
     && (param_2 != 0)) {
    uVar1 = param_3 * param_2;
    if (uVar1 / param_2 == param_3) {
      if (uVar1 != 0) {
        uVar1 = FUN_0001e400();
        uVar1 = uVar1 / param_2;
      }
    }
    else {
      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");
      uVar1 = 0;
    }
  }
  return uVar1;
}


PUSH ESI
PUSH EBX
XOR ECX,ECX
CALL 0x00012603
ADD ESI,0x9a27
SUB ESP,0x4
MOV EBX,dword ptr [ESP + 0x1c]
TEST EBX,EBX
JZ 0x0001e5f3
CMP dword ptr [EBX + 0x10],0x79b1
JZ 0x0001e600
ADD ESP,0x4
MOV EAX,ECX
POP EBX
POP ESI
RET
MOV EDX,dword ptr [EBX + 0x58]
TEST EDX,EDX
JNZ 0x0001e5f3
MOV EAX,dword ptr [ESP + 0x14]
TEST EAX,EAX
JZ 0x0001e5f3
MOV ECX,dword ptr [ESP + 0x18]
XOR EDX,EDX
IMUL ECX,dword ptr [ESP + 0x14]
MOV EAX,ECX
DIV dword ptr [ESP + 0x14]
CMP EAX,dword ptr [ESP + 0x18]
JNZ 0x0001e640
TEST ECX,ECX
JZ 0x0001e5f3
MOV EDX,dword ptr [ESP + 0x10]
MOV EAX,EBX
CALL 0x0001e400
XOR EDX,EDX
DIV dword ptr [ESP + 0x14]
MOV ECX,EAX
JMP 0x0001e5f3
LEA EAX,[ESI + 0xffffaff4]
SUB ESP,0x4
PUSH EAX
PUSH -0x2
PUSH EBX
CALL 0x0001cae0
ADD ESP,0x10
XOR ECX,ECX
JMP 0x0001e5f3
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nuint gzfwrite(undefined4 param_1,uint param_2,uint param_3,int param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = 0;\n  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}\n\n" comment (function_definition "uint gzfwrite(undefined4 param_1,uint param_2,uint param_3,int param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = 0;\n  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" type_identifier (function_declarator "gzfwrite(undefined4 param_1,uint param_2,uint param_3,int param_4)" identifier (parameter_list "(undefined4 param_1,uint param_2,uint param_3,int param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = 0;\n  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }" if (parenthesized_expression "((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0))" ( (binary_expression "(((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)" (parenthesized_expression "(((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))" ( (binary_expression "((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0)" (parenthesized_expression "((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1))" ( (binary_expression "(param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)" (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(int *)(param_4 + 0x10) == 0x79b1)" ( (binary_expression "*(int *)(param_4 + 0x10) == 0x79b1" (pointer_expression "*(int *)(param_4 + 0x10)" * (cast_expression "(int *)(param_4 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "(*(int *)(param_4 + 0x58) == 0)" ( (binary_expression "*(int *)(param_4 + 0x58) == 0" (pointer_expression "*(int *)(param_4 + 0x58)" * (cast_expression "(int *)(param_4 + 0x58)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x58)" ( (binary_expression "param_4 + 0x58" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }" { (expression_statement "uVar1 = param_3 * param_2;" (assignment_expression "uVar1 = param_3 * param_2" identifier = (binary_expression "param_3 * param_2" identifier * identifier)) ;) (if_statement "if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }" if (parenthesized_expression "(uVar1 / param_2 == param_3)" ( (binary_expression "uVar1 / param_2 == param_3" (binary_expression "uVar1 / param_2" identifier / identifier) == identifier) )) (compound_statement "{\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }" { (if_statement "if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }" { (expression_statement "uVar1 = FUN_0001e400();" (assignment_expression "uVar1 = FUN_0001e400()" identifier = (call_expression "FUN_0001e400()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar1 = uVar1 / param_2;" (assignment_expression "uVar1 = uVar1 / param_2" identifier = (binary_expression "uVar1 / param_2" identifier / identifier)) ;) })) }) (else_clause "else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }" else (compound_statement "{\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }" { (expression_statement "FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");" (call_expression "FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t")" identifier (argument_list "(param_4,0xfffffffe,"request does not fit in a size_t")" ( identifier , number_literal , (string_literal ""request does not fit in a size_t"" " string_content ") ))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) }))) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* WARNING: Unknown calling convention */\n\nz_size_t gzfwrite(voidpc buf,z_size_t size,z_size_t nitems,gzFile file)\n\n{\n  z_size_t zVar1;\n  uint len;\n  \n  len = 0;\n  if ((((file != (gzFile)0x0) && (file[1].have == 0x79b1)) && ((int)file[5].pos == 0)) &&\n     (size != 0)) {\n    len = nitems * size;\n    if (len / size == nitems) {\n      if (len != 0) {\n        zVar1 = gz_write((gz_statep)file,buf,len);\n        len = zVar1 / size;\n      }\n    }\n    else {\n      gz_error((gz_statep)file,-2,"request does not fit in a size_t");\n      len = 0;\n    }\n  }\n  return len;\n}\n\n" comment comment (function_definition "z_size_t gzfwrite(voidpc buf,z_size_t size,z_size_t nitems,gzFile file)\n\n{\n  z_size_t zVar1;\n  uint len;\n  \n  len = 0;\n  if ((((file != (gzFile)0x0) && (file[1].have == 0x79b1)) && ((int)file[5].pos == 0)) &&\n     (size != 0)) {\n    len = nitems * size;\n    if (len / size == nitems) {\n      if (len != 0) {\n        zVar1 = gz_write((gz_statep)file,buf,len);\n        len = zVar1 / size;\n      }\n    }\n    else {\n      gz_error((gz_statep)file,-2,"request does not fit in a size_t");\n      len = 0;\n    }\n  }\n  return len;\n}" type_identifier (function_declarator "gzfwrite(voidpc buf,z_size_t size,z_size_t nitems,gzFile file)" identifier (parameter_list "(voidpc buf,z_size_t size,z_size_t nitems,gzFile file)" ( (parameter_declaration "voidpc buf" type_identifier identifier) , (parameter_declaration "z_size_t size" type_identifier identifier) , (parameter_declaration "z_size_t nitems" type_identifier identifier) , (parameter_declaration "gzFile file" type_identifier identifier) ))) (compound_statement "{\n  z_size_t zVar1;\n  uint len;\n  \n  len = 0;\n  if ((((file != (gzFile)0x0) && (file[1].have == 0x79b1)) && ((int)file[5].pos == 0)) &&\n     (size != 0)) {\n    len = nitems * size;\n    if (len / size == nitems) {\n      if (len != 0) {\n        zVar1 = gz_write((gz_statep)file,buf,len);\n        len = zVar1 / size;\n      }\n    }\n    else {\n      gz_error((gz_statep)file,-2,"request does not fit in a size_t");\n      len = 0;\n    }\n  }\n  return len;\n}" { (declaration "z_size_t zVar1;" type_identifier identifier ;) (declaration "uint len;" type_identifier identifier ;) (expression_statement "len = 0;" (assignment_expression "len = 0" identifier = number_literal) ;) (if_statement "if ((((file != (gzFile)0x0) && (file[1].have == 0x79b1)) && ((int)file[5].pos == 0)) &&\n     (size != 0)) {\n    len = nitems * size;\n    if (len / size == nitems) {\n      if (len != 0) {\n        zVar1 = gz_write((gz_statep)file,buf,len);\n        len = zVar1 / size;\n      }\n    }\n    else {\n      gz_error((gz_statep)file,-2,"request does not fit in a size_t");\n      len = 0;\n    }\n  }" if (parenthesized_expression "((((file != (gzFile)0x0) && (file[1].have == 0x79b1)) && ((int)file[5].pos == 0)) &&\n     (size != 0))" ( (binary_expression "(((file != (gzFile)0x0) && (file[1].have == 0x79b1)) && ((int)file[5].pos == 0)) &&\n     (size != 0)" (parenthesized_expression "(((file != (gzFile)0x0) && (file[1].have == 0x79b1)) && ((int)file[5].pos == 0))" ( (binary_expression "((file != (gzFile)0x0) && (file[1].have == 0x79b1)) && ((int)file[5].pos == 0)" (parenthesized_expression "((file != (gzFile)0x0) && (file[1].have == 0x79b1))" ( (binary_expression "(file != (gzFile)0x0) && (file[1].have == 0x79b1)" (parenthesized_expression "(file != (gzFile)0x0)" ( (binary_expression "file != (gzFile)0x0" identifier != (cast_expression "(gzFile)0x0" ( (type_descriptor "gzFile" type_identifier) ) number_literal)) )) && (parenthesized_expression "(file[1].have == 0x79b1)" ( (binary_expression "file[1].have == 0x79b1" (field_expression "file[1].have" (subscript_expression "file[1]" identifier [ number_literal ]) . field_identifier) == number_literal) ))) )) && (parenthesized_expression "((int)file[5].pos == 0)" ( (binary_expression "(int)file[5].pos == 0" (cast_expression "(int)file[5].pos" ( (type_descriptor "int" primitive_type) ) (field_expression "file[5].pos" (subscript_expression "file[5]" identifier [ number_literal ]) . field_identifier)) == number_literal) ))) )) && (parenthesized_expression "(size != 0)" ( (binary_expression "size != 0" identifier != number_literal) ))) )) (compound_statement "{\n    len = nitems * size;\n    if (len / size == nitems) {\n      if (len != 0) {\n        zVar1 = gz_write((gz_statep)file,buf,len);\n        len = zVar1 / size;\n      }\n    }\n    else {\n      gz_error((gz_statep)file,-2,"request does not fit in a size_t");\n      len = 0;\n    }\n  }" { (expression_statement "len = nitems * size;" (assignment_expression "len = nitems * size" identifier = (binary_expression "nitems * size" identifier * identifier)) ;) (if_statement "if (len / size == nitems) {\n      if (len != 0) {\n        zVar1 = gz_write((gz_statep)file,buf,len);\n        len = zVar1 / size;\n      }\n    }\n    else {\n      gz_error((gz_statep)file,-2,"request does not fit in a size_t");\n      len = 0;\n    }" if (parenthesized_expression "(len / size == nitems)" ( (binary_expression "len / size == nitems" (binary_expression "len / size" identifier / identifier) == identifier) )) (compound_statement "{\n      if (len != 0) {\n        zVar1 = gz_write((gz_statep)file,buf,len);\n        len = zVar1 / size;\n      }\n    }" { (if_statement "if (len != 0) {\n        zVar1 = gz_write((gz_statep)file,buf,len);\n        len = zVar1 / size;\n      }" if (parenthesized_expression "(len != 0)" ( (binary_expression "len != 0" identifier != number_literal) )) (compound_statement "{\n        zVar1 = gz_write((gz_statep)file,buf,len);\n        len = zVar1 / size;\n      }" { (expression_statement "zVar1 = gz_write((gz_statep)file,buf,len);" (assignment_expression "zVar1 = gz_write((gz_statep)file,buf,len)" identifier = (call_expression "gz_write((gz_statep)file,buf,len)" identifier (argument_list "((gz_statep)file,buf,len)" ( (cast_expression "(gz_statep)file" ( (type_descriptor "gz_statep" type_identifier) ) identifier) , identifier , identifier )))) ;) (expression_statement "len = zVar1 / size;" (assignment_expression "len = zVar1 / size" identifier = (binary_expression "zVar1 / size" identifier / identifier)) ;) })) }) (else_clause "else {\n      gz_error((gz_statep)file,-2,"request does not fit in a size_t");\n      len = 0;\n    }" else (compound_statement "{\n      gz_error((gz_statep)file,-2,"request does not fit in a size_t");\n      len = 0;\n    }" { (expression_statement "gz_error((gz_statep)file,-2,"request does not fit in a size_t");" (call_expression "gz_error((gz_statep)file,-2,"request does not fit in a size_t")" identifier (argument_list "((gz_statep)file,-2,"request does not fit in a size_t")" ( (cast_expression "(gz_statep)file" ( (type_descriptor "gz_statep" type_identifier) ) identifier) , number_literal , (string_literal ""request does not fit in a size_t"" " string_content ") ))) ;) (expression_statement "len = 0;" (assignment_expression "len = 0" identifier = number_literal) ;) }))) })) (return_statement "return len;" return identifier ;) })))
(translation_unit "uint gzfwrite(undefined4 param_1,uint param_2,uint param_3,int param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = 0;\n  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}\n\n" (function_definition "uint gzfwrite(undefined4 param_1,uint param_2,uint param_3,int param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = 0;\n  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" type_identifier (function_declarator "gzfwrite(undefined4 param_1,uint param_2,uint param_3,int param_4)" identifier (parameter_list "(undefined4 param_1,uint param_2,uint param_3,int param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = 0;\n  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }" if (parenthesized_expression "((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0))" ( (binary_expression "(((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)" (parenthesized_expression "(((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))" ( (binary_expression "((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0)" (parenthesized_expression "((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1))" ( (binary_expression "(param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)" (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(int *)(param_4 + 0x10) == 0x79b1)" ( (binary_expression "*(int *)(param_4 + 0x10) == 0x79b1" (pointer_expression "*(int *)(param_4 + 0x10)" * (cast_expression "(int *)(param_4 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "(*(int *)(param_4 + 0x58) == 0)" ( (binary_expression "*(int *)(param_4 + 0x58) == 0" (pointer_expression "*(int *)(param_4 + 0x58)" * (cast_expression "(int *)(param_4 + 0x58)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x58)" ( (binary_expression "param_4 + 0x58" identifier + number_literal) )))) == number_literal) ))) )) && (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }" { (expression_statement "uVar1 = param_3 * param_2;" (assignment_expression "uVar1 = param_3 * param_2" identifier = (binary_expression "param_3 * param_2" identifier * identifier)) ;) (if_statement "if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }" if (parenthesized_expression "(uVar1 / param_2 == param_3)" ( (binary_expression "uVar1 / param_2 == param_3" (binary_expression "uVar1 / param_2" identifier / identifier) == identifier) )) (compound_statement "{\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }" { (if_statement "if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }" { (expression_statement "uVar1 = FUN_0001e400();" (assignment_expression "uVar1 = FUN_0001e400()" identifier = (call_expression "FUN_0001e400()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar1 = uVar1 / param_2;" (assignment_expression "uVar1 = uVar1 / param_2" identifier = (binary_expression "uVar1 / param_2" identifier / identifier)) ;) })) }) (else_clause "else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }" else (compound_statement "{\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }" { (expression_statement "FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");" (call_expression "FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t")" identifier (argument_list "(param_4,0xfffffffe,"request does not fit in a size_t")" ( identifier , number_literal , (string_literal ""request does not fit in a size_t"" " string_content ") ))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) }))) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT / IDENT) == IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT / IDENT)) ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) })) (return_statement return IDENT ;) })))
(function_definition "uint gzfwrite(undefined4 param_1,uint param_2,uint param_3,int param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = 0;\n  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" (type_identifier "uint") (function_declarator "gzfwrite(undefined4 param_1,uint param_2,uint param_3,int param_4)" (identifier "gzfwrite") (parameter_list "(undefined4 param_1,uint param_2,uint param_3,int param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = 0;\n  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }\n  return uVar1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)) {\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }" (if "if") (parenthesized_expression "((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0))" (( "(") (binary_expression "(((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))\n     && (param_2 != 0)" (parenthesized_expression "(((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))" (( "(") (binary_expression "((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0)" (parenthesized_expression "((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1))" (( "(") (binary_expression "(param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)" (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(param_4 + 0x10) == 0x79b1)" (( "(") (binary_expression "*(int *)(param_4 + 0x10) == 0x79b1" (pointer_expression "*(int *)(param_4 + 0x10)" (* "*") (cast_expression "(int *)(param_4 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x10)" (( "(") (binary_expression "param_4 + 0x10" (identifier "param_4") (+ "+") (number_literal "0x10")) () ")")))) (== "==") (number_literal "0x79b1")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(param_4 + 0x58) == 0)" (( "(") (binary_expression "*(int *)(param_4 + 0x58) == 0" (pointer_expression "*(int *)(param_4 + 0x58)" (* "*") (cast_expression "(int *)(param_4 + 0x58)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x58)" (( "(") (binary_expression "param_4 + 0x58" (identifier "param_4") (+ "+") (number_literal "0x58")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    uVar1 = param_3 * param_2;\n    if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }\n  }" ({ "{") (expression_statement "uVar1 = param_3 * param_2;" (assignment_expression "uVar1 = param_3 * param_2" (identifier "uVar1") (= "=") (binary_expression "param_3 * param_2" (identifier "param_3") (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (uVar1 / param_2 == param_3) {\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }\n    else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }" (if "if") (parenthesized_expression "(uVar1 / param_2 == param_3)" (( "(") (binary_expression "uVar1 / param_2 == param_3" (binary_expression "uVar1 / param_2" (identifier "uVar1") (/ "/") (identifier "param_2")) (== "==") (identifier "param_3")) () ")")) (compound_statement "{\n      if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }\n    }" ({ "{") (if_statement "if (uVar1 != 0) {\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }" (if "if") (parenthesized_expression "(uVar1 != 0)" (( "(") (binary_expression "uVar1 != 0" (identifier "uVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar1 = FUN_0001e400();\n        uVar1 = uVar1 / param_2;\n      }" ({ "{") (expression_statement "uVar1 = FUN_0001e400();" (assignment_expression "uVar1 = FUN_0001e400()" (identifier "uVar1") (= "=") (call_expression "FUN_0001e400()" (identifier "FUN_0001e400") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar1 = uVar1 / param_2;" (assignment_expression "uVar1 = uVar1 / param_2" (identifier "uVar1") (= "=") (binary_expression "uVar1 / param_2" (identifier "uVar1") (/ "/") (identifier "param_2"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }" (else "else") (compound_statement "{\n      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");\n      uVar1 = 0;\n    }" ({ "{") (expression_statement "FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");" (call_expression "FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t")" (identifier "FUN_0001cae0") (argument_list "(param_4,0xfffffffe,"request does not fit in a size_t")" (( "(") (identifier "param_4") (, ",") (number_literal "0xfffffffe") (, ",") (string_literal ""request does not fit in a size_t"" (" """) (string_content "request does not fit in a size_t") (" """)) () ")"))) (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Unknown calling convention */

type_1 function_1(type_2 buf,type_1 var_2,type_1 var_3,type_3 var_1)

{
  type_1 var_6;
  type_4 var_4;
  
  var_4 = 0;
  if ((((var_1 != (type_3)0x0) && (var_1[1].have == 0x79b1)) && ((int)var_1[5].pos == 0)) &&
     (var_2 != 0)) {
    var_4 = var_3 * var_2;
    if (var_4 / var_2 == var_3) {
      if (var_4 != 0) {
        var_6 = var_5((type_5)var_1,buf,var_4);
        var_4 = var_6 / var_2;
      }
    }
    else {
      var_7((type_5)var_1,-2,"request does not fit in a size_t");
      var_4 = 0;
    }
  }
  return var_4;
}


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

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

uint MASKED(undefined4 param_1,uint param_2,uint param_3,int param_4)

{
  uint uVar1;
  
  uVar1 = 0;
  if ((((param_4 != 0) && (*(int *)(param_4 + 0x10) == 0x79b1)) && (*(int *)(param_4 + 0x58) == 0))
     && (param_2 != 0)) {
    uVar1 = param_3 * param_2;
    if (uVar1 / param_2 == param_3) {
      if (uVar1 != 0) {
        uVar1 = FUN_0001e400();
        uVar1 = uVar1 / param_2;
      }
    }
    else {
      FUN_0001cae0(param_4,0xfffffffe,"request does not fit in a size_t");
      uVar1 = 0;
    }
  }
  return uVar1;
}

