📄 tlsfixer.asm
字号:
; Author: Brandon LaCombe
; Date: February 3, 2006
; License: Public Domain
.386
.model flat, stdcall
option casemap:none
include windows.inc
include LoaderStructs.inc
.code
ExportTLSFixer proc pdwTLSFixerSize:dword
mov eax, pdwTLSFixerSize
.if eax
mov dword ptr[eax], tls_fixer_end - tls_fixer_start
.endif
mov eax, tls_fixer_start
ret
ExportTLSFixer endp
; The Windows loader has overwritten the tls index, so we need to restore
; it to its original value. (or restore the windows loader value)
tls_fixer_start:
mov eax, (LOADER_STRUCT ptr[ebx]).pTLSIndex
mov edx, (LOADER_STRUCT ptr[ebx]).dwOrigTLSIndex
xchg [eax], edx
mov (LOADER_STRUCT ptr[ebx]).dwOrigTLSIndex, edx
tls_fixer_end:
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -