mrexodia Posted March 9, 2013 Posted March 9, 2013 (edited) Hi, For personal use I created a small launcher program that allows you to quickly select if you want to start Scylla_x86.exe or Scylla_x64.exe. This was useful in my case because I assign hotkeys to tools, which means that I should've assigned two hotkeys to scylla instead of one. Program+sources attached, please consider adding it to the official release, maybe more people have benefit from it. Screenshot: Greetings, Mr. eXoDia Scylla_Launcher.rar Edited March 9, 2013 by Mr. eXoDia
Vic Posted March 10, 2013 Posted March 10, 2013 I think you should use IsWow64Process function to determines whether the specified process is running under x86 or x64 and so on, you only need a button to launcher Scylla_x86.exe or Scylla_x64.exe. So It would be neat.
Aguila Posted March 10, 2013 Posted March 10, 2013 Thanks, this is a really nice idea. I added a windows check: the x64 button is disabled if you cant execute it. BOOL isWindows64() { _GetNativeSystemInfo = (def_GetNativeSystemInfo)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo"); if (_GetNativeSystemInfo) { _GetNativeSystemInfo(&sysi); } else { GetSystemInfo(&sysi); } if (sysi.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { return TRUE; } else { return FALSE; } } BOOL CALLBACK DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch(uMsg) { case WM_INITDIALOG: { SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1))); if (!isWindows64()) { EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_X64), FALSE); } } @vic4keyI think this is too complicated and not really comfortable, because you must first select the correct process.ScyllaLauncher_v2.rar
Vic Posted March 10, 2013 Posted March 10, 2013 (edited) I dont think so. This is an example. This code is an example, its a function in source code of my tool for game online hacking. Its using IsWow64Process function, very easy to use, you can look it: BOOL Initialize() { if (!IsWow64Process(GetCurrentProcess(),&IsWOW64)) return 0; if (IsWOW64) { if (!ExtractResource(GetModuleHandleA("Test.exe"),MAKEINTRESOURCE(IDR_DEVICE641),"DEVICE64",LDEV)) return 0; } else { if (!ExtractResource(GetModuleHandleA("Test.exe"),MAKEINTRESOURCE(IDR_DEVICE321),"DEVICE32",LDEV)) return 0; } // Load L-Dev Driver char RUNCOMMAND[MAX_PATH]; strcpy(RUNCOMMAND," -f "); strcat(RUNCOMMAND,LDEV); ShellExecuteA(0,NULL,ATSIV,RUNCOMMAND,NULL,1); return 1; } Edited March 10, 2013 by vic4key
mrexodia Posted March 10, 2013 Author Posted March 10, 2013 @vic4key: your idea is good, but in practice it's not useful when you want to unpack an x86 process in WOW64. @Scylla: glad you liked the idea Greetings 1
Aguila Posted March 10, 2013 Posted March 10, 2013 @vic4keyI see, but this is not useful, because of the reason Mr. eXoDia already mentioned. You must use Scylla x86 for x86 processes and Scylla x64 for x64 processes. Your snippet is also error-prone, please read this carefully: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684139%28v=vs.85%29.aspx
Vic Posted March 11, 2013 Posted March 11, 2013 Yeah I know, but it only is a simple idea for launching x86/x64 application. We can use the current process (Launcher) to determines whether the specified process is running under x86 or x64, thereby determining to run x86 or x64 file.
Aguila Posted March 11, 2013 Posted March 11, 2013 But your code will not run on Windows 2000/Windows XP SP0-1/Windows Server 2003 SP0, and some more I guess. It is a really bad way to determine a windows 64. Look at my source code example...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now