
void random_add_heavynoise_bitbybit(void *noise,int length)

{
  int iVar1;
  byte *pbVar2;
  int iVar3;
  int extraout_ECX;
  int iVar4;
  byte *pbVar5;
  byte *pbVar6;
  int unaff_EDI;
  
  __x86_get_pc_thunk_di();
  iVar3 = *(int *)(unaff_EDI + 0x52065);
  iVar4 = extraout_ECX - iVar3;
  if (iVar4 <= length) {
    if (iVar4 < 1) goto LAB_00057850;
    do {
      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);
      pbVar5 = (byte *)((int)noise + iVar4);
      pbVar6 = (byte *)noise;
      do {
        noise = pbVar6 + 1;
        *pbVar2 = *pbVar2 ^ *pbVar6;
        pbVar2 = pbVar2 + 1;
        pbVar6 = (byte *)noise;
      } while ((byte *)noise != pbVar5);
LAB_00057850:
      if (*(int *)(unaff_EDI + 0x520c1) == 0) {
        random_stir();
      }
      iVar1 = *(int *)(unaff_EDI + 0x52065);
      iVar3 = 0;
      iVar4 = 0x4b0;
      *(undefined4 *)(unaff_EDI + 0x52065) = 0;
      length = length + iVar1 + -0x4b0;
    } while (0x4af < length);
  }
  if (length < 1) {
    *(undefined4 *)(unaff_EDI + 0x52065) = 0;
    return;
  }
  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);
  pbVar6 = pbVar2 + length;
  do {
                    /* WARNING: Load size is inaccurate */
    *pbVar2 = *pbVar2 ^ *noise;
    pbVar2 = pbVar2 + 1;
    noise = (void *)((int)noise + 1);
  } while (pbVar2 != pbVar6);
  *(int *)(unaff_EDI + 0x52065) = length;
  return;
}



void FUN_00057800(byte *param_1,int param_2)

{
  int iVar1;
  byte *pbVar2;
  int iVar3;
  int extraout_ECX;
  int iVar4;
  byte *pbVar5;
  byte *pbVar6;
  int unaff_EDI;
  
  FUN_000409cb();
  iVar3 = *(int *)(unaff_EDI + 0x52065);
  iVar4 = extraout_ECX - iVar3;
  if (iVar4 <= param_2) {
    if (iVar4 < 1) goto LAB_00057850;
    do {
      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);
      pbVar5 = param_1 + iVar4;
      pbVar6 = param_1;
      do {
        param_1 = pbVar6 + 1;
        *pbVar2 = *pbVar2 ^ *pbVar6;
        pbVar2 = pbVar2 + 1;
        pbVar6 = param_1;
      } while (param_1 != pbVar5);
LAB_00057850:
      if (*(int *)(unaff_EDI + 0x520c1) == 0) {
        FUN_00057500();
      }
      iVar1 = *(int *)(unaff_EDI + 0x52065);
      iVar3 = 0;
      iVar4 = 0x4b0;
      *(undefined4 *)(unaff_EDI + 0x52065) = 0;
      param_2 = param_2 + iVar1 + -0x4b0;
    } while (0x4af < param_2);
  }
  if (param_2 < 1) {
    *(undefined4 *)(unaff_EDI + 0x52065) = 0;
    return;
  }
  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);
  pbVar6 = pbVar2 + param_2;
  do {
    *pbVar2 = *pbVar2 ^ *param_1;
    pbVar2 = pbVar2 + 1;
    param_1 = param_1 + 1;
  } while (pbVar2 != pbVar6);
  *(int *)(unaff_EDI + 0x52065) = param_2;
  return;
}


PUSH EDI
MOV ECX,0x4b0
CALL 0x000409cb
ADD EDI,0x51565
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x14]
MOV EBX,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [EDI + 0xb00]
SUB ECX,EAX
CMP ESI,ECX
JL 0x00057884
TEST ECX,ECX
JLE 0x00057850
LEA ESI,[ESI]
NOP
LEA EAX,[EDI + EAX*0x1 + 0x650]
ADD ECX,EBX
LEA ESI,[ESI]
ADD EBX,0x1
MOVZX EDX,byte ptr [EBX + -0x1]
XOR byte ptr [EAX],DL
ADD EAX,0x1
CMP EBX,ECX
JNZ 0x00057840
MOV EAX,dword ptr [EDI + 0xb5c]
TEST EAX,EAX
JNZ 0x0005785f
CALL 0x00057500
ADD ESI,dword ptr [EDI + 0xb00]
XOR EAX,EAX
MOV ECX,0x4b0
MOV dword ptr [EDI + 0xb00],0x0
SUB ESI,0x4b0
CMP ESI,0x4af
JG 0x00057830
TEST ESI,ESI
JLE 0x000578b1
LEA EDX,[EDI + 0x650]
LEA ECX,[ESI + EDX*0x1]
LEA ESI,[ESI]
MOVZX EAX,byte ptr [EBX]
XOR byte ptr [EDX],AL
ADD EDX,0x1
ADD EBX,0x1
CMP EDX,ECX
JNZ 0x00057898
MOV dword ptr [EDI + 0xb00],ESI
POP EBX
POP ESI
POP EDI
RET
XOR ESI,ESI
POP EBX
MOV dword ptr [EDI + 0xb00],ESI
POP ESI
POP EDI
RET
(translation_unit "void FUN_00057800(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  FUN_000409cb();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }\n  if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + param_2;\n  do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = param_2;\n  return;\n}\n\n" (function_definition "void FUN_00057800(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  FUN_000409cb();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }\n  if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + param_2;\n  do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = param_2;\n  return;\n}" primitive_type (function_declarator "FUN_00057800(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  FUN_000409cb();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }\n  if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + param_2;\n  do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = param_2;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int extraout_ECX;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "FUN_000409cb();" (call_expression "FUN_000409cb()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x52065);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x52065)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x52065)" * (cast_expression "(int *)(unaff_EDI + 0x52065)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = extraout_ECX - iVar3;" (assignment_expression "iVar4 = extraout_ECX - iVar3" identifier = (binary_expression "extraout_ECX - iVar3" identifier - identifier)) ;) (if_statement "if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }" if (parenthesized_expression "(iVar4 <= param_2)" ( (binary_expression "iVar4 <= param_2" identifier <= identifier) )) (compound_statement "{\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }" { (if_statement "if (iVar4 < 1) goto LAB_00057850;" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (goto_statement "goto LAB_00057850;" goto statement_identifier ;)) (do_statement "do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);" do (compound_statement "{\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    }" { (expression_statement "pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);" (assignment_expression "pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x51bb5 + iVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x51bb5 + iVar3)" ( (binary_expression "unaff_EDI + 0x51bb5 + iVar3" (binary_expression "unaff_EDI + 0x51bb5" identifier + number_literal) + identifier) )))) ;) (expression_statement "pbVar5 = param_1 + iVar4;" (assignment_expression "pbVar5 = param_1 + iVar4" identifier = (binary_expression "param_1 + iVar4" identifier + identifier)) ;) (expression_statement "pbVar6 = param_1;" (assignment_expression "pbVar6 = param_1" identifier = identifier) ;) (do_statement "do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);" do (compound_statement "{\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      }" { (expression_statement "param_1 = pbVar6 + 1;" (assignment_expression "param_1 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar2 = *pbVar2 ^ *pbVar6;" (assignment_expression "*pbVar2 = *pbVar2 ^ *pbVar6" (pointer_expression "*pbVar2" * identifier) = (binary_expression "*pbVar2 ^ *pbVar6" (pointer_expression "*pbVar2" * identifier) ^ (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "pbVar6 = param_1;" (assignment_expression "pbVar6 = param_1" identifier = identifier) ;) }) while (parenthesized_expression "(param_1 != pbVar5)" ( (binary_expression "param_1 != pbVar5" identifier != identifier) )) ;) (labeled_statement "LAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }" statement_identifier : (if_statement "if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }" if (parenthesized_expression "(*(int *)(unaff_EDI + 0x520c1) == 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x520c1) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x520c1)" * (cast_expression "(int *)(unaff_EDI + 0x520c1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x520c1)" ( (binary_expression "unaff_EDI + 0x520c1" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        FUN_00057500();\n      }" { (expression_statement "FUN_00057500();" (call_expression "FUN_00057500()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "iVar1 = *(int *)(unaff_EDI + 0x52065);" (assignment_expression "iVar1 = *(int *)(unaff_EDI + 0x52065)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x52065)" * (cast_expression "(int *)(unaff_EDI + 0x52065)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = 0x4b0;" (assignment_expression "iVar4 = 0x4b0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(unaff_EDI + 0x52065) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52065) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52065)" * (cast_expression "(undefined4 *)(unaff_EDI + 0x52065)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) )))) = number_literal) ;) (expression_statement "param_2 = param_2 + iVar1 + -0x4b0;" (assignment_expression "param_2 = param_2 + iVar1 + -0x4b0" identifier = (binary_expression "param_2 + iVar1 + -0x4b0" (binary_expression "param_2 + iVar1" identifier + identifier) + number_literal)) ;) }) while (parenthesized_expression "(0x4af < param_2)" ( (binary_expression "0x4af < param_2" number_literal < identifier) )) ;) })) (if_statement "if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }" if (parenthesized_expression "(param_2 < 1)" ( (binary_expression "param_2 < 1" identifier < number_literal) )) (compound_statement "{\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }" { (expression_statement "*(undefined4 *)(unaff_EDI + 0x52065) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52065) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52065)" * (cast_expression "(undefined4 *)(unaff_EDI + 0x52065)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "pbVar2 = (byte *)(unaff_EDI + 0x51bb5);" (assignment_expression "pbVar2 = (byte *)(unaff_EDI + 0x51bb5)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x51bb5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x51bb5)" ( (binary_expression "unaff_EDI + 0x51bb5" identifier + number_literal) )))) ;) (expression_statement "pbVar6 = pbVar2 + param_2;" (assignment_expression "pbVar6 = pbVar2 + param_2" identifier = (binary_expression "pbVar2 + param_2" identifier + identifier)) ;) (do_statement "do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);" do (compound_statement "{\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  }" { (expression_statement "*pbVar2 = *pbVar2 ^ *param_1;" (assignment_expression "*pbVar2 = *pbVar2 ^ *param_1" (pointer_expression "*pbVar2" * identifier) = (binary_expression "*pbVar2 ^ *param_1" (pointer_expression "*pbVar2" * identifier) ^ (pointer_expression "*param_1" * identifier))) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar2 != pbVar6)" ( (binary_expression "pbVar2 != pbVar6" identifier != identifier) )) ;) (expression_statement "*(int *)(unaff_EDI + 0x52065) = param_2;" (assignment_expression "*(int *)(unaff_EDI + 0x52065) = param_2" (pointer_expression "*(int *)(unaff_EDI + 0x52065)" * (cast_expression "(int *)(unaff_EDI + 0x52065)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void random_add_heavynoise_bitbybit(void *noise,int length)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= length) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = (byte *)((int)noise + iVar4);\n      pbVar6 = (byte *)noise;\n      do {\n        noise = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = (byte *)noise;\n      } while ((byte *)noise != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        random_stir();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      length = length + iVar1 + -0x4b0;\n    } while (0x4af < length);\n  }\n  if (length < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + length;\n  do {\n                    /* WARNING: Load size is inaccurate */\n    *pbVar2 = *pbVar2 ^ *noise;\n    pbVar2 = pbVar2 + 1;\n    noise = (void *)((int)noise + 1);\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = length;\n  return;\n}\n\n" (function_definition "void random_add_heavynoise_bitbybit(void *noise,int length)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= length) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = (byte *)((int)noise + iVar4);\n      pbVar6 = (byte *)noise;\n      do {\n        noise = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = (byte *)noise;\n      } while ((byte *)noise != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        random_stir();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      length = length + iVar1 + -0x4b0;\n    } while (0x4af < length);\n  }\n  if (length < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + length;\n  do {\n                    /* WARNING: Load size is inaccurate */\n    *pbVar2 = *pbVar2 ^ *noise;\n    pbVar2 = pbVar2 + 1;\n    noise = (void *)((int)noise + 1);\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = length;\n  return;\n}" primitive_type (function_declarator "random_add_heavynoise_bitbybit(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  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= length) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = (byte *)((int)noise + iVar4);\n      pbVar6 = (byte *)noise;\n      do {\n        noise = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = (byte *)noise;\n      } while ((byte *)noise != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        random_stir();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      length = length + iVar1 + -0x4b0;\n    } while (0x4af < length);\n  }\n  if (length < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + length;\n  do {\n                    /* WARNING: Load size is inaccurate */\n    *pbVar2 = *pbVar2 ^ *noise;\n    pbVar2 = pbVar2 + 1;\n    noise = (void *)((int)noise + 1);\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = length;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int extraout_ECX;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x52065);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x52065)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x52065)" * (cast_expression "(int *)(unaff_EDI + 0x52065)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = extraout_ECX - iVar3;" (assignment_expression "iVar4 = extraout_ECX - iVar3" identifier = (binary_expression "extraout_ECX - iVar3" identifier - identifier)) ;) (if_statement "if (iVar4 <= length) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = (byte *)((int)noise + iVar4);\n      pbVar6 = (byte *)noise;\n      do {\n        noise = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = (byte *)noise;\n      } while ((byte *)noise != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        random_stir();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      length = length + iVar1 + -0x4b0;\n    } while (0x4af < length);\n  }" if (parenthesized_expression "(iVar4 <= length)" ( (binary_expression "iVar4 <= length" identifier <= identifier) )) (compound_statement "{\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = (byte *)((int)noise + iVar4);\n      pbVar6 = (byte *)noise;\n      do {\n        noise = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = (byte *)noise;\n      } while ((byte *)noise != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        random_stir();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      length = length + iVar1 + -0x4b0;\n    } while (0x4af < length);\n  }" { (if_statement "if (iVar4 < 1) goto LAB_00057850;" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (goto_statement "goto LAB_00057850;" goto statement_identifier ;)) (do_statement "do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = (byte *)((int)noise + iVar4);\n      pbVar6 = (byte *)noise;\n      do {\n        noise = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = (byte *)noise;\n      } while ((byte *)noise != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        random_stir();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      length = length + iVar1 + -0x4b0;\n    } while (0x4af < length);" do (compound_statement "{\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = (byte *)((int)noise + iVar4);\n      pbVar6 = (byte *)noise;\n      do {\n        noise = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = (byte *)noise;\n      } while ((byte *)noise != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        random_stir();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      length = length + iVar1 + -0x4b0;\n    }" { (expression_statement "pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);" (assignment_expression "pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x51bb5 + iVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x51bb5 + iVar3)" ( (binary_expression "unaff_EDI + 0x51bb5 + iVar3" (binary_expression "unaff_EDI + 0x51bb5" identifier + number_literal) + identifier) )))) ;) (expression_statement "pbVar5 = (byte *)((int)noise + iVar4);" (assignment_expression "pbVar5 = (byte *)((int)noise + iVar4)" identifier = (cast_expression "(byte *)((int)noise + iVar4)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)noise + iVar4)" ( (binary_expression "(int)noise + iVar4" (cast_expression "(int)noise" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "pbVar6 = (byte *)noise;" (assignment_expression "pbVar6 = (byte *)noise" identifier = (cast_expression "(byte *)noise" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n        noise = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = (byte *)noise;\n      } while ((byte *)noise != pbVar5);" do (compound_statement "{\n        noise = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = (byte *)noise;\n      }" { (expression_statement "noise = pbVar6 + 1;" (assignment_expression "noise = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar2 = *pbVar2 ^ *pbVar6;" (assignment_expression "*pbVar2 = *pbVar2 ^ *pbVar6" (pointer_expression "*pbVar2" * identifier) = (binary_expression "*pbVar2 ^ *pbVar6" (pointer_expression "*pbVar2" * identifier) ^ (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "pbVar6 = (byte *)noise;" (assignment_expression "pbVar6 = (byte *)noise" identifier = (cast_expression "(byte *)noise" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) }) while (parenthesized_expression "((byte *)noise != pbVar5)" ( (binary_expression "(byte *)noise != pbVar5" (cast_expression "(byte *)noise" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != identifier) )) ;) (labeled_statement "LAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        random_stir();\n      }" statement_identifier : (if_statement "if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        random_stir();\n      }" if (parenthesized_expression "(*(int *)(unaff_EDI + 0x520c1) == 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x520c1) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x520c1)" * (cast_expression "(int *)(unaff_EDI + 0x520c1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x520c1)" ( (binary_expression "unaff_EDI + 0x520c1" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        random_stir();\n      }" { (expression_statement "random_stir();" (call_expression "random_stir()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "iVar1 = *(int *)(unaff_EDI + 0x52065);" (assignment_expression "iVar1 = *(int *)(unaff_EDI + 0x52065)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x52065)" * (cast_expression "(int *)(unaff_EDI + 0x52065)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = 0x4b0;" (assignment_expression "iVar4 = 0x4b0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(unaff_EDI + 0x52065) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52065) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52065)" * (cast_expression "(undefined4 *)(unaff_EDI + 0x52065)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) )))) = number_literal) ;) (expression_statement "length = length + iVar1 + -0x4b0;" (assignment_expression "length = length + iVar1 + -0x4b0" identifier = (binary_expression "length + iVar1 + -0x4b0" (binary_expression "length + iVar1" identifier + identifier) + number_literal)) ;) }) while (parenthesized_expression "(0x4af < length)" ( (binary_expression "0x4af < length" number_literal < identifier) )) ;) })) (if_statement "if (length < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }" if (parenthesized_expression "(length < 1)" ( (binary_expression "length < 1" identifier < number_literal) )) (compound_statement "{\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }" { (expression_statement "*(undefined4 *)(unaff_EDI + 0x52065) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52065) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52065)" * (cast_expression "(undefined4 *)(unaff_EDI + 0x52065)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "pbVar2 = (byte *)(unaff_EDI + 0x51bb5);" (assignment_expression "pbVar2 = (byte *)(unaff_EDI + 0x51bb5)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x51bb5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x51bb5)" ( (binary_expression "unaff_EDI + 0x51bb5" identifier + number_literal) )))) ;) (expression_statement "pbVar6 = pbVar2 + length;" (assignment_expression "pbVar6 = pbVar2 + length" identifier = (binary_expression "pbVar2 + length" identifier + identifier)) ;) (do_statement "do {\n                    /* WARNING: Load size is inaccurate */\n    *pbVar2 = *pbVar2 ^ *noise;\n    pbVar2 = pbVar2 + 1;\n    noise = (void *)((int)noise + 1);\n  } while (pbVar2 != pbVar6);" do (compound_statement "{\n                    /* WARNING: Load size is inaccurate */\n    *pbVar2 = *pbVar2 ^ *noise;\n    pbVar2 = pbVar2 + 1;\n    noise = (void *)((int)noise + 1);\n  }" { comment (expression_statement "*pbVar2 = *pbVar2 ^ *noise;" (assignment_expression "*pbVar2 = *pbVar2 ^ *noise" (pointer_expression "*pbVar2" * identifier) = (binary_expression "*pbVar2 ^ *noise" (pointer_expression "*pbVar2" * identifier) ^ (pointer_expression "*noise" * identifier))) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "noise = (void *)((int)noise + 1);" (assignment_expression "noise = (void *)((int)noise + 1)" identifier = (cast_expression "(void *)((int)noise + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)noise + 1)" ( (binary_expression "(int)noise + 1" (cast_expression "(int)noise" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) }) while (parenthesized_expression "(pbVar2 != pbVar6)" ( (binary_expression "pbVar2 != pbVar6" identifier != identifier) )) ;) (expression_statement "*(int *)(unaff_EDI + 0x52065) = length;" (assignment_expression "*(int *)(unaff_EDI + 0x52065) = length" (pointer_expression "*(int *)(unaff_EDI + 0x52065)" * (cast_expression "(int *)(unaff_EDI + 0x52065)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00057800(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  FUN_000409cb();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }\n  if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + param_2;\n  do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = param_2;\n  return;\n}\n\n" (function_definition "void FUN_00057800(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  FUN_000409cb();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }\n  if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + param_2;\n  do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = param_2;\n  return;\n}" primitive_type (function_declarator "FUN_00057800(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  FUN_000409cb();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }\n  if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + param_2;\n  do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = param_2;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int extraout_ECX;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "FUN_000409cb();" (call_expression "FUN_000409cb()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x52065);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x52065)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x52065)" * (cast_expression "(int *)(unaff_EDI + 0x52065)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = extraout_ECX - iVar3;" (assignment_expression "iVar4 = extraout_ECX - iVar3" identifier = (binary_expression "extraout_ECX - iVar3" identifier - identifier)) ;) (if_statement "if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }" if (parenthesized_expression "(iVar4 <= param_2)" ( (binary_expression "iVar4 <= param_2" identifier <= identifier) )) (compound_statement "{\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }" { (if_statement "if (iVar4 < 1) goto LAB_00057850;" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (goto_statement "goto LAB_00057850;" goto statement_identifier ;)) (do_statement "do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);" do (compound_statement "{\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    }" { (expression_statement "pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);" (assignment_expression "pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x51bb5 + iVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x51bb5 + iVar3)" ( (binary_expression "unaff_EDI + 0x51bb5 + iVar3" (binary_expression "unaff_EDI + 0x51bb5" identifier + number_literal) + identifier) )))) ;) (expression_statement "pbVar5 = param_1 + iVar4;" (assignment_expression "pbVar5 = param_1 + iVar4" identifier = (binary_expression "param_1 + iVar4" identifier + identifier)) ;) (expression_statement "pbVar6 = param_1;" (assignment_expression "pbVar6 = param_1" identifier = identifier) ;) (do_statement "do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);" do (compound_statement "{\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      }" { (expression_statement "param_1 = pbVar6 + 1;" (assignment_expression "param_1 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar2 = *pbVar2 ^ *pbVar6;" (assignment_expression "*pbVar2 = *pbVar2 ^ *pbVar6" (pointer_expression "*pbVar2" * identifier) = (binary_expression "*pbVar2 ^ *pbVar6" (pointer_expression "*pbVar2" * identifier) ^ (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "pbVar6 = param_1;" (assignment_expression "pbVar6 = param_1" identifier = identifier) ;) }) while (parenthesized_expression "(param_1 != pbVar5)" ( (binary_expression "param_1 != pbVar5" identifier != identifier) )) ;) (labeled_statement "LAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }" statement_identifier : (if_statement "if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }" if (parenthesized_expression "(*(int *)(unaff_EDI + 0x520c1) == 0)" ( (binary_expression "*(int *)(unaff_EDI + 0x520c1) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x520c1)" * (cast_expression "(int *)(unaff_EDI + 0x520c1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x520c1)" ( (binary_expression "unaff_EDI + 0x520c1" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        FUN_00057500();\n      }" { (expression_statement "FUN_00057500();" (call_expression "FUN_00057500()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "iVar1 = *(int *)(unaff_EDI + 0x52065);" (assignment_expression "iVar1 = *(int *)(unaff_EDI + 0x52065)" identifier = (pointer_expression "*(int *)(unaff_EDI + 0x52065)" * (cast_expression "(int *)(unaff_EDI + 0x52065)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = 0x4b0;" (assignment_expression "iVar4 = 0x4b0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(unaff_EDI + 0x52065) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52065) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52065)" * (cast_expression "(undefined4 *)(unaff_EDI + 0x52065)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) )))) = number_literal) ;) (expression_statement "param_2 = param_2 + iVar1 + -0x4b0;" (assignment_expression "param_2 = param_2 + iVar1 + -0x4b0" identifier = (binary_expression "param_2 + iVar1 + -0x4b0" (binary_expression "param_2 + iVar1" identifier + identifier) + number_literal)) ;) }) while (parenthesized_expression "(0x4af < param_2)" ( (binary_expression "0x4af < param_2" number_literal < identifier) )) ;) })) (if_statement "if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }" if (parenthesized_expression "(param_2 < 1)" ( (binary_expression "param_2 < 1" identifier < number_literal) )) (compound_statement "{\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }" { (expression_statement "*(undefined4 *)(unaff_EDI + 0x52065) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52065) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52065)" * (cast_expression "(undefined4 *)(unaff_EDI + 0x52065)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "pbVar2 = (byte *)(unaff_EDI + 0x51bb5);" (assignment_expression "pbVar2 = (byte *)(unaff_EDI + 0x51bb5)" identifier = (cast_expression "(byte *)(unaff_EDI + 0x51bb5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x51bb5)" ( (binary_expression "unaff_EDI + 0x51bb5" identifier + number_literal) )))) ;) (expression_statement "pbVar6 = pbVar2 + param_2;" (assignment_expression "pbVar6 = pbVar2 + param_2" identifier = (binary_expression "pbVar2 + param_2" identifier + identifier)) ;) (do_statement "do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);" do (compound_statement "{\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  }" { (expression_statement "*pbVar2 = *pbVar2 ^ *param_1;" (assignment_expression "*pbVar2 = *pbVar2 ^ *param_1" (pointer_expression "*pbVar2" * identifier) = (binary_expression "*pbVar2 ^ *param_1" (pointer_expression "*pbVar2" * identifier) ^ (pointer_expression "*param_1" * identifier))) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar2 != pbVar6)" ( (binary_expression "pbVar2 != pbVar6" identifier != identifier) )) ;) (expression_statement "*(int *)(unaff_EDI + 0x52065) = param_2;" (assignment_expression "*(int *)(unaff_EDI + 0x52065) = param_2" (pointer_expression "*(int *)(unaff_EDI + 0x52065)" * (cast_expression "(int *)(unaff_EDI + 0x52065)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EDI + 0x52065)" ( (binary_expression "unaff_EDI + 0x52065" 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 IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (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 IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (labeled_statement statement_identifier : (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 (call_expression IDENT (argument_list ( ))) ;) }))) (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 = LIT) ;) (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 = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) }) while (parenthesized_expression ( (binary_expression LIT < IDENT) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_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_00057800(byte *param_1,int param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  FUN_000409cb();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }\n  if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + param_2;\n  do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = param_2;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00057800(byte *param_1,int param_2)" (identifier "FUN_00057800") (parameter_list "(byte *param_1,int param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  int unaff_EDI;\n  \n  FUN_000409cb();\n  iVar3 = *(int *)(unaff_EDI + 0x52065);\n  iVar4 = extraout_ECX - iVar3;\n  if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }\n  if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }\n  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);\n  pbVar6 = pbVar2 + param_2;\n  do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);\n  *(int *)(unaff_EDI + 0x52065) = param_2;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int extraout_ECX;" (primitive_type "int") (identifier "extraout_ECX") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (expression_statement "FUN_000409cb();" (call_expression "FUN_000409cb()" (identifier "FUN_000409cb") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar3 = *(int *)(unaff_EDI + 0x52065);" (assignment_expression "iVar3 = *(int *)(unaff_EDI + 0x52065)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(unaff_EDI + 0x52065)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x52065)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52065)" (( "(") (binary_expression "unaff_EDI + 0x52065" (identifier "unaff_EDI") (+ "+") (number_literal "0x52065")) () ")"))))) (; ";")) (expression_statement "iVar4 = extraout_ECX - iVar3;" (assignment_expression "iVar4 = extraout_ECX - iVar3" (identifier "iVar4") (= "=") (binary_expression "extraout_ECX - iVar3" (identifier "extraout_ECX") (- "-") (identifier "iVar3"))) (; ";")) (if_statement "if (iVar4 <= param_2) {\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }" (if "if") (parenthesized_expression "(iVar4 <= param_2)" (( "(") (binary_expression "iVar4 <= param_2" (identifier "iVar4") (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n    if (iVar4 < 1) goto LAB_00057850;\n    do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);\n  }" ({ "{") (if_statement "if (iVar4 < 1) goto LAB_00057850;" (if "if") (parenthesized_expression "(iVar4 < 1)" (( "(") (binary_expression "iVar4 < 1" (identifier "iVar4") (< "<") (number_literal "1")) () ")")) (goto_statement "goto LAB_00057850;" (goto "goto") (statement_identifier "LAB_00057850") (; ";"))) (do_statement "do {\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    } while (0x4af < param_2);" (do "do") (compound_statement "{\n      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);\n      pbVar5 = param_1 + iVar4;\n      pbVar6 = param_1;\n      do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);\nLAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }\n      iVar1 = *(int *)(unaff_EDI + 0x52065);\n      iVar3 = 0;\n      iVar4 = 0x4b0;\n      *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n      param_2 = param_2 + iVar1 + -0x4b0;\n    }" ({ "{") (expression_statement "pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);" (assignment_expression "pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3)" (identifier "pbVar2") (= "=") (cast_expression "(byte *)(unaff_EDI + 0x51bb5 + iVar3)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x51bb5 + iVar3)" (( "(") (binary_expression "unaff_EDI + 0x51bb5 + iVar3" (binary_expression "unaff_EDI + 0x51bb5" (identifier "unaff_EDI") (+ "+") (number_literal "0x51bb5")) (+ "+") (identifier "iVar3")) () ")")))) (; ";")) (expression_statement "pbVar5 = param_1 + iVar4;" (assignment_expression "pbVar5 = param_1 + iVar4" (identifier "pbVar5") (= "=") (binary_expression "param_1 + iVar4" (identifier "param_1") (+ "+") (identifier "iVar4"))) (; ";")) (expression_statement "pbVar6 = param_1;" (assignment_expression "pbVar6 = param_1" (identifier "pbVar6") (= "=") (identifier "param_1")) (; ";")) (do_statement "do {\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      } while (param_1 != pbVar5);" (do "do") (compound_statement "{\n        param_1 = pbVar6 + 1;\n        *pbVar2 = *pbVar2 ^ *pbVar6;\n        pbVar2 = pbVar2 + 1;\n        pbVar6 = param_1;\n      }" ({ "{") (expression_statement "param_1 = pbVar6 + 1;" (assignment_expression "param_1 = pbVar6 + 1" (identifier "param_1") (= "=") (binary_expression "pbVar6 + 1" (identifier "pbVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*pbVar2 = *pbVar2 ^ *pbVar6;" (assignment_expression "*pbVar2 = *pbVar2 ^ *pbVar6" (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")) (= "=") (binary_expression "*pbVar2 ^ *pbVar6" (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")) (^ "^") (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")))) (; ";")) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" (identifier "pbVar2") (= "=") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar6 = param_1;" (assignment_expression "pbVar6 = param_1" (identifier "pbVar6") (= "=") (identifier "param_1")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_1 != pbVar5)" (( "(") (binary_expression "param_1 != pbVar5" (identifier "param_1") (!= "!=") (identifier "pbVar5")) () ")")) (; ";")) (labeled_statement "LAB_00057850:\n      if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }" (statement_identifier "LAB_00057850") (: ":") (if_statement "if (*(int *)(unaff_EDI + 0x520c1) == 0) {\n        FUN_00057500();\n      }" (if "if") (parenthesized_expression "(*(int *)(unaff_EDI + 0x520c1) == 0)" (( "(") (binary_expression "*(int *)(unaff_EDI + 0x520c1) == 0" (pointer_expression "*(int *)(unaff_EDI + 0x520c1)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x520c1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x520c1)" (( "(") (binary_expression "unaff_EDI + 0x520c1" (identifier "unaff_EDI") (+ "+") (number_literal "0x520c1")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_00057500();\n      }" ({ "{") (expression_statement "FUN_00057500();" (call_expression "FUN_00057500()" (identifier "FUN_00057500") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (expression_statement "iVar1 = *(int *)(unaff_EDI + 0x52065);" (assignment_expression "iVar1 = *(int *)(unaff_EDI + 0x52065)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(unaff_EDI + 0x52065)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x52065)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52065)" (( "(") (binary_expression "unaff_EDI + 0x52065" (identifier "unaff_EDI") (+ "+") (number_literal "0x52065")) () ")"))))) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = 0x4b0;" (assignment_expression "iVar4 = 0x4b0" (identifier "iVar4") (= "=") (number_literal "0x4b0")) (; ";")) (expression_statement "*(undefined4 *)(unaff_EDI + 0x52065) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52065) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52065)" (* "*") (cast_expression "(undefined4 *)(unaff_EDI + 0x52065)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52065)" (( "(") (binary_expression "unaff_EDI + 0x52065" (identifier "unaff_EDI") (+ "+") (number_literal "0x52065")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2 = param_2 + iVar1 + -0x4b0;" (assignment_expression "param_2 = param_2 + iVar1 + -0x4b0" (identifier "param_2") (= "=") (binary_expression "param_2 + iVar1 + -0x4b0" (binary_expression "param_2 + iVar1" (identifier "param_2") (+ "+") (identifier "iVar1")) (+ "+") (number_literal "-0x4b0"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(0x4af < param_2)" (( "(") (binary_expression "0x4af < param_2" (number_literal "0x4af") (< "<") (identifier "param_2")) () ")")) (; ";")) (} "}"))) (if_statement "if (param_2 < 1) {\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }" (if "if") (parenthesized_expression "(param_2 < 1)" (( "(") (binary_expression "param_2 < 1" (identifier "param_2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n    *(undefined4 *)(unaff_EDI + 0x52065) = 0;\n    return;\n  }" ({ "{") (expression_statement "*(undefined4 *)(unaff_EDI + 0x52065) = 0;" (assignment_expression "*(undefined4 *)(unaff_EDI + 0x52065) = 0" (pointer_expression "*(undefined4 *)(unaff_EDI + 0x52065)" (* "*") (cast_expression "(undefined4 *)(unaff_EDI + 0x52065)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52065)" (( "(") (binary_expression "unaff_EDI + 0x52065" (identifier "unaff_EDI") (+ "+") (number_literal "0x52065")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "pbVar2 = (byte *)(unaff_EDI + 0x51bb5);" (assignment_expression "pbVar2 = (byte *)(unaff_EDI + 0x51bb5)" (identifier "pbVar2") (= "=") (cast_expression "(byte *)(unaff_EDI + 0x51bb5)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x51bb5)" (( "(") (binary_expression "unaff_EDI + 0x51bb5" (identifier "unaff_EDI") (+ "+") (number_literal "0x51bb5")) () ")")))) (; ";")) (expression_statement "pbVar6 = pbVar2 + param_2;" (assignment_expression "pbVar6 = pbVar2 + param_2" (identifier "pbVar6") (= "=") (binary_expression "pbVar2 + param_2" (identifier "pbVar2") (+ "+") (identifier "param_2"))) (; ";")) (do_statement "do {\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  } while (pbVar2 != pbVar6);" (do "do") (compound_statement "{\n    *pbVar2 = *pbVar2 ^ *param_1;\n    pbVar2 = pbVar2 + 1;\n    param_1 = param_1 + 1;\n  }" ({ "{") (expression_statement "*pbVar2 = *pbVar2 ^ *param_1;" (assignment_expression "*pbVar2 = *pbVar2 ^ *param_1" (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")) (= "=") (binary_expression "*pbVar2 ^ *param_1" (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")) (^ "^") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" (identifier "pbVar2") (= "=") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar2 != pbVar6)" (( "(") (binary_expression "pbVar2 != pbVar6" (identifier "pbVar2") (!= "!=") (identifier "pbVar6")) () ")")) (; ";")) (expression_statement "*(int *)(unaff_EDI + 0x52065) = param_2;" (assignment_expression "*(int *)(unaff_EDI + 0x52065) = param_2" (pointer_expression "*(int *)(unaff_EDI + 0x52065)" (* "*") (cast_expression "(int *)(unaff_EDI + 0x52065)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EDI + 0x52065)" (( "(") (binary_expression "unaff_EDI + 0x52065" (identifier "unaff_EDI") (+ "+") (number_literal "0x52065")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(void *noise,int var_6)

{
  int var_11;
  type_1 *var_8;
  int var_4;
  int var_3;
  int var_5;
  type_1 *var_9;
  type_1 *var_7;
  int var_2;
  
  var_1();
  var_4 = *(int *)(var_2 + 0x52065);
  var_5 = var_3 - var_4;
  if (var_5 <= var_6) {
    if (var_5 < 1) goto LAB_00057850;
    do {
      var_8 = (type_1 *)(var_2 + 0x51bb5 + var_4);
      var_9 = (type_1 *)((int)noise + var_5);
      var_7 = (type_1 *)noise;
      do {
        noise = var_7 + 1;
        *var_8 = *var_8 ^ *var_7;
        var_8 = var_8 + 1;
        var_7 = (type_1 *)noise;
      } while ((type_1 *)noise != var_9);
LAB_00057850:
      if (*(int *)(var_2 + 0x520c1) == 0) {
        var_10();
      }
      var_11 = *(int *)(var_2 + 0x52065);
      var_4 = 0;
      var_5 = 0x4b0;
      *(type_2 *)(var_2 + 0x52065) = 0;
      var_6 = var_6 + var_11 + -0x4b0;
    } while (0x4af < var_6);
  }
  if (var_6 < 1) {
    *(type_2 *)(var_2 + 0x52065) = 0;
    return;
  }
  var_8 = (type_1 *)(var_2 + 0x51bb5);
  var_7 = var_8 + var_6;
  do {
                    /* WARNING: Load size is inaccurate */
    *var_8 = *var_8 ^ *noise;
    var_8 = var_8 + 1;
    noise = (void *)((int)noise + 1);
  } while (var_8 != var_7);
  *(int *)(var_2 + 0x52065) = var_6;
  return;
}


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

void MASKED(byte *param_1,int param_2)

{
  int iVar1;
  byte *pbVar2;
  int iVar3;
  int extraout_ECX;
  int iVar4;
  byte *pbVar5;
  byte *pbVar6;
  int unaff_EDI;
  
  FUN_000409cb();
  iVar3 = *(int *)(unaff_EDI + 0x52065);
  iVar4 = extraout_ECX - iVar3;
  if (iVar4 <= param_2) {
    if (iVar4 < 1) goto LAB_00057850;
    do {
      pbVar2 = (byte *)(unaff_EDI + 0x51bb5 + iVar3);
      pbVar5 = param_1 + iVar4;
      pbVar6 = param_1;
      do {
        param_1 = pbVar6 + 1;
        *pbVar2 = *pbVar2 ^ *pbVar6;
        pbVar2 = pbVar2 + 1;
        pbVar6 = param_1;
      } while (param_1 != pbVar5);
LAB_00057850:
      if (*(int *)(unaff_EDI + 0x520c1) == 0) {
        FUN_00057500();
      }
      iVar1 = *(int *)(unaff_EDI + 0x52065);
      iVar3 = 0;
      iVar4 = 0x4b0;
      *(undefined4 *)(unaff_EDI + 0x52065) = 0;
      param_2 = param_2 + iVar1 + -0x4b0;
    } while (0x4af < param_2);
  }
  if (param_2 < 1) {
    *(undefined4 *)(unaff_EDI + 0x52065) = 0;
    return;
  }
  pbVar2 = (byte *)(unaff_EDI + 0x51bb5);
  pbVar6 = pbVar2 + param_2;
  do {
    *pbVar2 = *pbVar2 ^ *param_1;
    pbVar2 = pbVar2 + 1;
    param_1 = param_1 + 1;
  } while (pbVar2 != pbVar6);
  *(int *)(unaff_EDI + 0x52065) = param_2;
  return;
}

