
/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

ulong crc32_update(ulong crcword,void *buf,size_t len)

{
  byte *pbVar1;
  byte *pbVar2;
  
  if (len != 0) {
    pbVar2 = (byte *)buf;
    do {
      pbVar1 = pbVar2 + 1;
      crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)];
      pbVar2 = pbVar1;
    } while (pbVar1 != (byte *)(len + (int)buf));
    return crcword;
  }
  return crcword;
}



/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

uint FUN_00044e00(uint param_1,byte *param_2,int param_3)

{
  byte *pbVar1;
  byte *pbVar2;
  
  if (param_3 != 0) {
    pbVar2 = param_2;
    do {
      pbVar1 = pbVar2 + 1;
      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);
      pbVar2 = pbVar1;
    } while (pbVar1 != param_2 + param_3);
    return param_1;
  }
  return param_1;
}


CALL 0x0001d87b
ADD ECX,0x5ff6b
PUSH ESI
PUSH EBX
MOV EBX,dword ptr [ESP + 0x14]
MOV EDX,dword ptr [ESP + 0x10]
TEST EBX,EBX
JZ 0x00044e48
MOV EAX,dword ptr [ESP + 0xc]
ADD EBX,EDX
LEA ESI,[ECX + 0xfffd38b0]
LEA ESI,[ESI]
ADD EDX,0x1
MOV ECX,EAX
XOR AL,byte ptr [EDX + -0x1]
SHR ECX,0x8
MOVZX EAX,AL
XOR ECX,dword ptr [ESI + EAX*0x4]
MOV EAX,ECX
CMP EDX,EBX
JNZ 0x00044e28
POP EBX
POP ESI
RET
MOV EAX,dword ptr [ESP + 0xc]
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */\n\nuint FUN_00044e00(uint param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }\n  return param_1;\n}\n\n" comment (function_definition "uint FUN_00044e00(uint param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }\n  return param_1;\n}" type_identifier (function_declarator "FUN_00044e00(uint param_1,byte *param_2,int param_3)" identifier (parameter_list "(uint param_1,byte *param_2,int param_3)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }\n  return param_1;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (if_statement "if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }" { (expression_statement "pbVar2 = param_2;" (assignment_expression "pbVar2 = param_2" identifier = identifier) ;) (do_statement "do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);" do (compound_statement "{\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    }" { (expression_statement "pbVar1 = pbVar2 + 1;" (assignment_expression "pbVar1 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);" (assignment_expression "param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" identifier = (binary_expression "param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" (binary_expression "param_1 >> 8" identifier >> number_literal) ^ (pointer_expression "*(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" * (cast_expression "(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" ( (binary_expression "&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4" (pointer_expression "&DAT_00078620" & identifier) + (binary_expression "(uint)(byte)((byte)param_1 ^ *pbVar2) * 4" (call_expression "(uint)(byte)((byte)param_1 ^ *pbVar2)" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "((byte)param_1 ^ *pbVar2)" ( (binary_expression "(byte)param_1 ^ *pbVar2" (cast_expression "(byte)param_1" ( (type_descriptor "byte" type_identifier) ) identifier) ^ (pointer_expression "*pbVar2" * identifier)) ))) * number_literal)) )))))) ;) (expression_statement "pbVar2 = pbVar1;" (assignment_expression "pbVar2 = pbVar1" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar1 != param_2 + param_3)" ( (binary_expression "pbVar1 != param_2 + param_3" identifier != (binary_expression "param_2 + param_3" identifier + identifier)) )) ;) (return_statement "return param_1;" return identifier ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */\n\nulong crc32_update(ulong crcword,void *buf,size_t len)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (len != 0) {\n    pbVar2 = (byte *)buf;\n    do {\n      pbVar1 = pbVar2 + 1;\n      crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)];\n      pbVar2 = pbVar1;\n    } while (pbVar1 != (byte *)(len + (int)buf));\n    return crcword;\n  }\n  return crcword;\n}\n\n" comment (function_definition "ulong crc32_update(ulong crcword,void *buf,size_t len)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (len != 0) {\n    pbVar2 = (byte *)buf;\n    do {\n      pbVar1 = pbVar2 + 1;\n      crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)];\n      pbVar2 = pbVar1;\n    } while (pbVar1 != (byte *)(len + (int)buf));\n    return crcword;\n  }\n  return crcword;\n}" type_identifier (function_declarator "crc32_update(ulong crcword,void *buf,size_t len)" identifier (parameter_list "(ulong crcword,void *buf,size_t len)" ( (parameter_declaration "ulong crcword" type_identifier identifier) , (parameter_declaration "void *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "size_t len" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (len != 0) {\n    pbVar2 = (byte *)buf;\n    do {\n      pbVar1 = pbVar2 + 1;\n      crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)];\n      pbVar2 = pbVar1;\n    } while (pbVar1 != (byte *)(len + (int)buf));\n    return crcword;\n  }\n  return crcword;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (if_statement "if (len != 0) {\n    pbVar2 = (byte *)buf;\n    do {\n      pbVar1 = pbVar2 + 1;\n      crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)];\n      pbVar2 = pbVar1;\n    } while (pbVar1 != (byte *)(len + (int)buf));\n    return crcword;\n  }" if (parenthesized_expression "(len != 0)" ( (binary_expression "len != 0" identifier != number_literal) )) (compound_statement "{\n    pbVar2 = (byte *)buf;\n    do {\n      pbVar1 = pbVar2 + 1;\n      crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)];\n      pbVar2 = pbVar1;\n    } while (pbVar1 != (byte *)(len + (int)buf));\n    return crcword;\n  }" { (expression_statement "pbVar2 = (byte *)buf;" (assignment_expression "pbVar2 = (byte *)buf" identifier = (cast_expression "(byte *)buf" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n      pbVar1 = pbVar2 + 1;\n      crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)];\n      pbVar2 = pbVar1;\n    } while (pbVar1 != (byte *)(len + (int)buf));" do (compound_statement "{\n      pbVar1 = pbVar2 + 1;\n      crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)];\n      pbVar2 = pbVar1;\n    }" { (expression_statement "pbVar1 = pbVar2 + 1;" (assignment_expression "pbVar1 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)];" (assignment_expression "crcword = crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)]" identifier = (binary_expression "crcword >> 8 ^ crc32_table[(byte)((byte)crcword ^ *pbVar2)]" (binary_expression "crcword >> 8" identifier >> number_literal) ^ (subscript_expression "crc32_table[(byte)((byte)crcword ^ *pbVar2)]" identifier [ (call_expression "(byte)((byte)crcword ^ *pbVar2)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((byte)crcword ^ *pbVar2)" ( (binary_expression "(byte)crcword ^ *pbVar2" (cast_expression "(byte)crcword" ( (type_descriptor "byte" type_identifier) ) identifier) ^ (pointer_expression "*pbVar2" * identifier)) ))) ]))) ;) (expression_statement "pbVar2 = pbVar1;" (assignment_expression "pbVar2 = pbVar1" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar1 != (byte *)(len + (int)buf))" ( (binary_expression "pbVar1 != (byte *)(len + (int)buf)" identifier != (cast_expression "(byte *)(len + (int)buf)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(len + (int)buf)" ( (binary_expression "len + (int)buf" identifier + (cast_expression "(int)buf" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) ;) (return_statement "return crcword;" return identifier ;) })) (return_statement "return crcword;" return identifier ;) })))
(translation_unit "uint FUN_00044e00(uint param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }\n  return param_1;\n}\n\n" (function_definition "uint FUN_00044e00(uint param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }\n  return param_1;\n}" type_identifier (function_declarator "FUN_00044e00(uint param_1,byte *param_2,int param_3)" identifier (parameter_list "(uint param_1,byte *param_2,int param_3)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }\n  return param_1;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (if_statement "if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }" { (expression_statement "pbVar2 = param_2;" (assignment_expression "pbVar2 = param_2" identifier = identifier) ;) (do_statement "do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);" do (compound_statement "{\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    }" { (expression_statement "pbVar1 = pbVar2 + 1;" (assignment_expression "pbVar1 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);" (assignment_expression "param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" identifier = (binary_expression "param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" (binary_expression "param_1 >> 8" identifier >> number_literal) ^ (pointer_expression "*(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" * (cast_expression "(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" ( (binary_expression "&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4" (pointer_expression "&DAT_00078620" & identifier) + (binary_expression "(uint)(byte)((byte)param_1 ^ *pbVar2) * 4" (call_expression "(uint)(byte)((byte)param_1 ^ *pbVar2)" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "((byte)param_1 ^ *pbVar2)" ( (binary_expression "(byte)param_1 ^ *pbVar2" (cast_expression "(byte)param_1" ( (type_descriptor "byte" type_identifier) ) identifier) ^ (pointer_expression "*pbVar2" * identifier)) ))) * number_literal)) )))))) ;) (expression_statement "pbVar2 = pbVar1;" (assignment_expression "pbVar2 = pbVar1" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar1 != param_2 + param_3)" ( (binary_expression "pbVar1 != param_2 + param_3" identifier != (binary_expression "param_2 + param_3" identifier + identifier)) )) ;) (return_statement "return param_1;" return identifier ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT >> LIT) ^ (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + (binary_expression (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) ^ (pointer_expression * IDENT)) ))) * LIT)) )))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + IDENT)) )) ;) (return_statement return IDENT ;) })) (return_statement return IDENT ;) })))
(function_definition "uint FUN_00044e00(uint param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }\n  return param_1;\n}" (type_identifier "uint") (function_declarator "FUN_00044e00(uint param_1,byte *param_2,int param_3)" (identifier "FUN_00044e00") (parameter_list "(uint param_1,byte *param_2,int param_3)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  \n  if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }\n  return param_1;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (if_statement "if (param_3 != 0) {\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    pbVar2 = param_2;\n    do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);\n    return param_1;\n  }" ({ "{") (expression_statement "pbVar2 = param_2;" (assignment_expression "pbVar2 = param_2" (identifier "pbVar2") (= "=") (identifier "param_2")) (; ";")) (do_statement "do {\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    } while (pbVar1 != param_2 + param_3);" (do "do") (compound_statement "{\n      pbVar1 = pbVar2 + 1;\n      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);\n      pbVar2 = pbVar1;\n    }" ({ "{") (expression_statement "pbVar1 = pbVar2 + 1;" (assignment_expression "pbVar1 = pbVar2 + 1" (identifier "pbVar1") (= "=") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);" (assignment_expression "param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" (identifier "param_1") (= "=") (binary_expression "param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" (binary_expression "param_1 >> 8" (identifier "param_1") (>> ">>") (number_literal "8")) (^ "^") (pointer_expression "*(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" (* "*") (cast_expression "(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4)" (( "(") (binary_expression "&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4" (pointer_expression "&DAT_00078620" (& "&") (identifier "DAT_00078620")) (+ "+") (binary_expression "(uint)(byte)((byte)param_1 ^ *pbVar2) * 4" (call_expression "(uint)(byte)((byte)param_1 ^ *pbVar2)" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(byte)" (( "(") (identifier "byte") () ")"))) (argument_list "((byte)param_1 ^ *pbVar2)" (( "(") (binary_expression "(byte)param_1 ^ *pbVar2" (cast_expression "(byte)param_1" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_1")) (^ "^") (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2"))) () ")"))) (* "*") (number_literal "4"))) () ")")))))) (; ";")) (expression_statement "pbVar2 = pbVar1;" (assignment_expression "pbVar2 = pbVar1" (identifier "pbVar2") (= "=") (identifier "pbVar1")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar1 != param_2 + param_3)" (( "(") (binary_expression "pbVar1 != param_2 + param_3" (identifier "pbVar1") (!= "!=") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3"))) () ")")) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

type_1 function_1(type_1 var_3,void *buf,size_t var_1)

{
  type_2 *var_4;
  type_2 *var_2;
  
  if (var_1 != 0) {
    var_2 = (type_2 *)buf;
    do {
      var_4 = var_2 + 1;
      var_3 = var_3 >> 8 ^ crc32_table[(type_2)((type_2)var_3 ^ *var_2)];
      var_2 = var_4;
    } while (var_4 != (type_2 *)(var_1 + (int)buf));
    return var_3;
  }
  return var_3;
}


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

/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

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

{
  byte *pbVar1;
  byte *pbVar2;
  
  if (param_3 != 0) {
    pbVar2 = param_2;
    do {
      pbVar1 = pbVar2 + 1;
      param_1 = param_1 >> 8 ^ *(uint *)(&DAT_00078620 + (uint)(byte)((byte)param_1 ^ *pbVar2) * 4);
      pbVar2 = pbVar1;
    } while (pbVar1 != param_2 + param_3);
    return param_1;
  }
  return param_1;
}

