
/* WARNING: Unknown calling convention */

void arcfour128_key(void *handle,uchar *key)

{
  byte *pbVar1;
  byte bVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  int in_GS_OFFSET;
  uchar k [256];
  
  uVar4 = 0;
  iVar3 = *(int *)(in_GS_OFFSET + 0x14);
  *(undefined2 *)handle = 0;
  do {
    *(char *)((int)handle + uVar4 + 2) = (char)uVar4;
    k[uVar4] = key[uVar4 & 0xf];
    uVar4 = uVar4 + 1;
  } while (uVar4 != 0x100);
  uVar4 = 0;
  iVar5 = 0;
  do {
    bVar2 = *(byte *)((int)handle + iVar5 + 2);
    uVar4 = uVar4 + (uint)k[iVar5] + (uint)bVar2 & 0xff;
    pbVar1 = (byte *)((int)handle + uVar4 + 2);
    *(byte *)((int)handle + iVar5 + 2) = *pbVar1;
    iVar5 = iVar5 + 1;
    *pbVar1 = bVar2;
  } while (iVar5 != 0x100);
  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {
    arcfour_stir((ArcfourContext *)handle);
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



void FUN_00053310(undefined2 *param_1,int param_2)

{
  byte *pbVar1;
  byte bVar2;
  uint uVar3;
  int iVar4;
  int in_GS_OFFSET;
  byte local_120 [256];
  int local_20;
  
  uVar3 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_1 = 0;
  do {
    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;
    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));
    uVar3 = uVar3 + 1;
  } while (uVar3 != 0x100);
  uVar3 = 0;
  iVar4 = 0;
  do {
    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);
    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;
    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);
    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;
    iVar4 = iVar4 + 1;
    *pbVar1 = bVar2;
  } while (iVar4 != 0x100);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    FUN_00053140();
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}


PUSH EBP
XOR EDX,EDX
XOR ECX,ECX
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x12c
MOV EDI,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x11c],EDI
XOR EDI,EDI
MOV EAX,dword ptr [ESP + 0x140]
MOV EBX,dword ptr [ESP + 0x144]
LEA ESI,[ESP + 0x1c]
MOV word ptr [EAX],DX
LEA EDI,[EAX + 0x2]
LEA ESI,[ESI]
LEA ESI,[ESI]
MOV EDX,ECX
MOV byte ptr [EAX + ECX*0x1 + 0x2],CL
AND EDX,0xf
MOVZX EDX,byte ptr [EBX + EDX*0x1]
MOV byte ptr [ESI + ECX*0x1],DL
ADD ECX,0x1
CMP ECX,0x100
JNZ 0x00053350
MOV dword ptr [ESP + 0x8],EAX
XOR EDX,EDX
XOR EBX,EBX
LEA ESI,[ESI]
NOP
MOV EBP,dword ptr [ESP + 0x8]
MOVZX ECX,byte ptr [EBP + EBX*0x1 + 0x2]
MOVZX EBP,CL
MOVZX ECX,byte ptr [ESI + EBX*0x1]
MOV EAX,EBP
ADD ECX,EBP
MOV byte ptr [ESP + 0xf],AL
MOV EBP,dword ptr [ESP + 0x8]
ADD EDX,ECX
MOVZX EDX,DL
LEA ECX,[EDI + EDX*0x1]
MOVZX EAX,byte ptr [ECX]
MOV byte ptr [EBP + EBX*0x1 + 0x2],AL
MOVZX EAX,byte ptr [ESP + 0xf]
ADD EBX,0x1
MOV byte ptr [ECX],AL
CMP EBX,0x100
JNZ 0x00053378
MOV ESI,dword ptr [ESP + 0x11c]
XOR ESI,dword ptr GS:[0x14]
MOV EAX,EBP
JNZ 0x000533d6
ADD ESP,0x12c
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x00053140
CALL 0x0008eb20
(translation_unit "void FUN_00053310(undefined2 *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  byte local_120 [256];\n  int local_20;\n  \n  uVar3 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = 0;\n  do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);\n  uVar3 = 0;\n  iVar4 = 0;\n  do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}\n\n" (function_definition "void FUN_00053310(undefined2 *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  byte local_120 [256];\n  int local_20;\n  \n  uVar3 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = 0;\n  do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);\n  uVar3 = 0;\n  iVar4 = 0;\n  do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" primitive_type (function_declarator "FUN_00053310(undefined2 *param_1,int param_2)" identifier (parameter_list "(undefined2 *param_1,int param_2)" ( (parameter_declaration "undefined2 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  byte local_120 [256];\n  int local_20;\n  \n  uVar3 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = 0;\n  do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);\n  uVar3 = 0;\n  iVar4 = 0;\n  do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte local_120 [256];" type_identifier (array_declarator "local_120 [256]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (do_statement "do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);" do (compound_statement "{\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  }" { (expression_statement "*(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;" (assignment_expression "*(char *)((int)param_1 + uVar3 + 2) = (char)uVar3" (pointer_expression "*(char *)((int)param_1 + uVar3 + 2)" * (cast_expression "(char *)((int)param_1 + uVar3 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + uVar3 + 2)" ( (binary_expression "(int)param_1 + uVar3 + 2" (binary_expression "(int)param_1 + uVar3" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (cast_expression "(char)uVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));" (assignment_expression "local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf))" (subscript_expression "local_120[uVar3]" identifier [ identifier ]) = (pointer_expression "*(byte *)(param_2 + (uVar3 & 0xf))" * (cast_expression "(byte *)(param_2 + (uVar3 & 0xf))" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (uVar3 & 0xf))" ( (binary_expression "param_2 + (uVar3 & 0xf)" identifier + (parenthesized_expression "(uVar3 & 0xf)" ( (binary_expression "uVar3 & 0xf" identifier & number_literal) ))) ))))) ;) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 != 0x100)" ( (binary_expression "uVar3 != 0x100" identifier != number_literal) )) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);" do (compound_statement "{\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  }" { (expression_statement "bVar2 = *(byte *)((int)param_1 + iVar4 + 2);" (assignment_expression "bVar2 = *(byte *)((int)param_1 + iVar4 + 2)" identifier = (pointer_expression "*(byte *)((int)param_1 + iVar4 + 2)" * (cast_expression "(byte *)((int)param_1 + iVar4 + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + iVar4 + 2)" ( (binary_expression "(int)param_1 + iVar4 + 2" (binary_expression "(int)param_1 + iVar4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) ))))) ;) (expression_statement "uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;" (assignment_expression "uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff" identifier = (binary_expression "uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff" (binary_expression "uVar3 + (uint)local_120[iVar4] + (uint)bVar2" (binary_expression "uVar3 + (uint)local_120[iVar4]" identifier + (cast_expression "(uint)local_120[iVar4]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "local_120[iVar4]" identifier [ identifier ]))) + (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) & number_literal)) ;) (expression_statement "pbVar1 = (byte *)((int)param_1 + uVar3 + 2);" (assignment_expression "pbVar1 = (byte *)((int)param_1 + uVar3 + 2)" identifier = (cast_expression "(byte *)((int)param_1 + uVar3 + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + uVar3 + 2)" ( (binary_expression "(int)param_1 + uVar3 + 2" (binary_expression "(int)param_1 + uVar3" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) ;) (expression_statement "*(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;" (assignment_expression "*(byte *)((int)param_1 + iVar4 + 2) = *pbVar1" (pointer_expression "*(byte *)((int)param_1 + iVar4 + 2)" * (cast_expression "(byte *)((int)param_1 + iVar4 + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + iVar4 + 2)" ( (binary_expression "(int)param_1 + iVar4 + 2" (binary_expression "(int)param_1 + iVar4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (pointer_expression "*pbVar1" * identifier)) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar1 = bVar2;" (assignment_expression "*pbVar1 = bVar2" (pointer_expression "*pbVar1" * identifier) = identifier) ;) }) while (parenthesized_expression "(iVar4 != 0x100)" ( (binary_expression "iVar4 != 0x100" identifier != number_literal) )) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    FUN_00053140();\n    return;\n  }" { (expression_statement "FUN_00053140();" (call_expression "FUN_00053140()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nvoid arcfour128_key(void *handle,uchar *key)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  uchar k [256];\n  \n  uVar4 = 0;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  *(undefined2 *)handle = 0;\n  do {\n    *(char *)((int)handle + uVar4 + 2) = (char)uVar4;\n    k[uVar4] = key[uVar4 & 0xf];\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 0x100);\n  uVar4 = 0;\n  iVar5 = 0;\n  do {\n    bVar2 = *(byte *)((int)handle + iVar5 + 2);\n    uVar4 = uVar4 + (uint)k[iVar5] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)handle + uVar4 + 2);\n    *(byte *)((int)handle + iVar5 + 2) = *pbVar1;\n    iVar5 = iVar5 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar5 != 0x100);\n  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    arcfour_stir((ArcfourContext *)handle);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void arcfour128_key(void *handle,uchar *key)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  uchar k [256];\n  \n  uVar4 = 0;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  *(undefined2 *)handle = 0;\n  do {\n    *(char *)((int)handle + uVar4 + 2) = (char)uVar4;\n    k[uVar4] = key[uVar4 & 0xf];\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 0x100);\n  uVar4 = 0;\n  iVar5 = 0;\n  do {\n    bVar2 = *(byte *)((int)handle + iVar5 + 2);\n    uVar4 = uVar4 + (uint)k[iVar5] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)handle + uVar4 + 2);\n    *(byte *)((int)handle + iVar5 + 2) = *pbVar1;\n    iVar5 = iVar5 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar5 != 0x100);\n  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    arcfour_stir((ArcfourContext *)handle);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "arcfour128_key(void *handle,uchar *key)" identifier (parameter_list "(void *handle,uchar *key)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) , (parameter_declaration "uchar *key" type_identifier (pointer_declarator "*key" * identifier)) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  int iVar3;\n  uint uVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  uchar k [256];\n  \n  uVar4 = 0;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  *(undefined2 *)handle = 0;\n  do {\n    *(char *)((int)handle + uVar4 + 2) = (char)uVar4;\n    k[uVar4] = key[uVar4 & 0xf];\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 0x100);\n  uVar4 = 0;\n  iVar5 = 0;\n  do {\n    bVar2 = *(byte *)((int)handle + iVar5 + 2);\n    uVar4 = uVar4 + (uint)k[iVar5] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)handle + uVar4 + 2);\n    *(byte *)((int)handle + iVar5 + 2) = *pbVar1;\n    iVar5 = iVar5 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar5 != 0x100);\n  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    arcfour_stir((ArcfourContext *)handle);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uchar k [256];" type_identifier (array_declarator "k [256]" identifier [ number_literal ]) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "iVar3 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar3 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*(undefined2 *)handle = 0;" (assignment_expression "*(undefined2 *)handle = 0" (pointer_expression "*(undefined2 *)handle" * (cast_expression "(undefined2 *)handle" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (do_statement "do {\n    *(char *)((int)handle + uVar4 + 2) = (char)uVar4;\n    k[uVar4] = key[uVar4 & 0xf];\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 0x100);" do (compound_statement "{\n    *(char *)((int)handle + uVar4 + 2) = (char)uVar4;\n    k[uVar4] = key[uVar4 & 0xf];\n    uVar4 = uVar4 + 1;\n  }" { (expression_statement "*(char *)((int)handle + uVar4 + 2) = (char)uVar4;" (assignment_expression "*(char *)((int)handle + uVar4 + 2) = (char)uVar4" (pointer_expression "*(char *)((int)handle + uVar4 + 2)" * (cast_expression "(char *)((int)handle + uVar4 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + uVar4 + 2)" ( (binary_expression "(int)handle + uVar4 + 2" (binary_expression "(int)handle + uVar4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (cast_expression "(char)uVar4" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "k[uVar4] = key[uVar4 & 0xf];" (assignment_expression "k[uVar4] = key[uVar4 & 0xf]" (subscript_expression "k[uVar4]" identifier [ identifier ]) = (subscript_expression "key[uVar4 & 0xf]" identifier [ (binary_expression "uVar4 & 0xf" identifier & number_literal) ])) ;) (expression_statement "uVar4 = uVar4 + 1;" (assignment_expression "uVar4 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 != 0x100)" ( (binary_expression "uVar4 != 0x100" identifier != number_literal) )) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    bVar2 = *(byte *)((int)handle + iVar5 + 2);\n    uVar4 = uVar4 + (uint)k[iVar5] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)handle + uVar4 + 2);\n    *(byte *)((int)handle + iVar5 + 2) = *pbVar1;\n    iVar5 = iVar5 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar5 != 0x100);" do (compound_statement "{\n    bVar2 = *(byte *)((int)handle + iVar5 + 2);\n    uVar4 = uVar4 + (uint)k[iVar5] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)handle + uVar4 + 2);\n    *(byte *)((int)handle + iVar5 + 2) = *pbVar1;\n    iVar5 = iVar5 + 1;\n    *pbVar1 = bVar2;\n  }" { (expression_statement "bVar2 = *(byte *)((int)handle + iVar5 + 2);" (assignment_expression "bVar2 = *(byte *)((int)handle + iVar5 + 2)" identifier = (pointer_expression "*(byte *)((int)handle + iVar5 + 2)" * (cast_expression "(byte *)((int)handle + iVar5 + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + iVar5 + 2)" ( (binary_expression "(int)handle + iVar5 + 2" (binary_expression "(int)handle + iVar5" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) ))))) ;) (expression_statement "uVar4 = uVar4 + (uint)k[iVar5] + (uint)bVar2 & 0xff;" (assignment_expression "uVar4 = uVar4 + (uint)k[iVar5] + (uint)bVar2 & 0xff" identifier = (binary_expression "uVar4 + (uint)k[iVar5] + (uint)bVar2 & 0xff" (binary_expression "uVar4 + (uint)k[iVar5] + (uint)bVar2" (binary_expression "uVar4 + (uint)k[iVar5]" identifier + (cast_expression "(uint)k[iVar5]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "k[iVar5]" identifier [ identifier ]))) + (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) & number_literal)) ;) (expression_statement "pbVar1 = (byte *)((int)handle + uVar4 + 2);" (assignment_expression "pbVar1 = (byte *)((int)handle + uVar4 + 2)" identifier = (cast_expression "(byte *)((int)handle + uVar4 + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + uVar4 + 2)" ( (binary_expression "(int)handle + uVar4 + 2" (binary_expression "(int)handle + uVar4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) ;) (expression_statement "*(byte *)((int)handle + iVar5 + 2) = *pbVar1;" (assignment_expression "*(byte *)((int)handle + iVar5 + 2) = *pbVar1" (pointer_expression "*(byte *)((int)handle + iVar5 + 2)" * (cast_expression "(byte *)((int)handle + iVar5 + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + iVar5 + 2)" ( (binary_expression "(int)handle + iVar5 + 2" (binary_expression "(int)handle + iVar5" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (pointer_expression "*pbVar1" * identifier)) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar1 = bVar2;" (assignment_expression "*pbVar1 = bVar2" (pointer_expression "*pbVar1" * identifier) = identifier) ;) }) while (parenthesized_expression "(iVar5 != 0x100)" ( (binary_expression "iVar5 != 0x100" identifier != number_literal) )) ;) (if_statement "if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    arcfour_stir((ArcfourContext *)handle);\n    return;\n  }" if (parenthesized_expression "(iVar3 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar3 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    arcfour_stir((ArcfourContext *)handle);\n    return;\n  }" { (expression_statement "arcfour_stir((ArcfourContext *)handle);" (call_expression "arcfour_stir((ArcfourContext *)handle)" identifier (argument_list "((ArcfourContext *)handle)" ( (cast_expression "(ArcfourContext *)handle" ( (type_descriptor "ArcfourContext *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_00053310(undefined2 *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  byte local_120 [256];\n  int local_20;\n  \n  uVar3 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = 0;\n  do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);\n  uVar3 = 0;\n  iVar4 = 0;\n  do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }\n                    \n  FUN_0008eb20();\n}\n\n" (function_definition "void FUN_00053310(undefined2 *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  byte local_120 [256];\n  int local_20;\n  \n  uVar3 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = 0;\n  do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);\n  uVar3 = 0;\n  iVar4 = 0;\n  do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }\n                    \n  FUN_0008eb20();\n}" primitive_type (function_declarator "FUN_00053310(undefined2 *param_1,int param_2)" identifier (parameter_list "(undefined2 *param_1,int param_2)" ( (parameter_declaration "undefined2 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  byte local_120 [256];\n  int local_20;\n  \n  uVar3 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = 0;\n  do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);\n  uVar3 = 0;\n  iVar4 = 0;\n  do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }\n                    \n  FUN_0008eb20();\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte local_120 [256];" type_identifier (array_declarator "local_120 [256]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (do_statement "do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);" do (compound_statement "{\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  }" { (expression_statement "*(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;" (assignment_expression "*(char *)((int)param_1 + uVar3 + 2) = (char)uVar3" (pointer_expression "*(char *)((int)param_1 + uVar3 + 2)" * (cast_expression "(char *)((int)param_1 + uVar3 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + uVar3 + 2)" ( (binary_expression "(int)param_1 + uVar3 + 2" (binary_expression "(int)param_1 + uVar3" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (cast_expression "(char)uVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));" (assignment_expression "local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf))" (subscript_expression "local_120[uVar3]" identifier [ identifier ]) = (pointer_expression "*(byte *)(param_2 + (uVar3 & 0xf))" * (cast_expression "(byte *)(param_2 + (uVar3 & 0xf))" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (uVar3 & 0xf))" ( (binary_expression "param_2 + (uVar3 & 0xf)" identifier + (parenthesized_expression "(uVar3 & 0xf)" ( (binary_expression "uVar3 & 0xf" identifier & number_literal) ))) ))))) ;) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 != 0x100)" ( (binary_expression "uVar3 != 0x100" identifier != number_literal) )) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);" do (compound_statement "{\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  }" { (expression_statement "bVar2 = *(byte *)((int)param_1 + iVar4 + 2);" (assignment_expression "bVar2 = *(byte *)((int)param_1 + iVar4 + 2)" identifier = (pointer_expression "*(byte *)((int)param_1 + iVar4 + 2)" * (cast_expression "(byte *)((int)param_1 + iVar4 + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + iVar4 + 2)" ( (binary_expression "(int)param_1 + iVar4 + 2" (binary_expression "(int)param_1 + iVar4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) ))))) ;) (expression_statement "uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;" (assignment_expression "uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff" identifier = (binary_expression "uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff" (binary_expression "uVar3 + (uint)local_120[iVar4] + (uint)bVar2" (binary_expression "uVar3 + (uint)local_120[iVar4]" identifier + (cast_expression "(uint)local_120[iVar4]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "local_120[iVar4]" identifier [ identifier ]))) + (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) & number_literal)) ;) (expression_statement "pbVar1 = (byte *)((int)param_1 + uVar3 + 2);" (assignment_expression "pbVar1 = (byte *)((int)param_1 + uVar3 + 2)" identifier = (cast_expression "(byte *)((int)param_1 + uVar3 + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + uVar3 + 2)" ( (binary_expression "(int)param_1 + uVar3 + 2" (binary_expression "(int)param_1 + uVar3" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) ;) (expression_statement "*(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;" (assignment_expression "*(byte *)((int)param_1 + iVar4 + 2) = *pbVar1" (pointer_expression "*(byte *)((int)param_1 + iVar4 + 2)" * (cast_expression "(byte *)((int)param_1 + iVar4 + 2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + iVar4 + 2)" ( (binary_expression "(int)param_1 + iVar4 + 2" (binary_expression "(int)param_1 + iVar4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (pointer_expression "*pbVar1" * identifier)) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar1 = bVar2;" (assignment_expression "*pbVar1 = bVar2" (pointer_expression "*pbVar1" * identifier) = identifier) ;) }) while (parenthesized_expression "(iVar4 != 0x100)" ( (binary_expression "iVar4 != 0x100" identifier != number_literal) )) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    FUN_00053140();\n    return;\n  }" { (expression_statement "FUN_00053140();" (call_expression "FUN_00053140()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT & LIT) ))) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ IDENT ]))) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) & LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_00053310(undefined2 *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  byte local_120 [256];\n  int local_20;\n  \n  uVar3 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = 0;\n  do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);\n  uVar3 = 0;\n  iVar4 = 0;\n  do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }\n                    \n  FUN_0008eb20();\n}" (primitive_type "void") (function_declarator "FUN_00053310(undefined2 *param_1,int param_2)" (identifier "FUN_00053310") (parameter_list "(undefined2 *param_1,int param_2)" (( "(") (parameter_declaration "undefined2 *param_1" (type_identifier "undefined2") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  byte local_120 [256];\n  int local_20;\n  \n  uVar3 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_1 = 0;\n  do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);\n  uVar3 = 0;\n  iVar4 = 0;\n  do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }\n                    \n  FUN_0008eb20();\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "byte local_120 [256];" (type_identifier "byte") (array_declarator "local_120 [256]" (identifier "local_120") ([ "[") (number_literal "256") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  } while (uVar3 != 0x100);" (do "do") (compound_statement "{\n    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;\n    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));\n    uVar3 = uVar3 + 1;\n  }" ({ "{") (expression_statement "*(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;" (assignment_expression "*(char *)((int)param_1 + uVar3 + 2) = (char)uVar3" (pointer_expression "*(char *)((int)param_1 + uVar3 + 2)" (* "*") (cast_expression "(char *)((int)param_1 + uVar3 + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + uVar3 + 2)" (( "(") (binary_expression "(int)param_1 + uVar3 + 2" (binary_expression "(int)param_1 + uVar3" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (identifier "uVar3")) (+ "+") (number_literal "2")) () ")")))) (= "=") (cast_expression "(char)uVar3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar3"))) (; ";")) (expression_statement "local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));" (assignment_expression "local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf))" (subscript_expression "local_120[uVar3]" (identifier "local_120") ([ "[") (identifier "uVar3") (] "]")) (= "=") (pointer_expression "*(byte *)(param_2 + (uVar3 & 0xf))" (* "*") (cast_expression "(byte *)(param_2 + (uVar3 & 0xf))" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + (uVar3 & 0xf))" (( "(") (binary_expression "param_2 + (uVar3 & 0xf)" (identifier "param_2") (+ "+") (parenthesized_expression "(uVar3 & 0xf)" (( "(") (binary_expression "uVar3 & 0xf" (identifier "uVar3") (& "&") (number_literal "0xf")) () ")"))) () ")"))))) (; ";")) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 + 1" (identifier "uVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar3 != 0x100)" (( "(") (binary_expression "uVar3 != 0x100" (identifier "uVar3") (!= "!=") (number_literal "0x100")) () ")")) (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  } while (iVar4 != 0x100);" (do "do") (compound_statement "{\n    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);\n    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;\n    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);\n    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;\n    iVar4 = iVar4 + 1;\n    *pbVar1 = bVar2;\n  }" ({ "{") (expression_statement "bVar2 = *(byte *)((int)param_1 + iVar4 + 2);" (assignment_expression "bVar2 = *(byte *)((int)param_1 + iVar4 + 2)" (identifier "bVar2") (= "=") (pointer_expression "*(byte *)((int)param_1 + iVar4 + 2)" (* "*") (cast_expression "(byte *)((int)param_1 + iVar4 + 2)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + iVar4 + 2)" (( "(") (binary_expression "(int)param_1 + iVar4 + 2" (binary_expression "(int)param_1 + iVar4" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (identifier "iVar4")) (+ "+") (number_literal "2")) () ")"))))) (; ";")) (expression_statement "uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;" (assignment_expression "uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff" (identifier "uVar3") (= "=") (binary_expression "uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff" (binary_expression "uVar3 + (uint)local_120[iVar4] + (uint)bVar2" (binary_expression "uVar3 + (uint)local_120[iVar4]" (identifier "uVar3") (+ "+") (cast_expression "(uint)local_120[iVar4]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "local_120[iVar4]" (identifier "local_120") ([ "[") (identifier "iVar4") (] "]")))) (+ "+") (cast_expression "(uint)bVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar2"))) (& "&") (number_literal "0xff"))) (; ";")) (expression_statement "pbVar1 = (byte *)((int)param_1 + uVar3 + 2);" (assignment_expression "pbVar1 = (byte *)((int)param_1 + uVar3 + 2)" (identifier "pbVar1") (= "=") (cast_expression "(byte *)((int)param_1 + uVar3 + 2)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + uVar3 + 2)" (( "(") (binary_expression "(int)param_1 + uVar3 + 2" (binary_expression "(int)param_1 + uVar3" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (identifier "uVar3")) (+ "+") (number_literal "2")) () ")")))) (; ";")) (expression_statement "*(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;" (assignment_expression "*(byte *)((int)param_1 + iVar4 + 2) = *pbVar1" (pointer_expression "*(byte *)((int)param_1 + iVar4 + 2)" (* "*") (cast_expression "(byte *)((int)param_1 + iVar4 + 2)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + iVar4 + 2)" (( "(") (binary_expression "(int)param_1 + iVar4 + 2" (binary_expression "(int)param_1 + iVar4" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (identifier "iVar4")) (+ "+") (number_literal "2")) () ")")))) (= "=") (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1"))) (; ";")) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*pbVar1 = bVar2;" (assignment_expression "*pbVar1 = bVar2" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (identifier "bVar2")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != 0x100)" (( "(") (binary_expression "iVar4 != 0x100" (identifier "iVar4") (!= "!=") (number_literal "0x100")) () ")")) (; ";")) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    FUN_00053140();\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    FUN_00053140();\n    return;\n  }" ({ "{") (expression_statement "FUN_00053140();" (call_expression "FUN_00053140()" (identifier "FUN_00053140") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" (identifier "FUN_0008eb20") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

void function_1(void *handle,type_1 *key)

{
  type_2 *pbVar1;
  type_2 bVar2;
  int var_4;
  type_3 var_2;
  int var_3;
  int var_1;
  type_1 k [256];
  
  var_2 = 0;
  var_4 = *(int *)(var_1 + 0x14);
  *(type_4 *)handle = 0;
  do {
    *(char *)((int)handle + var_2 + 2) = (char)var_2;
    k[var_2] = key[var_2 & 0xf];
    var_2 = var_2 + 1;
  } while (var_2 != 0x100);
  var_2 = 0;
  var_3 = 0;
  do {
    bVar2 = *(type_2 *)((int)handle + var_3 + 2);
    var_2 = var_2 + (type_3)k[var_3] + (type_3)bVar2 & 0xff;
    pbVar1 = (type_2 *)((int)handle + var_2 + 2);
    *(type_2 *)((int)handle + var_3 + 2) = *pbVar1;
    var_3 = var_3 + 1;
    *pbVar1 = bVar2;
  } while (var_3 != 0x100);
  if (var_4 == *(int *)(var_1 + 0x14)) {
    var_5((type_5 *)handle);
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_6();
}


(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: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (do_statement body: (compound_statement (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: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (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: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (identifier)))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (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: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)) right: (number_literal))))) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_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))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

void MASKED(undefined2 *param_1,int param_2)

{
  byte *pbVar1;
  byte bVar2;
  uint uVar3;
  int iVar4;
  int in_GS_OFFSET;
  byte local_120 [256];
  int local_20;
  
  uVar3 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_1 = 0;
  do {
    *(char *)((int)param_1 + uVar3 + 2) = (char)uVar3;
    local_120[uVar3] = *(byte *)(param_2 + (uVar3 & 0xf));
    uVar3 = uVar3 + 1;
  } while (uVar3 != 0x100);
  uVar3 = 0;
  iVar4 = 0;
  do {
    bVar2 = *(byte *)((int)param_1 + iVar4 + 2);
    uVar3 = uVar3 + (uint)local_120[iVar4] + (uint)bVar2 & 0xff;
    pbVar1 = (byte *)((int)param_1 + uVar3 + 2);
    *(byte *)((int)param_1 + iVar4 + 2) = *pbVar1;
    iVar4 = iVar4 + 1;
    *pbVar1 = bVar2;
  } while (iVar4 != 0x100);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    FUN_00053140();
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}

