
void random_add_noise(void *noise,int length)

{
  byte bVar1;
  bool bVar2;
  undefined *puVar3;
  byte *pbVar4;
  word32 *pwVar5;
  uchar *p;
  int iVar6;
  int iVar7;
  word32 *digest;
  byte *pbVar8;
  word32 *block;
  
  puVar3 = PTR_DAT_000ad2b8;
  if (*(int *)PTR_random_active_000ad984 != 0) {
    pbVar8 = PTR_DAT_000ad2b8 + -0x20ec;
    iVar6 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);
    iVar7 = 0x40 - iVar6;
    if (length < iVar7) {
      block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24);
    }
    else {
      digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);
      block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);
      do {
        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);
        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));
        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));
        SHATransform(digest,block);
        bVar2 = false;
        iVar6 = *(int *)(puVar3 + -0x1c3c);
        pwVar5 = digest;
        do {
          while (iVar6 < 0x4b0) {
            bVar1 = *(byte *)pwVar5;
            pbVar4 = pbVar8 + iVar6;
            pwVar5 = (word32 *)((int)pwVar5 + 1);
            iVar6 = iVar6 + 1;
            *pbVar4 = *pbVar4 ^ bVar1;
            if (block == pwVar5) goto LAB_00067cf4;
          }
          bVar1 = *(byte *)pwVar5;
          pwVar5 = (word32 *)((int)pwVar5 + 1);
          iVar6 = 1;
          bVar2 = true;
          *pbVar8 = *pbVar8 ^ bVar1;
        } while (block != pwVar5);
LAB_00067cf4:
        *(int *)(puVar3 + -0x1c3c) = iVar6;
        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {
          random_stir();
        }
        *(undefined4 *)(puVar3 + -0x1be4) = 0;
        iVar6 = 0;
        iVar7 = 0x40;
      } while (0x3f < length);
    }
    (*(code *)PTR_memcpy_000adcd8)(block,noise,length);
    *(int *)(puVar3 + -0x1be4) = *(int *)(puVar3 + -0x1be4) + length;
  }
  return;
}



void random_add_noise(int param_1,int param_2)

{
  byte bVar1;
  undefined *puVar2;
  byte *pbVar3;
  byte *pbVar4;
  int iVar5;
  bool bVar6;
  int iVar7;
  byte *pbVar8;
  byte *pbVar9;
  byte *pbVar10;
  
  puVar2 = PTR_DAT_000ad2b8;
  if (*(int *)PTR_random_active_000ad984 != 0) {
    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;
    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);
    iVar7 = 0x40 - iVar5;
    if (param_2 < iVar7) {
      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;
    }
    else {
      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;
      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;
      do {
        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);
        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));
        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));
        SHATransform(pbVar8,pbVar10);
        bVar6 = false;
        iVar5 = *(int *)(puVar2 + -0x1c3c);
        pbVar4 = pbVar8;
        do {
          while (iVar5 < 0x4b0) {
            bVar1 = *pbVar4;
            pbVar3 = pbVar9 + iVar5;
            pbVar4 = pbVar4 + 1;
            iVar5 = iVar5 + 1;
            *pbVar3 = *pbVar3 ^ bVar1;
            if (pbVar10 == pbVar4) goto LAB_00067cf4;
          }
          bVar1 = *pbVar4;
          pbVar4 = pbVar4 + 1;
          iVar5 = 1;
          bVar6 = true;
          *pbVar9 = *pbVar9 ^ bVar1;
        } while (pbVar10 != pbVar4);
LAB_00067cf4:
        *(int *)(puVar2 + -0x1c3c) = iVar5;
        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {
          FUN_000678b0();
        }
        *(undefined4 *)(puVar2 + -0x1be4) = 0;
        iVar5 = 0;
        iVar7 = 0x40;
      } while (0x3f < param_2);
    }
    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);
    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;
  }
  return;
}


lui gp,0x5
addiu gp,gp,-0x2940
addu gp,gp,t9
lw v0,-0x790c(gp)
addiu sp,sp,-0x40
sw gp,0x10(sp)
sw ra,0x3c(sp)
sw s7,0x38(sp)
sw s6,0x34(sp)
sw s5,0x30(sp)
sw s4,0x2c(sp)
sw s3,0x28(sp)
sw s2,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
lw v0,0x0(v0)
beq v0,zero,0x00067d4c
_lw s6,-0x7fd8(gp)
or s1,a0,zero
li a2,0x40
addiu s6,s6,-0x20ec
lw a0,0x508(s6)
subu a2,a2,a0
slt v0,a1,a2
bne v0,zero,0x00067d78
_or s0,a1,zero
lw s2,-0x7fd8(gp)
li s4,0x40
lw s7,-0x7fd8(gp)
lw s5,-0x79e0(gp)
addiu s2,s2,-0x1c38
addiu s7,s7,-0x1c24
addiu s5,s5,0x78b0
or s3,s2,zero
lw t9,-0x75b8(gp)
addu a0,s7,a0
jalr t9
_or a1,s1,zero
or a0,s3,zero
lw gp,0x10(sp)
or a1,s7,zero
lw v0,0x508(s6)
lw t9,-0x7910(gp)
subu v0,s4,v0
addu s1,s1,v0
bal 0x0006e3ac
_subu s0,s0,v0
lw gp,0x10(sp)
or a0,zero,zero
lw a2,0x4b0(s6)
b 0x00067cc4
_or v1,s2,zero
or v0,a2,zero
lbu a3,0x0(v1)
addu v0,s6,v0
addiu v1,v1,0x1
addiu a2,a2,0x1
lbu a1,0x0(v0)
xor a1,a1,a3
beq s7,v1,0x00067cf4
_sb a1,0x0(v0)
slti a1,a2,0x4b0
bne a1,zero,0x00067ca0
_or v0,zero,zero
addu v0,s6,v0
lbu a3,0x0(v1)
addiu v1,v1,0x1
li a2,0x1
lbu a1,0x0(v0)
li a0,0x1
xor a1,a1,a3
bne s7,v1,0x00067cc4
_sb a1,0x0(v0)
beq a0,zero,0x00067d18
_sw a2,0x4b0(s6)
lw v0,0x50c(s6)
bne v0,zero,0x00067d1c
_slti v0,s0,0x40
or t9,s5,zero
bal 0x000678b0
_nop
lw gp,0x10(sp)
slti v0,s0,0x40
sw zero,0x508(s6)
or a0,zero,zero
beq v0,zero,0x00067c58
_li a2,0x40
or a0,s7,zero
lw t9,-0x75b8(gp)
or a2,s0,zero
jalr t9
_or a1,s1,zero
lw v0,0x508(s6)
addu s0,v0,s0
sw s0,0x508(s6)
lw ra,0x3c(sp)
lw s7,0x38(sp)
lw s6,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x40
lw s7,-0x7fd8(gp)
addiu s7,s7,-0x1c24
b 0x00067d30
_addu a0,s7,a0
(translation_unit "void random_add_noise(int param_1,int param_2)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int iVar5;\n  bool bVar6;\n  int iVar7;\n  byte *pbVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  \n  puVar2 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }\n  return;\n}\n\n" (function_definition "void random_add_noise(int param_1,int param_2)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int iVar5;\n  bool bVar6;\n  int iVar7;\n  byte *pbVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  \n  puVar2 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }\n  return;\n}" primitive_type (function_declarator "random_add_noise(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int iVar5;\n  bool bVar6;\n  int iVar7;\n  byte *pbVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  \n  puVar2 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (expression_statement "puVar2 = PTR_DAT_000ad2b8;" (assignment_expression "puVar2 = PTR_DAT_000ad2b8" identifier = identifier) ;) (if_statement "if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }" if (parenthesized_expression "(*(int *)PTR_random_active_000ad984 != 0)" ( (binary_expression "*(int *)PTR_random_active_000ad984 != 0" (pointer_expression "*(int *)PTR_random_active_000ad984" * (cast_expression "(int *)PTR_random_active_000ad984" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }" { (expression_statement "pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;" (assignment_expression "pbVar9 = PTR_DAT_000ad2b8 + -0x20ec" identifier = (binary_expression "PTR_DAT_000ad2b8 + -0x20ec" identifier + number_literal)) ;) (expression_statement "iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);" (assignment_expression "iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4)" identifier = (pointer_expression "*(int *)(PTR_DAT_000ad2b8 + -0x1be4)" * (cast_expression "(int *)(PTR_DAT_000ad2b8 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000ad2b8 + -0x1be4)" ( (binary_expression "PTR_DAT_000ad2b8 + -0x1be4" identifier + number_literal) ))))) ;) (expression_statement "iVar7 = 0x40 - iVar5;" (assignment_expression "iVar7 = 0x40 - iVar5" identifier = (binary_expression "0x40 - iVar5" number_literal - identifier)) ;) (if_statement "if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }" if (parenthesized_expression "(param_2 < iVar7)" ( (binary_expression "param_2 < iVar7" identifier < identifier) )) (compound_statement "{\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }" { (expression_statement "pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;" (assignment_expression "pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24" identifier = (binary_expression "PTR_DAT_000ad2b8 + iVar5 + -0x1c24" (binary_expression "PTR_DAT_000ad2b8 + iVar5" identifier + identifier) + number_literal)) ;) }) (else_clause "else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }" else (compound_statement "{\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }" { (expression_statement "pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;" (assignment_expression "pbVar8 = PTR_DAT_000ad2b8 + -0x1c38" identifier = (binary_expression "PTR_DAT_000ad2b8 + -0x1c38" identifier + number_literal)) ;) (expression_statement "pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;" (assignment_expression "pbVar10 = PTR_DAT_000ad2b8 + -0x1c24" identifier = (binary_expression "PTR_DAT_000ad2b8 + -0x1c24" identifier + number_literal)) ;) (do_statement "do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);" do (compound_statement "{\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      }" { (expression_statement "(*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);" (call_expression "(*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7)" (parenthesized_expression "(*(code *)PTR_memcpy_000adcd8)" ( (pointer_expression "*(code *)PTR_memcpy_000adcd8" * (cast_expression "(code *)PTR_memcpy_000adcd8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pbVar10 + iVar5,param_1,iVar7)" ( (binary_expression "pbVar10 + iVar5" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));" (assignment_expression "param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4))" identifier = (binary_expression "param_1 + (0x40 - *(int *)(puVar2 + -0x1be4))" identifier + (parenthesized_expression "(0x40 - *(int *)(puVar2 + -0x1be4))" ( (binary_expression "0x40 - *(int *)(puVar2 + -0x1be4)" number_literal - (pointer_expression "*(int *)(puVar2 + -0x1be4)" * (cast_expression "(int *)(puVar2 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) ))))) )))) ;) (expression_statement "param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));" (assignment_expression "param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4))" identifier = (binary_expression "param_2 - (0x40 - *(int *)(puVar2 + -0x1be4))" identifier - (parenthesized_expression "(0x40 - *(int *)(puVar2 + -0x1be4))" ( (binary_expression "0x40 - *(int *)(puVar2 + -0x1be4)" number_literal - (pointer_expression "*(int *)(puVar2 + -0x1be4)" * (cast_expression "(int *)(puVar2 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) ))))) )))) ;) (expression_statement "SHATransform(pbVar8,pbVar10);" (call_expression "SHATransform(pbVar8,pbVar10)" identifier (argument_list "(pbVar8,pbVar10)" ( identifier , identifier ))) ;) (expression_statement "bVar6 = false;" (assignment_expression "bVar6 = false" identifier = false) ;) (expression_statement "iVar5 = *(int *)(puVar2 + -0x1c3c);" (assignment_expression "iVar5 = *(int *)(puVar2 + -0x1c3c)" identifier = (pointer_expression "*(int *)(puVar2 + -0x1c3c)" * (cast_expression "(int *)(puVar2 + -0x1c3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1c3c)" ( (binary_expression "puVar2 + -0x1c3c" identifier + number_literal) ))))) ;) (expression_statement "pbVar4 = pbVar8;" (assignment_expression "pbVar4 = pbVar8" identifier = identifier) ;) (do_statement "do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);" do (compound_statement "{\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        }" { (while_statement "while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }" while (parenthesized_expression "(iVar5 < 0x4b0)" ( (binary_expression "iVar5 < 0x4b0" identifier < number_literal) )) (compound_statement "{\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }" { (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" identifier = (pointer_expression "*pbVar4" * identifier)) ;) (expression_statement "pbVar3 = pbVar9 + iVar5;" (assignment_expression "pbVar3 = pbVar9 + iVar5" identifier = (binary_expression "pbVar9 + iVar5" identifier + identifier)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar3 = *pbVar3 ^ bVar1;" (assignment_expression "*pbVar3 = *pbVar3 ^ bVar1" (pointer_expression "*pbVar3" * identifier) = (binary_expression "*pbVar3 ^ bVar1" (pointer_expression "*pbVar3" * identifier) ^ identifier)) ;) (if_statement "if (pbVar10 == pbVar4) goto LAB_00067cf4;" if (parenthesized_expression "(pbVar10 == pbVar4)" ( (binary_expression "pbVar10 == pbVar4" identifier == identifier) )) (goto_statement "goto LAB_00067cf4;" goto statement_identifier ;)) })) (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" identifier = (pointer_expression "*pbVar4" * identifier)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (expression_statement "bVar6 = true;" (assignment_expression "bVar6 = true" identifier = true) ;) (expression_statement "*pbVar9 = *pbVar9 ^ bVar1;" (assignment_expression "*pbVar9 = *pbVar9 ^ bVar1" (pointer_expression "*pbVar9" * identifier) = (binary_expression "*pbVar9 ^ bVar1" (pointer_expression "*pbVar9" * identifier) ^ identifier)) ;) }) while (parenthesized_expression "(pbVar10 != pbVar4)" ( (binary_expression "pbVar10 != pbVar4" identifier != identifier) )) ;) (labeled_statement "LAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;" statement_identifier : (expression_statement "*(int *)(puVar2 + -0x1c3c) = iVar5;" (assignment_expression "*(int *)(puVar2 + -0x1c3c) = iVar5" (pointer_expression "*(int *)(puVar2 + -0x1c3c)" * (cast_expression "(int *)(puVar2 + -0x1c3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1c3c)" ( (binary_expression "puVar2 + -0x1c3c" identifier + number_literal) )))) = identifier) ;)) (if_statement "if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }" if (parenthesized_expression "((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0))" ( (binary_expression "(bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)" (parenthesized_expression "(bVar6)" ( identifier )) && (parenthesized_expression "(*(int *)(puVar2 + -0x1be0) == 0)" ( (binary_expression "*(int *)(puVar2 + -0x1be0) == 0" (pointer_expression "*(int *)(puVar2 + -0x1be0)" * (cast_expression "(int *)(puVar2 + -0x1be0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be0)" ( (binary_expression "puVar2 + -0x1be0" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n          FUN_000678b0();\n        }" { (expression_statement "FUN_000678b0();" (call_expression "FUN_000678b0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined4 *)(puVar2 + -0x1be4) = 0;" (assignment_expression "*(undefined4 *)(puVar2 + -0x1be4) = 0" (pointer_expression "*(undefined4 *)(puVar2 + -0x1be4)" * (cast_expression "(undefined4 *)(puVar2 + -0x1be4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "iVar7 = 0x40;" (assignment_expression "iVar7 = 0x40" identifier = number_literal) ;) }) while (parenthesized_expression "(0x3f < param_2)" ( (binary_expression "0x3f < param_2" number_literal < identifier) )) ;) }))) (expression_statement "(*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);" (call_expression "(*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_memcpy_000adcd8)" ( (pointer_expression "*(code *)PTR_memcpy_000adcd8" * (cast_expression "(code *)PTR_memcpy_000adcd8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pbVar10,param_1,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;" (assignment_expression "*(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2" (pointer_expression "*(int *)(puVar2 + -0x1be4)" * (cast_expression "(int *)(puVar2 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) )))) = (binary_expression "*(int *)(puVar2 + -0x1be4) + param_2" (pointer_expression "*(int *)(puVar2 + -0x1be4)" * (cast_expression "(int *)(puVar2 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) )))) + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void random_add_noise(void *noise,int length)\n\n{\n  byte bVar1;\n  bool bVar2;\n  undefined *puVar3;\n  byte *pbVar4;\n  word32 *pwVar5;\n  uchar *p;\n  int iVar6;\n  int iVar7;\n  word32 *digest;\n  byte *pbVar8;\n  word32 *block;\n  \n  puVar3 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar8 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar6 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar6;\n    if (length < iVar7) {\n      block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24);\n    }\n    else {\n      digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);\n      block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);\n      do {\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < length);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(block,noise,length);\n    *(int *)(puVar3 + -0x1be4) = *(int *)(puVar3 + -0x1be4) + length;\n  }\n  return;\n}\n\n" (function_definition "void random_add_noise(void *noise,int length)\n\n{\n  byte bVar1;\n  bool bVar2;\n  undefined *puVar3;\n  byte *pbVar4;\n  word32 *pwVar5;\n  uchar *p;\n  int iVar6;\n  int iVar7;\n  word32 *digest;\n  byte *pbVar8;\n  word32 *block;\n  \n  puVar3 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar8 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar6 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar6;\n    if (length < iVar7) {\n      block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24);\n    }\n    else {\n      digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);\n      block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);\n      do {\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < length);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(block,noise,length);\n    *(int *)(puVar3 + -0x1be4) = *(int *)(puVar3 + -0x1be4) + length;\n  }\n  return;\n}" primitive_type (function_declarator "random_add_noise(void *noise,int length)" identifier (parameter_list "(void *noise,int length)" ( (parameter_declaration "void *noise" primitive_type (pointer_declarator "*noise" * identifier)) , (parameter_declaration "int length" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  bool bVar2;\n  undefined *puVar3;\n  byte *pbVar4;\n  word32 *pwVar5;\n  uchar *p;\n  int iVar6;\n  int iVar7;\n  word32 *digest;\n  byte *pbVar8;\n  word32 *block;\n  \n  puVar3 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar8 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar6 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar6;\n    if (length < iVar7) {\n      block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24);\n    }\n    else {\n      digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);\n      block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);\n      do {\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < length);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(block,noise,length);\n    *(int *)(puVar3 + -0x1be4) = *(int *)(puVar3 + -0x1be4) + length;\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "word32 *pwVar5;" type_identifier (pointer_declarator "*pwVar5" * identifier) ;) (declaration "uchar *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "word32 *digest;" type_identifier (pointer_declarator "*digest" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "word32 *block;" type_identifier (pointer_declarator "*block" * identifier) ;) (expression_statement "puVar3 = PTR_DAT_000ad2b8;" (assignment_expression "puVar3 = PTR_DAT_000ad2b8" identifier = identifier) ;) (if_statement "if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar8 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar6 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar6;\n    if (length < iVar7) {\n      block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24);\n    }\n    else {\n      digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);\n      block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);\n      do {\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < length);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(block,noise,length);\n    *(int *)(puVar3 + -0x1be4) = *(int *)(puVar3 + -0x1be4) + length;\n  }" if (parenthesized_expression "(*(int *)PTR_random_active_000ad984 != 0)" ( (binary_expression "*(int *)PTR_random_active_000ad984 != 0" (pointer_expression "*(int *)PTR_random_active_000ad984" * (cast_expression "(int *)PTR_random_active_000ad984" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n    pbVar8 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar6 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar6;\n    if (length < iVar7) {\n      block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24);\n    }\n    else {\n      digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);\n      block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);\n      do {\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < length);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(block,noise,length);\n    *(int *)(puVar3 + -0x1be4) = *(int *)(puVar3 + -0x1be4) + length;\n  }" { (expression_statement "pbVar8 = PTR_DAT_000ad2b8 + -0x20ec;" (assignment_expression "pbVar8 = PTR_DAT_000ad2b8 + -0x20ec" identifier = (binary_expression "PTR_DAT_000ad2b8 + -0x20ec" identifier + number_literal)) ;) (expression_statement "iVar6 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);" (assignment_expression "iVar6 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4)" identifier = (pointer_expression "*(int *)(PTR_DAT_000ad2b8 + -0x1be4)" * (cast_expression "(int *)(PTR_DAT_000ad2b8 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000ad2b8 + -0x1be4)" ( (binary_expression "PTR_DAT_000ad2b8 + -0x1be4" identifier + number_literal) ))))) ;) (expression_statement "iVar7 = 0x40 - iVar6;" (assignment_expression "iVar7 = 0x40 - iVar6" identifier = (binary_expression "0x40 - iVar6" number_literal - identifier)) ;) (if_statement "if (length < iVar7) {\n      block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24);\n    }\n    else {\n      digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);\n      block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);\n      do {\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < length);\n    }" if (parenthesized_expression "(length < iVar7)" ( (binary_expression "length < iVar7" identifier < identifier) )) (compound_statement "{\n      block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24);\n    }" { (expression_statement "block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24);" (assignment_expression "block = (word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24)" identifier = (cast_expression "(word32 *)(PTR_DAT_000ad2b8 + iVar6 + -0x1c24)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000ad2b8 + iVar6 + -0x1c24)" ( (binary_expression "PTR_DAT_000ad2b8 + iVar6 + -0x1c24" (binary_expression "PTR_DAT_000ad2b8 + iVar6" identifier + identifier) + number_literal) )))) ;) }) (else_clause "else {\n      digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);\n      block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);\n      do {\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < length);\n    }" else (compound_statement "{\n      digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);\n      block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);\n      do {\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < length);\n    }" { (expression_statement "digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38);" (assignment_expression "digest = (word32 *)(PTR_DAT_000ad2b8 + -0x1c38)" identifier = (cast_expression "(word32 *)(PTR_DAT_000ad2b8 + -0x1c38)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000ad2b8 + -0x1c38)" ( (binary_expression "PTR_DAT_000ad2b8 + -0x1c38" identifier + number_literal) )))) ;) (expression_statement "block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24);" (assignment_expression "block = (word32 *)(PTR_DAT_000ad2b8 + -0x1c24)" identifier = (cast_expression "(word32 *)(PTR_DAT_000ad2b8 + -0x1c24)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000ad2b8 + -0x1c24)" ( (binary_expression "PTR_DAT_000ad2b8 + -0x1c24" identifier + number_literal) )))) ;) (do_statement "do {\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < length);" do (compound_statement "{\n        (*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);\n        noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));\n        length = length - (0x40 - *(int *)(puVar3 + -0x1be4));\n        SHATransform(digest,block);\n        bVar2 = false;\n        iVar6 = *(int *)(puVar3 + -0x1c3c);\n        pwVar5 = digest;\n        do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);\nLAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;\n        if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }\n        *(undefined4 *)(puVar3 + -0x1be4) = 0;\n        iVar6 = 0;\n        iVar7 = 0x40;\n      }" { (expression_statement "(*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7);" (call_expression "(*(code *)PTR_memcpy_000adcd8)((int)block + iVar6,noise,iVar7)" (parenthesized_expression "(*(code *)PTR_memcpy_000adcd8)" ( (pointer_expression "*(code *)PTR_memcpy_000adcd8" * (cast_expression "(code *)PTR_memcpy_000adcd8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "((int)block + iVar6,noise,iVar7)" ( (binary_expression "(int)block + iVar6" (cast_expression "(int)block" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) , identifier , identifier ))) ;) (expression_statement "noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)));" (assignment_expression "noise = (void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)))" identifier = (cast_expression "(void *)((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)noise + (0x40 - *(int *)(puVar3 + -0x1be4)))" ( (binary_expression "(int)noise + (0x40 - *(int *)(puVar3 + -0x1be4))" (cast_expression "(int)noise" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x40 - *(int *)(puVar3 + -0x1be4))" ( (binary_expression "0x40 - *(int *)(puVar3 + -0x1be4)" number_literal - (pointer_expression "*(int *)(puVar3 + -0x1be4)" * (cast_expression "(int *)(puVar3 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + -0x1be4)" ( (binary_expression "puVar3 + -0x1be4" identifier + number_literal) ))))) ))) )))) ;) (expression_statement "length = length - (0x40 - *(int *)(puVar3 + -0x1be4));" (assignment_expression "length = length - (0x40 - *(int *)(puVar3 + -0x1be4))" identifier = (binary_expression "length - (0x40 - *(int *)(puVar3 + -0x1be4))" identifier - (parenthesized_expression "(0x40 - *(int *)(puVar3 + -0x1be4))" ( (binary_expression "0x40 - *(int *)(puVar3 + -0x1be4)" number_literal - (pointer_expression "*(int *)(puVar3 + -0x1be4)" * (cast_expression "(int *)(puVar3 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + -0x1be4)" ( (binary_expression "puVar3 + -0x1be4" identifier + number_literal) ))))) )))) ;) (expression_statement "SHATransform(digest,block);" (call_expression "SHATransform(digest,block)" identifier (argument_list "(digest,block)" ( identifier , identifier ))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (expression_statement "iVar6 = *(int *)(puVar3 + -0x1c3c);" (assignment_expression "iVar6 = *(int *)(puVar3 + -0x1c3c)" identifier = (pointer_expression "*(int *)(puVar3 + -0x1c3c)" * (cast_expression "(int *)(puVar3 + -0x1c3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + -0x1c3c)" ( (binary_expression "puVar3 + -0x1c3c" identifier + number_literal) ))))) ;) (expression_statement "pwVar5 = digest;" (assignment_expression "pwVar5 = digest" identifier = identifier) ;) (do_statement "do {\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        } while (block != pwVar5);" do (compound_statement "{\n          while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }\n          bVar1 = *(byte *)pwVar5;\n          pwVar5 = (word32 *)((int)pwVar5 + 1);\n          iVar6 = 1;\n          bVar2 = true;\n          *pbVar8 = *pbVar8 ^ bVar1;\n        }" { (while_statement "while (iVar6 < 0x4b0) {\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }" while (parenthesized_expression "(iVar6 < 0x4b0)" ( (binary_expression "iVar6 < 0x4b0" identifier < number_literal) )) (compound_statement "{\n            bVar1 = *(byte *)pwVar5;\n            pbVar4 = pbVar8 + iVar6;\n            pwVar5 = (word32 *)((int)pwVar5 + 1);\n            iVar6 = iVar6 + 1;\n            *pbVar4 = *pbVar4 ^ bVar1;\n            if (block == pwVar5) goto LAB_00067cf4;\n          }" { (expression_statement "bVar1 = *(byte *)pwVar5;" (assignment_expression "bVar1 = *(byte *)pwVar5" identifier = (pointer_expression "*(byte *)pwVar5" * (cast_expression "(byte *)pwVar5" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pbVar4 = pbVar8 + iVar6;" (assignment_expression "pbVar4 = pbVar8 + iVar6" identifier = (binary_expression "pbVar8 + iVar6" identifier + identifier)) ;) (expression_statement "pwVar5 = (word32 *)((int)pwVar5 + 1);" (assignment_expression "pwVar5 = (word32 *)((int)pwVar5 + 1)" identifier = (cast_expression "(word32 *)((int)pwVar5 + 1)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pwVar5 + 1)" ( (binary_expression "(int)pwVar5 + 1" (cast_expression "(int)pwVar5" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar4 = *pbVar4 ^ bVar1;" (assignment_expression "*pbVar4 = *pbVar4 ^ bVar1" (pointer_expression "*pbVar4" * identifier) = (binary_expression "*pbVar4 ^ bVar1" (pointer_expression "*pbVar4" * identifier) ^ identifier)) ;) (if_statement "if (block == pwVar5) goto LAB_00067cf4;" if (parenthesized_expression "(block == pwVar5)" ( (binary_expression "block == pwVar5" identifier == identifier) )) (goto_statement "goto LAB_00067cf4;" goto statement_identifier ;)) })) (expression_statement "bVar1 = *(byte *)pwVar5;" (assignment_expression "bVar1 = *(byte *)pwVar5" identifier = (pointer_expression "*(byte *)pwVar5" * (cast_expression "(byte *)pwVar5" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pwVar5 = (word32 *)((int)pwVar5 + 1);" (assignment_expression "pwVar5 = (word32 *)((int)pwVar5 + 1)" identifier = (cast_expression "(word32 *)((int)pwVar5 + 1)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pwVar5 + 1)" ( (binary_expression "(int)pwVar5 + 1" (cast_expression "(int)pwVar5" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "iVar6 = 1;" (assignment_expression "iVar6 = 1" identifier = number_literal) ;) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) (expression_statement "*pbVar8 = *pbVar8 ^ bVar1;" (assignment_expression "*pbVar8 = *pbVar8 ^ bVar1" (pointer_expression "*pbVar8" * identifier) = (binary_expression "*pbVar8 ^ bVar1" (pointer_expression "*pbVar8" * identifier) ^ identifier)) ;) }) while (parenthesized_expression "(block != pwVar5)" ( (binary_expression "block != pwVar5" identifier != identifier) )) ;) (labeled_statement "LAB_00067cf4:\n        *(int *)(puVar3 + -0x1c3c) = iVar6;" statement_identifier : (expression_statement "*(int *)(puVar3 + -0x1c3c) = iVar6;" (assignment_expression "*(int *)(puVar3 + -0x1c3c) = iVar6" (pointer_expression "*(int *)(puVar3 + -0x1c3c)" * (cast_expression "(int *)(puVar3 + -0x1c3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + -0x1c3c)" ( (binary_expression "puVar3 + -0x1c3c" identifier + number_literal) )))) = identifier) ;)) (if_statement "if ((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)) {\n          random_stir();\n        }" if (parenthesized_expression "((bVar2) && (*(int *)(puVar3 + -0x1be0) == 0))" ( (binary_expression "(bVar2) && (*(int *)(puVar3 + -0x1be0) == 0)" (parenthesized_expression "(bVar2)" ( identifier )) && (parenthesized_expression "(*(int *)(puVar3 + -0x1be0) == 0)" ( (binary_expression "*(int *)(puVar3 + -0x1be0) == 0" (pointer_expression "*(int *)(puVar3 + -0x1be0)" * (cast_expression "(int *)(puVar3 + -0x1be0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + -0x1be0)" ( (binary_expression "puVar3 + -0x1be0" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n          random_stir();\n        }" { (expression_statement "random_stir();" (call_expression "random_stir()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined4 *)(puVar3 + -0x1be4) = 0;" (assignment_expression "*(undefined4 *)(puVar3 + -0x1be4) = 0" (pointer_expression "*(undefined4 *)(puVar3 + -0x1be4)" * (cast_expression "(undefined4 *)(puVar3 + -0x1be4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + -0x1be4)" ( (binary_expression "puVar3 + -0x1be4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "iVar7 = 0x40;" (assignment_expression "iVar7 = 0x40" identifier = number_literal) ;) }) while (parenthesized_expression "(0x3f < length)" ( (binary_expression "0x3f < length" number_literal < identifier) )) ;) }))) (expression_statement "(*(code *)PTR_memcpy_000adcd8)(block,noise,length);" (call_expression "(*(code *)PTR_memcpy_000adcd8)(block,noise,length)" (parenthesized_expression "(*(code *)PTR_memcpy_000adcd8)" ( (pointer_expression "*(code *)PTR_memcpy_000adcd8" * (cast_expression "(code *)PTR_memcpy_000adcd8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(block,noise,length)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(int *)(puVar3 + -0x1be4) = *(int *)(puVar3 + -0x1be4) + length;" (assignment_expression "*(int *)(puVar3 + -0x1be4) = *(int *)(puVar3 + -0x1be4) + length" (pointer_expression "*(int *)(puVar3 + -0x1be4)" * (cast_expression "(int *)(puVar3 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + -0x1be4)" ( (binary_expression "puVar3 + -0x1be4" identifier + number_literal) )))) = (binary_expression "*(int *)(puVar3 + -0x1be4) + length" (pointer_expression "*(int *)(puVar3 + -0x1be4)" * (cast_expression "(int *)(puVar3 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + -0x1be4)" ( (binary_expression "puVar3 + -0x1be4" identifier + number_literal) )))) + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void random_add_noise(int param_1,int param_2)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int iVar5;\n  bool bVar6;\n  int iVar7;\n  byte *pbVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  \n  puVar2 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }\n  return;\n}\n\n" (function_definition "void random_add_noise(int param_1,int param_2)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int iVar5;\n  bool bVar6;\n  int iVar7;\n  byte *pbVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  \n  puVar2 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }\n  return;\n}" primitive_type (function_declarator "random_add_noise(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int iVar5;\n  bool bVar6;\n  int iVar7;\n  byte *pbVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  \n  puVar2 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (expression_statement "puVar2 = PTR_DAT_000ad2b8;" (assignment_expression "puVar2 = PTR_DAT_000ad2b8" identifier = identifier) ;) (if_statement "if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }" if (parenthesized_expression "(*(int *)PTR_random_active_000ad984 != 0)" ( (binary_expression "*(int *)PTR_random_active_000ad984 != 0" (pointer_expression "*(int *)PTR_random_active_000ad984" * (cast_expression "(int *)PTR_random_active_000ad984" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }" { (expression_statement "pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;" (assignment_expression "pbVar9 = PTR_DAT_000ad2b8 + -0x20ec" identifier = (binary_expression "PTR_DAT_000ad2b8 + -0x20ec" identifier + number_literal)) ;) (expression_statement "iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);" (assignment_expression "iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4)" identifier = (pointer_expression "*(int *)(PTR_DAT_000ad2b8 + -0x1be4)" * (cast_expression "(int *)(PTR_DAT_000ad2b8 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000ad2b8 + -0x1be4)" ( (binary_expression "PTR_DAT_000ad2b8 + -0x1be4" identifier + number_literal) ))))) ;) (expression_statement "iVar7 = 0x40 - iVar5;" (assignment_expression "iVar7 = 0x40 - iVar5" identifier = (binary_expression "0x40 - iVar5" number_literal - identifier)) ;) (if_statement "if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }" if (parenthesized_expression "(param_2 < iVar7)" ( (binary_expression "param_2 < iVar7" identifier < identifier) )) (compound_statement "{\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }" { (expression_statement "pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;" (assignment_expression "pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24" identifier = (binary_expression "PTR_DAT_000ad2b8 + iVar5 + -0x1c24" (binary_expression "PTR_DAT_000ad2b8 + iVar5" identifier + identifier) + number_literal)) ;) }) (else_clause "else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }" else (compound_statement "{\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }" { (expression_statement "pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;" (assignment_expression "pbVar8 = PTR_DAT_000ad2b8 + -0x1c38" identifier = (binary_expression "PTR_DAT_000ad2b8 + -0x1c38" identifier + number_literal)) ;) (expression_statement "pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;" (assignment_expression "pbVar10 = PTR_DAT_000ad2b8 + -0x1c24" identifier = (binary_expression "PTR_DAT_000ad2b8 + -0x1c24" identifier + number_literal)) ;) (do_statement "do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);" do (compound_statement "{\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      }" { (expression_statement "(*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);" (call_expression "(*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7)" (parenthesized_expression "(*(code *)PTR_memcpy_000adcd8)" ( (pointer_expression "*(code *)PTR_memcpy_000adcd8" * (cast_expression "(code *)PTR_memcpy_000adcd8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pbVar10 + iVar5,param_1,iVar7)" ( (binary_expression "pbVar10 + iVar5" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));" (assignment_expression "param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4))" identifier = (binary_expression "param_1 + (0x40 - *(int *)(puVar2 + -0x1be4))" identifier + (parenthesized_expression "(0x40 - *(int *)(puVar2 + -0x1be4))" ( (binary_expression "0x40 - *(int *)(puVar2 + -0x1be4)" number_literal - (pointer_expression "*(int *)(puVar2 + -0x1be4)" * (cast_expression "(int *)(puVar2 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) ))))) )))) ;) (expression_statement "param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));" (assignment_expression "param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4))" identifier = (binary_expression "param_2 - (0x40 - *(int *)(puVar2 + -0x1be4))" identifier - (parenthesized_expression "(0x40 - *(int *)(puVar2 + -0x1be4))" ( (binary_expression "0x40 - *(int *)(puVar2 + -0x1be4)" number_literal - (pointer_expression "*(int *)(puVar2 + -0x1be4)" * (cast_expression "(int *)(puVar2 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) ))))) )))) ;) (expression_statement "SHATransform(pbVar8,pbVar10);" (call_expression "SHATransform(pbVar8,pbVar10)" identifier (argument_list "(pbVar8,pbVar10)" ( identifier , identifier ))) ;) (expression_statement "bVar6 = false;" (assignment_expression "bVar6 = false" identifier = false) ;) (expression_statement "iVar5 = *(int *)(puVar2 + -0x1c3c);" (assignment_expression "iVar5 = *(int *)(puVar2 + -0x1c3c)" identifier = (pointer_expression "*(int *)(puVar2 + -0x1c3c)" * (cast_expression "(int *)(puVar2 + -0x1c3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1c3c)" ( (binary_expression "puVar2 + -0x1c3c" identifier + number_literal) ))))) ;) (expression_statement "pbVar4 = pbVar8;" (assignment_expression "pbVar4 = pbVar8" identifier = identifier) ;) (do_statement "do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);" do (compound_statement "{\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        }" { (while_statement "while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }" while (parenthesized_expression "(iVar5 < 0x4b0)" ( (binary_expression "iVar5 < 0x4b0" identifier < number_literal) )) (compound_statement "{\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }" { (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" identifier = (pointer_expression "*pbVar4" * identifier)) ;) (expression_statement "pbVar3 = pbVar9 + iVar5;" (assignment_expression "pbVar3 = pbVar9 + iVar5" identifier = (binary_expression "pbVar9 + iVar5" identifier + identifier)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar3 = *pbVar3 ^ bVar1;" (assignment_expression "*pbVar3 = *pbVar3 ^ bVar1" (pointer_expression "*pbVar3" * identifier) = (binary_expression "*pbVar3 ^ bVar1" (pointer_expression "*pbVar3" * identifier) ^ identifier)) ;) (if_statement "if (pbVar10 == pbVar4) goto LAB_00067cf4;" if (parenthesized_expression "(pbVar10 == pbVar4)" ( (binary_expression "pbVar10 == pbVar4" identifier == identifier) )) (goto_statement "goto LAB_00067cf4;" goto statement_identifier ;)) })) (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" identifier = (pointer_expression "*pbVar4" * identifier)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (expression_statement "bVar6 = true;" (assignment_expression "bVar6 = true" identifier = true) ;) (expression_statement "*pbVar9 = *pbVar9 ^ bVar1;" (assignment_expression "*pbVar9 = *pbVar9 ^ bVar1" (pointer_expression "*pbVar9" * identifier) = (binary_expression "*pbVar9 ^ bVar1" (pointer_expression "*pbVar9" * identifier) ^ identifier)) ;) }) while (parenthesized_expression "(pbVar10 != pbVar4)" ( (binary_expression "pbVar10 != pbVar4" identifier != identifier) )) ;) (labeled_statement "LAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;" statement_identifier : (expression_statement "*(int *)(puVar2 + -0x1c3c) = iVar5;" (assignment_expression "*(int *)(puVar2 + -0x1c3c) = iVar5" (pointer_expression "*(int *)(puVar2 + -0x1c3c)" * (cast_expression "(int *)(puVar2 + -0x1c3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1c3c)" ( (binary_expression "puVar2 + -0x1c3c" identifier + number_literal) )))) = identifier) ;)) (if_statement "if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }" if (parenthesized_expression "((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0))" ( (binary_expression "(bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)" (parenthesized_expression "(bVar6)" ( identifier )) && (parenthesized_expression "(*(int *)(puVar2 + -0x1be0) == 0)" ( (binary_expression "*(int *)(puVar2 + -0x1be0) == 0" (pointer_expression "*(int *)(puVar2 + -0x1be0)" * (cast_expression "(int *)(puVar2 + -0x1be0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be0)" ( (binary_expression "puVar2 + -0x1be0" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n          FUN_000678b0();\n        }" { (expression_statement "FUN_000678b0();" (call_expression "FUN_000678b0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined4 *)(puVar2 + -0x1be4) = 0;" (assignment_expression "*(undefined4 *)(puVar2 + -0x1be4) = 0" (pointer_expression "*(undefined4 *)(puVar2 + -0x1be4)" * (cast_expression "(undefined4 *)(puVar2 + -0x1be4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "iVar7 = 0x40;" (assignment_expression "iVar7 = 0x40" identifier = number_literal) ;) }) while (parenthesized_expression "(0x3f < param_2)" ( (binary_expression "0x3f < param_2" number_literal < identifier) )) ;) }))) (expression_statement "(*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);" (call_expression "(*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_memcpy_000adcd8)" ( (pointer_expression "*(code *)PTR_memcpy_000adcd8" * (cast_expression "(code *)PTR_memcpy_000adcd8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pbVar10,param_1,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;" (assignment_expression "*(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2" (pointer_expression "*(int *)(puVar2 + -0x1be4)" * (cast_expression "(int *)(puVar2 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) )))) = (binary_expression "*(int *)(puVar2 + -0x1be4) + param_2" (pointer_expression "*(int *)(puVar2 + -0x1be4)" * (cast_expression "(int *)(puVar2 + -0x1be4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + -0x1be4)" ( (binary_expression "puVar2 + -0x1be4" identifier + number_literal) )))) + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression LIT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + IDENT) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression LIT - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (parenthesized_expression ( (binary_expression LIT - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( IDENT )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) while (parenthesized_expression ( (binary_expression LIT < IDENT) )) ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) })) (return_statement return ;) })))
(function_definition "void random_add_noise(int param_1,int param_2)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int iVar5;\n  bool bVar6;\n  int iVar7;\n  byte *pbVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  \n  puVar2 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "random_add_noise(int param_1,int param_2)" (identifier "random_add_noise") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int iVar5;\n  bool bVar6;\n  int iVar7;\n  byte *pbVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  \n  puVar2 = PTR_DAT_000ad2b8;\n  if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }\n  return;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "bool bVar6;" (primitive_type "bool") (identifier "bVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "byte *pbVar8;" (type_identifier "byte") (pointer_declarator "*pbVar8" (* "*") (identifier "pbVar8")) (; ";")) (declaration "byte *pbVar9;" (type_identifier "byte") (pointer_declarator "*pbVar9" (* "*") (identifier "pbVar9")) (; ";")) (declaration "byte *pbVar10;" (type_identifier "byte") (pointer_declarator "*pbVar10" (* "*") (identifier "pbVar10")) (; ";")) (expression_statement "puVar2 = PTR_DAT_000ad2b8;" (assignment_expression "puVar2 = PTR_DAT_000ad2b8" (identifier "puVar2") (= "=") (identifier "PTR_DAT_000ad2b8")) (; ";")) (if_statement "if (*(int *)PTR_random_active_000ad984 != 0) {\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }" (if "if") (parenthesized_expression "(*(int *)PTR_random_active_000ad984 != 0)" (( "(") (binary_expression "*(int *)PTR_random_active_000ad984 != 0" (pointer_expression "*(int *)PTR_random_active_000ad984" (* "*") (cast_expression "(int *)PTR_random_active_000ad984" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_random_active_000ad984"))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;\n    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);\n    iVar7 = 0x40 - iVar5;\n    if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }\n    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);\n    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;\n  }" ({ "{") (expression_statement "pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;" (assignment_expression "pbVar9 = PTR_DAT_000ad2b8 + -0x20ec" (identifier "pbVar9") (= "=") (binary_expression "PTR_DAT_000ad2b8 + -0x20ec" (identifier "PTR_DAT_000ad2b8") (+ "+") (number_literal "-0x20ec"))) (; ";")) (expression_statement "iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);" (assignment_expression "iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(PTR_DAT_000ad2b8 + -0x1be4)" (* "*") (cast_expression "(int *)(PTR_DAT_000ad2b8 + -0x1be4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_000ad2b8 + -0x1be4)" (( "(") (binary_expression "PTR_DAT_000ad2b8 + -0x1be4" (identifier "PTR_DAT_000ad2b8") (+ "+") (number_literal "-0x1be4")) () ")"))))) (; ";")) (expression_statement "iVar7 = 0x40 - iVar5;" (assignment_expression "iVar7 = 0x40 - iVar5" (identifier "iVar7") (= "=") (binary_expression "0x40 - iVar5" (number_literal "0x40") (- "-") (identifier "iVar5"))) (; ";")) (if_statement "if (param_2 < iVar7) {\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }\n    else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }" (if "if") (parenthesized_expression "(param_2 < iVar7)" (( "(") (binary_expression "param_2 < iVar7" (identifier "param_2") (< "<") (identifier "iVar7")) () ")")) (compound_statement "{\n      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;\n    }" ({ "{") (expression_statement "pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;" (assignment_expression "pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24" (identifier "pbVar10") (= "=") (binary_expression "PTR_DAT_000ad2b8 + iVar5 + -0x1c24" (binary_expression "PTR_DAT_000ad2b8 + iVar5" (identifier "PTR_DAT_000ad2b8") (+ "+") (identifier "iVar5")) (+ "+") (number_literal "-0x1c24"))) (; ";")) (} "}")) (else_clause "else {\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }" (else "else") (compound_statement "{\n      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;\n      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;\n      do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);\n    }" ({ "{") (expression_statement "pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;" (assignment_expression "pbVar8 = PTR_DAT_000ad2b8 + -0x1c38" (identifier "pbVar8") (= "=") (binary_expression "PTR_DAT_000ad2b8 + -0x1c38" (identifier "PTR_DAT_000ad2b8") (+ "+") (number_literal "-0x1c38"))) (; ";")) (expression_statement "pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;" (assignment_expression "pbVar10 = PTR_DAT_000ad2b8 + -0x1c24" (identifier "pbVar10") (= "=") (binary_expression "PTR_DAT_000ad2b8 + -0x1c24" (identifier "PTR_DAT_000ad2b8") (+ "+") (number_literal "-0x1c24"))) (; ";")) (do_statement "do {\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      } while (0x3f < param_2);" (do "do") (compound_statement "{\n        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);\n        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));\n        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));\n        SHATransform(pbVar8,pbVar10);\n        bVar6 = false;\n        iVar5 = *(int *)(puVar2 + -0x1c3c);\n        pbVar4 = pbVar8;\n        do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);\nLAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;\n        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }\n        *(undefined4 *)(puVar2 + -0x1be4) = 0;\n        iVar5 = 0;\n        iVar7 = 0x40;\n      }" ({ "{") (expression_statement "(*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);" (call_expression "(*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7)" (parenthesized_expression "(*(code *)PTR_memcpy_000adcd8)" (( "(") (pointer_expression "*(code *)PTR_memcpy_000adcd8" (* "*") (cast_expression "(code *)PTR_memcpy_000adcd8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_000adcd8"))) () ")")) (argument_list "(pbVar10 + iVar5,param_1,iVar7)" (( "(") (binary_expression "pbVar10 + iVar5" (identifier "pbVar10") (+ "+") (identifier "iVar5")) (, ",") (identifier "param_1") (, ",") (identifier "iVar7") () ")"))) (; ";")) (expression_statement "param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));" (assignment_expression "param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4))" (identifier "param_1") (= "=") (binary_expression "param_1 + (0x40 - *(int *)(puVar2 + -0x1be4))" (identifier "param_1") (+ "+") (parenthesized_expression "(0x40 - *(int *)(puVar2 + -0x1be4))" (( "(") (binary_expression "0x40 - *(int *)(puVar2 + -0x1be4)" (number_literal "0x40") (- "-") (pointer_expression "*(int *)(puVar2 + -0x1be4)" (* "*") (cast_expression "(int *)(puVar2 + -0x1be4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + -0x1be4)" (( "(") (binary_expression "puVar2 + -0x1be4" (identifier "puVar2") (+ "+") (number_literal "-0x1be4")) () ")"))))) () ")")))) (; ";")) (expression_statement "param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));" (assignment_expression "param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4))" (identifier "param_2") (= "=") (binary_expression "param_2 - (0x40 - *(int *)(puVar2 + -0x1be4))" (identifier "param_2") (- "-") (parenthesized_expression "(0x40 - *(int *)(puVar2 + -0x1be4))" (( "(") (binary_expression "0x40 - *(int *)(puVar2 + -0x1be4)" (number_literal "0x40") (- "-") (pointer_expression "*(int *)(puVar2 + -0x1be4)" (* "*") (cast_expression "(int *)(puVar2 + -0x1be4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + -0x1be4)" (( "(") (binary_expression "puVar2 + -0x1be4" (identifier "puVar2") (+ "+") (number_literal "-0x1be4")) () ")"))))) () ")")))) (; ";")) (expression_statement "SHATransform(pbVar8,pbVar10);" (call_expression "SHATransform(pbVar8,pbVar10)" (identifier "SHATransform") (argument_list "(pbVar8,pbVar10)" (( "(") (identifier "pbVar8") (, ",") (identifier "pbVar10") () ")"))) (; ";")) (expression_statement "bVar6 = false;" (assignment_expression "bVar6 = false" (identifier "bVar6") (= "=") (false "false")) (; ";")) (expression_statement "iVar5 = *(int *)(puVar2 + -0x1c3c);" (assignment_expression "iVar5 = *(int *)(puVar2 + -0x1c3c)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(puVar2 + -0x1c3c)" (* "*") (cast_expression "(int *)(puVar2 + -0x1c3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + -0x1c3c)" (( "(") (binary_expression "puVar2 + -0x1c3c" (identifier "puVar2") (+ "+") (number_literal "-0x1c3c")) () ")"))))) (; ";")) (expression_statement "pbVar4 = pbVar8;" (assignment_expression "pbVar4 = pbVar8" (identifier "pbVar4") (= "=") (identifier "pbVar8")) (; ";")) (do_statement "do {\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        } while (pbVar10 != pbVar4);" (do "do") (compound_statement "{\n          while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }\n          bVar1 = *pbVar4;\n          pbVar4 = pbVar4 + 1;\n          iVar5 = 1;\n          bVar6 = true;\n          *pbVar9 = *pbVar9 ^ bVar1;\n        }" ({ "{") (while_statement "while (iVar5 < 0x4b0) {\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }" (while "while") (parenthesized_expression "(iVar5 < 0x4b0)" (( "(") (binary_expression "iVar5 < 0x4b0" (identifier "iVar5") (< "<") (number_literal "0x4b0")) () ")")) (compound_statement "{\n            bVar1 = *pbVar4;\n            pbVar3 = pbVar9 + iVar5;\n            pbVar4 = pbVar4 + 1;\n            iVar5 = iVar5 + 1;\n            *pbVar3 = *pbVar3 ^ bVar1;\n            if (pbVar10 == pbVar4) goto LAB_00067cf4;\n          }" ({ "{") (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" (identifier "bVar1") (= "=") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4"))) (; ";")) (expression_statement "pbVar3 = pbVar9 + iVar5;" (assignment_expression "pbVar3 = pbVar9 + iVar5" (identifier "pbVar3") (= "=") (binary_expression "pbVar9 + iVar5" (identifier "pbVar9") (+ "+") (identifier "iVar5"))) (; ";")) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*pbVar3 = *pbVar3 ^ bVar1;" (assignment_expression "*pbVar3 = *pbVar3 ^ bVar1" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (= "=") (binary_expression "*pbVar3 ^ bVar1" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (^ "^") (identifier "bVar1"))) (; ";")) (if_statement "if (pbVar10 == pbVar4) goto LAB_00067cf4;" (if "if") (parenthesized_expression "(pbVar10 == pbVar4)" (( "(") (binary_expression "pbVar10 == pbVar4" (identifier "pbVar10") (== "==") (identifier "pbVar4")) () ")")) (goto_statement "goto LAB_00067cf4;" (goto "goto") (statement_identifier "LAB_00067cf4") (; ";"))) (} "}"))) (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" (identifier "bVar1") (= "=") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4"))) (; ";")) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" (identifier "iVar5") (= "=") (number_literal "1")) (; ";")) (expression_statement "bVar6 = true;" (assignment_expression "bVar6 = true" (identifier "bVar6") (= "=") (true "true")) (; ";")) (expression_statement "*pbVar9 = *pbVar9 ^ bVar1;" (assignment_expression "*pbVar9 = *pbVar9 ^ bVar1" (pointer_expression "*pbVar9" (* "*") (identifier "pbVar9")) (= "=") (binary_expression "*pbVar9 ^ bVar1" (pointer_expression "*pbVar9" (* "*") (identifier "pbVar9")) (^ "^") (identifier "bVar1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar10 != pbVar4)" (( "(") (binary_expression "pbVar10 != pbVar4" (identifier "pbVar10") (!= "!=") (identifier "pbVar4")) () ")")) (; ";")) (labeled_statement "LAB_00067cf4:\n        *(int *)(puVar2 + -0x1c3c) = iVar5;" (statement_identifier "LAB_00067cf4") (: ":") (expression_statement "*(int *)(puVar2 + -0x1c3c) = iVar5;" (assignment_expression "*(int *)(puVar2 + -0x1c3c) = iVar5" (pointer_expression "*(int *)(puVar2 + -0x1c3c)" (* "*") (cast_expression "(int *)(puVar2 + -0x1c3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + -0x1c3c)" (( "(") (binary_expression "puVar2 + -0x1c3c" (identifier "puVar2") (+ "+") (number_literal "-0x1c3c")) () ")")))) (= "=") (identifier "iVar5")) (; ";"))) (if_statement "if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {\n          FUN_000678b0();\n        }" (if "if") (parenthesized_expression "((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0))" (( "(") (binary_expression "(bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)" (parenthesized_expression "(bVar6)" (( "(") (identifier "bVar6") () ")")) (&& "&&") (parenthesized_expression "(*(int *)(puVar2 + -0x1be0) == 0)" (( "(") (binary_expression "*(int *)(puVar2 + -0x1be0) == 0" (pointer_expression "*(int *)(puVar2 + -0x1be0)" (* "*") (cast_expression "(int *)(puVar2 + -0x1be0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + -0x1be0)" (( "(") (binary_expression "puVar2 + -0x1be0" (identifier "puVar2") (+ "+") (number_literal "-0x1be0")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n          FUN_000678b0();\n        }" ({ "{") (expression_statement "FUN_000678b0();" (call_expression "FUN_000678b0()" (identifier "FUN_000678b0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(puVar2 + -0x1be4) = 0;" (assignment_expression "*(undefined4 *)(puVar2 + -0x1be4) = 0" (pointer_expression "*(undefined4 *)(puVar2 + -0x1be4)" (* "*") (cast_expression "(undefined4 *)(puVar2 + -0x1be4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + -0x1be4)" (( "(") (binary_expression "puVar2 + -0x1be4" (identifier "puVar2") (+ "+") (number_literal "-0x1be4")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar7 = 0x40;" (assignment_expression "iVar7 = 0x40" (identifier "iVar7") (= "=") (number_literal "0x40")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(0x3f < param_2)" (( "(") (binary_expression "0x3f < param_2" (number_literal "0x3f") (< "<") (identifier "param_2")) () ")")) (; ";")) (} "}")))) (expression_statement "(*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);" (call_expression "(*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_memcpy_000adcd8)" (( "(") (pointer_expression "*(code *)PTR_memcpy_000adcd8" (* "*") (cast_expression "(code *)PTR_memcpy_000adcd8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_000adcd8"))) () ")")) (argument_list "(pbVar10,param_1,param_2)" (( "(") (identifier "pbVar10") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "*(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;" (assignment_expression "*(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2" (pointer_expression "*(int *)(puVar2 + -0x1be4)" (* "*") (cast_expression "(int *)(puVar2 + -0x1be4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + -0x1be4)" (( "(") (binary_expression "puVar2 + -0x1be4" (identifier "puVar2") (+ "+") (number_literal "-0x1be4")) () ")")))) (= "=") (binary_expression "*(int *)(puVar2 + -0x1be4) + param_2" (pointer_expression "*(int *)(puVar2 + -0x1be4)" (* "*") (cast_expression "(int *)(puVar2 + -0x1be4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + -0x1be4)" (( "(") (binary_expression "puVar2 + -0x1be4" (identifier "puVar2") (+ "+") (number_literal "-0x1be4")) () ")")))) (+ "+") (identifier "param_2"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(void *noise,int var_3)

{
  type_1 var_8;
  bool bVar2;
  type_2 *var_5;
  type_1 *pbVar4;
  type_3 *var_10;
  type_4 *p;
  int var_2;
  int var_4;
  type_3 *digest;
  type_1 *var_7;
  type_3 *var_9;
  
  var_5 = var_1;
  if (*(int *)PTR_random_active_000ad984 != 0) {
    var_7 = var_1 + -0x20ec;
    var_2 = *(int *)(var_1 + -0x1be4);
    var_4 = 0x40 - var_2;
    if (var_3 < var_4) {
      var_9 = (type_3 *)(var_1 + var_2 + -0x1c24);
    }
    else {
      digest = (type_3 *)(var_1 + -0x1c38);
      var_9 = (type_3 *)(var_1 + -0x1c24);
      do {
        (*(type_5 *)PTR_memcpy_000adcd8)((int)var_9 + var_2,noise,var_4);
        noise = (void *)((int)noise + (0x40 - *(int *)(var_5 + -0x1be4)));
        var_3 = var_3 - (0x40 - *(int *)(var_5 + -0x1be4));
        var_6(digest,var_9);
        bVar2 = false;
        var_2 = *(int *)(var_5 + -0x1c3c);
        var_10 = digest;
        do {
          while (var_2 < 0x4b0) {
            var_8 = *(type_1 *)var_10;
            pbVar4 = var_7 + var_2;
            var_10 = (type_3 *)((int)var_10 + 1);
            var_2 = var_2 + 1;
            *pbVar4 = *pbVar4 ^ var_8;
            if (var_9 == var_10) goto LAB_00067cf4;
          }
          var_8 = *(type_1 *)var_10;
          var_10 = (type_3 *)((int)var_10 + 1);
          var_2 = 1;
          bVar2 = true;
          *var_7 = *var_7 ^ var_8;
        } while (var_9 != var_10);
LAB_00067cf4:
        *(int *)(var_5 + -0x1c3c) = var_2;
        if ((bVar2) && (*(int *)(var_5 + -0x1be0) == 0)) {
          var_11();
        }
        *(type_6 *)(var_5 + -0x1be4) = 0;
        var_2 = 0;
        var_4 = 0x40;
      } while (0x3f < var_3);
    }
    (*(type_5 *)PTR_memcpy_000adcd8)(var_9,noise,var_3);
    *(int *)(var_5 + -0x1be4) = *(int *)(var_5 + -0x1be4) + var_3;
  }
  return;
}


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

void MASKED(int param_1,int param_2)

{
  byte bVar1;
  undefined *puVar2;
  byte *pbVar3;
  byte *pbVar4;
  int iVar5;
  bool bVar6;
  int iVar7;
  byte *pbVar8;
  byte *pbVar9;
  byte *pbVar10;
  
  puVar2 = PTR_DAT_000ad2b8;
  if (*(int *)PTR_random_active_000ad984 != 0) {
    pbVar9 = PTR_DAT_000ad2b8 + -0x20ec;
    iVar5 = *(int *)(PTR_DAT_000ad2b8 + -0x1be4);
    iVar7 = 0x40 - iVar5;
    if (param_2 < iVar7) {
      pbVar10 = PTR_DAT_000ad2b8 + iVar5 + -0x1c24;
    }
    else {
      pbVar8 = PTR_DAT_000ad2b8 + -0x1c38;
      pbVar10 = PTR_DAT_000ad2b8 + -0x1c24;
      do {
        (*(code *)PTR_memcpy_000adcd8)(pbVar10 + iVar5,param_1,iVar7);
        param_1 = param_1 + (0x40 - *(int *)(puVar2 + -0x1be4));
        param_2 = param_2 - (0x40 - *(int *)(puVar2 + -0x1be4));
        SHATransform(pbVar8,pbVar10);
        bVar6 = false;
        iVar5 = *(int *)(puVar2 + -0x1c3c);
        pbVar4 = pbVar8;
        do {
          while (iVar5 < 0x4b0) {
            bVar1 = *pbVar4;
            pbVar3 = pbVar9 + iVar5;
            pbVar4 = pbVar4 + 1;
            iVar5 = iVar5 + 1;
            *pbVar3 = *pbVar3 ^ bVar1;
            if (pbVar10 == pbVar4) goto LAB_00067cf4;
          }
          bVar1 = *pbVar4;
          pbVar4 = pbVar4 + 1;
          iVar5 = 1;
          bVar6 = true;
          *pbVar9 = *pbVar9 ^ bVar1;
        } while (pbVar10 != pbVar4);
LAB_00067cf4:
        *(int *)(puVar2 + -0x1c3c) = iVar5;
        if ((bVar6) && (*(int *)(puVar2 + -0x1be0) == 0)) {
          FUN_000678b0();
        }
        *(undefined4 *)(puVar2 + -0x1be4) = 0;
        iVar5 = 0;
        iVar7 = 0x40;
      } while (0x3f < param_2);
    }
    (*(code *)PTR_memcpy_000adcd8)(pbVar10,param_1,param_2);
    *(int *)(puVar2 + -0x1be4) = *(int *)(puVar2 + -0x1be4) + param_2;
  }
  return;
}

