diff options
| -rw-r--r-- | main.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
| @@ -579,15 +579,21 @@ bool CApplication::InitSteam() | |||
| 579 | 579 | ||
| 580 | #ifdef _WIN32 | 580 | #ifdef _WIN32 |
| 581 | void* pppUsePICS = steamclientScanner.FindSignature("\x00\x00\x00\x00\x83\x78\x34\x00\x75\x00\xc6\x81\x74\x0c\x00\x00\x00\x5d\xc2\x04\x00", "????xxxxx?xxxxxxxxxxx"); | 581 | void* pppUsePICS = steamclientScanner.FindSignature("\x00\x00\x00\x00\x83\x78\x34\x00\x75\x00\xc6\x81\x74\x0c\x00\x00\x00\x5d\xc2\x04\x00", "????xxxxx?xxxxxxxxxxx"); |
| 582 | g_pUsePICS = **(void***)pppUsePICS; | 582 | if(pppUsePICS) |
| 583 | g_pUsePICS = **(void***)pppUsePICS; | ||
| 583 | #else | 584 | #else |
| 584 | unsigned char* pSig = (unsigned char*)steamclientScanner.FindSignature("\x55\x89\xE5\xE8\x00\x00\x00\x00\x81\xC1\x00\x00\x00\x00\x8B\x45\x08\x80\x7D\x0C\x00", "xxxx????xx????xxxxxxx"); | 585 | unsigned char* pSig = (unsigned char*)steamclientScanner.FindSignature("\x55\x89\xE5\xE8\x00\x00\x00\x00\x81\xC1\x00\x00\x00\x00\x8B\x45\x08\x80\x7D\x0C\x00", "xxxx????xx????xxxxxxx"); |
| 585 | int uOffset = *(int*)(pSig + 10); | 586 | if(pSig) |
| 586 | int uOffset2 = *(int*)(pSig + 34); | 587 | { |
| 588 | int uOffset = *(int*)(pSig + 10); | ||
| 589 | int uOffset2 = *(int*)(pSig + 34); | ||
| 587 | 590 | ||
| 588 | void* ppUsePICS = pSig + 8 + uOffset + uOffset2; | 591 | void* ppUsePICS = pSig + 8 + uOffset + uOffset2; |
| 589 | g_pUsePICS = *(void**)ppUsePICS; | 592 | g_pUsePICS = *(void**)ppUsePICS; |
| 593 | } | ||
| 590 | #endif | 594 | #endif |
| 595 | if(!g_pUsePICS) | ||
| 596 | Msg("Unable to find function signature required for anonymous logon. Anonymous logon is disabled\n"); | ||
| 591 | 597 | ||
| 592 | const char* cszDir = commandLine.ParmValue("-dir"); | 598 | const char* cszDir = commandLine.ParmValue("-dir"); |
| 593 | if(cszDir) | 599 | if(cszDir) |
| @@ -867,6 +873,11 @@ bool CApplication::LogOn() | |||
| 867 | const char* cszUsername = commandLine.ParmValue("-username"); | 873 | const char* cszUsername = commandLine.ParmValue("-username"); |
| 868 | if(!cszUsername) | 874 | if(!cszUsername) |
| 869 | { | 875 | { |
| 876 | if (!g_pUsePICS) | ||
| 877 | { | ||
| 878 | Error("Anonymous logon is disabled\n"); | ||
| 879 | return false; | ||
| 880 | } | ||
| 870 | #ifdef _WIN32 | 881 | #ifdef _WIN32 |
| 871 | void (__thiscall* pSetValue)(void* pThis, const char* cszValue) = (void (__thiscall *)(void *,const char *)) (*(void***)g_pUsePICS)[12]; | 882 | void (__thiscall* pSetValue)(void* pThis, const char* cszValue) = (void (__thiscall *)(void *,const char *)) (*(void***)g_pUsePICS)[12]; |
| 872 | #else | 883 | #else |
