Function at 0x140004f20
Capabilities:
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xa8
mov rdi, rdx
mov r14, rcx
mov rbx, qword [rdx + 0x18]
mov r15, qword [rdx + 0x20]
test rbx, rbx
je 0x140004f4c
mov rax, qword [r15 + 0x30]
jmp 0x140004f50
mov eax, dword [r15 + 0x34]
mov qword [rsp + 0x30], rax
mov eax, dword [r15 + 0x50]
mov qword [rsp + 0x70], rax
mov rsi, qword [0x14063f0a8]
test rsi, rsi
je 0x140004f9a
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0x3000
lea rdx, [rsp + 0x30]
lea r9, [rsp + 0x70]
mov rcx, rax
xor r8d, r8d
call rsi
test eax, eax
jne 0x140004fdf
jmp 0x140005038
lea rdx, str.ntdll.dllNtAllocateVirtualMemoryNtProtectVirtualMemoryC:Userspyr.cargo_registry_srcindex.crates.io_6f17d22bba15001fmemexec_0.2.0_srcpeparserheader.rs
lea rcx, [rsp + 0x38]
mov r8d, 9
call sym.memexec::peloader::winapi::load_library::h3749b2585a8e2bca
cmp dword [rsp + 0x38], 0
jne 0x140004fdf
mov rdx, qword [rsp + 0x40]
lea r8, [0x1406048b9]
lea rcx, [rsp + 0x50]
mov r9d, 0x17
call sym.memexec::peloader::winapi::get_proc_address_by_name::hebc41c3c95b44637
cmp dword [rsp + 0x50], 0
je 0x14000558f
mov qword [rsp + 0x30], 0
mov rsi, qword [0x14063f0a8]
test rsi, rsi
je 0x1400050af
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0x3000
lea rdx, [rsp + 0x30]
lea r9, [rsp + 0x70]
mov rcx, rax
xor r8d, r8d
call rsi
test eax, eax
je 0x140005038
movd xmm1, eax
movdqa xmm0, xmmword [0x140604880]
punpckldq xmm0, xmm1
jmp 0x140005559
mov qword [rsp + 0x60], r14
mov r12, qword [rdi + 0x28]
mov r13, qword [rdi + 0x30]
test r13, r13
je 0x140005085
mov rsi, qword [rdi + 0x48]
lea rax, [r13*8]
lea rdi, [rax + rax*4]
xor r14d, r14d
nop dword [rax]
mov edx, dword [r12 + r14 + 0x14]
add rdx, rsi
mov ecx, dword [r12 + r14 + 0xc]
mov r8d, dword [r12 + r14 + 0x10]
add rcx, qword [rsp + 0x30]
call sym.memcpy
add r14, 0x28
cmp rdi, r14
jne 0x140005060
mov qword [rsp + 0x80], r13
mov rbp, qword [rsp + 0x30]
test rbx, rbx
je 0x1400050dc
lea rdx, [r15 + 0xb0]
mov rcx, qword [r15 + 0x30]
mov rax, rbp
sub rax, rcx
jne 0x1400050f3
jmp 0x1400051c2
lea rdx, str.ntdll.dllNtAllocateVirtualMemoryNtProtectVirtualMemoryC:Userspyr.cargo_registry_srcindex.crates.io_6f17d22bba15001fmemexec_0.2.0_srcpeparserheader.rs
lea rcx, [rsp + 0x38]
mov r8d, 9
call sym.memexec::peloader::winapi::load_library::h3749b2585a8e2bca
cmp dword [rsp + 0x38], 0
je 0x140005530
movq xmm0, qword [rsp + 0x3c]
jmp 0x140005559
lea rdx, [r15 + 0xa0]
mov ecx, dword [r15 + 0x34]
mov rax, rbp
sub rax, rcx
je 0x1400051c2
mov ecx, dword [rdx]
test rcx, rcx
je 0x1400051c2
cmp dword [rdx + 4], 0
je 0x1400051c2
add rcx, rbp
mov edx, 1
mov r8d, dword [rcx + 4]
test r8, r8
jne 0x140005133
jmp 0x1400051b4
xor r8d, r8d
add rcx, r8
mov r8d, dword [rcx + 4]
test r8, r8
je 0x1400051b4
cmp r8d, 0xa
jb 0x1400051a4
lea r9, [r8 - 8]
shr r9, 0x3f
add r8, r9
add r8, 0xfffffffffffffff8
sar r8, 1
cmp r8, 2
cmovl r8, rdx
xor r9d, r9d
jmp 0x140005168
inc r9
cmp r8, r9
je 0x1400051a0
movzx r10d, word [rcx + r9*2 + 8]
mov r11d, r10d
and r11d, 0xf000
cmp r11d, 0xa000
jne 0x140005160
mov r11d, dword [rcx]
and r10d, 0xfff
add r11, rbp
add qword [r10 + r11], rax
jmp 0x140005160
mov r8d, dword [rcx + 4]
add rcx, r8
mov r8d, dword [rcx + 4]
test r8, r8
jne 0x140005133
cmp dword [rcx], 0
jne 0x140005120
mov rbp, qword [rsp + 0x30]
shl ebx, 4
lea rax, [rbx + 0x78]
mov qword [rsp + 0x68], rax
cmp dword [r15 + rbx + 0x84], 0
mov qword [rsp + 0x78], r15
je 0x140005379
mov rax, qword [rsp + 0x68]
mov edi, dword [r15 + rax + 8]
test rdi, rdi
je 0x140005379
add rdi, rbp
lea rax, [rbp + 2]
lea rbx, [rsp + 0x38]
mov qword [rsp + 0x90], rax
mov r14d, dword [rdi + 0xc]
test r14, r14
jne 0x140005230
cmp dword [rdi + 0x10], 0
jne 0x140005230
cmp dword [rdi], 0
jne 0x140005230
cmp dword [rdi + 4], 0
jne 0x140005230
cmp dword [rdi + 8], 0
je 0x140005379
nop dword [rax]
add r14, rbp
mov rcx, r14
call sym.strlen
lea r8, [rax + 1]
mov rcx, rbx
mov rdx, r14
call sym.core::ffi::c_str::CStr::to_str::h09d25461edc7d95b
cmp qword [rsp + 0x38], 0
jne 0x140005573
mov rdx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x48]
mov rcx, rbx
call sym.memexec::peloader::winapi::load_library::h3749b2585a8e2bca
cmp dword [rsp + 0x38], 0
jne 0x1400055d5
mov eax, dword [rdi]
mov qword [rsp + 0x88], rdi
mov edi, dword [rdi + 0x10]
add rdi, rbp
lea rbx, [rax + rbp]
test rax, rax
cmove rbx, rdi
mov r15, qword [rbx]
test r15, r15
je 0x140005350
mov r14, qword [rsp + 0x40]
xor r13d, r13d
jmp 0x1400052dd
movzx edx, r15w
mov rcx, r14
call sub.KERNEL32.dll_GetProcAddress
mov rcx, rax
test rax, rax
je 0x1400055c3
mov qword [rdi + r13], rcx
mov r15, qword [rbx + r13 + 8]
add r13, 8
mov rsi, rax
test r15, r15
je 0x140005353
test r15, r15
js 0x1400052b0
mov rax, qword [rsp + 0x90]
cmp byte [rax + r15], 0
je 0x140005350
add r15, rax
mov rcx, r15
call sym.strlen
lea r8, [rax + 1]
lea rcx, [rsp + 0x38]
mov rdx, r15
call sym.core::ffi::c_str::CStr::to_str::h09d25461edc7d95b
cmp qword [rsp + 0x38], 0
jne 0x140005573
mov r8, qword [rsp + 0x40]
mov r9, qword [rsp + 0x48]
lea rcx, [rsp + 0x50]
mov rdx, r14
call sym.memexec::peloader::winapi::get_proc_address_by_name::hebc41c3c95b44637
cmp dword [rsp + 0x50], 0
jne 0x14000556b
mov rcx, qword [rsp + 0x58]
mov rax, rsi
jmp 0x1400052c8
mov rax, rsi
mov rdi, qword [rsp + 0x88]
add rdi, 0x14
mov rsi, rax
lea rbx, [rsp + 0x38]
mov r14d, dword [rdi + 0xc]
test r14, r14
jne 0x140005230
jmp 0x140005212
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x1400054c8
shl rax, 3
lea rsi, [rax + rax*4]
xor edi, edi
lea rbx, [rsp + 0x38]
lea r14, [rsp + 0xa0]
lea r13, [rsp + 0x98]
jmp 0x1400053f6
mov r15, qword [0x14063f0b0]
test r15, r15
je 0x140005470
mov dword [rsp + 0x38], 0
call sub.KERNEL32.dll_GetCurrentProcess
mov qword [rsp + 0x20], rbx
mov rcx, rax
mov rdx, r14
mov r8, r13
mov r9d, ebp
call r15
test eax, eax
jne 0x1400055a0
add rdi, 0x28
cmp rsi, rdi
je 0x1400054c8
mov eax, dword [r12 + rdi + 0x10]
mov qword [rsp + 0x98], rax
test rax, rax
je 0x1400053e9
mov eax, dword [r12 + rdi + 0xc]
add rax, qword [rsp + 0x30]
mov qword [rsp + 0xa0], rax
mov eax, dword [r12 + rdi + 0x24]
test eax, 0x20000000
jne 0x140005450
mov ebp, 1
test eax, 0x40000000
je 0x1400053b0
shr eax, 0x1f
lea ebp, [rax*2 + 2]
jmp 0x1400053b0
mov ebp, 0x10
test eax, 0x40000000
je 0x1400053b0
shr eax, 0x1a
and eax, 0xffffffe0
add eax, 0x20
mov ebp, eax
jmp 0x1400053b0
mov r8d, 9
mov rcx, rbx
lea rdx, str.ntdll.dllNtAllocateVirtualMemoryNtProtectVirtualMemoryC:Userspyr.cargo_registry_srcindex.crates.io_6f17d22bba15001fmemexec_0.2.0_srcpeparserheader.rs
call sym.memexec::peloader::winapi::load_library::h3749b2585a8e2bca
cmp dword [rsp + 0x38], 0
jne 0x1400055d5
mov rdx, qword [rsp + 0x40]
mov r9d, 0x16
lea rcx, [rsp + 0x50]
lea r8, [0x1406048d0]
call sym.memexec::peloader::winapi::get_proc_address_by_name::hebc41c3c95b44637
cmp dword [rsp + 0x50], 0
jne 0x14000556b
mov r15, qword [rsp + 0x58]
mov qword [0x14063f0b0], r15
jmp 0x1400053c0
mov rdi, qword [rsp + 0x30]
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
cmp dword [rax + rcx + 0x4c], 0
je 0x14000557e
mov eax, dword [rax + rcx + 0x48]
test rax, rax
mov rbx, qword [rsp + 0x60]
je 0x140005583
mov rsi, qword [rdi + rax + 0x18]
mov rax, qword [rsi]
test rax, rax
je 0x140005583
add rsi, 8
nop dword [rax]
mov rcx, rdi
mov edx, 1
xor r8d, r8d
call rax
mov rax, qword [rsi]
add rsi, 8
test rax, rax
jne 0x140005510
mov rdi, qword [rsp + 0x30]
jmp 0x140005583
mov rdx, qword [rsp + 0x40]
lea r8, [0x1406048b9]
lea rcx, [rsp + 0x50]
mov r9d, 0x17
call sym.memexec::peloader::winapi::get_proc_address_by_name::hebc41c3c95b44637
cmp dword [rsp + 0x50], 0
je 0x1400055b2
movq xmm0, qword [rsp + 0x54]
movq qword [r14 + 4], xmm0
mov dword [r14], 1
jmp 0x1400055eb
movq xmm0, qword [rsp + 0x54]
jmp 0x1400055db
mov eax, 5
movd xmm0, eax
jmp 0x1400055db
mov rbx, qword [rsp + 0x60]
mov qword [rbx + 8], rdi
mov dword [rbx], 0
jmp 0x1400055eb
mov rsi, qword [rsp + 0x58]
mov qword [0x14063f0a8], rsi
jmp 0x140004f6a
movd xmm1, eax
movdqa xmm0, xmmword [0x1406048a0]
punpckldq xmm0, xmm1
jmp 0x1400055db
mov rsi, qword [rsp + 0x58]
mov qword [0x14063f0a8], rsi
jmp 0x140004ff8
movd xmm1, esi
movdqa xmm0, xmmword [0x140604890]
punpckldq xmm0, xmm1
jmp 0x1400055db
movq xmm0, qword [rsp + 0x3c]
mov rax, qword [rsp + 0x60]
movq qword [rax + 4], xmm0
mov dword [rax], 1
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret