From 45d0bcf1e5882a70a9aaf26cdd73bc1151561db3 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Jun 2010 02:35:41 +0900 Subject: [PATCH] ckw-0.8.10-mod4-20100517 by craftware MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ・AllocConsole 時に SW_HIDE を与えるために、__readfsdword を用いてアドレスを指定する ようにしました。(これによって、もう少し整理できるかも) --- ckw-mod_readme.txt | 7 +++++++ main.cpp | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ckw-mod_readme.txt b/ckw-mod_readme.txt index 7b4d6fa..b988649 100644 --- a/ckw-mod_readme.txt +++ b/ckw-mod_readme.txt @@ -1,5 +1,12 @@ ckw-mod•ÏX“_ +----- 2010/05/17 ----- + +(craftware) + +EAllocConsole Žž‚É SW_HIDE ‚ð—^‚¦‚邽‚߂ɁA__readfsdword ‚ð—p‚¢‚ăAƒhƒŒƒX‚ðŽw’è‚·‚é + ‚悤‚É‚µ‚Ü‚µ‚½B(‚±‚ê‚É‚æ‚Á‚āA‚à‚¤­‚µ®—‚Å‚«‚é‚©‚à) + ----- 2010/05/07 ----- (craftware) diff --git a/main.cpp b/main.cpp index 08ab045..2aecb62 100644 --- a/main.cpp +++ b/main.cpp @@ -890,8 +890,10 @@ static void __hide_alloc_console() * Open Console Window * hack StartupInfo.wShowWindow flag */ - DWORD* pflags = (DWORD*) 0x00020068; /* private memory */ - WORD* pshow = (WORD*) 0x0002006C; + INT_PTR peb = __readfsdword(0x30); + INT_PTR param = *(INT_PTR*) (peb + 0x10); + DWORD* pflags = (DWORD*) (param + 0x68); + WORD* pshow = (WORD*) (param + 0x6C); DWORD backup_flags = *pflags; WORD backup_show = *pshow; -- 2.11.0