Skip to content

Instantly share code, notes, and snippets.

@matrosov
Created October 7, 2014 17:36
Show Gist options
  • Save matrosov/7df04f4b21f55c7b7413 to your computer and use it in GitHub Desktop.
Save matrosov/7df04f4b21f55c7b7413 to your computer and use it in GitHub Desktop.
Snowman decompilation result
struct s0 {
signed char[124] pad124;
uint32_t f124;
};
struct s1 {
signed char[124] pad124;
int32_t f124;
};
struct s2 {
signed char[16] pad16;
int32_t f16;
};
struct s3 {
signed char[172] pad172;
struct s2* f172;
};
struct s5 {
signed char[3160] pad3160;
uint32_t f3160;
};
struct s4 {
signed char[12] pad12;
struct s5* f12;
};
struct s6 {
signed char[148] pad148;
struct s4* f148;
};
struct s7 {
signed char[12] pad12;
unsigned char f12;
};
struct s7* g1c0;
/*
* ?GetHWND@CServer@@QAEPAUHWND__@@XZ
* public: struct HWND__ * __thiscall CServer::GetHWND(void)
*/
int32_t GetHWND_CServer_QAEPAUHWND___XZ();
int32_t SetTimer;
/*
* ?UpdateMarkupContentsVersion@CMarkup@@QAEXXZ
* public: void __thiscall CMarkup::UpdateMarkupContentsVersion(void)
*/
void UpdateMarkupContentsVersion_CMarkup_QAEXXZ() {
struct s0* edx1;
struct s1* edx2;
struct s2* eax3;
struct s3* edx4;
struct s4* ecx5;
struct s6* edx6;
int32_t edx7;
struct s5* ecx8;
uint32_t* esi9;
uint32_t eax10;
int32_t eax11;
edx1->f124 = (uint32_t)(edx2->f124 + 1) | 0x80000000;
eax3 = edx4->f172;
if (eax3 != 0) {
eax3->f16 = eax3->f16 + 1;
}
ecx5 = edx6->f148;
if (ecx5 != 0) {
}
if (g1c0 != 0) {
if (ecx5 != 0) {
}
if ((g1c0->f12 & 1) != 0) {
}
if (edx7 == 0 && (ecx5 != 0 && (ecx8 = ecx5->f12, ecx8 != 0))) {
esi9 = &ecx8->f3160;
eax10 = *esi9;
if ((0x4000 & eax10) == 0) {
eax11 = GetHWND_CServer_QAEPAUHWND___XZ();
if (eax11 != 0) {
SetTimer(eax11, 0x1008, 100);
*esi9 = *esi9 | 0x4000;
}
} else {
*esi9 = eax10 | 0x8000;
}
return;
}
}
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment