
void arcfour_block(void *handle,uchar *blk,int len)

{
  byte *pbVar1;
  char cVar2;
  char *pcVar3;
  byte bVar4;
  int iVar5;
  char *pcVar6;
  byte bVar7;
  
                    /* WARNING: Load size is inaccurate */
  bVar4 = *handle;
  bVar7 = *(byte *)((long)handle + 1);
  if (0 < len) {
    pbVar1 = blk + (ulong)(len - 1U) + 1;
    iVar5 = (int)blk;
    do {
      pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2);
      cVar2 = *pcVar3;
      bVar7 = bVar7 + cVar2;
      pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2);
      *pcVar3 = *pcVar6;
      *pcVar6 = cVar2;
      *blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2);
      blk = blk + 1;
    } while (blk != pbVar1);
    bVar4 = bVar4 + 1 + (char)(len - 1U);
  }
  *(byte *)handle = bVar4;
  *(byte *)((long)handle + 1) = bVar7;
  return;
}



void FUN_00133999(byte *param_1,byte *param_2,int param_3)

{
  byte *pbVar1;
  byte bVar2;
  byte *pbVar3;
  byte bVar4;
  int iVar5;
  byte bVar6;
  
  bVar4 = *param_1;
  bVar6 = param_1[1];
  if (0 < param_3) {
    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;
    iVar5 = (int)param_2;
    do {
      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;
      bVar2 = *pbVar3;
      bVar6 = bVar6 + bVar2;
      *pbVar3 = param_1[(ulong)bVar6 + 2];
      param_1[(ulong)bVar6 + 2] = bVar2;
      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];
      param_2 = param_2 + 1;
    } while (param_2 != pbVar1);
    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);
  }
  *param_1 = bVar4;
  param_1[1] = bVar6;
  return;
}


PUSH R14
PUSH RBP
PUSH RBX
MOVZX EBP,byte ptr [RDI]
MOVZX R9D,byte ptr [RDI + 0x1]
TEST EDX,EDX
JLE 0x001339fe
LEA R10,[RDI + 0x2]
LEA EBX,[RDX + -0x1]
MOV EAX,EBX
LEA RDX,[RSI + RAX*0x1 + 0x1]
MOV R8,RSI
MOV R11D,EBP
SUB R11D,ESI
ADD R11D,0x1
LEA ECX,[R11 + R8*0x1]
MOVZX ECX,CL
ADD RCX,R10
MOVZX EAX,byte ptr [RCX]
ADD R9D,EAX
MOVZX ESI,R9B
ADD RSI,R10
MOVZX R14D,byte ptr [RSI]
MOV byte ptr [RCX],R14B
MOV byte ptr [RSI],AL
ADD AL,byte ptr [RCX]
MOVZX EAX,AL
MOVZX EAX,byte ptr [R10 + RAX*0x1]
XOR byte ptr [R8],AL
ADD R8,0x1
CMP R8,RDX
JNZ 0x001339c4
LEA EBP,[RBP + RBX*0x1 + 0x1]
MOV byte ptr [RDI],BPL
MOV byte ptr [RDI + 0x1],R9B
POP RBX
POP RBP
POP R14
RET
(translation_unit "void FUN_00133999(byte *param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  byte *pbVar3;\n  byte bVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar4 = *param_1;\n  bVar6 = param_1[1];\n  if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }\n  *param_1 = bVar4;\n  param_1[1] = bVar6;\n  return;\n}\n\n" (function_definition "void FUN_00133999(byte *param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  byte *pbVar3;\n  byte bVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar4 = *param_1;\n  bVar6 = param_1[1];\n  if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }\n  *param_1 = bVar4;\n  param_1[1] = bVar6;\n  return;\n}" primitive_type (function_declarator "FUN_00133999(byte *param_1,byte *param_2,int param_3)" identifier (parameter_list "(byte *param_1,byte *param_2,int param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  byte *pbVar3;\n  byte bVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar4 = *param_1;\n  bVar6 = param_1[1];\n  if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }\n  *param_1 = bVar4;\n  param_1[1] = bVar6;\n  return;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte bVar6;" type_identifier identifier ;) (expression_statement "bVar4 = *param_1;" (assignment_expression "bVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar6 = param_1[1];" (assignment_expression "bVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }" if (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) (compound_statement "{\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }" { (expression_statement "pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;" (assignment_expression "pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1" identifier = (binary_expression "param_2 + (ulong)(param_3 - 1U) + 1" (binary_expression "param_2 + (ulong)(param_3 - 1U)" identifier + (call_expression "(ulong)(param_3 - 1U)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_3 - 1U)" ( (binary_expression "param_3 - 1U" identifier - number_literal) )))) + number_literal)) ;) (expression_statement "iVar5 = (int)param_2;" (assignment_expression "iVar5 = (int)param_2" identifier = (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (do_statement "do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);" do (compound_statement "{\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    }" { (expression_statement "pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;" (assignment_expression "pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2" identifier = (binary_expression "param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2" (binary_expression "param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff)" identifier + (call_expression "(ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff)" ( (binary_expression "((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff" (binary_expression "((uint)bVar4 - iVar5) + 1 + (int)param_2" (binary_expression "((uint)bVar4 - iVar5) + 1" (parenthesized_expression "((uint)bVar4 - iVar5)" ( (binary_expression "(uint)bVar4 - iVar5" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) - identifier) )) + number_literal) + (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) & number_literal) )))) + number_literal)) ;) (expression_statement "bVar2 = *pbVar3;" (assignment_expression "bVar2 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) (expression_statement "bVar6 = bVar6 + bVar2;" (assignment_expression "bVar6 = bVar6 + bVar2" identifier = (binary_expression "bVar6 + bVar2" identifier + identifier)) ;) (expression_statement "*pbVar3 = param_1[(ulong)bVar6 + 2];" (assignment_expression "*pbVar3 = param_1[(ulong)bVar6 + 2]" (pointer_expression "*pbVar3" * identifier) = (subscript_expression "param_1[(ulong)bVar6 + 2]" identifier [ (binary_expression "(ulong)bVar6 + 2" (cast_expression "(ulong)bVar6" ( (type_descriptor "ulong" type_identifier) ) identifier) + number_literal) ])) ;) (expression_statement "param_1[(ulong)bVar6 + 2] = bVar2;" (assignment_expression "param_1[(ulong)bVar6 + 2] = bVar2" (subscript_expression "param_1[(ulong)bVar6 + 2]" identifier [ (binary_expression "(ulong)bVar6 + 2" (cast_expression "(ulong)bVar6" ( (type_descriptor "ulong" type_identifier) ) identifier) + number_literal) ]) = identifier) ;) (expression_statement "*param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];" (assignment_expression "*param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2]" (pointer_expression "*param_2" * identifier) = (binary_expression "*param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2]" (pointer_expression "*param_2" * identifier) ^ (subscript_expression "param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2]" identifier [ (binary_expression "(ulong)(byte)(bVar2 + *pbVar3) + 2" (call_expression "(ulong)(byte)(bVar2 + *pbVar3)" (call_expression "(ulong)(byte)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "(bVar2 + *pbVar3)" ( (binary_expression "bVar2 + *pbVar3" identifier + (pointer_expression "*pbVar3" * identifier)) ))) + number_literal) ]))) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != pbVar1)" ( (binary_expression "param_2 != pbVar1" identifier != identifier) )) ;) (expression_statement "bVar4 = bVar4 + 1 + (char)(param_3 - 1U);" (assignment_expression "bVar4 = bVar4 + 1 + (char)(param_3 - 1U)" identifier = (binary_expression "bVar4 + 1 + (char)(param_3 - 1U)" (binary_expression "bVar4 + 1" identifier + number_literal) + (cast_expression "(char)(param_3 - 1U)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_3 - 1U)" ( (binary_expression "param_3 - 1U" identifier - number_literal) ))))) ;) })) (expression_statement "*param_1 = bVar4;" (assignment_expression "*param_1 = bVar4" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[1] = bVar6;" (assignment_expression "param_1[1] = bVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void arcfour_block(void *handle,uchar *blk,int len)\n\n{\n  byte *pbVar1;\n  char cVar2;\n  char *pcVar3;\n  byte bVar4;\n  int iVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n                    /* WARNING: Load size is inaccurate */\n  bVar4 = *handle;\n  bVar7 = *(byte *)((long)handle + 1);\n  if (0 < len) {\n    pbVar1 = blk + (ulong)(len - 1U) + 1;\n    iVar5 = (int)blk;\n    do {\n      pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2);\n      cVar2 = *pcVar3;\n      bVar7 = bVar7 + cVar2;\n      pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2);\n      *pcVar3 = *pcVar6;\n      *pcVar6 = cVar2;\n      *blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2);\n      blk = blk + 1;\n    } while (blk != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(len - 1U);\n  }\n  *(byte *)handle = bVar4;\n  *(byte *)((long)handle + 1) = bVar7;\n  return;\n}\n\n" (function_definition "void arcfour_block(void *handle,uchar *blk,int len)\n\n{\n  byte *pbVar1;\n  char cVar2;\n  char *pcVar3;\n  byte bVar4;\n  int iVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n                    /* WARNING: Load size is inaccurate */\n  bVar4 = *handle;\n  bVar7 = *(byte *)((long)handle + 1);\n  if (0 < len) {\n    pbVar1 = blk + (ulong)(len - 1U) + 1;\n    iVar5 = (int)blk;\n    do {\n      pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2);\n      cVar2 = *pcVar3;\n      bVar7 = bVar7 + cVar2;\n      pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2);\n      *pcVar3 = *pcVar6;\n      *pcVar6 = cVar2;\n      *blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2);\n      blk = blk + 1;\n    } while (blk != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(len - 1U);\n  }\n  *(byte *)handle = bVar4;\n  *(byte *)((long)handle + 1) = bVar7;\n  return;\n}" primitive_type (function_declarator "arcfour_block(void *handle,uchar *blk,int len)" identifier (parameter_list "(void *handle,uchar *blk,int len)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) , (parameter_declaration "uchar *blk" type_identifier (pointer_declarator "*blk" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  char cVar2;\n  char *pcVar3;\n  byte bVar4;\n  int iVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n                    /* WARNING: Load size is inaccurate */\n  bVar4 = *handle;\n  bVar7 = *(byte *)((long)handle + 1);\n  if (0 < len) {\n    pbVar1 = blk + (ulong)(len - 1U) + 1;\n    iVar5 = (int)blk;\n    do {\n      pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2);\n      cVar2 = *pcVar3;\n      bVar7 = bVar7 + cVar2;\n      pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2);\n      *pcVar3 = *pcVar6;\n      *pcVar6 = cVar2;\n      *blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2);\n      blk = blk + 1;\n    } while (blk != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(len - 1U);\n  }\n  *(byte *)handle = bVar4;\n  *(byte *)((long)handle + 1) = bVar7;\n  return;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "byte bVar7;" type_identifier identifier ;) comment (expression_statement "bVar4 = *handle;" (assignment_expression "bVar4 = *handle" identifier = (pointer_expression "*handle" * identifier)) ;) (expression_statement "bVar7 = *(byte *)((long)handle + 1);" (assignment_expression "bVar7 = *(byte *)((long)handle + 1)" identifier = (pointer_expression "*(byte *)((long)handle + 1)" * (cast_expression "(byte *)((long)handle + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)handle + 1)" ( (binary_expression "(long)handle + 1" (cast_expression "(long)handle" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (if_statement "if (0 < len) {\n    pbVar1 = blk + (ulong)(len - 1U) + 1;\n    iVar5 = (int)blk;\n    do {\n      pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2);\n      cVar2 = *pcVar3;\n      bVar7 = bVar7 + cVar2;\n      pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2);\n      *pcVar3 = *pcVar6;\n      *pcVar6 = cVar2;\n      *blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2);\n      blk = blk + 1;\n    } while (blk != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(len - 1U);\n  }" if (parenthesized_expression "(0 < len)" ( (binary_expression "0 < len" number_literal < identifier) )) (compound_statement "{\n    pbVar1 = blk + (ulong)(len - 1U) + 1;\n    iVar5 = (int)blk;\n    do {\n      pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2);\n      cVar2 = *pcVar3;\n      bVar7 = bVar7 + cVar2;\n      pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2);\n      *pcVar3 = *pcVar6;\n      *pcVar6 = cVar2;\n      *blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2);\n      blk = blk + 1;\n    } while (blk != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(len - 1U);\n  }" { (expression_statement "pbVar1 = blk + (ulong)(len - 1U) + 1;" (assignment_expression "pbVar1 = blk + (ulong)(len - 1U) + 1" identifier = (binary_expression "blk + (ulong)(len - 1U) + 1" (binary_expression "blk + (ulong)(len - 1U)" identifier + (call_expression "(ulong)(len - 1U)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(len - 1U)" ( (binary_expression "len - 1U" identifier - number_literal) )))) + number_literal)) ;) (expression_statement "iVar5 = (int)blk;" (assignment_expression "iVar5 = (int)blk" identifier = (cast_expression "(int)blk" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (do_statement "do {\n      pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2);\n      cVar2 = *pcVar3;\n      bVar7 = bVar7 + cVar2;\n      pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2);\n      *pcVar3 = *pcVar6;\n      *pcVar6 = cVar2;\n      *blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2);\n      blk = blk + 1;\n    } while (blk != pbVar1);" do (compound_statement "{\n      pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2);\n      cVar2 = *pcVar3;\n      bVar7 = bVar7 + cVar2;\n      pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2);\n      *pcVar3 = *pcVar6;\n      *pcVar6 = cVar2;\n      *blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2);\n      blk = blk + 1;\n    }" { (expression_statement "pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2);" (assignment_expression "pcVar3 = (char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2)" identifier = (cast_expression "(char *)((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2)" ( (binary_expression "(long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff) + 2" (binary_expression "(long)handle + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff)" (cast_expression "(long)handle" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (call_expression "(ulong)(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff)" ( (binary_expression "((uint)bVar4 - iVar5) + 1 + (int)blk & 0xff" (binary_expression "((uint)bVar4 - iVar5) + 1 + (int)blk" (binary_expression "((uint)bVar4 - iVar5) + 1" (parenthesized_expression "((uint)bVar4 - iVar5)" ( (binary_expression "(uint)bVar4 - iVar5" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) - identifier) )) + number_literal) + (cast_expression "(int)blk" ( (type_descriptor "int" primitive_type) ) identifier)) & number_literal) )))) + number_literal) )))) ;) (expression_statement "cVar2 = *pcVar3;" (assignment_expression "cVar2 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (expression_statement "bVar7 = bVar7 + cVar2;" (assignment_expression "bVar7 = bVar7 + cVar2" identifier = (binary_expression "bVar7 + cVar2" identifier + identifier)) ;) (expression_statement "pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2);" (assignment_expression "pcVar6 = (char *)((long)handle + (ulong)bVar7 + 2)" identifier = (cast_expression "(char *)((long)handle + (ulong)bVar7 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)handle + (ulong)bVar7 + 2)" ( (binary_expression "(long)handle + (ulong)bVar7 + 2" (binary_expression "(long)handle + (ulong)bVar7" (cast_expression "(long)handle" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(ulong)bVar7" ( (type_descriptor "ulong" type_identifier) ) identifier)) + number_literal) )))) ;) (expression_statement "*pcVar3 = *pcVar6;" (assignment_expression "*pcVar3 = *pcVar6" (pointer_expression "*pcVar3" * identifier) = (pointer_expression "*pcVar6" * identifier)) ;) (expression_statement "*pcVar6 = cVar2;" (assignment_expression "*pcVar6 = cVar2" (pointer_expression "*pcVar6" * identifier) = identifier) ;) (expression_statement "*blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2);" (assignment_expression "*blk = *blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2)" (pointer_expression "*blk" * identifier) = (binary_expression "*blk ^ *(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2)" (pointer_expression "*blk" * identifier) ^ (pointer_expression "*(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2)" * (cast_expression "(byte *)((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2)" ( (binary_expression "(long)handle + (ulong)(byte)(cVar2 + *pcVar3) + 2" (binary_expression "(long)handle + (ulong)(byte)(cVar2 + *pcVar3)" (cast_expression "(long)handle" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (call_expression "(ulong)(byte)(cVar2 + *pcVar3)" (call_expression "(ulong)(byte)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "(cVar2 + *pcVar3)" ( (binary_expression "cVar2 + *pcVar3" identifier + (pointer_expression "*pcVar3" * identifier)) )))) + number_literal) )))))) ;) (expression_statement "blk = blk + 1;" (assignment_expression "blk = blk + 1" identifier = (binary_expression "blk + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(blk != pbVar1)" ( (binary_expression "blk != pbVar1" identifier != identifier) )) ;) (expression_statement "bVar4 = bVar4 + 1 + (char)(len - 1U);" (assignment_expression "bVar4 = bVar4 + 1 + (char)(len - 1U)" identifier = (binary_expression "bVar4 + 1 + (char)(len - 1U)" (binary_expression "bVar4 + 1" identifier + number_literal) + (cast_expression "(char)(len - 1U)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(len - 1U)" ( (binary_expression "len - 1U" identifier - number_literal) ))))) ;) })) (expression_statement "*(byte *)handle = bVar4;" (assignment_expression "*(byte *)handle = bVar4" (pointer_expression "*(byte *)handle" * (cast_expression "(byte *)handle" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) (expression_statement "*(byte *)((long)handle + 1) = bVar7;" (assignment_expression "*(byte *)((long)handle + 1) = bVar7" (pointer_expression "*(byte *)((long)handle + 1)" * (cast_expression "(byte *)((long)handle + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)handle + 1)" ( (binary_expression "(long)handle + 1" (cast_expression "(long)handle" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00133999(byte *param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  byte *pbVar3;\n  byte bVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar4 = *param_1;\n  bVar6 = param_1[1];\n  if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }\n  *param_1 = bVar4;\n  param_1[1] = bVar6;\n  return;\n}\n\n" (function_definition "void FUN_00133999(byte *param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  byte *pbVar3;\n  byte bVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar4 = *param_1;\n  bVar6 = param_1[1];\n  if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }\n  *param_1 = bVar4;\n  param_1[1] = bVar6;\n  return;\n}" primitive_type (function_declarator "FUN_00133999(byte *param_1,byte *param_2,int param_3)" identifier (parameter_list "(byte *param_1,byte *param_2,int param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  byte *pbVar3;\n  byte bVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar4 = *param_1;\n  bVar6 = param_1[1];\n  if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }\n  *param_1 = bVar4;\n  param_1[1] = bVar6;\n  return;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte bVar6;" type_identifier identifier ;) (expression_statement "bVar4 = *param_1;" (assignment_expression "bVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "bVar6 = param_1[1];" (assignment_expression "bVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }" if (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) (compound_statement "{\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }" { (expression_statement "pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;" (assignment_expression "pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1" identifier = (binary_expression "param_2 + (ulong)(param_3 - 1U) + 1" (binary_expression "param_2 + (ulong)(param_3 - 1U)" identifier + (call_expression "(ulong)(param_3 - 1U)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_3 - 1U)" ( (binary_expression "param_3 - 1U" identifier - number_literal) )))) + number_literal)) ;) (expression_statement "iVar5 = (int)param_2;" (assignment_expression "iVar5 = (int)param_2" identifier = (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (do_statement "do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);" do (compound_statement "{\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    }" { (expression_statement "pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;" (assignment_expression "pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2" identifier = (binary_expression "param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2" (binary_expression "param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff)" identifier + (call_expression "(ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff)" ( (binary_expression "((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff" (binary_expression "((uint)bVar4 - iVar5) + 1 + (int)param_2" (binary_expression "((uint)bVar4 - iVar5) + 1" (parenthesized_expression "((uint)bVar4 - iVar5)" ( (binary_expression "(uint)bVar4 - iVar5" (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) - identifier) )) + number_literal) + (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) & number_literal) )))) + number_literal)) ;) (expression_statement "bVar2 = *pbVar3;" (assignment_expression "bVar2 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) (expression_statement "bVar6 = bVar6 + bVar2;" (assignment_expression "bVar6 = bVar6 + bVar2" identifier = (binary_expression "bVar6 + bVar2" identifier + identifier)) ;) (expression_statement "*pbVar3 = param_1[(ulong)bVar6 + 2];" (assignment_expression "*pbVar3 = param_1[(ulong)bVar6 + 2]" (pointer_expression "*pbVar3" * identifier) = (subscript_expression "param_1[(ulong)bVar6 + 2]" identifier [ (binary_expression "(ulong)bVar6 + 2" (cast_expression "(ulong)bVar6" ( (type_descriptor "ulong" type_identifier) ) identifier) + number_literal) ])) ;) (expression_statement "param_1[(ulong)bVar6 + 2] = bVar2;" (assignment_expression "param_1[(ulong)bVar6 + 2] = bVar2" (subscript_expression "param_1[(ulong)bVar6 + 2]" identifier [ (binary_expression "(ulong)bVar6 + 2" (cast_expression "(ulong)bVar6" ( (type_descriptor "ulong" type_identifier) ) identifier) + number_literal) ]) = identifier) ;) (expression_statement "*param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];" (assignment_expression "*param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2]" (pointer_expression "*param_2" * identifier) = (binary_expression "*param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2]" (pointer_expression "*param_2" * identifier) ^ (subscript_expression "param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2]" identifier [ (binary_expression "(ulong)(byte)(bVar2 + *pbVar3) + 2" (call_expression "(ulong)(byte)(bVar2 + *pbVar3)" (call_expression "(ulong)(byte)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "(bVar2 + *pbVar3)" ( (binary_expression "bVar2 + *pbVar3" identifier + (pointer_expression "*pbVar3" * identifier)) ))) + number_literal) ]))) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != pbVar1)" ( (binary_expression "param_2 != pbVar1" identifier != identifier) )) ;) (expression_statement "bVar4 = bVar4 + 1 + (char)(param_3 - 1U);" (assignment_expression "bVar4 = bVar4 + 1 + (char)(param_3 - 1U)" identifier = (binary_expression "bVar4 + 1 + (char)(param_3 - 1U)" (binary_expression "bVar4 + 1" identifier + number_literal) + (cast_expression "(char)(param_3 - 1U)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_3 - 1U)" ( (binary_expression "param_3 - 1U" identifier - number_literal) ))))) ;) })) (expression_statement "*param_1 = bVar4;" (assignment_expression "*param_1 = bVar4" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[1] = bVar6;" (assignment_expression "param_1[1] = bVar6" (subscript_expression "param_1[1]" 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 (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) )))) + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - IDENT) )) + LIT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) & LIT) )))) + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) ^ (subscript_expression IDENT [ (binary_expression (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (binary_expression IDENT + (pointer_expression * IDENT)) ))) + LIT) ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT - LIT) ))))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })))
(function_definition "void FUN_00133999(byte *param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  byte *pbVar3;\n  byte bVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar4 = *param_1;\n  bVar6 = param_1[1];\n  if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }\n  *param_1 = bVar4;\n  param_1[1] = bVar6;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00133999(byte *param_1,byte *param_2,int param_3)" (identifier "FUN_00133999") (parameter_list "(byte *param_1,byte *param_2,int param_3)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  byte *pbVar3;\n  byte bVar4;\n  int iVar5;\n  byte bVar6;\n  \n  bVar4 = *param_1;\n  bVar6 = param_1[1];\n  if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }\n  *param_1 = bVar4;\n  param_1[1] = bVar6;\n  return;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "byte bVar4;" (type_identifier "byte") (identifier "bVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "byte bVar6;" (type_identifier "byte") (identifier "bVar6") (; ";")) (expression_statement "bVar4 = *param_1;" (assignment_expression "bVar4 = *param_1" (identifier "bVar4") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "bVar6 = param_1[1];" (assignment_expression "bVar6 = param_1[1]" (identifier "bVar6") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (0 < param_3) {\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }" (if "if") (parenthesized_expression "(0 < param_3)" (( "(") (binary_expression "0 < param_3" (number_literal "0") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;\n    iVar5 = (int)param_2;\n    do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);\n  }" ({ "{") (expression_statement "pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;" (assignment_expression "pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1" (identifier "pbVar1") (= "=") (binary_expression "param_2 + (ulong)(param_3 - 1U) + 1" (binary_expression "param_2 + (ulong)(param_3 - 1U)" (identifier "param_2") (+ "+") (call_expression "(ulong)(param_3 - 1U)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(param_3 - 1U)" (( "(") (binary_expression "param_3 - 1U" (identifier "param_3") (- "-") (number_literal "1U")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar5 = (int)param_2;" (assignment_expression "iVar5 = (int)param_2" (identifier "iVar5") (= "=") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) (; ";")) (do_statement "do {\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);" (do "do") (compound_statement "{\n      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;\n      bVar2 = *pbVar3;\n      bVar6 = bVar6 + bVar2;\n      *pbVar3 = param_1[(ulong)bVar6 + 2];\n      param_1[(ulong)bVar6 + 2] = bVar2;\n      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];\n      param_2 = param_2 + 1;\n    }" ({ "{") (expression_statement "pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;" (assignment_expression "pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2" (identifier "pbVar3") (= "=") (binary_expression "param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2" (binary_expression "param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff)" (identifier "param_1") (+ "+") (call_expression "(ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff)" (( "(") (binary_expression "((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff" (binary_expression "((uint)bVar4 - iVar5) + 1 + (int)param_2" (binary_expression "((uint)bVar4 - iVar5) + 1" (parenthesized_expression "((uint)bVar4 - iVar5)" (( "(") (binary_expression "(uint)bVar4 - iVar5" (cast_expression "(uint)bVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar4")) (- "-") (identifier "iVar5")) () ")")) (+ "+") (number_literal "1")) (+ "+") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) (& "&") (number_literal "0xff")) () ")")))) (+ "+") (number_literal "2"))) (; ";")) (expression_statement "bVar2 = *pbVar3;" (assignment_expression "bVar2 = *pbVar3" (identifier "bVar2") (= "=") (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3"))) (; ";")) (expression_statement "bVar6 = bVar6 + bVar2;" (assignment_expression "bVar6 = bVar6 + bVar2" (identifier "bVar6") (= "=") (binary_expression "bVar6 + bVar2" (identifier "bVar6") (+ "+") (identifier "bVar2"))) (; ";")) (expression_statement "*pbVar3 = param_1[(ulong)bVar6 + 2];" (assignment_expression "*pbVar3 = param_1[(ulong)bVar6 + 2]" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (= "=") (subscript_expression "param_1[(ulong)bVar6 + 2]" (identifier "param_1") ([ "[") (binary_expression "(ulong)bVar6 + 2" (cast_expression "(ulong)bVar6" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar6")) (+ "+") (number_literal "2")) (] "]"))) (; ";")) (expression_statement "param_1[(ulong)bVar6 + 2] = bVar2;" (assignment_expression "param_1[(ulong)bVar6 + 2] = bVar2" (subscript_expression "param_1[(ulong)bVar6 + 2]" (identifier "param_1") ([ "[") (binary_expression "(ulong)bVar6 + 2" (cast_expression "(ulong)bVar6" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar6")) (+ "+") (number_literal "2")) (] "]")) (= "=") (identifier "bVar2")) (; ";")) (expression_statement "*param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];" (assignment_expression "*param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2]" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "*param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2]" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (^ "^") (subscript_expression "param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2]" (identifier "param_1") ([ "[") (binary_expression "(ulong)(byte)(bVar2 + *pbVar3) + 2" (call_expression "(ulong)(byte)(bVar2 + *pbVar3)" (call_expression "(ulong)(byte)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(byte)" (( "(") (identifier "byte") () ")"))) (argument_list "(bVar2 + *pbVar3)" (( "(") (binary_expression "bVar2 + *pbVar3" (identifier "bVar2") (+ "+") (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3"))) () ")"))) (+ "+") (number_literal "2")) (] "]")))) (; ";")) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 != pbVar1)" (( "(") (binary_expression "param_2 != pbVar1" (identifier "param_2") (!= "!=") (identifier "pbVar1")) () ")")) (; ";")) (expression_statement "bVar4 = bVar4 + 1 + (char)(param_3 - 1U);" (assignment_expression "bVar4 = bVar4 + 1 + (char)(param_3 - 1U)" (identifier "bVar4") (= "=") (binary_expression "bVar4 + 1 + (char)(param_3 - 1U)" (binary_expression "bVar4 + 1" (identifier "bVar4") (+ "+") (number_literal "1")) (+ "+") (cast_expression "(char)(param_3 - 1U)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(param_3 - 1U)" (( "(") (binary_expression "param_3 - 1U" (identifier "param_3") (- "-") (number_literal "1U")) () ")"))))) (; ";")) (} "}"))) (expression_statement "*param_1 = bVar4;" (assignment_expression "*param_1 = bVar4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "bVar4")) (; ";")) (expression_statement "param_1[1] = bVar6;" (assignment_expression "param_1[1] = bVar6" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "bVar6")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(void *handle,type_1 *var_2,int var_1)

{
  type_2 *var_6;
  char var_5;
  char *pcVar3;
  type_2 var_7;
  int var_3;
  char *pcVar6;
  type_2 var_4;
  
                    /* WARNING: Load size is inaccurate */
  var_7 = *handle;
  var_4 = *(type_2 *)((long)handle + 1);
  if (0 < var_1) {
    var_6 = var_2 + (type_4)(var_1 - 1U) + 1;
    var_3 = (int)var_2;
    do {
      pcVar3 = (char *)((long)handle + (type_4)(((type_3)var_7 - var_3) + 1 + (int)var_2 & 0xff) + 2);
      var_5 = *pcVar3;
      var_4 = var_4 + var_5;
      pcVar6 = (char *)((long)handle + (type_4)var_4 + 2);
      *pcVar3 = *pcVar6;
      *pcVar6 = var_5;
      *var_2 = *var_2 ^ *(type_2 *)((long)handle + (type_4)(type_2)(var_5 + *pcVar3) + 2);
      var_2 = var_2 + 1;
    } while (var_2 != var_6);
    var_7 = var_7 + 1 + (char)(var_1 - 1U);
  }
  *(type_2 *)handle = var_7;
  *(type_2 *)((long)handle + 1) = var_4;
  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: (type_identifier) 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: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (identifier))) right: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal))))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (binary_expression left: (call_expression function: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (identifier))) arguments: (argument_list (binary_expression left: (identifier) right: (pointer_expression argument: (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: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (return_statement))))

void MASKED(byte *param_1,byte *param_2,int param_3)

{
  byte *pbVar1;
  byte bVar2;
  byte *pbVar3;
  byte bVar4;
  int iVar5;
  byte bVar6;
  
  bVar4 = *param_1;
  bVar6 = param_1[1];
  if (0 < param_3) {
    pbVar1 = param_2 + (ulong)(param_3 - 1U) + 1;
    iVar5 = (int)param_2;
    do {
      pbVar3 = param_1 + (ulong)(((uint)bVar4 - iVar5) + 1 + (int)param_2 & 0xff) + 2;
      bVar2 = *pbVar3;
      bVar6 = bVar6 + bVar2;
      *pbVar3 = param_1[(ulong)bVar6 + 2];
      param_1[(ulong)bVar6 + 2] = bVar2;
      *param_2 = *param_2 ^ param_1[(ulong)(byte)(bVar2 + *pbVar3) + 2];
      param_2 = param_2 + 1;
    } while (param_2 != pbVar1);
    bVar4 = bVar4 + 1 + (char)(param_3 - 1U);
  }
  *param_1 = bVar4;
  param_1[1] = bVar6;
  return;
}

