Skip to content

Commit b27abc9

Browse files
committed
Correct GetVirtualIndex's comment paddings
1 parent 9ab4104 commit b27abc9

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

include/dynlibutils/virtual.hpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,23 @@ constexpr std::ptrdiff_t GetVirtualIndex() noexcept
4747
pAddr += 5 /*size of the instruction*/ + *(unsigned long*)(pAddr + 1);
4848
}
4949

50+
//AMs note:
5051
// Check whether it's a virtual function call
5152
// They look like this:
52-
// 004125A0 8B 01 mov eax,dword ptr [ecx]
53-
// 004125A2 FF 60 04 jmp dword ptr [eax+4]
54-
// ==OR==
55-
// 00411B80 8B 01 mov eax,dword ptr [ecx]
56-
// 00411B82 FF A0 18 03 00 00 jmp dword ptr [eax+318h]
53+
// 004125A0 8B 01 mov eax,dword ptr [ecx]
54+
// 004125A2 FF 60 04 jmp dword ptr [eax+4]
55+
// ==OR==
56+
// 00411B80 8B 01 mov eax,dword ptr [ecx]
57+
// 00411B82 FF A0 18 03 00 00 jmp dword ptr [eax+318h]
5758

5859
// However, for vararg functions, they look like this:
59-
// 0048F0B0 8B 44 24 04 mov eax,dword ptr [esp+4]
60-
// 0048F0B4 8B 00 mov eax,dword ptr [eax]
61-
// 0048F0B6 FF 60 08 jmp dword ptr [eax+8]
62-
// ==OR==
63-
// 0048F0B0 8B 44 24 04 mov eax,dword ptr [esp+4]
64-
// 0048F0B4 8B 00 mov eax,dword ptr [eax]
65-
// 00411B82 FF A0 18 03 00 00 jmp dword ptr [eax+318h]
60+
// 0048F0B0 8B 44 24 04 mov eax,dword ptr [esp+4]
61+
// 0048F0B4 8B 00 mov eax,dword ptr [eax]
62+
// 0048F0B6 FF 60 08 jmp dword ptr [eax+8]
63+
// ==OR==
64+
// 0048F0B0 8B 44 24 04 mov eax,dword ptr [esp+4]
65+
// 0048F0B4 8B 00 mov eax,dword ptr [eax]
66+
// 00411B82 FF A0 18 03 00 00 jmp dword ptr [eax+318h]
6667

6768
// With varargs, the this pointer is passed as if it was the first argument
6869

0 commit comments

Comments
 (0)