Function at 0x140152a30
Capabilities:
Get common file path

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x468
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x30], 2
mov qword [rsp + 0x38], 0
mov edi, 0x200
mov eax, 2
mov qword [rsp + 0x60], rax
xor ebx, ebx
xor r13d, r13d
xor r14d, r14d
cmp rdi, 0x201
jae 0x140152ab0
jmp 0x140152a9f
jae 0x140152b5e
cmp rdi, 0x201
jae 0x140152ab0
mov esi, 0x200
lea r15, [rsp + 0x68]
mov r12, rdi
jmp 0x140152ae0
sub rdi, r14
sub r13, r14
cmp r13, rdi
jb 0x140152b3a
mov eax, 0xffffffff
cmp rbx, rax
mov r14d, 0xffffffff
cmovb r14, rbx
mov qword [rsp + 0x38], r14
mov r13, rbx
mov rsi, r14
mov r15, qword [rsp + 0x60]
mov r12, r14
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov rcx, r15
mov edx, r12d
call sub.KERNEL32.dll_GetSystemDirectoryW
mov ebp, eax
test eax, eax
jne 0x140152b05
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x140152b89
mov edi, ebp
cmp r12, rdi
jne 0x140152a90
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x140152b87
add r12, r12
mov eax, 0xffffffff
cmp r12, rax
cmovae r12, rax
mov rdi, r12
cmp rdi, 0x201
jb 0x140152a9f
jmp 0x140152ab0
lea rcx, [rsp + 0x28]
mov rdx, r14
mov r8, rdi
call fcn.140056cf0
mov rbx, qword [rsp + 0x28]
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x60], rax
jmp 0x140152abb
cmp rsi, rdi
jb 0x140152b87
test ebp, ebp
je 0x140152bce
lea rbx, [rdi + rdi]
movzx eax, byte [0x141af8129]
xor ecx, ecx
mov rdx, rbx
call fcn.140146820
mov r14, rax
mov rsi, rdi
test rax, rax
jne 0x140152bd8
ud2
call sub.KERNEL32.dll_GetLastError
mov edi, eax
shl rdi, 0x20
or rdi, 2
cmp qword [rsp + 0x28], 0
je 0x140152bb3
mov r8, qword [rsp + 0x30]
mov rcx, qword [0x141af8068]
xor edx, edx
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [rsp + 0x58]
mov qword [rcx + 8], rdi
movabs rax, 0x8000000000000000
mov qword [rcx], rax
jmp 0x140152dd3
mov r14d, 2
xor ebx, ebx
xor esi, esi
mov rcx, r14
mov rdx, r15
mov r8, rbx
call sub.msvcrt.dll_memcpy
cmp qword [rsp + 0x28], 0
je 0x140152c01
mov r8, qword [rsp + 0x30]
mov rcx, qword [0x141af8068]
xor edx, edx
call sub.KERNEL32.dll_HeapFree
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x50], rdi
lea r13, [0x141a7acda]
xor eax, eax
lea r12, [0x141a7ace2]
mov r15, r13
xor ebp, ebp
jmp 0x140152c4e
xor esi, esi
mov ebx, eax
cmp rdi, qword [rsp + 0x40]
je 0x140152ce6
mov word [r14 + rdi*2], bx
inc rdi
mov qword [rsp + 0x50], rdi
mov eax, esi
test r15, r15
je 0x140152cc0
test ax, ax
jne 0x140152c30
cmp r15, r12
je 0x140152cc0
movzx ebx, byte [r15]
test bl, bl
js 0x140152c6c
inc r15
xor esi, esi
jmp 0x140152c34
mov ecx, ebx
and ecx, 0x1f
movzx r8d, byte [r15 + 1]
and r8d, 0x3f
cmp bl, 0xdf
jbe 0x140152d45
movzx edx, byte [r15 + 2]
shl r8d, 6
and edx, 0x3f
or edx, r8d
cmp bl, 0xf0
jb 0x140152d74
movzx ebx, byte [r15 + 3]
and ecx, 7
shl ecx, 0x12
shl edx, 6
and ebx, 0x3f
or ebx, edx
or ebx, ecx
cmp ebx, 0x110000
jne 0x140152daa
nop dword [rax]
cmp rbp, 1
je 0x140152dbd
cmp rdi, qword [rsp + 0x40]
je 0x140152d58
mov ebp, 1
xor ebx, ebx
xor r15d, r15d
mov esi, eax
jmp 0x140152c3f
mov rax, r13
sub rax, r15
add rax, 0xa
movabs rcx, 0xaaaaaaaaaaaaaaab
mul rcx
shr rdx, 1
cmp si, 1
sbb rdx, 0xffffffffffffffff
mov ecx, 1
sub rcx, rbp
mov rax, 0xffffffffffffffff
add rcx, rdx
jb 0x140152d1f
mov rax, rcx
mov r8, 0xffffffffffffffff
inc rax
je 0x140152d2e
mov r8, rax
lea rcx, [rsp + 0x40]
mov rdx, rdi
call fcn.140056cf0
mov r14, qword [rsp + 0x48]
jmp 0x140152c3f
add r15, 2
shl ecx, 6
or ecx, r8d
mov ebx, ecx
xor esi, esi
jmp 0x140152c34
mov ebp, 1
xor r15d, r15d
mov esi, eax
xor ebx, ebx
xor eax, eax
mov r8, 0xffffffffffffffff
inc rax
jne 0x140152d2b
jmp 0x140152d2e
add r15, 3
shl ecx, 0xc
or edx, ecx
mov ebx, edx
cmp ebx, 0xffff
jbe 0x140152db6
lea eax, [rbx + 0xff0000]
shr eax, 0xa
or eax, 0xd800
and ebx, 0x3ff
or ebx, 0xdc00
mov esi, ebx
mov ebx, eax
jmp 0x140152c34
add r15, 4
cmp ebx, 0xffff
ja 0x140152d87
xor esi, esi
jmp 0x140152c34
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
mov qword [rcx + 0x10], rax
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rcx], xmm0
add rsp, 0x468
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret