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

int SHA1_loop(void *args)

{
  int iVar1;
  uchar *d;
  int iVar2;
  int in_GS_OFFSET;
  uchar sha [20];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
                    /* WARNING: Load size is inaccurate */
  d = *(uchar **)(*args + 8);
  iVar2 = run;
  if (run != 0) {
    iVar2 = 0;
    do {
      iVar2 = iVar2 + 1;
      SHA1(d,lengths[testnum],sha);
      if (run == 0) break;
    } while (iVar2 != 0x7fffffff);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_00064e60(int *param_1)

{
  uchar *d;
  int iVar1;
  int in_GS_OFFSET;
  uchar local_34 [20];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x64e69;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  d = *(uchar **)(*param_1 + 8);
  iVar1 = DAT_000cdd34;
  if (DAT_000cdd34 != 0) {
    iVar1 = 0;
    do {
      iVar1 = iVar1 + 1;
      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);
      if (DAT_000cdd34 == 0) break;
    } while (iVar1 != 0x7fffffff);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00083c90();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0002c850
ADD EBX,0x5fc0f
SUB ESP,0x2c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
MOV EAX,dword ptr [ESP + 0x40]
MOV EAX,dword ptr [EAX]
MOV EBP,dword ptr [EBX + 0x92bc]
MOV ESI,dword ptr [EAX + 0x8]
TEST EBP,EBP
JZ 0x00064ed1
XOR EBP,EBP
LEA EDI,[ESP + 0x8]
JMP 0x00064ea8
CMP EBP,0x7fffffff
JZ 0x00064ed1
MOV EDX,dword ptr [EBX + 0x89d0]
MOV EAX,dword ptr [EBX + 0x7404]
SUB ESP,0x4
ADD EBP,0x1
PUSH EDI
PUSH dword ptr [EAX + EDX*0x4]
PUSH ESI
CALL 0x0002b570
MOV EAX,dword ptr [EBX + 0x92bc]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00064ea0
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,EBP
JNZ 0x00064ee8
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x00083c90
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00064e60(int *param_1)\n\n{\n  uchar *d;\n  int iVar1;\n  int in_GS_OFFSET;\n  uchar local_34 [20];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x64e69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  d = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00083c90();\n}\n\n" comment (function_definition "int FUN_00064e60(int *param_1)\n\n{\n  uchar *d;\n  int iVar1;\n  int in_GS_OFFSET;\n  uchar local_34 [20];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x64e69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  d = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00083c90();\n}" primitive_type (function_declarator "FUN_00064e60(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 *d;\n  int iVar1;\n  int in_GS_OFFSET;\n  uchar local_34 [20];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x64e69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  d = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00083c90();\n}" { (declaration "uchar *d;" type_identifier (pointer_declarator "*d" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uchar local_34 [20];" type_identifier (array_declarator "local_34 [20]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x64e69;" (assignment_expression "uStack_14 = 0x64e69" 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 "d = *(uchar **)(*param_1 + 8);" (assignment_expression "d = *(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      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\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      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);" (call_expression "SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34)" identifier (argument_list "(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34)" ( 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)) )))) , identifier ))) ;) (if_statement "if (DAT_000cdd34 == 0) break;" if (parenthesized_expression "(DAT_000cdd34 == 0)" ( (binary_expression "DAT_000cdd34 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(iVar1 != 0x7fffffff)" ( (binary_expression "iVar1 != 0x7fffffff" identifier != number_literal) )) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\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    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "FUN_00083c90();" (call_expression "FUN_00083c90()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint SHA1_loop(void *args)\n\n{\n  int iVar1;\n  uchar *d;\n  int iVar2;\n  int in_GS_OFFSET;\n  uchar sha [20];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n                    /* WARNING: Load size is inaccurate */\n  d = *(uchar **)(*args + 8);\n  iVar2 = run;\n  if (run != 0) {\n    iVar2 = 0;\n    do {\n      iVar2 = iVar2 + 1;\n      SHA1(d,lengths[testnum],sha);\n      if (run == 0) break;\n    } while (iVar2 != 0x7fffffff);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int SHA1_loop(void *args)\n\n{\n  int iVar1;\n  uchar *d;\n  int iVar2;\n  int in_GS_OFFSET;\n  uchar sha [20];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n                    /* WARNING: Load size is inaccurate */\n  d = *(uchar **)(*args + 8);\n  iVar2 = run;\n  if (run != 0) {\n    iVar2 = 0;\n    do {\n      iVar2 = iVar2 + 1;\n      SHA1(d,lengths[testnum],sha);\n      if (run == 0) break;\n    } while (iVar2 != 0x7fffffff);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "SHA1_loop(void *args)" identifier (parameter_list "(void *args)" ( (parameter_declaration "void *args" primitive_type (pointer_declarator "*args" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uchar *d;\n  int iVar2;\n  int in_GS_OFFSET;\n  uchar sha [20];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n                    /* WARNING: Load size is inaccurate */\n  d = *(uchar **)(*args + 8);\n  iVar2 = run;\n  if (run != 0) {\n    iVar2 = 0;\n    do {\n      iVar2 = iVar2 + 1;\n      SHA1(d,lengths[testnum],sha);\n      if (run == 0) break;\n    } while (iVar2 != 0x7fffffff);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uchar *d;" type_identifier (pointer_declarator "*d" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uchar sha [20];" type_identifier (array_declarator "sha [20]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(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) ))))) ;) comment (expression_statement "d = *(uchar **)(*args + 8);" (assignment_expression "d = *(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 "iVar2 = run;" (assignment_expression "iVar2 = run" identifier = identifier) ;) (if_statement "if (run != 0) {\n    iVar2 = 0;\n    do {\n      iVar2 = iVar2 + 1;\n      SHA1(d,lengths[testnum],sha);\n      if (run == 0) break;\n    } while (iVar2 != 0x7fffffff);\n  }" if (parenthesized_expression "(run != 0)" ( (binary_expression "run != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = 0;\n    do {\n      iVar2 = iVar2 + 1;\n      SHA1(d,lengths[testnum],sha);\n      if (run == 0) break;\n    } while (iVar2 != 0x7fffffff);\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar2 = iVar2 + 1;\n      SHA1(d,lengths[testnum],sha);\n      if (run == 0) break;\n    } while (iVar2 != 0x7fffffff);" do (compound_statement "{\n      iVar2 = iVar2 + 1;\n      SHA1(d,lengths[testnum],sha);\n      if (run == 0) break;\n    }" { (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "SHA1(d,lengths[testnum],sha);" (call_expression "SHA1(d,lengths[testnum],sha)" identifier (argument_list "(d,lengths[testnum],sha)" ( identifier , (subscript_expression "lengths[testnum]" identifier [ identifier ]) , identifier ))) ;) (if_statement "if (run == 0) break;" if (parenthesized_expression "(run == 0)" ( (binary_expression "run == 0" identifier == number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(iVar2 != 0x7fffffff)" ( (binary_expression "iVar2 != 0x7fffffff" identifier != number_literal) )) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(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    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_00064e60(int *param_1)\n\n{\n  uchar *d;\n  int iVar1;\n  int in_GS_OFFSET;\n  uchar local_34 [20];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x64e69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  d = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00083c90();\n}\n\n" (function_definition "int FUN_00064e60(int *param_1)\n\n{\n  uchar *d;\n  int iVar1;\n  int in_GS_OFFSET;\n  uchar local_34 [20];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x64e69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  d = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00083c90();\n}" primitive_type (function_declarator "FUN_00064e60(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 *d;\n  int iVar1;\n  int in_GS_OFFSET;\n  uchar local_34 [20];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x64e69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  d = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00083c90();\n}" { (declaration "uchar *d;" type_identifier (pointer_declarator "*d" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uchar local_34 [20];" type_identifier (array_declarator "local_34 [20]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x64e69;" (assignment_expression "uStack_14 = 0x64e69" 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 "d = *(uchar **)(*param_1 + 8);" (assignment_expression "d = *(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      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\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      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);" (call_expression "SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34)" identifier (argument_list "(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34)" ( 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)) )))) , identifier ))) ;) (if_statement "if (DAT_000cdd34 == 0) break;" if (parenthesized_expression "(DAT_000cdd34 == 0)" ( (binary_expression "DAT_000cdd34 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(iVar1 != 0x7fffffff)" ( (binary_expression "iVar1 != 0x7fffffff" identifier != number_literal) )) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\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    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "FUN_00083c90();" (call_expression "FUN_00083c90()" identifier (argument_list "()" ( ))) ;) })))
(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 ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (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 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 , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) }) 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 { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_00064e60(int *param_1)\n\n{\n  uchar *d;\n  int iVar1;\n  int in_GS_OFFSET;\n  uchar local_34 [20];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x64e69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  d = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00083c90();\n}" (primitive_type "int") (function_declarator "FUN_00064e60(int *param_1)" (identifier "FUN_00064e60") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  uchar *d;\n  int iVar1;\n  int in_GS_OFFSET;\n  uchar local_34 [20];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x64e69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  d = *(uchar **)(*param_1 + 8);\n  iVar1 = DAT_000cdd34;\n  if (DAT_000cdd34 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00083c90();\n}" ({ "{") (declaration "uchar *d;" (type_identifier "uchar") (pointer_declarator "*d" (* "*") (identifier "d")) (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "uchar local_34 [20];" (type_identifier "uchar") (array_declarator "local_34 [20]" (identifier "local_34") ([ "[") (number_literal "20") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x64e69;" (assignment_expression "uStack_14 = 0x64e69" (identifier "uStack_14") (= "=") (number_literal "0x64e69")) (; ";")) (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 "d = *(uchar **)(*param_1 + 8);" (assignment_expression "d = *(uchar **)(*param_1 + 8)" (identifier "d") (= "=") (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      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\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      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\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      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    } while (iVar1 != 0x7fffffff);" (do "do") (compound_statement "{\n      iVar1 = iVar1 + 1;\n      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);\n      if (DAT_000cdd34 == 0) break;\n    }" ({ "{") (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);" (call_expression "SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34)" (identifier "SHA1") (argument_list "(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34)" (( "(") (identifier "d") (, ",") (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"))) () ")")))) (, ",") (identifier "local_34") () ")"))) (; ";")) (if_statement "if (DAT_000cdd34 == 0) break;" (if "if") (parenthesized_expression "(DAT_000cdd34 == 0)" (( "(") (binary_expression "DAT_000cdd34 == 0" (identifier "DAT_000cdd34") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(iVar1 != 0x7fffffff)" (( "(") (binary_expression "iVar1 != 0x7fffffff" (identifier "iVar1") (!= "!=") (number_literal "0x7fffffff")) () ")")) (; ";")) (} "}"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\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    return iVar1;\n  }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "FUN_00083c90();" (call_expression "FUN_00083c90()" (identifier "FUN_00083c90") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(void *args)

{
  int var_5;
  type_1 *d;
  int var_3;
  int var_1;
  type_1 sha [20];
  
  var_5 = *(int *)(var_1 + 0x14);
                    /* WARNING: Load size is inaccurate */
  d = *(type_1 **)(*args + 8);
  var_3 = var_2;
  if (var_2 != 0) {
    var_3 = 0;
    do {
      var_3 = var_3 + 1;
      var_4(d,lengths[testnum],sha);
      if (var_2 == 0) break;
    } while (var_3 != 0x7fffffff);
  }
  if (var_5 == *(int *)(var_1 + 0x14)) {
    return var_3;
  }
                    /* 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: (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)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) 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: (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) (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)))))) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement))) 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 (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

int MASKED(int *param_1)

{
  uchar *d;
  int iVar1;
  int in_GS_OFFSET;
  uchar local_34 [20];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x64e69;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  d = *(uchar **)(*param_1 + 8);
  iVar1 = DAT_000cdd34;
  if (DAT_000cdd34 != 0) {
    iVar1 = 0;
    do {
      iVar1 = iVar1 + 1;
      SHA1(d,*(size_t *)(PTR_DAT_000cbe7c + DAT_000cd448 * 4),local_34);
      if (DAT_000cdd34 == 0) break;
    } while (iVar1 != 0x7fffffff);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00083c90();
}

