Skip to content

Instantly share code, notes, and snippets.

@zoumorn
zoumorn / decrypt.cpp
Created December 28, 2017 01:55
Decrypt the Assembly-CSharp.dll in hearthstone windows client
extern "C" int WINAPI setup_assembly(const char* file_in, const char* file_out)
{
FILE* fp_out = NULL, *fp_in = NULL;
fopen_s(&fp_in, file_in, "rb");
fopen_s(&fp_out, file_out, "wb");
//dos header
IMAGE_DOS_HEADER dos_header;
fread(&dos_header, sizeof(dos_header), 1, fp_in);
fwrite(&dos_header, sizeof(dos_header), 1, fp_out);