
/* WARNING: Unknown calling convention */

int kseed_test(void)

{
  int iVar1;
  test *pt;
  int which;
  long in_FS_OFFSET;
  uchar buf [2] [16];
  symmetric_key skey;
  long local_30;
  
  which = 0;
  pt = kseed_test::tests;
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  do {
    kseed_setup(pt->key,0x10,0,&skey);
    kseed_ecb_encrypt(pt->pt,buf[0],&skey);
    kseed_ecb_decrypt(buf[0],buf[1],&skey);
    iVar1 = compare_testvector(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which);
    if (iVar1 != 0) {
LAB_00122118:
      iVar1 = 5;
      break;
    }
    iVar1 = compare_testvector(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which);
    if (iVar1 != 0) goto LAB_00122118;
    which = which + 1;
    pt = pt + 1;
    iVar1 = 0;
  } while (which != 4);
  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



undefined8 kseed_test(void)

{
  int iVar1;
  undefined8 uVar2;
  undefined *puVar3;
  int iVar4;
  long in_FS_OFFSET;
  undefined1 auStack_10f8 [16];
  undefined1 local_10e8 [16];
  undefined1 local_10d8 [4264];
  long local_30;
  
  iVar4 = 0;
  puVar3 = &DAT_001a6dc0;
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  do {
    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);
    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);
    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);
    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);
    if (iVar1 != 0) {
LAB_00122118:
      uVar2 = 5;
      break;
    }
    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);
    if ((int)uVar2 != 0) goto LAB_00122118;
    iVar4 = iVar4 + 1;
    puVar3 = puVar3 + 0x30;
  } while (iVar4 != 4);
  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R14
PUSH R13
PUSH R12
PUSH RBP
XOR EBP,EBP
PUSH RBX
LEA RBX,[0x1a6dc0]
SUB RSP,0x10d0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x10c8],RAX
XOR EAX,EAX
MOV R12,RSP
LEA R13,[RSP + 0x20]
LEA R14,[R12 + 0x10]
MOV RCX,R13
XOR EDX,EDX
LEA RDI,[RBX + 0x20]
MOV ESI,0x10
CALL 0x00114d60
MOV RDX,R13
MOV RSI,R12
MOV RDI,RBX
CALL 0x001142e0
MOV RDX,R13
MOV RSI,R14
MOV RDI,R12
CALL 0x001140d0
LEA RDX,[RBX + 0x10]
MOV R9D,EBP
MOV RDI,R12
LEA R8,[0x1a6d80]
MOV ECX,0x10
MOV ESI,0x10
CALL 0x001143c0
TEST EAX,EAX
JNZ 0x00122118
MOV R9D,EBP
LEA R8,[0x1a6d8e]
MOV RDX,RBX
MOV RDI,R14
MOV ECX,0x10
MOV ESI,0x10
CALL 0x001143c0
TEST EAX,EAX
JNZ 0x00122118
ADD EBP,0x1
ADD RBX,0x30
CMP EBP,0x4
JNZ 0x00122068
MOV RCX,qword ptr [RSP + 0x10c8]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x0012211f
ADD RSP,0x10d0
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
MOV EAX,0x5
JMP 0x001220ee
CALL 0x00113880
(translation_unit "undefined8 kseed_test(void)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  undefined *puVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  undefined1 auStack_10f8 [16];\n  undefined1 local_10e8 [16];\n  undefined1 local_10d8 [4264];\n  long local_30;\n  \n  iVar4 = 0;\n  puVar3 = &DAT_001a6dc0;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "undefined8 kseed_test(void)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  undefined *puVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  undefined1 auStack_10f8 [16];\n  undefined1 local_10e8 [16];\n  undefined1 local_10d8 [4264];\n  long local_30;\n  \n  iVar4 = 0;\n  puVar3 = &DAT_001a6dc0;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" type_identifier (function_declarator "kseed_test(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  undefined *puVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  undefined1 auStack_10f8 [16];\n  undefined1 local_10e8 [16];\n  undefined1 local_10d8 [4264];\n  long local_30;\n  \n  iVar4 = 0;\n  puVar3 = &DAT_001a6dc0;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 auStack_10f8 [16];" type_identifier (array_declarator "auStack_10f8 [16]" identifier [ number_literal ]) ;) (declaration "undefined1 local_10e8 [16];" type_identifier (array_declarator "local_10e8 [16]" identifier [ number_literal ]) ;) (declaration "undefined1 local_10d8 [4264];" type_identifier (array_declarator "local_10d8 [4264]" identifier [ number_literal ]) ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "puVar3 = &DAT_001a6dc0;" (assignment_expression "puVar3 = &DAT_001a6dc0" identifier = (pointer_expression "&DAT_001a6dc0" & identifier)) ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (do_statement "do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);" do (compound_statement "{\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  }" { (expression_statement "kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);" (call_expression "kseed_setup(puVar3 + 0x20,0x10,0,local_10d8)" identifier (argument_list "(puVar3 + 0x20,0x10,0,local_10d8)" ( (binary_expression "puVar3 + 0x20" identifier + number_literal) , number_literal , number_literal , identifier ))) ;) (expression_statement "kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);" (call_expression "kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8)" identifier (argument_list "(puVar3,auStack_10f8,local_10d8)" ( identifier , identifier , identifier ))) ;) (expression_statement "kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);" (call_expression "kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8)" identifier (argument_list "(auStack_10f8,local_10e8,local_10d8)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);" (assignment_expression "iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4)" identifier = (call_expression "compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4)" identifier (argument_list "(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4)" ( identifier , number_literal , (binary_expression "puVar3 + 0x10" identifier + number_literal) , number_literal , (string_literal ""KSEED Encrypt"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }" { (labeled_statement "LAB_00122118:\n      uVar2 = 5;" statement_identifier : (expression_statement "uVar2 = 5;" (assignment_expression "uVar2 = 5" identifier = number_literal) ;)) (break_statement "break;" break ;) })) (expression_statement "uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);" (assignment_expression "uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4)" identifier = (call_expression "compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4)" identifier (argument_list "(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4)" ( identifier , number_literal , identifier , number_literal , (string_literal ""KSEED Decrypt"" " string_content ") , identifier )))) ;) (if_statement "if ((int)uVar2 != 0) goto LAB_00122118;" if (parenthesized_expression "((int)uVar2 != 0)" ( (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (goto_statement "goto LAB_00122118;" goto statement_identifier ;)) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar3 + 0x30;" (assignment_expression "puVar3 = puVar3 + 0x30" identifier = (binary_expression "puVar3 + 0x30" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 4)" ( (binary_expression "iVar4 != 4" identifier != number_literal) )) ;) (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint kseed_test(void)\n\n{\n  int iVar1;\n  test *pt;\n  int which;\n  long in_FS_OFFSET;\n  uchar buf [2] [16];\n  symmetric_key skey;\n  long local_30;\n  \n  which = 0;\n  pt = kseed_test::tests;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(pt->key,0x10,0,&skey);\n    kseed_ecb_encrypt(pt->pt,buf[0],&skey);\n    kseed_ecb_decrypt(buf[0],buf[1],&skey);\n    iVar1 = compare_testvector(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which);\n    if (iVar1 != 0) {\nLAB_00122118:\n      iVar1 = 5;\n      break;\n    }\n    iVar1 = compare_testvector(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which);\n    if (iVar1 != 0) goto LAB_00122118;\n    which = which + 1;\n    pt = pt + 1;\n    iVar1 = 0;\n  } while (which != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" comment (function_definition "int kseed_test(void)\n\n{\n  int iVar1;\n  test *pt;\n  int which;\n  long in_FS_OFFSET;\n  uchar buf [2] [16];\n  symmetric_key skey;\n  long local_30;\n  \n  which = 0;\n  pt = kseed_test::tests;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(pt->key,0x10,0,&skey);\n    kseed_ecb_encrypt(pt->pt,buf[0],&skey);\n    kseed_ecb_decrypt(buf[0],buf[1],&skey);\n    iVar1 = compare_testvector(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which);\n    if (iVar1 != 0) {\nLAB_00122118:\n      iVar1 = 5;\n      break;\n    }\n    iVar1 = compare_testvector(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which);\n    if (iVar1 != 0) goto LAB_00122118;\n    which = which + 1;\n    pt = pt + 1;\n    iVar1 = 0;\n  } while (which != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "kseed_test(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  test *pt;\n  int which;\n  long in_FS_OFFSET;\n  uchar buf [2] [16];\n  symmetric_key skey;\n  long local_30;\n  \n  which = 0;\n  pt = kseed_test::tests;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(pt->key,0x10,0,&skey);\n    kseed_ecb_encrypt(pt->pt,buf[0],&skey);\n    kseed_ecb_decrypt(buf[0],buf[1],&skey);\n    iVar1 = compare_testvector(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which);\n    if (iVar1 != 0) {\nLAB_00122118:\n      iVar1 = 5;\n      break;\n    }\n    iVar1 = compare_testvector(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which);\n    if (iVar1 != 0) goto LAB_00122118;\n    which = which + 1;\n    pt = pt + 1;\n    iVar1 = 0;\n  } while (which != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "test *pt;" type_identifier (pointer_declarator "*pt" * identifier) ;) (declaration "int which;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "uchar buf [2] [16];" type_identifier (array_declarator "buf [2] [16]" (array_declarator "buf [2]" identifier [ number_literal ]) [ number_literal ]) ;) (declaration "symmetric_key skey;" type_identifier identifier ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "which = 0;" (assignment_expression "which = 0" identifier = number_literal) ;) (expression_statement "pt = kseed_test::tests;" (assignment_expression "pt = kseed_test" identifier = identifier) (ERROR "::tests" : : identifier) ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (do_statement "do {\n    kseed_setup(pt->key,0x10,0,&skey);\n    kseed_ecb_encrypt(pt->pt,buf[0],&skey);\n    kseed_ecb_decrypt(buf[0],buf[1],&skey);\n    iVar1 = compare_testvector(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which);\n    if (iVar1 != 0) {\nLAB_00122118:\n      iVar1 = 5;\n      break;\n    }\n    iVar1 = compare_testvector(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which);\n    if (iVar1 != 0) goto LAB_00122118;\n    which = which + 1;\n    pt = pt + 1;\n    iVar1 = 0;\n  } while (which != 4);" do (compound_statement "{\n    kseed_setup(pt->key,0x10,0,&skey);\n    kseed_ecb_encrypt(pt->pt,buf[0],&skey);\n    kseed_ecb_decrypt(buf[0],buf[1],&skey);\n    iVar1 = compare_testvector(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which);\n    if (iVar1 != 0) {\nLAB_00122118:\n      iVar1 = 5;\n      break;\n    }\n    iVar1 = compare_testvector(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which);\n    if (iVar1 != 0) goto LAB_00122118;\n    which = which + 1;\n    pt = pt + 1;\n    iVar1 = 0;\n  }" { (expression_statement "kseed_setup(pt->key,0x10,0,&skey);" (call_expression "kseed_setup(pt->key,0x10,0,&skey)" identifier (argument_list "(pt->key,0x10,0,&skey)" ( (field_expression "pt->key" identifier -> field_identifier) , number_literal , number_literal , (pointer_expression "&skey" & identifier) ))) ;) (expression_statement "kseed_ecb_encrypt(pt->pt,buf[0],&skey);" (call_expression "kseed_ecb_encrypt(pt->pt,buf[0],&skey)" identifier (argument_list "(pt->pt,buf[0],&skey)" ( (field_expression "pt->pt" identifier -> field_identifier) , (subscript_expression "buf[0]" identifier [ number_literal ]) , (pointer_expression "&skey" & identifier) ))) ;) (expression_statement "kseed_ecb_decrypt(buf[0],buf[1],&skey);" (call_expression "kseed_ecb_decrypt(buf[0],buf[1],&skey)" identifier (argument_list "(buf[0],buf[1],&skey)" ( (subscript_expression "buf[0]" identifier [ number_literal ]) , (subscript_expression "buf[1]" identifier [ number_literal ]) , (pointer_expression "&skey" & identifier) ))) ;) (expression_statement "iVar1 = compare_testvector(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which);" (assignment_expression "iVar1 = compare_testvector(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which)" identifier = (call_expression "compare_testvector(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which)" identifier (argument_list "(buf,0x10,pt->ct,0x10,"KSEED Encrypt",which)" ( identifier , number_literal , (field_expression "pt->ct" identifier -> field_identifier) , number_literal , (string_literal ""KSEED Encrypt"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 != 0) {\nLAB_00122118:\n      iVar1 = 5;\n      break;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00122118:\n      iVar1 = 5;\n      break;\n    }" { (labeled_statement "LAB_00122118:\n      iVar1 = 5;" statement_identifier : (expression_statement "iVar1 = 5;" (assignment_expression "iVar1 = 5" identifier = number_literal) ;)) (break_statement "break;" break ;) })) (expression_statement "iVar1 = compare_testvector(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which);" (assignment_expression "iVar1 = compare_testvector(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which)" identifier = (call_expression "compare_testvector(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which)" identifier (argument_list "(buf + 1,0x10,pt,0x10,"KSEED Decrypt",which)" ( (binary_expression "buf + 1" identifier + number_literal) , number_literal , identifier , number_literal , (string_literal ""KSEED Decrypt"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 != 0) goto LAB_00122118;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00122118;" goto statement_identifier ;)) (expression_statement "which = which + 1;" (assignment_expression "which = which + 1" identifier = (binary_expression "which + 1" identifier + number_literal)) ;) (expression_statement "pt = pt + 1;" (assignment_expression "pt = pt + 1" identifier = (binary_expression "pt + 1" identifier + number_literal)) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) while (parenthesized_expression "(which != 4)" ( (binary_expression "which != 4" identifier != number_literal) )) ;) (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined8 kseed_test(void)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  undefined *puVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  undefined1 auStack_10f8 [16];\n  undefined1 local_10e8 [16];\n  undefined1 local_10d8 [4264];\n  long local_30;\n  \n  iVar4 = 0;\n  puVar3 = &DAT_001a6dc0;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "undefined8 kseed_test(void)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  undefined *puVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  undefined1 auStack_10f8 [16];\n  undefined1 local_10e8 [16];\n  undefined1 local_10d8 [4264];\n  long local_30;\n  \n  iVar4 = 0;\n  puVar3 = &DAT_001a6dc0;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" type_identifier (function_declarator "kseed_test(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  undefined *puVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  undefined1 auStack_10f8 [16];\n  undefined1 local_10e8 [16];\n  undefined1 local_10d8 [4264];\n  long local_30;\n  \n  iVar4 = 0;\n  puVar3 = &DAT_001a6dc0;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 auStack_10f8 [16];" type_identifier (array_declarator "auStack_10f8 [16]" identifier [ number_literal ]) ;) (declaration "undefined1 local_10e8 [16];" type_identifier (array_declarator "local_10e8 [16]" identifier [ number_literal ]) ;) (declaration "undefined1 local_10d8 [4264];" type_identifier (array_declarator "local_10d8 [4264]" identifier [ number_literal ]) ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "puVar3 = &DAT_001a6dc0;" (assignment_expression "puVar3 = &DAT_001a6dc0" identifier = (pointer_expression "&DAT_001a6dc0" & identifier)) ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (do_statement "do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);" do (compound_statement "{\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  }" { (expression_statement "kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);" (call_expression "kseed_setup(puVar3 + 0x20,0x10,0,local_10d8)" identifier (argument_list "(puVar3 + 0x20,0x10,0,local_10d8)" ( (binary_expression "puVar3 + 0x20" identifier + number_literal) , number_literal , number_literal , identifier ))) ;) (expression_statement "kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);" (call_expression "kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8)" identifier (argument_list "(puVar3,auStack_10f8,local_10d8)" ( identifier , identifier , identifier ))) ;) (expression_statement "kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);" (call_expression "kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8)" identifier (argument_list "(auStack_10f8,local_10e8,local_10d8)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);" (assignment_expression "iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4)" identifier = (call_expression "compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4)" identifier (argument_list "(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4)" ( identifier , number_literal , (binary_expression "puVar3 + 0x10" identifier + number_literal) , number_literal , (string_literal ""KSEED Encrypt"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }" { (labeled_statement "LAB_00122118:\n      uVar2 = 5;" statement_identifier : (expression_statement "uVar2 = 5;" (assignment_expression "uVar2 = 5" identifier = number_literal) ;)) (break_statement "break;" break ;) })) (expression_statement "uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);" (assignment_expression "uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4)" identifier = (call_expression "compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4)" identifier (argument_list "(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4)" ( identifier , number_literal , identifier , number_literal , (string_literal ""KSEED Decrypt"" " string_content ") , identifier )))) ;) (if_statement "if ((int)uVar2 != 0) goto LAB_00122118;" if (parenthesized_expression "((int)uVar2 != 0)" ( (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )) (goto_statement "goto LAB_00122118;" goto statement_identifier ;)) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar3 + 0x30;" (assignment_expression "puVar3 = puVar3 + 0x30" identifier = (binary_expression "puVar3 + 0x30" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 4)" ( (binary_expression "iVar4 != 4" identifier != number_literal) )) ;) (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (do_statement do (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , LIT , LIT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression IDENT + LIT) , LIT , (string_literal " string_content ") , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (break_statement break ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , LIT , (string_literal " string_content ") , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined8 kseed_test(void)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  undefined *puVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  undefined1 auStack_10f8 [16];\n  undefined1 local_10e8 [16];\n  undefined1 local_10d8 [4264];\n  long local_30;\n  \n  iVar4 = 0;\n  puVar3 = &DAT_001a6dc0;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" (type_identifier "undefined8") (function_declarator "kseed_test(void)" (identifier "kseed_test") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  undefined *puVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  undefined1 auStack_10f8 [16];\n  undefined1 local_10e8 [16];\n  undefined1 local_10d8 [4264];\n  long local_30;\n  \n  iVar4 = 0;\n  puVar3 = &DAT_001a6dc0;\n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined1 auStack_10f8 [16];" (type_identifier "undefined1") (array_declarator "auStack_10f8 [16]" (identifier "auStack_10f8") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "undefined1 local_10e8 [16];" (type_identifier "undefined1") (array_declarator "local_10e8 [16]" (identifier "local_10e8") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "undefined1 local_10d8 [4264];" (type_identifier "undefined1") (array_declarator "local_10d8 [4264]" (identifier "local_10d8") ([ "[") (number_literal "4264") (] "]")) (; ";")) (declaration "long local_30;" (sized_type_specifier "long" (long "long")) (identifier "local_30") (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3 = &DAT_001a6dc0;" (assignment_expression "puVar3 = &DAT_001a6dc0" (identifier "puVar3") (= "=") (pointer_expression "&DAT_001a6dc0" (& "&") (identifier "DAT_001a6dc0"))) (; ";")) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (do_statement "do {\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  } while (iVar4 != 4);" (do "do") (compound_statement "{\n    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);\n    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);\n    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);\n    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);\n    if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }\n    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);\n    if ((int)uVar2 != 0) goto LAB_00122118;\n    iVar4 = iVar4 + 1;\n    puVar3 = puVar3 + 0x30;\n  }" ({ "{") (expression_statement "kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);" (call_expression "kseed_setup(puVar3 + 0x20,0x10,0,local_10d8)" (identifier "kseed_setup") (argument_list "(puVar3 + 0x20,0x10,0,local_10d8)" (( "(") (binary_expression "puVar3 + 0x20" (identifier "puVar3") (+ "+") (number_literal "0x20")) (, ",") (number_literal "0x10") (, ",") (number_literal "0") (, ",") (identifier "local_10d8") () ")"))) (; ";")) (expression_statement "kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);" (call_expression "kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8)" (identifier "kseed_ecb_encrypt") (argument_list "(puVar3,auStack_10f8,local_10d8)" (( "(") (identifier "puVar3") (, ",") (identifier "auStack_10f8") (, ",") (identifier "local_10d8") () ")"))) (; ";")) (expression_statement "kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);" (call_expression "kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8)" (identifier "kseed_ecb_decrypt") (argument_list "(auStack_10f8,local_10e8,local_10d8)" (( "(") (identifier "auStack_10f8") (, ",") (identifier "local_10e8") (, ",") (identifier "local_10d8") () ")"))) (; ";")) (expression_statement "iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);" (assignment_expression "iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4)" (identifier "iVar1") (= "=") (call_expression "compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4)" (identifier "compare_testvector") (argument_list "(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4)" (( "(") (identifier "auStack_10f8") (, ",") (number_literal "0x10") (, ",") (binary_expression "puVar3 + 0x10" (identifier "puVar3") (+ "+") (number_literal "0x10")) (, ",") (number_literal "0x10") (, ",") (string_literal ""KSEED Encrypt"" (" """) (string_content "KSEED Encrypt") (" """)) (, ",") (identifier "iVar4") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00122118:\n      uVar2 = 5;\n      break;\n    }" ({ "{") (labeled_statement "LAB_00122118:\n      uVar2 = 5;" (statement_identifier "LAB_00122118") (: ":") (expression_statement "uVar2 = 5;" (assignment_expression "uVar2 = 5" (identifier "uVar2") (= "=") (number_literal "5")) (; ";"))) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);" (assignment_expression "uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4)" (identifier "uVar2") (= "=") (call_expression "compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4)" (identifier "compare_testvector") (argument_list "(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4)" (( "(") (identifier "local_10e8") (, ",") (number_literal "0x10") (, ",") (identifier "puVar3") (, ",") (number_literal "0x10") (, ",") (string_literal ""KSEED Decrypt"" (" """) (string_content "KSEED Decrypt") (" """)) (, ",") (identifier "iVar4") () ")")))) (; ";")) (if_statement "if ((int)uVar2 != 0) goto LAB_00122118;" (if "if") (parenthesized_expression "((int)uVar2 != 0)" (( "(") (binary_expression "(int)uVar2 != 0" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00122118;" (goto "goto") (statement_identifier "LAB_00122118") (; ";"))) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar3 = puVar3 + 0x30;" (assignment_expression "puVar3 = puVar3 + 0x30" (identifier "puVar3") (= "=") (binary_expression "puVar3 + 0x30" (identifier "puVar3") (+ "+") (number_literal "0x30"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != 4)" (( "(") (binary_expression "iVar4 != 4" (identifier "iVar4") (!= "!=") (number_literal "4")) () ")")) (; ";")) (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(void)

{
  int var_6;
  type_1 *var_9;
  int var_8;
  long var_1;
  type_2 var_7 [2] [16];
  type_3 skey;
  long var_10;
  
  var_8 = 0;
  var_9 = function_1::tests;
  var_10 = *(long *)(var_1 + 0x28);
  do {
    var_2(var_9->key,0x10,0,&skey);
    var_3(var_9->var_9,var_7[0],&skey);
    var_4(var_7[0],var_7[1],&skey);
    var_6 = var_5(var_7,0x10,var_9->ct,0x10,"KSEED Encrypt",var_8);
    if (var_6 != 0) {
LAB_00122118:
      var_6 = 5;
      break;
    }
    var_6 = var_5(var_7 + 1,0x10,var_9,0x10,"KSEED Decrypt",var_8);
    if (var_6 != 0) goto LAB_00122118;
    var_8 = var_8 + 1;
    var_9 = var_9 + 1;
    var_6 = 0;
  } while (var_8 != 4);
  if (var_10 == *(long *)(var_1 + 0x28)) {
    return var_6;
  }
                    /* WARNING: Subroutine does not return */
  var_11();
}


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

undefined8 MASKED(void)

{
  int iVar1;
  undefined8 uVar2;
  undefined *puVar3;
  int iVar4;
  long in_FS_OFFSET;
  undefined1 auStack_10f8 [16];
  undefined1 local_10e8 [16];
  undefined1 local_10d8 [4264];
  long local_30;
  
  iVar4 = 0;
  puVar3 = &DAT_001a6dc0;
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  do {
    kseed_setup(puVar3 + 0x20,0x10,0,local_10d8);
    kseed_ecb_encrypt(puVar3,auStack_10f8,local_10d8);
    kseed_ecb_decrypt(auStack_10f8,local_10e8,local_10d8);
    iVar1 = compare_testvector(auStack_10f8,0x10,puVar3 + 0x10,0x10,"KSEED Encrypt",iVar4);
    if (iVar1 != 0) {
LAB_00122118:
      uVar2 = 5;
      break;
    }
    uVar2 = compare_testvector(local_10e8,0x10,puVar3,0x10,"KSEED Decrypt",iVar4);
    if ((int)uVar2 != 0) goto LAB_00122118;
    iVar4 = iVar4 + 1;
    puVar3 = puVar3 + 0x30;
  } while (iVar4 != 4);
  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

