Function at 0x140021cd0
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 0x140021d10
mov qword [rdx], rbx
lea rdx, [rsp + 0xa0]
mov rcx, r9
call fcn.140021990
mov ecx, ebx
mov edx, 0xc000007b
test al, al
cmove ecx, edx
mov dword [rsp + 0x30], ecx
jmp 0x140021d52
test ecx, ecx
jns 0x140021d68
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.14001fd80
test eax, eax
js 0x140022171
cmp eax, 0x4000000e
je 0x140022171
mov rcx, qword [rsi]
call fcn.14001fd10
mov r15, rax
test rax, rax
jne 0x140021db7
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.140021650
mov r12d, eax
mov dword [rsp + 0x90], eax
test eax, eax
jns 0x140021e24
xor edx, edx
mov rcx, qword [rsi]
call fcn.140022190
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 0x140021e3a
mov rax, qword [rsp + 0xa8]
mov qword [rdi], rax
test r14b, 1
jne 0x140021e89
mov edx, dword [r13 + 0x50]
mov rcx, qword [r15 + 0x10]
call fcn.140023220
mov r12d, eax
mov dword [rsp + 0x90], eax
test eax, eax
jns 0x140021e83
xor edx, edx
mov rcx, qword [rsi]
call fcn.140022190
mov qword [rsi], rbx
test rdi, rdi
je 0x140021e70
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 0x140021fcc
cmp byte [0x140389040], 0
jne 0x140021fcc
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 0x140021fcc
nop word [rax + rax]
mov eax, dword [rdi + 0xc]
add rax, r13
mov qword [rsp + 0xb0], rax
mov rcx, rdi
call fcn.14001fbf0
test al, al
je 0x140021fb6
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, [0x14033fe90]
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 0x140021fcc
mov edx, dword [rdi + 8]
mov rcx, qword [rsp + 0xb0]
call fcn.14001f990
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 [0x140389040], 1
inc r14d
add rdi, 0x28
movzx eax, word [r12 + 6]
cmp r14d, eax
jb 0x140021ed0
lea r12, [0x14033fe90]
mov rcx, r15
call fcn.140021be0
test eax, eax
je 0x140022162
mov rcx, r15
call fcn.140021c50
test eax, eax
je 0x140022162
mov r14, qword [rsi]
test r14, r14
je 0x14002214b
cmp byte [0x140389040], 0
je 0x14002214b
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 0x140022144
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.14001fbf0
test al, al
je 0x14002212b
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 0x14002214b
mov edx, dword [rdi + 8]
mov rcx, qword [rsp + 0xa8]
call fcn.14001f990
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, [0x14033fe90]
jb 0x140022040
mov byte [0x140389040], 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.140022190
mov eax, 0xc0000142
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret