Function at 0x140021ca0
Capabilities:
Access pe header
Enumerate pe sections
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov dword [rax + 0x18], r8d
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov r14, r9
mov rdi, rdx
mov rsi, rcx
xor ebx, ebx
mov qword [rax + 0x28], rbx
mov qword [rax + 0x30], rbx
mov qword [rcx], rbx
test rdx, rdx
je 0x140021ce0
mov qword [rdx], rbx
lea rdx, [rsp + 0xa0]
mov rcx, r9
call fcn.140021960
mov ecx, ebx
mov edx, 0xc000007b
test al, al
cmove ecx, edx
mov dword [rsp + 0x30], ecx
jmp 0x140021d22
test ecx, ecx
jns 0x140021d38
mov eax, ecx
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov r8d, dword [rsp + 0xa0]
mov rdx, r14
mov rcx, rsi
call fcn.14001fd50
test eax, eax
js 0x140022141
cmp eax, 0x4000000e
je 0x140022141
mov rcx, qword [rsi]
call fcn.14001fce0
mov r15, rax
test rax, rax
jne 0x140021d87
mov ecx, 7
int 0x29
call qword [sym.imp.KERNEL32.dll_DebugBreak]
mov ecx, 0xc0000141
call qword [sym.imp.KERNEL32.dll_ExitProcess]
or byte [rax + 0xc], 2
mov rcx, qword [rsi]
call qword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov r13, rax
movzx r14d, word [rax + 0x5e]
and r14d, 0x400
or r14d, 0x2800
shr r14d, 0xa
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x20], rax
mov edx, r14d
mov rcx, qword [rsi]
call fcn.140021620
mov r12d, eax
mov dword [rsp + 0x90], eax
test eax, eax
jns 0x140021df4
xor edx, edx
mov rcx, qword [rsi]
call fcn.140022160
mov qword [rsi], rbx
mov eax, r12d
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
or word [r15 + 0xe], 1
test rdi, rdi
je 0x140021e0a
mov rax, qword [rsp + 0xa8]
mov qword [rdi], rax
test r14b, 1
jne 0x140021e59
mov edx, dword [r13 + 0x50]
mov rcx, qword [r15 + 0x10]
call fcn.1400231f0
mov r12d, eax
mov dword [rsp + 0x90], eax
test eax, eax
jns 0x140021e53
xor edx, edx
mov rcx, qword [rsi]
call fcn.140022160
mov qword [rsi], rbx
test rdi, rdi
je 0x140021e40
mov qword [rdi], rbx
mov eax, r12d
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
or word [r15 + 0xe], 2
mov r13, qword [rsi]
test r13, r13
je 0x140021f9c
cmp byte [0x140389038], 0
jne 0x140021f9c
movsxd r12, dword [r13 + 0x3c]
add r12, r13
movzx eax, word [r12 + 0x14]
lea rdi, [r12 + 0x18]
add rdi, rax
mov r14d, ebx
cmp bx, word [r12 + 6]
jae 0x140021f9c
nop word [rax + rax]
mov eax, dword [rdi + 0xc]
add rax, r13
mov qword [rsp + 0xb0], rax
mov rcx, rdi
call fcn.14001fbc0
test al, al
je 0x140021f86
mov edx, dword [r12 + 0x38]
mov ecx, dword [rdi + 8]
inc rcx
add rcx, rdx
lea rax, [rdx - 1]
not rax
and rcx, rax
mov qword [rsp + 0x38], rcx
mov edx, dword [rdi + 0x24]
mov ecx, edx
shr rcx, 0x1d
and ecx, 1
mov eax, edx
shr rax, 0x1e
and eax, 1
lea rcx, [rax + rcx*2]
mov eax, edx
shr rax, 0x1f
lea rcx, [rax + rcx*2]
lea rax, [0x14033feb0]
mov eax, dword [rax + rcx*4]
mov dword [rsp + 0xa8], eax
lea rcx, [rsp + 0xa0]
mov qword [rsp + 0x20], rcx
mov r9d, 4
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0xb0]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x140021f9c
mov edx, dword [rdi + 8]
mov rcx, qword [rsp + 0xb0]
call fcn.14001f960
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0xa8]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0xb0]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov byte [0x140389038], 1
inc r14d
add rdi, 0x28
movzx eax, word [r12 + 6]
cmp r14d, eax
jb 0x140021ea0
lea r12, [0x14033feb0]
mov rcx, r15
call fcn.140021bb0
test eax, eax
je 0x140022132
mov rcx, r15
call fcn.140021c20
test eax, eax
je 0x140022132
mov r14, qword [rsi]
test r14, r14
je 0x14002211b
cmp byte [0x140389038], 0
je 0x14002211b
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
movsxd rsi, dword [r14 + 0x3c]
add rsi, r14
movzx eax, word [rsi + 0x14]
lea rdi, [rsi + 0x18]
add rdi, rax
cmp bx, word [rsi + 6]
jae 0x140022114
nop dword [rax]
nop word [rax + rax]
mov eax, dword [rdi + 0xc]
add rax, r14
mov qword [rsp + 0xa8], rax
mov rcx, rdi
call fcn.14001fbc0
test al, al
je 0x1400220fb
mov edx, dword [rsi + 0x38]
mov ecx, dword [rdi + 8]
inc rcx
add rcx, rdx
lea rax, [rdx - 1]
not rax
and rcx, rax
mov qword [rsp + 0xb0], rcx
mov r15d, dword [rdi + 0x24]
mov ecx, r15d
shr rcx, 0x1d
and ecx, 1
mov eax, r15d
shr rax, 0x1e
and eax, 1
lea rcx, [rax + rcx*2]
mov eax, r15d
shr rax, 0x1f
lea rcx, [rax + rcx*2]
mov r12d, dword [r12 + rcx*4]
and r15d, 0x4000000
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0xb0]
lea rdx, [rsp + 0xa8]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x14002211b
mov edx, dword [rdi + 8]
mov rcx, qword [rsp + 0xa8]
call fcn.14001f960
mov r9d, r12d
bts r9d, 9
test r15d, r15d
cmove r9d, r12d
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0xb0]
lea rdx, [rsp + 0xa8]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
inc ebx
add rdi, 0x28
movzx eax, word [rsi + 6]
cmp ebx, eax
lea r12, [0x14033feb0]
jb 0x140022010
mov byte [0x140389038], 0
mov eax, dword [rsp + 0x90]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
xor edx, edx
mov rcx, qword [rsi]
call fcn.140022160
mov eax, 0xc0000142
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret