
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int AES_cbc_192_encrypt_loop(void *args)

{
  uchar *in;
  int iVar1;
  
                    /* WARNING: Load size is inaccurate */
  in = *(uchar **)(*args + 8);
  iVar1 = run;
  if (run != 0) {
    iVar1 = 0;
    do {
      iVar1 = iVar1 + 1;
      AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1);
      if (run == 0) {
        return iVar1;
      }
    } while (iVar1 != 0x7fffffff);
  }
  return iVar1;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int FUN_00064950(int *param_1)

{
  uchar *in;
  int iVar1;
  
  in = *(uchar **)(*param_1 + 8);
  iVar1 = DAT_000cdd34;
  if (DAT_000cdd34 != 0) {
    iVar1 = 0;
    do {
      iVar1 = iVar1 + 1;
      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),
                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);
      if (DAT_000cdd34 == 0) {
        return iVar1;
      }
    } while (iVar1 != 0x7fffffff);
  }
  return iVar1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0002c850
ADD EBX,0x6011f
SUB ESP,0x1c
MOV EAX,dword ptr [ESP + 0x30]
MOV EAX,dword ptr [EAX]
MOV EBP,dword ptr [EBX + 0x92bc]
MOV ESI,dword ptr [EAX + 0x8]
TEST EBP,EBP
JZ 0x000649c8
LEA EAX,[EBX + 0x8208]
XOR EBP,EBP
LEA EDI,[EBX + 0x8408]
MOV dword ptr [ESP + 0xc],EAX
JMP 0x00064998
CMP EBP,0x7fffffff
JZ 0x000649c8
MOV EDX,dword ptr [EBX + 0x7404]
MOV ECX,dword ptr [EBX + 0x89d0]
SUB ESP,0x8
ADD EBP,0x1
PUSH 0x1
PUSH EDI
PUSH dword ptr [ESP + 0x1c]
PUSH dword ptr [EDX + ECX*0x4]
PUSH ESI
PUSH ESI
CALL 0x0002ada0
MOV EDX,dword ptr [EBX + 0x92bc]
ADD ESP,0x20
TEST EDX,EDX
JNZ 0x00064990
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00064950(int *param_1)\n\n{\n  uchar *in;\n  int iVar1;\n  \n  in = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int FUN_00064950(int *param_1)\n\n{\n  uchar *in;\n  int iVar1;\n  \n  in = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00064950(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uchar *in;\n  int iVar1;\n  \n  in = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}" { (declaration "uchar *in;" type_identifier (pointer_declarator "*in" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "in = *(uchar **)(*param_1 + 8);" (assignment_expression "in = *(uchar **)(*param_1 + 8)" identifier = (pointer_expression "*(uchar **)(*param_1 + 8)" * (cast_expression "(uchar **)(*param_1 + 8)" ( (type_descriptor "uchar **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 8)" ( (binary_expression "*param_1 + 8" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (expression_statement "iVar1 = DAT_000cdd34;" (assignment_expression "iVar1 = DAT_000cdd34" identifier = identifier) ;) (if_statement "if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }" if (parenthesized_expression "(DAT_000cdd34 != 0)" ( (binary_expression "DAT_000cdd34 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);" (call_expression "AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1)" identifier (argument_list "(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1)" ( identifier , identifier , (pointer_expression "*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4)" * (cast_expression "(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000cbe7c + DAT_000cd448 * 4)" ( (binary_expression "PTR_DAT_000cbe7c + DAT_000cd448 * 4" identifier + (binary_expression "DAT_000cd448 * 4" identifier * number_literal)) )))) , (cast_expression "(AES_KEY *)&DAT_000ccc80" ( (type_descriptor "AES_KEY *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_000ccc80" & identifier)) , (pointer_expression "&DAT_000cce80" & identifier) , number_literal ))) ;) (if_statement "if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }" if (parenthesized_expression "(DAT_000cdd34 == 0)" ( (binary_expression "DAT_000cdd34 == 0" identifier == number_literal) )) (compound_statement "{\n        return iVar1;\n      }" { (return_statement "return iVar1;" return identifier ;) })) }) while (parenthesized_expression "(iVar1 != 0x7fffffff)" ( (binary_expression "iVar1 != 0x7fffffff" identifier != number_literal) )) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint AES_cbc_192_encrypt_loop(void *args)\n\n{\n  uchar *in;\n  int iVar1;\n  \n                    /* WARNING: Load size is inaccurate */\n  in = *(uchar **)(*args + 8);\n  iVar1 = run;\n  if (run != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1);\n      if (run == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}\n\n" comment comment (function_definition "int AES_cbc_192_encrypt_loop(void *args)\n\n{\n  uchar *in;\n  int iVar1;\n  \n                    /* WARNING: Load size is inaccurate */\n  in = *(uchar **)(*args + 8);\n  iVar1 = run;\n  if (run != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1);\n      if (run == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}" primitive_type (function_declarator "AES_cbc_192_encrypt_loop(void *args)" identifier (parameter_list "(void *args)" ( (parameter_declaration "void *args" primitive_type (pointer_declarator "*args" * identifier)) ))) (compound_statement "{\n  uchar *in;\n  int iVar1;\n  \n                    /* WARNING: Load size is inaccurate */\n  in = *(uchar **)(*args + 8);\n  iVar1 = run;\n  if (run != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1);\n      if (run == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}" { (declaration "uchar *in;" type_identifier (pointer_declarator "*in" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) comment (expression_statement "in = *(uchar **)(*args + 8);" (assignment_expression "in = *(uchar **)(*args + 8)" identifier = (pointer_expression "*(uchar **)(*args + 8)" * (cast_expression "(uchar **)(*args + 8)" ( (type_descriptor "uchar **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*args + 8)" ( (binary_expression "*args + 8" (pointer_expression "*args" * identifier) + number_literal) ))))) ;) (expression_statement "iVar1 = run;" (assignment_expression "iVar1 = run" identifier = identifier) ;) (if_statement "if (run != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1);\n      if (run == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }" if (parenthesized_expression "(run != 0)" ( (binary_expression "run != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1);\n      if (run == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1);\n      if (run == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1);\n      if (run == 0) {\n        return iVar1;\n      }\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1);" (call_expression "AES_cbc_encrypt(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1)" identifier (argument_list "(in,in,lengths[testnum],(AES_KEY *)&aes_ks2,iv,1)" ( identifier , identifier , (subscript_expression "lengths[testnum]" identifier [ identifier ]) , (cast_expression "(AES_KEY *)&aes_ks2" ( (type_descriptor "AES_KEY *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&aes_ks2" & identifier)) , identifier , number_literal ))) ;) (if_statement "if (run == 0) {\n        return iVar1;\n      }" if (parenthesized_expression "(run == 0)" ( (binary_expression "run == 0" identifier == number_literal) )) (compound_statement "{\n        return iVar1;\n      }" { (return_statement "return iVar1;" return identifier ;) })) }) while (parenthesized_expression "(iVar1 != 0x7fffffff)" ( (binary_expression "iVar1 != 0x7fffffff" identifier != number_literal) )) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_00064950(int *param_1)\n\n{\n  uchar *in;\n  int iVar1;\n  \n  in = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_00064950(int *param_1)\n\n{\n  uchar *in;\n  int iVar1;\n  \n  in = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00064950(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uchar *in;\n  int iVar1;\n  \n  in = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}" { (declaration "uchar *in;" type_identifier (pointer_declarator "*in" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "in = *(uchar **)(*param_1 + 8);" (assignment_expression "in = *(uchar **)(*param_1 + 8)" identifier = (pointer_expression "*(uchar **)(*param_1 + 8)" * (cast_expression "(uchar **)(*param_1 + 8)" ( (type_descriptor "uchar **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 8)" ( (binary_expression "*param_1 + 8" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (expression_statement "iVar1 = DAT_000cdd34;" (assignment_expression "iVar1 = DAT_000cdd34" identifier = identifier) ;) (if_statement "if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }" if (parenthesized_expression "(DAT_000cdd34 != 0)" ( (binary_expression "DAT_000cdd34 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);" (call_expression "AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1)" identifier (argument_list "(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1)" ( identifier , identifier , (pointer_expression "*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4)" * (cast_expression "(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000cbe7c + DAT_000cd448 * 4)" ( (binary_expression "PTR_DAT_000cbe7c + DAT_000cd448 * 4" identifier + (binary_expression "DAT_000cd448 * 4" identifier * number_literal)) )))) , (cast_expression "(AES_KEY *)&DAT_000ccc80" ( (type_descriptor "AES_KEY *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_000ccc80" & identifier)) , (pointer_expression "&DAT_000cce80" & identifier) , number_literal ))) ;) (if_statement "if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }" if (parenthesized_expression "(DAT_000cdd34 == 0)" ( (binary_expression "DAT_000cdd34 == 0" identifier == number_literal) )) (compound_statement "{\n        return iVar1;\n      }" { (return_statement "return iVar1;" return identifier ;) })) }) while (parenthesized_expression "(iVar1 != 0x7fffffff)" ( (binary_expression "iVar1 != 0x7fffffff" identifier != number_literal) )) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) , (pointer_expression & IDENT) , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_00064950(int *param_1)\n\n{\n  uchar *in;\n  int iVar1;\n  \n  in = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_00064950(int *param_1)" (identifier "FUN_00064950") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  uchar *in;\n  int iVar1;\n  \n  in = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }\n  return iVar1;\n}" ({ "{") (declaration "uchar *in;" (type_identifier "uchar") (pointer_declarator "*in" (* "*") (identifier "in")) (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "in = *(uchar **)(*param_1 + 8);" (assignment_expression "in = *(uchar **)(*param_1 + 8)" (identifier "in") (= "=") (pointer_expression "*(uchar **)(*param_1 + 8)" (* "*") (cast_expression "(uchar **)(*param_1 + 8)" (( "(") (type_descriptor "uchar **" (type_identifier "uchar") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 8)" (( "(") (binary_expression "*param_1 + 8" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "iVar1 = DAT_000cdd34;" (assignment_expression "iVar1 = DAT_000cdd34" (identifier "iVar1") (= "=") (identifier "DAT_000cdd34")) (; ";")) (if_statement "if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }" (if "if") (parenthesized_expression "(DAT_000cdd34 != 0)" (( "(") (binary_expression "DAT_000cdd34 != 0" (identifier "DAT_000cdd34") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);\n  }" ({ "{") (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    } while (iVar1 != 0x7fffffff);" (do "do") (compound_statement "{\n      iVar1 = iVar1 + 1;\n      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);\n      if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }\n    }" ({ "{") (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);" (call_expression "AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1)" (identifier "AES_cbc_encrypt") (argument_list "(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),\n                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1)" (( "(") (identifier "in") (, ",") (identifier "in") (, ",") (pointer_expression "*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4)" (* "*") (cast_expression "(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_000cbe7c + DAT_000cd448 * 4)" (( "(") (binary_expression "PTR_DAT_000cbe7c + DAT_000cd448 * 4" (identifier "PTR_DAT_000cbe7c") (+ "+") (binary_expression "DAT_000cd448 * 4" (identifier "DAT_000cd448") (* "*") (number_literal "4"))) () ")")))) (, ",") (cast_expression "(AES_KEY *)&DAT_000ccc80" (( "(") (type_descriptor "AES_KEY *" (type_identifier "AES_KEY") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_000ccc80" (& "&") (identifier "DAT_000ccc80"))) (, ",") (pointer_expression "&DAT_000cce80" (& "&") (identifier "DAT_000cce80")) (, ",") (number_literal "1") () ")"))) (; ";")) (if_statement "if (DAT_000cdd34 == 0) {\n        return iVar1;\n      }" (if "if") (parenthesized_expression "(DAT_000cdd34 == 0)" (( "(") (binary_expression "DAT_000cdd34 == 0" (identifier "DAT_000cdd34") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return iVar1;\n      }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(iVar1 != 0x7fffffff)" (( "(") (binary_expression "iVar1 != 0x7fffffff" (identifier "iVar1") (!= "!=") (number_literal "0x7fffffff")) () ")")) (; ";")) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(void *args)

{
  type_1 *in;
  int var_2;
  
                    /* WARNING: Load size is inaccurate */
  in = *(type_1 **)(*args + 8);
  var_2 = var_1;
  if (var_1 != 0) {
    var_2 = 0;
    do {
      var_2 = var_2 + 1;
      var_3(in,in,lengths[testnum],(type_2 *)&aes_ks2,iv,1);
      if (var_1 == 0) {
        return var_2;
      }
    } while (var_2 != 0x7fffffff);
  }
  return var_2;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))) (pointer_expression argument: (identifier)) (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int MASKED(int *param_1)

{
  uchar *in;
  int iVar1;
  
  in = *(uchar **)(*param_1 + 8);
  iVar1 = DAT_000cdd34;
  if (DAT_000cdd34 != 0) {
    iVar1 = 0;
    do {
      iVar1 = iVar1 + 1;
      AES_cbc_encrypt(in,in,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),
                      (AES_KEY *)&DAT_000ccc80,&DAT_000cce80,1);
      if (DAT_000cdd34 == 0) {
        return iVar1;
      }
    } while (iVar1 != 0x7fffffff);
  }
  return iVar1;
}

