Function at 0xbef007b0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x128
movzx edx, word [rcx]
mov rbp, rcx
movzx eax, word [rcx + 2]
add rdx, 0x1e
cmp rdx, rax
ja 0xbef00b11
mov rdi, qword [0xbef13350]
xor ebx, ebx
test rdi, rdi
jne 0xbef00891
mov rcx, qword [0xbef0e4e0]
xor edx, edx
mov r8d, 0x400
mov edi, ebx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0xbef00881
mov edx, 0x200
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov r9d, eax
mov edx, ebx
lea r10, [0xbeef3520]
mov word [rsi + r9*2], 0x5c
lea r8d, [r9 + 1]
lea ecx, [r8 + rdx]
cmp ecx, 0x200
jae 0xbef00851
mov eax, edx
inc edx
movzx eax, word [r10 + rax*2]
mov word [rsi + rcx*2], ax
cmp word [r10 + rdx*2], bx
jne 0xbef00831
lea eax, [r9 + 1]
xor r8d, r8d
add eax, edx
mov rcx, rsi
xor edx, edx
mov word [rsi + rax*2], bx
mov rax, qword [0xbef0e510]
call rax
mov rcx, qword [0xbef0e4e0]
mov r8, rsi
xor edx, edx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [0xbef13350], rdi
test rdi, rdi
je 0xbef00b11
cmp qword [0xbef13368], rbx
jne 0xbef008ef
mov rax, qword [0xbef0e568]
lea rsi, [0xbeef3538]
test rax, rax
je 0xbef008cc
cmp rsi, qword [0xbef0dab0]
jb 0xbef008cc
cmp rsi, qword [0xbef0dab8]
ja 0xbef008cc
mov rdx, rsi
mov rcx, rdi
call rax
test rax, rax
jne 0xbef008d8
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0xbef13368], rax
test rax, rax
je 0xbef00b11
mov rdi, qword [0xbef13350]
cmp qword [0xbef13360], rbx
jne 0xbef0094d
mov rax, qword [0xbef0e568]
lea rsi, [0xbeef3550]
test rax, rax
je 0xbef0092a
cmp rsi, qword [0xbef0dab0]
jb 0xbef0092a
cmp rsi, qword [0xbef0dab8]
ja 0xbef0092a
mov rdx, rsi
mov rcx, rdi
call rax
test rax, rax
jne 0xbef00936
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0xbef13360], rax
test rax, rax
je 0xbef00b11
mov rdi, qword [0xbef13350]
cmp qword [0xbef13358], rbx
jne 0xbef009a4
mov rax, qword [0xbef0e568]
lea rsi, [0xbeef3568]
test rax, rax
je 0xbef00988
cmp rsi, qword [0xbef0dab0]
jb 0xbef00988
cmp rsi, qword [0xbef0dab8]
ja 0xbef00988
mov rdx, rsi
mov rcx, rdi
call rax
test rax, rax
jne 0xbef00994
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0xbef13358], rax
test rax, rax
je 0xbef00b11
mov rdx, qword [rbp + 8]
movzx r8d, word [rbp]
lea rcx, [rdx + 0x1c]
call qword [sym.imp.KERNEL32.dll_RtlMoveMemory]
mov rcx, qword [rbp + 8]
lea rdx, [0xbeef3578]
mov r8d, 0x1c
call qword [sym.imp.KERNEL32.dll_RtlMoveMemory]
movzx ecx, word [rbp]
xor edx, edx
mov rax, qword [rbp + 8]
shr rcx, 1
mov word [rax + rcx*2 + 0x1c], bx
mov rcx, qword [rbp + 8]
call qword [0xbef13368]
mov esi, eax
test eax, eax
je 0xbef00b11
mov rcx, qword [0xbef0e4e0]
mov r8d, esi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0xbef00b11
mov rcx, qword [rbp + 8]
mov r9, rax
mov qword [rsp + 0x120], r14
mov r8d, esi
xor edx, edx
xor r14b, r14b
call qword [0xbef13360]
test eax, eax
je 0xbef00ae7
lea r9, [rsp + 0x158]
mov rcx, rdi
lea r8, [rsp + 0x160]
lea rdx, [0xbeef3598]
call qword [0xbef13358]
test eax, eax
je 0xbef00ae7
test dword [rsp + 0x158], 0xfffffffc
jbe 0xbef00ae7
mov rax, qword [rsp + 0x160]
lea rdx, [0xbeef35d0]
mov ecx, ebx
movzx r9d, word [rax + rcx*4 + 2]
movzx r8d, word [rax + rcx*4]
lea rcx, [rsp + 0x20]
call qword [sym.imp.USER32.dll_wsprintfW]
lea r9, [rsp + 0x150]
mov rcx, rdi
lea r8, [rsp + 0x168]
lea rdx, [rsp + 0x20]
call qword [0xbef13358]
test eax, eax
je 0xbef00ad2
mov rdx, qword [rsp + 0x168]
lea rcx, [0xbeef3658]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0xbef00ae4
mov eax, dword [rsp + 0x158]
inc ebx
shr eax, 2
cmp ebx, eax
jb 0xbef00a70
jmp 0xbef00ae7
mov r14b, 1
mov rcx, qword [0xbef0e4e0]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
movzx eax, r14b
mov r14, qword [rsp + 0x120]
add rsp, 0x128
pop rdi
pop rsi
pop rbp
pop rbx
ret
xor al, al
add rsp, 0x128
pop rdi
pop rsi
pop rbp
pop rbx
ret