Function at 0xbef08d20
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get common file path

Disassembly:
mov qword [rsp + 8], rcx
push rdi
push r13
push r15
sub rsp, 0x290
movzx r13d, dl
lea rcx, [rsp + 0x60]
mov edx, 0x103
mov r15b, 1
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov rdx, qword [rsp + 0x2b0]
mov r8d, eax
mov eax, 0x5c
mov dword [rsp + 0x2c8], r8d
lea r9, [r8 + r8]
mov word [rsp + r9 + 0x60], ax
movsxd rax, dword [rdx + 0x3c]
mov qword [rsp + 0x50], r9
mov ecx, dword [rax + rdx + 0x90]
mov eax, dword [rax + rdx + 0x94]
mov qword [rsp + 0x48], rax
lea rdi, [rcx + rdx]
mov qword [rsp + 0x30], rdi
test rax, rax
je 0xbef08fd3
mov qword [rsp + 0x2b8], rbx
mov rax, 0xfffffffffffffff4
mov qword [rsp + 0x288], rbp
sub rax, rcx
mov qword [rsp + 0x280], rsi
sub rax, rdx
mov qword [rsp + 0x278], r12
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x270], r14
cmp dword [rdi], 0
je 0xbef08f9a
mov eax, 0x103
lea rbx, [rsp + 0x62]
sub eax, r8d
add rbx, r9
mov r8d, dword [rdi + 0xc]
xor ecx, ecx
add r8, rdx
mov dword [rsp + 0x28], eax
xor edx, edx
mov qword [rsp + 0x20], rbx
mov r9d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rax, qword [0xbef0e510]
lea rcx, [rsp + 0x60]
xor r8d, r8d
xor edx, edx
call rax
mov r14, rax
test rax, rax
jne 0xbef08e47
mov rax, qword [0xbef0e510]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call rax
mov r14, rax
test rax, rax
jne 0xbef08e47
xor r15b, r15b
jmp 0xbef08f65
mov rdx, qword [rsp + 0x2b0]
xor ebp, ebp
mov eax, dword [rdi]
xor r12d, r12d
mov esi, dword [rdi + 0x10]
add rax, rdx
add rsi, rdx
mov qword [rsp + 0x38], rax
cmp qword [rax], rbp
je 0xbef08f6d
mov rbx, rax
xor edi, edi
test r13b, r13b
je 0xbef08eac
movsxd rax, ebp
mov rcx, 0xffffffffffffffff
mov r9d, 0x40
mov r8d, 8
lea rdx, [rsi + rax*8]
lea rax, [rsp + 0x2c0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov rdx, qword [rsp + 0x2b0]
mov rax, qword [rbx]
test rax, rax
jns 0xbef08eb9
movzx ebx, ax
jmp 0xbef08ec0
lea rbx, [rax + 2]
add rbx, rdx
mov rax, qword [0xbef0e568]
test rax, rax
je 0xbef08eeb
cmp rbx, qword [0xbef0dab0]
jb 0xbef08eeb
cmp rbx, qword [0xbef0dab8]
ja 0xbef08eeb
mov rdx, rbx
mov rcx, r14
call rax
test rax, rax
jne 0xbef08efc
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0xbef08f02
mov qword [rdi + rsi], rax
jmp 0xbef08f05
xor r15b, r15b
test r13b, r13b
je 0xbef08f39
mov r9d, dword [rsp + 0x2c0]
mov rcx, 0xffffffffffffffff
movsxd rax, ebp
mov r8d, 8
lea rdx, [rsi + rax*8]
lea rax, [rsp + 0x2c0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov rbx, qword [rsp + 0x38]
inc r12
mov rdx, qword [rsp + 0x2b0]
inc ebp
lea rdi, [r12*8]
add rbx, rdi
cmp qword [rbx], 0
jne 0xbef08e72
mov rdi, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x2b0]
mov rcx, qword [rsp + 0x40]
add rdi, 0x14
mov r8d, dword [rsp + 0x2c8]
add rcx, 0xc
mov r9, qword [rsp + 0x50]
add rcx, rdi
mov qword [rsp + 0x30], rdi
cmp rcx, qword [rsp + 0x48]
jl 0xbef08dd2
mov r12, qword [rsp + 0x278]
movzx eax, r15b
mov rsi, qword [rsp + 0x280]
mov rbp, qword [rsp + 0x288]
mov rbx, qword [rsp + 0x2b8]
mov r14, qword [rsp + 0x270]
add rsp, 0x290
pop r15
pop r13
pop rdi
ret
movzx eax, r15b
add rsp, 0x290
pop r15
pop r13
pop rdi
ret