MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / start_address

Method start_address

windows/winobject/process.py:851–866  ·  view source on GitHub ↗

The start address of the thread :type: :class:`int`

(self)

Source from the content-addressed store, hash-verified

849
850 @property
851 def start_address(self):
852 """The start address of the thread
853
854 :type: :class:`int`
855 """
856 if windows.current_process.bitness == 32 and self.owner.bitness == 64:
857 res = ULONGLONG()
858 windows.syswow64.NtQueryInformationThread_32_to_64(self.handle, ThreadQuerySetWin32StartAddress, byref(res), ctypes.sizeof(res))
859 return res.value
860 res_size = max(self.owner.bitness, windows.current_process.bitness)
861 if res_size == 32:
862 res = ULONG()
863 else:
864 res = ULONGLONG()
865 winproxy.NtQueryInformationThread(self.handle, ThreadQuerySetWin32StartAddress, byref(res), ctypes.sizeof(res))
866 return res.value
867
868 def _get_principal_teb_addr(self):
869 # Returns the 64bits TEB on a 64bits computer (syswow process or not)

Callers

nothing calls this directly

Calls 1

sizeofMethod · 0.45

Tested by

no test coverage detected