Skip to content

Commit

Permalink
fix trial version
Browse files Browse the repository at this point in the history
  • Loading branch information
xmoezzz committed Nov 9, 2020
1 parent 6702d1d commit 0684600
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 0 additions & 2 deletions source/SiglusExtract/SiglusExtract/SiglusExtract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ BOOL Init(HMODULE hModule)
SiglusHook* Data;
WCHAR FullDllPath[MAX_PATH];

//AllocConsole();

LOOP_ONCE
{
Status = FALSE;
Expand Down
2 changes: 1 addition & 1 deletion source/SiglusExtract/SiglusExtract/SiglusExtractDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


#define szApplicationName L"[X'moe]Welcome to SiglusExtract(version : %s, built on : %s)"
#define szExtractVersion L"Ver 0.1.0.6"
#define szExtractVersion L"Ver 0.1.0.7"

class CSiglusExtractDialog : public CDialogEx
{
Expand Down
20 changes: 15 additions & 5 deletions source/SiglusExtract/SiglusExtract/SiglusHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,14 +769,15 @@ BOOL SiglusHook::InitWindow()
{
BOOL Status;
PVOID CreateProcessInternalWAddress;
BOOL WaitForStackDecode;

SelfPrivilegeUp();
SetUnhandledExceptionFilter(SiglusUnhandledExceptionFilter);

LOOP_ONCE
{
ExeModule = GetModuleHandleW(NULL);
DetactNeedDumper();
WaitForStackDecode = DetactNeedDumper();

ExtModuleHandle = NULL;
CreateProcessInternalWAddress = Nt_GetProcAddress(GetKernel32Handle(), "CreateProcessInternalW");
Expand All @@ -794,7 +795,8 @@ BOOL SiglusHook::InitWindow()
Mp::FunctionJumpVa(GetUserNameA, HookGetUserNameA, &StubGetUserNameA),

//hook create process(steam)
Mp::FunctionJumpVa(CreateProcessInternalWAddress, HookCreateProcessInternalW, &StubCreateProcessInternalW)
Mp::FunctionJumpVa(CreateProcessInternalWAddress, HookCreateProcessInternalW, &StubCreateProcessInternalW),
Mp::FunctionJumpVa(MultiByteToWideChar, HookMultiByteToWideChar, &OldMultiByteToWideChar)
};

Mp::PatchMemory(p, countof(p));
Expand All @@ -805,13 +807,21 @@ BOOL SiglusHook::InitWindow()
ULONG_PTR gdiplusToken;
Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);


Mp::PATCH_MEMORY_DATA f[] =
{
Mp::FunctionJumpVa(CreateFileW, HookCreateFileW, &StubCreateFileW ),
Mp::FunctionJumpVa(MultiByteToWideChar, HookMultiByteToWideChar, &OldMultiByteToWideChar)
Mp::FunctionJumpVa(CreateFileW, HookCreateFileW, &StubCreateFileW ),

};

Status = NT_SUCCESS(Mp::PatchMemory(f, countof(f)));
if (WaitForStackDecode) {
Status = NT_SUCCESS(Mp::PatchMemory(f, countof(f)));
}
else {
Status = Nt_CreateThread(GuiWorkerThread, this, FALSE, NtCurrentProcess(), &(this->GuiHandle));
Status = NT_SUCCESS(Status);
}
}

return Status;
}

0 comments on commit 0684600

Please sign in to comment.