+void Rebase()
+{
+ char dest[65535];
+ char command[65535];
+
+ *dest = 0;
+
+ WIN32_FIND_DATA fd;
+ HANDLE fh = FindFirstFile("..\\bin\\release\\lib\\*.so", &fd);
+ if(fh == INVALID_HANDLE_VALUE)
+ return;
+
+ do
+ {
+ strcat(dest, " ..\\bin\\release\\lib\\");
+ strcat(dest, fd.cFileName);
+ }
+ while (FindNextFile(fh, &fd));
+
+ FindClose(fh);
+
+ sprintf(command, "rebase.exe -v -b 10000000 -c baseaddr_commands.txt %s", dest);
+ printf("%s\n", command);
+ system(command);
+
+ fh = FindFirstFile("..\\bin\\release\\modules\\*.so", &fd);
+ if(fh == INVALID_HANDLE_VALUE)
+ return;
+
+ *dest = 0;
+
+ do
+ {
+ strcat(dest, " ..\\bin\\release\\modules\\");
+ strcat(dest, fd.cFileName);
+ }
+ while (FindNextFile(fh, &fd));
+
+ sprintf(command, "rebase.exe -v -b 11000000 -c baseaddr_modules.txt %s", dest);
+ printf("%s\n", command);
+ system(command);
+
+ FindClose(fh);
+
+}
+