⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tlsfixer.asm

📁 pe exe packer (must use vc2005 to compile)
💻 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 + -