Skip to content

Commit

Permalink
fix everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Prevter committed Jun 20, 2024
1 parent d0bd118 commit 6ba99f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- Fixed few false positive crashes
- Fixed bindings fetching
- Added class names for CCObject pointers
- Fixed some failures in Stack Allocation view

## v1.4.2
- Geode v3.0.0-beta.1 support
Expand Down
13 changes: 9 additions & 4 deletions src/analyzer/analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

#pragma comment(lib, "dbghelp")

// Import a TulipHook function
PVOID GeodeFunctionTableAccess64(HANDLE hProcess, DWORD64 AddrBase);

namespace analyzer {

static HANDLE s_mainThread = GetCurrentThread();
Expand Down Expand Up @@ -455,8 +458,13 @@ namespace analyzer {
#else
uintptr_t stackPointer = context.Rsp;
#endif
for (int i = 0; i < 32; i++) {
constexpr size_t stackSize = 32;
for (int i = 0; i < stackSize; i++) {
uintptr_t address = stackPointer + i * sizeof(uintptr_t);
if (!utils::mem::isAccessible(address)) {
geode::log::warn("Stack address 0x{:X} is not accessible", address);
break;
}
uintptr_t value = *(uintptr_t *) address;
auto valueResult = getValue(value);
stackData.push_back({address, value, valueResult.first, valueResult.second});
Expand Down Expand Up @@ -493,9 +501,6 @@ namespace analyzer {
return nullptr;
}

/// @brief Import a TulipHook function
PVOID GeodeFunctionTableAccess64(HANDLE hProcess, DWORD64 AddrBase);

PVOID CustomSymFunctionTableAccess64(HANDLE hProcess, DWORD64 AddrBase) {
auto ret = GeodeFunctionTableAccess64(hProcess, AddrBase);
if (ret) return ret;
Expand Down

0 comments on commit 6ba99f0

Please sign in to comment.