Files
thomasxm-amber/loader/loader-x64/inc/run_tls_callbacks.asm
T
Ege Balcı fae3275b68 Amber v3.2 release.
- Major loader update!
  - Added TLS callback support
  - Added forwarded imports support
  - Removed GetProcAddress and LoadLibrary WinAPI usage
  - Switched to NTDLL WinApi functions
  - Wiper code improved
- Added lite loader option for appending PE files on the fly!
- Added experimental raw syscall loader
- Added static build flags in makefile
- File name bug fixed
- Dockerfile updated
- Github workflows added
- README updated
2023-06-24 13:58:23 +02:00

36 lines
597 B
NASM

[BITS 64]
run_tls_callbacks:
push rsi
push rbx
sub rsp,0x28
mov rsi,rcx
movsxd rax,DWORD [rcx+0x3c]
mov eax,DWORD [rcx+rax*1+0xd0]
mov edx,0x0
test eax,eax
je loc_1400033ad
mov eax,eax
mov rbx,QWORD [rcx+rax*1+0x18]
mov edx,0x1
test rbx,rbx
jne loc_1400033ca
loc_1400033ad:
mov eax,edx
add rsp,0x28
pop rbx
pop rsi
ret
loc_1400033b6:
mov r8d,0x0
mov edx,0x1
mov rcx,rsi
call rax
add rbx,0x8
loc_1400033ca:
mov rax,QWORD [rbx]
test rax,rax
jne loc_1400033b6
mov edx,0x1
jmp loc_1400033ad