
void random_add_noise(void *noise,int length)

{
  byte *pbVar1;
  bool bVar2;
  int iVar3;
  word32 *pwVar4;
  word32 *pwVar5;
  int iVar6;
  size_t __n;
  int unaff_EDI;
  word32 *block;
  
  __x86_get_pc_thunk_di();
  if (*(int *)(unaff_EDI + 0x52129) != 0) {
    iVar3 = *(int *)(unaff_EDI + 0x52651);
    __n = 0x40 - iVar3;
    if (length < (int)__n) {
      block = (word32 *)(unaff_EDI + 0x52611 + iVar3);
    }
    else {
      block = (word32 *)(unaff_EDI + 0x52611);
      pbVar1 = (byte *)(unaff_EDI + 0x52149);
      do {
        memcpy((void *)(iVar3 + (int)block),noise,__n);
        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);
        noise = (void *)((int)noise + iVar3);
        length = length - iVar3;
        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);
        bVar2 = false;
        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);
        iVar3 = *(int *)(unaff_EDI + 0x525f9);
        do {
          while (0x4af < iVar3) {
            pwVar5 = (word32 *)((int)pwVar4 + 1);
            iVar6 = 1;
            bVar2 = true;
            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;
            pwVar4 = pwVar5;
            iVar3 = iVar6;
            if (block == pwVar5) goto LAB_00053463;
          }
          pwVar5 = (word32 *)((int)pwVar4 + 1);
          iVar6 = iVar3 + 1;
          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;
          pwVar4 = pwVar5;
          iVar3 = iVar6;
        } while (block != pwVar5);
LAB_00053463:
        *(int *)(unaff_EDI + 0x525f9) = iVar6;
        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {
          random_stir();
        }
        __n = 0x40;
        *(undefined4 *)(unaff_EDI + 0x52651) = 0;
        iVar3 = 0;
      } while (0x3f < length);
    }
    memcpy(block,noise,length);
    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + length;
  }
  return;
}



void FUN_00053370(void *param_1,size_t param_2)

{
  byte *pbVar1;
  bool bVar2;
  int iVar3;
  byte *pbVar4;
  byte *pbVar5;
  int iVar6;
  size_t __n;
  int unaff_EDI;
  byte *__dest;
  
  FUN_0003c47b();
  if (*(int *)(unaff_EDI + 0x52129) != 0) {
    iVar3 = *(int *)(unaff_EDI + 0x52651);
    __n = 0x40 - iVar3;
    if ((int)param_2 < (int)__n) {
      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);
    }
    else {
      __dest = (byte *)(unaff_EDI + 0x52611);
      pbVar1 = (byte *)(unaff_EDI + 0x52149);
      do {
        memcpy(__dest + iVar3,param_1,__n);
        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);
        param_1 = (void *)((int)param_1 + iVar3);
        param_2 = param_2 - iVar3;
        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);
        bVar2 = false;
        pbVar4 = (byte *)(unaff_EDI + 0x525fd);
        iVar3 = *(int *)(unaff_EDI + 0x525f9);
        do {
          while (0x4af < iVar3) {
            pbVar5 = pbVar4 + 1;
            iVar6 = 1;
            bVar2 = true;
            *pbVar1 = *pbVar1 ^ *pbVar4;
            pbVar4 = pbVar5;
            iVar3 = iVar6;
            if (__dest == pbVar5) goto LAB_00053463;
          }
          pbVar5 = pbVar4 + 1;
          iVar6 = iVar3 + 1;
          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;
          pbVar4 = pbVar5;
          iVar3 = iVar6;
        } while (__dest != pbVar5);
LAB_00053463:
        *(int *)(unaff_EDI + 0x525f9) = iVar6;
        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {
          FUN_00052fb0();
        }
        __n = 0x40;
        *(undefined4 *)(unaff_EDI + 0x52651) = 0;
        iVar3 = 0;
      } while (0x3f < (int)param_2);
    }
    memcpy(__dest,param_1,param_2);
    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;
  }
  return;
}


PUSH EBP
PUSH EDI
CALL 0x0003c47b
ADD EDI,0x519f9
PUSH ESI
PUSH EBX
SUB ESP,0x1c
MOV EBX,dword ptr [EDI + 0x730]
MOV dword ptr [ESP + 0x8],EDI
TEST EBX,EBX
JZ 0x000534cf
MOV EAX,dword ptr [EDI + 0xc58]
MOV EDX,0x40
SUB EDX,EAX
CMP dword ptr [ESP + 0x34],EDX
JL 0x000534d7
MOV ESI,EDI
LEA ECX,[0x750]
LEA EDI,[EDI + 0xc18]
MOV dword ptr [ESP + 0x4],ECX
LEA ECX,[ESI + 0xc04]
LEA ESI,[ESI + 0x750]
MOV dword ptr [ESP + 0xc],ECX
LEA ESI,[ESI]
SUB ESP,0x4
ADD EAX,EDI
PUSH EDX
PUSH dword ptr [ESP + 0x38]
PUSH EAX
MOV EBP,dword ptr [ESP + 0x18]
MOV EBX,EBP
CALL 0x00014140
MOV EBX,dword ptr [ESP + 0x14]
MOV EAX,0x40
SUB EAX,dword ptr [EBX + EBP*0x1 + 0x508]
ADD dword ptr [ESP + 0x40],EAX
MOV EBX,EBP
SUB dword ptr [ESP + 0x44],EAX
POP EDX
POP ECX
PUSH EDI
PUSH dword ptr [ESP + 0x18]
CALL 0x000586d0
MOV EBX,dword ptr [ESP + 0x14]
MOV EAX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV ECX,dword ptr [EBX + EBP*0x1 + 0x4b0]
XOR EBP,EBP
JMP 0x0005343e
MOV EBX,ECX
ADD EAX,0x1
ADD ECX,0x1
MOVZX EDX,byte ptr [ESI + EBX*0x1]
XOR DL,byte ptr [EAX + -0x1]
MOV byte ptr [ESI + EBX*0x1],DL
CMP EDI,EAX
JZ 0x00053463
CMP ECX,0x4af
JLE 0x00053428
XOR EBX,EBX
ADD EAX,0x1
MOV ECX,0x1
MOV EBP,0x1
MOVZX EDX,byte ptr [ESI + EBX*0x1]
XOR DL,byte ptr [EAX + -0x1]
MOV byte ptr [ESI + EBX*0x1],DL
CMP EDI,EAX
JNZ 0x0005343e
MOV EAX,dword ptr [ESP + 0x4]
MOV EBX,dword ptr [ESP + 0x8]
MOV dword ptr [EAX + EBX*0x1 + 0x4b0],ECX
TEST EBP,EBP
JZ 0x00053486
MOV EAX,dword ptr [EAX + EBX*0x1 + 0x50c]
TEST EAX,EAX
JNZ 0x00053486
CALL 0x00052fb0
MOV EAX,dword ptr [ESP + 0x4]
MOV ECX,dword ptr [ESP + 0x8]
MOV EDX,0x40
MOV dword ptr [EAX + ECX*0x1 + 0x508],0x0
XOR EAX,EAX
CMP dword ptr [ESP + 0x34],0x3f
JG 0x000533d0
SUB ESP,0x4
PUSH dword ptr [ESP + 0x38]
PUSH dword ptr [ESP + 0x38]
PUSH EDI
MOV EDI,dword ptr [ESP + 0x18]
MOV EBX,EDI
CALL 0x00014140
MOV EDI,dword ptr [ESP + 0x44]
ADD dword ptr [EBX + 0xc58],EDI
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDI,dword ptr [ESP + 0x8]
LEA EDI,[EDI + EAX*0x1 + 0xc18]
JMP 0x000534ab
(translation_unit "void FUN_00053370(void *param_1,size_t param_2)\n\n{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  byte *__dest;\n  \n  FUN_0003c47b();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00053370(void *param_1,size_t param_2)\n\n{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  byte *__dest;\n  \n  FUN_0003c47b();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00053370(void *param_1,size_t param_2)" identifier (parameter_list "(void *param_1,size_t param_2)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  byte *__dest;\n  \n  FUN_0003c47b();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }\n  return;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "byte *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (expression_statement "FUN_0003c47b();" (call_expression "FUN_0003c47b()" identifier (argument_list "()" ( ))) ;) (if_statement "if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }" if (parenthesized_expression "(*(int *)(unaff_EDI + 0x52129) != 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x52129) != 0" (pointer_expression "*(int *)(unaff_EDI + 0x52129)" * (cast_expression "(int *)(unaff_EDI + 0x52129)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52129)" ( (binary_expression "unaff_EDI + 0x52129" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }" { (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x52651);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x52651)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) ))))) ;) (expression_statement "__n = 0x40 - iVar3;" (assignment_expression "__n = 0x40 - iVar3" identifier = (binary_expression "0x40 - iVar3" number_literal - identifier)) ;) (if_statement "if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }" if (parenthesized_expression "((int)param_2 < (int)__n)" ( (binary_expression "(int)param_2 < (int)__n" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }" { (expression_statement "__dest = (byte *)(unaff_EDI + 0x52611 + iVar3);" (assignment_expression "__dest = (byte *)(unaff_EDI + 0x52611 + iVar3)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x52611 + iVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52611 + iVar3)" ( (binary_expression "unaff_EDI + 0x52611 + iVar3" (binary_expression "unaff_EDI + 0x52611" identifier + number_literal) + identifier) )))) ;) }) (else_clause "else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }" else (compound_statement "{\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }" { (expression_statement "__dest = (byte *)(unaff_EDI + 0x52611);" (assignment_expression "__dest = (byte *)(unaff_EDI + 0x52611)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x52611)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52611)" ( (binary_expression "unaff_EDI + 0x52611" identifier + number_literal) )))) ;) (expression_statement "pbVar1 = (byte *)(unaff_EDI + 0x52149);" (assignment_expression "pbVar1 = (byte *)(unaff_EDI + 0x52149)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x52149)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52149)" ( (binary_expression "unaff_EDI + 0x52149" identifier + number_literal) )))) ;) (do_statement "do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);" do (compound_statement "{\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      }" { (expression_statement "memcpy(__dest + iVar3,param_1,__n);" (call_expression "memcpy(__dest + iVar3,param_1,__n)" identifier (argument_list "(__dest + iVar3,param_1,__n)" ( (binary_expression "__dest + iVar3" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);" (assignment_expression "iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651)" identifier = (binary_expression "0x40 - *(int *)(unaff_EDI + 0x52651)" number_literal - (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))))) ;) (expression_statement "param_1 = (void *)((int)param_1 + iVar3);" (assignment_expression "param_1 = (void *)((int)param_1 + iVar3)" identifier = (cast_expression "(void *)((int)param_1 + iVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + iVar3)" ( (binary_expression "(int)param_1 + iVar3" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "param_2 = param_2 - iVar3;" (assignment_expression "param_2 = param_2 - iVar3" identifier = (binary_expression "param_2 - iVar3" identifier - identifier)) ;) (expression_statement "FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);" (call_expression "FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest)" identifier (argument_list "((byte *)(unaff_EDI + 0x525fd),__dest)" ( (cast_expression "(byte *)(unaff_EDI + 0x525fd)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525fd)" ( (binary_expression "unaff_EDI + 0x525fd" identifier + number_literal) ))) , identifier ))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (expression_statement "pbVar4 = (byte *)(unaff_EDI + 0x525fd);" (assignment_expression "pbVar4 = (byte *)(unaff_EDI + 0x525fd)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x525fd)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525fd)" ( (binary_expression "unaff_EDI + 0x525fd" identifier + number_literal) )))) ;) (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x525f9);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x525f9)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x525f9)" * (cast_expression "(int *)(unaff_EDI + 0x525f9)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525f9)" ( (binary_expression "unaff_EDI + 0x525f9" identifier + number_literal) ))))) ;) (do_statement "do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);" do (compound_statement "{\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        }" { (while_statement "while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }" while (parenthesized_expression "(0x4af < iVar3)" ( (binary_expression "0x4af < iVar3" number_literal < identifier) )) (compound_statement "{\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }" { (expression_statement "pbVar5 = pbVar4 + 1;" (assignment_expression "pbVar5 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" 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 "*pbVar1 = *pbVar1 ^ *pbVar4;" (assignment_expression "*pbVar1 = *pbVar1 ^ *pbVar4" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ *pbVar4" (pointer_expression "*pbVar1" * identifier) ^ (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar4 = pbVar5;" (assignment_expression "pbVar4 = pbVar5" identifier = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) (if_statement "if (__dest == pbVar5) goto LAB_00053463;" if (parenthesized_expression "(__dest == pbVar5)" ( (binary_expression "__dest == pbVar5" identifier == identifier) )) (goto_statement "goto LAB_00053463;" goto statement_identifier ;)) })) (expression_statement "pbVar5 = pbVar4 + 1;" (assignment_expression "pbVar5 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar6 = iVar3 + 1;" (assignment_expression "iVar6 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;" (assignment_expression "pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4" (subscript_expression "pbVar1[iVar3]" identifier [ identifier ]) = (binary_expression "pbVar1[iVar3] ^ *pbVar4" (subscript_expression "pbVar1[iVar3]" identifier [ identifier ]) ^ (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar4 = pbVar5;" (assignment_expression "pbVar4 = pbVar5" identifier = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) }) while (parenthesized_expression "(__dest != pbVar5)" ( (binary_expression "__dest != pbVar5" identifier != identifier) )) ;) (labeled_statement "LAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;" statement_identifier : (expression_statement "*(int *)(unaff_EDI + 0x525f9) = iVar6;" (assignment_expression "*(int *)(unaff_EDI + 0x525f9) = iVar6" (pointer_expression "*(int *)(unaff_EDI + 0x525f9)" * (cast_expression "(int *)(unaff_EDI + 0x525f9)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525f9)" ( (binary_expression "unaff_EDI + 0x525f9" identifier + number_literal) )))) = identifier) ;)) (if_statement "if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }" if (parenthesized_expression "((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0))" ( (binary_expression "(bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)" (parenthesized_expression "(bVar2)" ( identifier )) && (parenthesized_expression "(*(int *)(unaff_EDI + 0x52655) == 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x52655) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x52655)" * (cast_expression "(int *)(unaff_EDI + 0x52655)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52655)" ( (binary_expression "unaff_EDI + 0x52655" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n          FUN_00052fb0();\n        }" { (expression_statement "FUN_00052fb0();" (call_expression "FUN_00052fb0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "__n = 0x40;" (assignment_expression "__n = 0x40" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(unaff_EDI + 0x52651) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52651) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52651)" * (cast_expression "(undefined4 *)(unaff_EDI + 0x52651)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) while (parenthesized_expression "(0x3f < (int)param_2)" ( (binary_expression "0x3f < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;) }))) (expression_statement "memcpy(__dest,param_1,param_2);" (call_expression "memcpy(__dest,param_1,param_2)" identifier (argument_list "(__dest,param_1,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;" (assignment_expression "*(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2" (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))) = (binary_expression "*(int *)(unaff_EDI + 0x52651) + param_2" (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))) + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void random_add_noise(void *noise,int length)\n\n{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  word32 *pwVar4;\n  word32 *pwVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  word32 *block;\n  \n  __x86_get_pc_thunk_di();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if (length < (int)__n) {\n      block = (word32 *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      block = (word32 *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < length);\n    }\n    memcpy(block,noise,length);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + length;\n  }\n  return;\n}\n\n" (function_definition "void random_add_noise(void *noise,int length)\n\n{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  word32 *pwVar4;\n  word32 *pwVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  word32 *block;\n  \n  __x86_get_pc_thunk_di();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if (length < (int)__n) {\n      block = (word32 *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      block = (word32 *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < length);\n    }\n    memcpy(block,noise,length);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + 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 *pbVar1;\n  bool bVar2;\n  int iVar3;\n  word32 *pwVar4;\n  word32 *pwVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  word32 *block;\n  \n  __x86_get_pc_thunk_di();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if (length < (int)__n) {\n      block = (word32 *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      block = (word32 *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < length);\n    }\n    memcpy(block,noise,length);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + length;\n  }\n  return;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "word32 *pwVar4;" type_identifier (pointer_declarator "*pwVar4" * identifier) ;) (declaration "word32 *pwVar5;" type_identifier (pointer_declarator "*pwVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "word32 *block;" type_identifier (pointer_declarator "*block" * identifier) ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (if_statement "if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if (length < (int)__n) {\n      block = (word32 *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      block = (word32 *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < length);\n    }\n    memcpy(block,noise,length);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + length;\n  }" if (parenthesized_expression "(*(int *)(unaff_EDI + 0x52129) != 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x52129) != 0" (pointer_expression "*(int *)(unaff_EDI + 0x52129)" * (cast_expression "(int *)(unaff_EDI + 0x52129)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52129)" ( (binary_expression "unaff_EDI + 0x52129" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if (length < (int)__n) {\n      block = (word32 *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      block = (word32 *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < length);\n    }\n    memcpy(block,noise,length);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + length;\n  }" { (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x52651);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x52651)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) ))))) ;) (expression_statement "__n = 0x40 - iVar3;" (assignment_expression "__n = 0x40 - iVar3" identifier = (binary_expression "0x40 - iVar3" number_literal - identifier)) ;) (if_statement "if (length < (int)__n) {\n      block = (word32 *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      block = (word32 *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < length);\n    }" if (parenthesized_expression "(length < (int)__n)" ( (binary_expression "length < (int)__n" identifier < (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      block = (word32 *)(unaff_EDI + 0x52611 + iVar3);\n    }" { (expression_statement "block = (word32 *)(unaff_EDI + 0x52611 + iVar3);" (assignment_expression "block = (word32 *)(unaff_EDI + 0x52611 + iVar3)" identifier = (cast_expression "(word32 *)(unaff_EDI + 0x52611 + iVar3)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52611 + iVar3)" ( (binary_expression "unaff_EDI + 0x52611 + iVar3" (binary_expression "unaff_EDI + 0x52611" identifier + number_literal) + identifier) )))) ;) }) (else_clause "else {\n      block = (word32 *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < length);\n    }" else (compound_statement "{\n      block = (word32 *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < length);\n    }" { (expression_statement "block = (word32 *)(unaff_EDI + 0x52611);" (assignment_expression "block = (word32 *)(unaff_EDI + 0x52611)" identifier = (cast_expression "(word32 *)(unaff_EDI + 0x52611)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52611)" ( (binary_expression "unaff_EDI + 0x52611" identifier + number_literal) )))) ;) (expression_statement "pbVar1 = (byte *)(unaff_EDI + 0x52149);" (assignment_expression "pbVar1 = (byte *)(unaff_EDI + 0x52149)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x52149)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52149)" ( (binary_expression "unaff_EDI + 0x52149" identifier + number_literal) )))) ;) (do_statement "do {\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < length);" do (compound_statement "{\n        memcpy((void *)(iVar3 + (int)block),noise,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        noise = (void *)((int)noise + iVar3);\n        length = length - iVar3;\n        SHATransform((word32 *)(unaff_EDI + 0x525fd),block);\n        bVar2 = false;\n        pwVar4 = (word32 *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      }" { (expression_statement "memcpy((void *)(iVar3 + (int)block),noise,__n);" (call_expression "memcpy((void *)(iVar3 + (int)block),noise,__n)" identifier (argument_list "((void *)(iVar3 + (int)block),noise,__n)" ( (cast_expression "(void *)(iVar3 + (int)block)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + (int)block)" ( (binary_expression "iVar3 + (int)block" identifier + (cast_expression "(int)block" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , identifier , identifier ))) ;) (expression_statement "iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);" (assignment_expression "iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651)" identifier = (binary_expression "0x40 - *(int *)(unaff_EDI + 0x52651)" number_literal - (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))))) ;) (expression_statement "noise = (void *)((int)noise + iVar3);" (assignment_expression "noise = (void *)((int)noise + iVar3)" identifier = (cast_expression "(void *)((int)noise + iVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)noise + iVar3)" ( (binary_expression "(int)noise + iVar3" (cast_expression "(int)noise" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "length = length - iVar3;" (assignment_expression "length = length - iVar3" identifier = (binary_expression "length - iVar3" identifier - identifier)) ;) (expression_statement "SHATransform((word32 *)(unaff_EDI + 0x525fd),block);" (call_expression "SHATransform((word32 *)(unaff_EDI + 0x525fd),block)" identifier (argument_list "((word32 *)(unaff_EDI + 0x525fd),block)" ( (cast_expression "(word32 *)(unaff_EDI + 0x525fd)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525fd)" ( (binary_expression "unaff_EDI + 0x525fd" identifier + number_literal) ))) , identifier ))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (expression_statement "pwVar4 = (word32 *)(unaff_EDI + 0x525fd);" (assignment_expression "pwVar4 = (word32 *)(unaff_EDI + 0x525fd)" identifier = (cast_expression "(word32 *)(unaff_EDI + 0x525fd)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525fd)" ( (binary_expression "unaff_EDI + 0x525fd" identifier + number_literal) )))) ;) (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x525f9);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x525f9)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x525f9)" * (cast_expression "(int *)(unaff_EDI + 0x525f9)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525f9)" ( (binary_expression "unaff_EDI + 0x525f9" identifier + number_literal) ))))) ;) (do_statement "do {\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        } while (block != pwVar5);" do (compound_statement "{\n          while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }\n          pwVar5 = (word32 *)((int)pwVar4 + 1);\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;\n          pwVar4 = pwVar5;\n          iVar3 = iVar6;\n        }" { (while_statement "while (0x4af < iVar3) {\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }" while (parenthesized_expression "(0x4af < iVar3)" ( (binary_expression "0x4af < iVar3" number_literal < identifier) )) (compound_statement "{\n            pwVar5 = (word32 *)((int)pwVar4 + 1);\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ (byte)*pwVar4;\n            pwVar4 = pwVar5;\n            iVar3 = iVar6;\n            if (block == pwVar5) goto LAB_00053463;\n          }" { (expression_statement "pwVar5 = (word32 *)((int)pwVar4 + 1);" (assignment_expression "pwVar5 = (word32 *)((int)pwVar4 + 1)" identifier = (cast_expression "(word32 *)((int)pwVar4 + 1)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pwVar4 + 1)" ( (binary_expression "(int)pwVar4 + 1" (cast_expression "(int)pwVar4" ( (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 "*pbVar1 = *pbVar1 ^ (byte)*pwVar4;" (assignment_expression "*pbVar1 = *pbVar1 ^ (byte)*pwVar4" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ (byte)*pwVar4" (pointer_expression "*pbVar1" * identifier) ^ (binary_expression "(byte)*pwVar4" (parenthesized_expression "(byte)" ( identifier )) * identifier))) ;) (expression_statement "pwVar4 = pwVar5;" (assignment_expression "pwVar4 = pwVar5" identifier = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) (if_statement "if (block == pwVar5) goto LAB_00053463;" if (parenthesized_expression "(block == pwVar5)" ( (binary_expression "block == pwVar5" identifier == identifier) )) (goto_statement "goto LAB_00053463;" goto statement_identifier ;)) })) (expression_statement "pwVar5 = (word32 *)((int)pwVar4 + 1);" (assignment_expression "pwVar5 = (word32 *)((int)pwVar4 + 1)" identifier = (cast_expression "(word32 *)((int)pwVar4 + 1)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pwVar4 + 1)" ( (binary_expression "(int)pwVar4 + 1" (cast_expression "(int)pwVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "iVar6 = iVar3 + 1;" (assignment_expression "iVar6 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4;" (assignment_expression "pbVar1[iVar3] = pbVar1[iVar3] ^ (byte)*pwVar4" (subscript_expression "pbVar1[iVar3]" identifier [ identifier ]) = (binary_expression "pbVar1[iVar3] ^ (byte)*pwVar4" (subscript_expression "pbVar1[iVar3]" identifier [ identifier ]) ^ (binary_expression "(byte)*pwVar4" (parenthesized_expression "(byte)" ( identifier )) * identifier))) ;) (expression_statement "pwVar4 = pwVar5;" (assignment_expression "pwVar4 = pwVar5" identifier = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) }) while (parenthesized_expression "(block != pwVar5)" ( (binary_expression "block != pwVar5" identifier != identifier) )) ;) (labeled_statement "LAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;" statement_identifier : (expression_statement "*(int *)(unaff_EDI + 0x525f9) = iVar6;" (assignment_expression "*(int *)(unaff_EDI + 0x525f9) = iVar6" (pointer_expression "*(int *)(unaff_EDI + 0x525f9)" * (cast_expression "(int *)(unaff_EDI + 0x525f9)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525f9)" ( (binary_expression "unaff_EDI + 0x525f9" identifier + number_literal) )))) = identifier) ;)) (if_statement "if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          random_stir();\n        }" if (parenthesized_expression "((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0))" ( (binary_expression "(bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)" (parenthesized_expression "(bVar2)" ( identifier )) && (parenthesized_expression "(*(int *)(unaff_EDI + 0x52655) == 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x52655) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x52655)" * (cast_expression "(int *)(unaff_EDI + 0x52655)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52655)" ( (binary_expression "unaff_EDI + 0x52655" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n          random_stir();\n        }" { (expression_statement "random_stir();" (call_expression "random_stir()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "__n = 0x40;" (assignment_expression "__n = 0x40" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(unaff_EDI + 0x52651) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52651) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52651)" * (cast_expression "(undefined4 *)(unaff_EDI + 0x52651)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) while (parenthesized_expression "(0x3f < length)" ( (binary_expression "0x3f < length" number_literal < identifier) )) ;) }))) (expression_statement "memcpy(block,noise,length);" (call_expression "memcpy(block,noise,length)" identifier (argument_list "(block,noise,length)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + length;" (assignment_expression "*(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + length" (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))) = (binary_expression "*(int *)(unaff_EDI + 0x52651) + length" (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))) + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00053370(void *param_1,size_t param_2)\n\n{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  byte *__dest;\n  \n  FUN_0003c47b();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00053370(void *param_1,size_t param_2)\n\n{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  byte *__dest;\n  \n  FUN_0003c47b();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00053370(void *param_1,size_t param_2)" identifier (parameter_list "(void *param_1,size_t param_2)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  byte *__dest;\n  \n  FUN_0003c47b();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }\n  return;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "byte *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (expression_statement "FUN_0003c47b();" (call_expression "FUN_0003c47b()" identifier (argument_list "()" ( ))) ;) (if_statement "if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }" if (parenthesized_expression "(*(int *)(unaff_EDI + 0x52129) != 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x52129) != 0" (pointer_expression "*(int *)(unaff_EDI + 0x52129)" * (cast_expression "(int *)(unaff_EDI + 0x52129)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52129)" ( (binary_expression "unaff_EDI + 0x52129" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }" { (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x52651);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x52651)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) ))))) ;) (expression_statement "__n = 0x40 - iVar3;" (assignment_expression "__n = 0x40 - iVar3" identifier = (binary_expression "0x40 - iVar3" number_literal - identifier)) ;) (if_statement "if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }" if (parenthesized_expression "((int)param_2 < (int)__n)" ( (binary_expression "(int)param_2 < (int)__n" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }" { (expression_statement "__dest = (byte *)(unaff_EDI + 0x52611 + iVar3);" (assignment_expression "__dest = (byte *)(unaff_EDI + 0x52611 + iVar3)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x52611 + iVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52611 + iVar3)" ( (binary_expression "unaff_EDI + 0x52611 + iVar3" (binary_expression "unaff_EDI + 0x52611" identifier + number_literal) + identifier) )))) ;) }) (else_clause "else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }" else (compound_statement "{\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }" { (expression_statement "__dest = (byte *)(unaff_EDI + 0x52611);" (assignment_expression "__dest = (byte *)(unaff_EDI + 0x52611)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x52611)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52611)" ( (binary_expression "unaff_EDI + 0x52611" identifier + number_literal) )))) ;) (expression_statement "pbVar1 = (byte *)(unaff_EDI + 0x52149);" (assignment_expression "pbVar1 = (byte *)(unaff_EDI + 0x52149)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x52149)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52149)" ( (binary_expression "unaff_EDI + 0x52149" identifier + number_literal) )))) ;) (do_statement "do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);" do (compound_statement "{\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      }" { (expression_statement "memcpy(__dest + iVar3,param_1,__n);" (call_expression "memcpy(__dest + iVar3,param_1,__n)" identifier (argument_list "(__dest + iVar3,param_1,__n)" ( (binary_expression "__dest + iVar3" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);" (assignment_expression "iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651)" identifier = (binary_expression "0x40 - *(int *)(unaff_EDI + 0x52651)" number_literal - (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))))) ;) (expression_statement "param_1 = (void *)((int)param_1 + iVar3);" (assignment_expression "param_1 = (void *)((int)param_1 + iVar3)" identifier = (cast_expression "(void *)((int)param_1 + iVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + iVar3)" ( (binary_expression "(int)param_1 + iVar3" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "param_2 = param_2 - iVar3;" (assignment_expression "param_2 = param_2 - iVar3" identifier = (binary_expression "param_2 - iVar3" identifier - identifier)) ;) (expression_statement "FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);" (call_expression "FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest)" identifier (argument_list "((byte *)(unaff_EDI + 0x525fd),__dest)" ( (cast_expression "(byte *)(unaff_EDI + 0x525fd)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525fd)" ( (binary_expression "unaff_EDI + 0x525fd" identifier + number_literal) ))) , identifier ))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (expression_statement "pbVar4 = (byte *)(unaff_EDI + 0x525fd);" (assignment_expression "pbVar4 = (byte *)(unaff_EDI + 0x525fd)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x525fd)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525fd)" ( (binary_expression "unaff_EDI + 0x525fd" identifier + number_literal) )))) ;) (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x525f9);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x525f9)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x525f9)" * (cast_expression "(int *)(unaff_EDI + 0x525f9)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525f9)" ( (binary_expression "unaff_EDI + 0x525f9" identifier + number_literal) ))))) ;) (do_statement "do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);" do (compound_statement "{\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        }" { (while_statement "while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }" while (parenthesized_expression "(0x4af < iVar3)" ( (binary_expression "0x4af < iVar3" number_literal < identifier) )) (compound_statement "{\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }" { (expression_statement "pbVar5 = pbVar4 + 1;" (assignment_expression "pbVar5 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" 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 "*pbVar1 = *pbVar1 ^ *pbVar4;" (assignment_expression "*pbVar1 = *pbVar1 ^ *pbVar4" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 ^ *pbVar4" (pointer_expression "*pbVar1" * identifier) ^ (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar4 = pbVar5;" (assignment_expression "pbVar4 = pbVar5" identifier = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) (if_statement "if (__dest == pbVar5) goto LAB_00053463;" if (parenthesized_expression "(__dest == pbVar5)" ( (binary_expression "__dest == pbVar5" identifier == identifier) )) (goto_statement "goto LAB_00053463;" goto statement_identifier ;)) })) (expression_statement "pbVar5 = pbVar4 + 1;" (assignment_expression "pbVar5 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar6 = iVar3 + 1;" (assignment_expression "iVar6 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;" (assignment_expression "pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4" (subscript_expression "pbVar1[iVar3]" identifier [ identifier ]) = (binary_expression "pbVar1[iVar3] ^ *pbVar4" (subscript_expression "pbVar1[iVar3]" identifier [ identifier ]) ^ (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar4 = pbVar5;" (assignment_expression "pbVar4 = pbVar5" identifier = identifier) ;) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" identifier = identifier) ;) }) while (parenthesized_expression "(__dest != pbVar5)" ( (binary_expression "__dest != pbVar5" identifier != identifier) )) ;) (labeled_statement "LAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;" statement_identifier : (expression_statement "*(int *)(unaff_EDI + 0x525f9) = iVar6;" (assignment_expression "*(int *)(unaff_EDI + 0x525f9) = iVar6" (pointer_expression "*(int *)(unaff_EDI + 0x525f9)" * (cast_expression "(int *)(unaff_EDI + 0x525f9)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x525f9)" ( (binary_expression "unaff_EDI + 0x525f9" identifier + number_literal) )))) = identifier) ;)) (if_statement "if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }" if (parenthesized_expression "((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0))" ( (binary_expression "(bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)" (parenthesized_expression "(bVar2)" ( identifier )) && (parenthesized_expression "(*(int *)(unaff_EDI + 0x52655) == 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x52655) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x52655)" * (cast_expression "(int *)(unaff_EDI + 0x52655)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52655)" ( (binary_expression "unaff_EDI + 0x52655" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n          FUN_00052fb0();\n        }" { (expression_statement "FUN_00052fb0();" (call_expression "FUN_00052fb0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "__n = 0x40;" (assignment_expression "__n = 0x40" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(unaff_EDI + 0x52651) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52651) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52651)" * (cast_expression "(undefined4 *)(unaff_EDI + 0x52651)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) while (parenthesized_expression "(0x3f < (int)param_2)" ( (binary_expression "0x3f < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;) }))) (expression_statement "memcpy(__dest,param_1,param_2);" (call_expression "memcpy(__dest,param_1,param_2)" identifier (argument_list "(__dest,param_1,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;" (assignment_expression "*(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2" (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))) = (binary_expression "*(int *)(unaff_EDI + 0x52651) + param_2" (pointer_expression "*(int *)(unaff_EDI + 0x52651)" * (cast_expression "(int *)(unaff_EDI + 0x52651)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52651)" ( (binary_expression "unaff_EDI + 0x52651" identifier + number_literal) )))) + identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE 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) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (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 (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 (cast_expression ( (type_descriptor TYPE) ) IDENT) < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (do_statement do (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression LIT - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (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) ))))) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (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) ^ (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (binary_expression (subscript_expression IDENT [ IDENT ]) ^ (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_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 IDENT = LIT) ;) (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) ;) }) while (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) ;) }))) (expression_statement (call_expression 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 FUN_00053370(void *param_1,size_t param_2)\n\n{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  byte *__dest;\n  \n  FUN_0003c47b();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00053370(void *param_1,size_t param_2)" (identifier "FUN_00053370") (parameter_list "(void *param_1,size_t param_2)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "size_t param_2" (primitive_type "size_t") (identifier "param_2")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  bool bVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int iVar6;\n  size_t __n;\n  int unaff_EDI;\n  byte *__dest;\n  \n  FUN_0003c47b();\n  if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }\n  return;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (declaration "byte *__dest;" (type_identifier "byte") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (expression_statement "FUN_0003c47b();" (call_expression "FUN_0003c47b()" (identifier "FUN_0003c47b") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (*(int *)(unaff_EDI + 0x52129) != 0) {\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }" (if "if") (parenthesized_expression "(*(int *)(unaff_EDI + 0x52129) != 0)" (( "(") (binary_expression "*(int *)(unaff_EDI + 0x52129) != 0" (pointer_expression "*(int *)(unaff_EDI + 0x52129)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x52129)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52129)" (( "(") (binary_expression "unaff_EDI + 0x52129" (identifier "unaff_EDI") (+ "+") (number_literal "0x52129")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = *(int *)(unaff_EDI + 0x52651);\n    __n = 0x40 - iVar3;\n    if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }\n    memcpy(__dest,param_1,param_2);\n    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;\n  }" ({ "{") (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x52651);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x52651)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(unaff_EDI + 0x52651)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x52651)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52651)" (( "(") (binary_expression "unaff_EDI + 0x52651" (identifier "unaff_EDI") (+ "+") (number_literal "0x52651")) () ")"))))) (; ";")) (expression_statement "__n = 0x40 - iVar3;" (assignment_expression "__n = 0x40 - iVar3" (identifier "__n") (= "=") (binary_expression "0x40 - iVar3" (number_literal "0x40") (- "-") (identifier "iVar3"))) (; ";")) (if_statement "if ((int)param_2 < (int)__n) {\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }\n    else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }" (if "if") (parenthesized_expression "((int)param_2 < (int)__n)" (( "(") (binary_expression "(int)param_2 < (int)__n" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (< "<") (cast_expression "(int)__n" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__n"))) () ")")) (compound_statement "{\n      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);\n    }" ({ "{") (expression_statement "__dest = (byte *)(unaff_EDI + 0x52611 + iVar3);" (assignment_expression "__dest = (byte *)(unaff_EDI + 0x52611 + iVar3)" (identifier "__dest") (= "=") (cast_expression "(byte *)(unaff_EDI + 0x52611 + iVar3)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52611 + iVar3)" (( "(") (binary_expression "unaff_EDI + 0x52611 + iVar3" (binary_expression "unaff_EDI + 0x52611" (identifier "unaff_EDI") (+ "+") (number_literal "0x52611")) (+ "+") (identifier "iVar3")) () ")")))) (; ";")) (} "}")) (else_clause "else {\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }" (else "else") (compound_statement "{\n      __dest = (byte *)(unaff_EDI + 0x52611);\n      pbVar1 = (byte *)(unaff_EDI + 0x52149);\n      do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);\n    }" ({ "{") (expression_statement "__dest = (byte *)(unaff_EDI + 0x52611);" (assignment_expression "__dest = (byte *)(unaff_EDI + 0x52611)" (identifier "__dest") (= "=") (cast_expression "(byte *)(unaff_EDI + 0x52611)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52611)" (( "(") (binary_expression "unaff_EDI + 0x52611" (identifier "unaff_EDI") (+ "+") (number_literal "0x52611")) () ")")))) (; ";")) (expression_statement "pbVar1 = (byte *)(unaff_EDI + 0x52149);" (assignment_expression "pbVar1 = (byte *)(unaff_EDI + 0x52149)" (identifier "pbVar1") (= "=") (cast_expression "(byte *)(unaff_EDI + 0x52149)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52149)" (( "(") (binary_expression "unaff_EDI + 0x52149" (identifier "unaff_EDI") (+ "+") (number_literal "0x52149")) () ")")))) (; ";")) (do_statement "do {\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      } while (0x3f < (int)param_2);" (do "do") (compound_statement "{\n        memcpy(__dest + iVar3,param_1,__n);\n        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);\n        param_1 = (void *)((int)param_1 + iVar3);\n        param_2 = param_2 - iVar3;\n        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);\n        bVar2 = false;\n        pbVar4 = (byte *)(unaff_EDI + 0x525fd);\n        iVar3 = *(int *)(unaff_EDI + 0x525f9);\n        do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);\nLAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;\n        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }\n        __n = 0x40;\n        *(undefined4 *)(unaff_EDI + 0x52651) = 0;\n        iVar3 = 0;\n      }" ({ "{") (expression_statement "memcpy(__dest + iVar3,param_1,__n);" (call_expression "memcpy(__dest + iVar3,param_1,__n)" (identifier "memcpy") (argument_list "(__dest + iVar3,param_1,__n)" (( "(") (binary_expression "__dest + iVar3" (identifier "__dest") (+ "+") (identifier "iVar3")) (, ",") (identifier "param_1") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);" (assignment_expression "iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651)" (identifier "iVar3") (= "=") (binary_expression "0x40 - *(int *)(unaff_EDI + 0x52651)" (number_literal "0x40") (- "-") (pointer_expression "*(int *)(unaff_EDI + 0x52651)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x52651)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52651)" (( "(") (binary_expression "unaff_EDI + 0x52651" (identifier "unaff_EDI") (+ "+") (number_literal "0x52651")) () ")")))))) (; ";")) (expression_statement "param_1 = (void *)((int)param_1 + iVar3);" (assignment_expression "param_1 = (void *)((int)param_1 + iVar3)" (identifier "param_1") (= "=") (cast_expression "(void *)((int)param_1 + iVar3)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + iVar3)" (( "(") (binary_expression "(int)param_1 + iVar3" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (identifier "iVar3")) () ")")))) (; ";")) (expression_statement "param_2 = param_2 - iVar3;" (assignment_expression "param_2 = param_2 - iVar3" (identifier "param_2") (= "=") (binary_expression "param_2 - iVar3" (identifier "param_2") (- "-") (identifier "iVar3"))) (; ";")) (expression_statement "FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);" (call_expression "FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest)" (identifier "FUN_000586d0") (argument_list "((byte *)(unaff_EDI + 0x525fd),__dest)" (( "(") (cast_expression "(byte *)(unaff_EDI + 0x525fd)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x525fd)" (( "(") (binary_expression "unaff_EDI + 0x525fd" (identifier "unaff_EDI") (+ "+") (number_literal "0x525fd")) () ")"))) (, ",") (identifier "__dest") () ")"))) (; ";")) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (expression_statement "pbVar4 = (byte *)(unaff_EDI + 0x525fd);" (assignment_expression "pbVar4 = (byte *)(unaff_EDI + 0x525fd)" (identifier "pbVar4") (= "=") (cast_expression "(byte *)(unaff_EDI + 0x525fd)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x525fd)" (( "(") (binary_expression "unaff_EDI + 0x525fd" (identifier "unaff_EDI") (+ "+") (number_literal "0x525fd")) () ")")))) (; ";")) (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x525f9);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x525f9)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(unaff_EDI + 0x525f9)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x525f9)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x525f9)" (( "(") (binary_expression "unaff_EDI + 0x525f9" (identifier "unaff_EDI") (+ "+") (number_literal "0x525f9")) () ")"))))) (; ";")) (do_statement "do {\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        } while (__dest != pbVar5);" (do "do") (compound_statement "{\n          while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }\n          pbVar5 = pbVar4 + 1;\n          iVar6 = iVar3 + 1;\n          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;\n          pbVar4 = pbVar5;\n          iVar3 = iVar6;\n        }" ({ "{") (while_statement "while (0x4af < iVar3) {\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }" (while "while") (parenthesized_expression "(0x4af < iVar3)" (( "(") (binary_expression "0x4af < iVar3" (number_literal "0x4af") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n            pbVar5 = pbVar4 + 1;\n            iVar6 = 1;\n            bVar2 = true;\n            *pbVar1 = *pbVar1 ^ *pbVar4;\n            pbVar4 = pbVar5;\n            iVar3 = iVar6;\n            if (__dest == pbVar5) goto LAB_00053463;\n          }" ({ "{") (expression_statement "pbVar5 = pbVar4 + 1;" (assignment_expression "pbVar5 = pbVar4 + 1" (identifier "pbVar5") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar6 = 1;" (assignment_expression "iVar6 = 1" (identifier "iVar6") (= "=") (number_literal "1")) (; ";")) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" (identifier "bVar2") (= "=") (true "true")) (; ";")) (expression_statement "*pbVar1 = *pbVar1 ^ *pbVar4;" (assignment_expression "*pbVar1 = *pbVar1 ^ *pbVar4" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (binary_expression "*pbVar1 ^ *pbVar4" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (^ "^") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")))) (; ";")) (expression_statement "pbVar4 = pbVar5;" (assignment_expression "pbVar4 = pbVar5" (identifier "pbVar4") (= "=") (identifier "pbVar5")) (; ";")) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" (identifier "iVar3") (= "=") (identifier "iVar6")) (; ";")) (if_statement "if (__dest == pbVar5) goto LAB_00053463;" (if "if") (parenthesized_expression "(__dest == pbVar5)" (( "(") (binary_expression "__dest == pbVar5" (identifier "__dest") (== "==") (identifier "pbVar5")) () ")")) (goto_statement "goto LAB_00053463;" (goto "goto") (statement_identifier "LAB_00053463") (; ";"))) (} "}"))) (expression_statement "pbVar5 = pbVar4 + 1;" (assignment_expression "pbVar5 = pbVar4 + 1" (identifier "pbVar5") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar6 = iVar3 + 1;" (assignment_expression "iVar6 = iVar3 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;" (assignment_expression "pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4" (subscript_expression "pbVar1[iVar3]" (identifier "pbVar1") ([ "[") (identifier "iVar3") (] "]")) (= "=") (binary_expression "pbVar1[iVar3] ^ *pbVar4" (subscript_expression "pbVar1[iVar3]" (identifier "pbVar1") ([ "[") (identifier "iVar3") (] "]")) (^ "^") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")))) (; ";")) (expression_statement "pbVar4 = pbVar5;" (assignment_expression "pbVar4 = pbVar5" (identifier "pbVar4") (= "=") (identifier "pbVar5")) (; ";")) (expression_statement "iVar3 = iVar6;" (assignment_expression "iVar3 = iVar6" (identifier "iVar3") (= "=") (identifier "iVar6")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(__dest != pbVar5)" (( "(") (binary_expression "__dest != pbVar5" (identifier "__dest") (!= "!=") (identifier "pbVar5")) () ")")) (; ";")) (labeled_statement "LAB_00053463:\n        *(int *)(unaff_EDI + 0x525f9) = iVar6;" (statement_identifier "LAB_00053463") (: ":") (expression_statement "*(int *)(unaff_EDI + 0x525f9) = iVar6;" (assignment_expression "*(int *)(unaff_EDI + 0x525f9) = iVar6" (pointer_expression "*(int *)(unaff_EDI + 0x525f9)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x525f9)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x525f9)" (( "(") (binary_expression "unaff_EDI + 0x525f9" (identifier "unaff_EDI") (+ "+") (number_literal "0x525f9")) () ")")))) (= "=") (identifier "iVar6")) (; ";"))) (if_statement "if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {\n          FUN_00052fb0();\n        }" (if "if") (parenthesized_expression "((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0))" (( "(") (binary_expression "(bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)" (parenthesized_expression "(bVar2)" (( "(") (identifier "bVar2") () ")")) (&& "&&") (parenthesized_expression "(*(int *)(unaff_EDI + 0x52655) == 0)" (( "(") (binary_expression "*(int *)(unaff_EDI + 0x52655) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x52655)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x52655)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52655)" (( "(") (binary_expression "unaff_EDI + 0x52655" (identifier "unaff_EDI") (+ "+") (number_literal "0x52655")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n          FUN_00052fb0();\n        }" ({ "{") (expression_statement "FUN_00052fb0();" (call_expression "FUN_00052fb0()" (identifier "FUN_00052fb0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "__n = 0x40;" (assignment_expression "__n = 0x40" (identifier "__n") (= "=") (number_literal "0x40")) (; ";")) (expression_statement "*(undefined4 *)(unaff_EDI + 0x52651) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52651) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52651)" (* "*") (cast_expression "(undefined4 *)(unaff_EDI + 0x52651)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52651)" (( "(") (binary_expression "unaff_EDI + 0x52651" (identifier "unaff_EDI") (+ "+") (number_literal "0x52651")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(0x3f < (int)param_2)" (( "(") (binary_expression "0x3f < (int)param_2" (number_literal "0x3f") (< "<") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")")) (; ";")) (} "}")))) (expression_statement "memcpy(__dest,param_1,param_2);" (call_expression "memcpy(__dest,param_1,param_2)" (identifier "memcpy") (argument_list "(__dest,param_1,param_2)" (( "(") (identifier "__dest") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "*(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;" (assignment_expression "*(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2" (pointer_expression "*(int *)(unaff_EDI + 0x52651)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x52651)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52651)" (( "(") (binary_expression "unaff_EDI + 0x52651" (identifier "unaff_EDI") (+ "+") (number_literal "0x52651")) () ")")))) (= "=") (binary_expression "*(int *)(unaff_EDI + 0x52651) + param_2" (pointer_expression "*(int *)(unaff_EDI + 0x52651)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x52651)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52651)" (( "(") (binary_expression "unaff_EDI + 0x52651" (identifier "unaff_EDI") (+ "+") (number_literal "0x52651")) () ")")))) (+ "+") (identifier "param_2"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(void *noise,int var_4)

{
  type_1 *pbVar1;
  bool bVar2;
  int var_3;
  type_2 *var_7;
  type_2 *var_9;
  int iVar6;
  size_t __n;
  int var_2;
  type_2 *var_8;
  
  var_1();
  if (*(int *)(var_2 + 0x52129) != 0) {
    var_3 = *(int *)(var_2 + 0x52651);
    __n = 0x40 - var_3;
    if (var_4 < (int)__n) {
      var_8 = (type_2 *)(var_2 + 0x52611 + var_3);
    }
    else {
      var_8 = (type_2 *)(var_2 + 0x52611);
      pbVar1 = (type_1 *)(var_2 + 0x52149);
      do {
        var_5((void *)(var_3 + (int)var_8),noise,__n);
        var_3 = 0x40 - *(int *)(var_2 + 0x52651);
        noise = (void *)((int)noise + var_3);
        var_4 = var_4 - var_3;
        var_6((type_2 *)(var_2 + 0x525fd),var_8);
        bVar2 = false;
        var_7 = (type_2 *)(var_2 + 0x525fd);
        var_3 = *(int *)(var_2 + 0x525f9);
        do {
          while (0x4af < var_3) {
            var_9 = (type_2 *)((int)var_7 + 1);
            iVar6 = 1;
            bVar2 = true;
            *pbVar1 = *pbVar1 ^ (type_1)*var_7;
            var_7 = var_9;
            var_3 = iVar6;
            if (var_8 == var_9) goto LAB_00053463;
          }
          var_9 = (type_2 *)((int)var_7 + 1);
          iVar6 = var_3 + 1;
          pbVar1[var_3] = pbVar1[var_3] ^ (type_1)*var_7;
          var_7 = var_9;
          var_3 = iVar6;
        } while (var_8 != var_9);
LAB_00053463:
        *(int *)(var_2 + 0x525f9) = iVar6;
        if ((bVar2) && (*(int *)(var_2 + 0x52655) == 0)) {
          var_10();
        }
        __n = 0x40;
        *(type_3 *)(var_2 + 0x52651) = 0;
        var_3 = 0;
      } while (0x3f < var_4);
    }
    var_5(var_8,noise,var_4);
    *(int *)(var_2 + 0x52651) = *(int *)(var_2 + 0x52651) + var_4;
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator 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: (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))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (if_statement condition: (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 (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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (do_statement body: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (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: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (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))))))) (do_statement body: (compound_statement (while_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) body: (compound_statement (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: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (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: (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: (subscript_expression argument: (identifier) index: (identifier)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (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: (identifier) right: (number_literal))) (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)))) condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))))) (expression_statement (call_expression function: (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(void *param_1,size_t param_2)

{
  byte *pbVar1;
  bool bVar2;
  int iVar3;
  byte *pbVar4;
  byte *pbVar5;
  int iVar6;
  size_t __n;
  int unaff_EDI;
  byte *__dest;
  
  FUN_0003c47b();
  if (*(int *)(unaff_EDI + 0x52129) != 0) {
    iVar3 = *(int *)(unaff_EDI + 0x52651);
    __n = 0x40 - iVar3;
    if ((int)param_2 < (int)__n) {
      __dest = (byte *)(unaff_EDI + 0x52611 + iVar3);
    }
    else {
      __dest = (byte *)(unaff_EDI + 0x52611);
      pbVar1 = (byte *)(unaff_EDI + 0x52149);
      do {
        memcpy(__dest + iVar3,param_1,__n);
        iVar3 = 0x40 - *(int *)(unaff_EDI + 0x52651);
        param_1 = (void *)((int)param_1 + iVar3);
        param_2 = param_2 - iVar3;
        FUN_000586d0((byte *)(unaff_EDI + 0x525fd),__dest);
        bVar2 = false;
        pbVar4 = (byte *)(unaff_EDI + 0x525fd);
        iVar3 = *(int *)(unaff_EDI + 0x525f9);
        do {
          while (0x4af < iVar3) {
            pbVar5 = pbVar4 + 1;
            iVar6 = 1;
            bVar2 = true;
            *pbVar1 = *pbVar1 ^ *pbVar4;
            pbVar4 = pbVar5;
            iVar3 = iVar6;
            if (__dest == pbVar5) goto LAB_00053463;
          }
          pbVar5 = pbVar4 + 1;
          iVar6 = iVar3 + 1;
          pbVar1[iVar3] = pbVar1[iVar3] ^ *pbVar4;
          pbVar4 = pbVar5;
          iVar3 = iVar6;
        } while (__dest != pbVar5);
LAB_00053463:
        *(int *)(unaff_EDI + 0x525f9) = iVar6;
        if ((bVar2) && (*(int *)(unaff_EDI + 0x52655) == 0)) {
          FUN_00052fb0();
        }
        __n = 0x40;
        *(undefined4 *)(unaff_EDI + 0x52651) = 0;
        iVar3 = 0;
      } while (0x3f < (int)param_2);
    }
    memcpy(__dest,param_1,param_2);
    *(int *)(unaff_EDI + 0x52651) = *(int *)(unaff_EDI + 0x52651) + param_2;
  }
  return;
}

