Function at 0x14000551c
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x350]
sub rsp, 0x450
xor ebx, ebx
lea rax, str.CI.dll
cmp ecx, 0x23f0
mov qword [rbp + 0x3a0], rbx
mov r13d, ecx
mov qword [rsp + 0x28], rbx
lea r15, str.ntoskrnl.exe
mov dword [rsp + 0x20], ebx
cmovae r15, rax
lea rcx, [rsp + 0x30]
mov rdx, r15
mov edi, ebx
mov r14d, ebx
mov r12d, ebx
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov r8b, 1
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x20]
call qword [sym.imp.ntdll.dll_RtlUnicodeStringToAnsiString]
test eax, eax
js 0x1400057ca
call fcn.14000266c
mov r8, rax
test rax, rax
je 0x140005664
mov r9d, ebx
cmp dword [rax], ebx
jbe 0x140005644
lea rsi, [rax + 0x2e]
movzx r10d, word [rsi]
mov r11, qword [rsp + 0x28]
add r10, 0x30
mov eax, r9d
imul rdi, rax, 0x128
add r10, rdi
add r10, r8
cmp r10, r11
je 0x140005754
test r10, r10
je 0x14000562e
test r11, r11
je 0x14000562e
sub r10, r11
movzx edx, byte [r10 + r11]
lea ecx, [rdx - 0x41]
cmp cl, 0x19
lea eax, [rdx + 0x20]
movzx r12d, al
cmova r12d, edx
movzx edx, byte [r11]
lea ecx, [rdx - 0x41]
cmp cl, 0x19
lea eax, [rdx + 0x20]
cmova eax, edx
inc r11
test r12b, r12b
je 0x14000561f
cmp r12b, al
je 0x1400055ec
movsx eax, al
movsx ecx, r12b
sub ecx, eax
je 0x140005754
inc r9d
add rsi, 0x128
cmp r9d, dword [r8]
jb 0x1400055b9
mov r12d, ebx
mov rax, qword gs:[0x30]
xor edx, edx
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov rdi, qword [rbp + 0x3a0]
lea rcx, [rsp + 0x20]
call qword [sym.imp.ntdll.dll_RtlFreeAnsiString]
test r14, r14
je 0x1400057ca
mov edx, 0x104
mov word [rsp + 0x40], bx
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1400057de
lea rax, [rsp + 0x40]
cmp word [rsp + 0x40], bx
je 0x1400056aa
add rax, 2
cmp word [rax], bx
jne 0x1400056a1
lea rdx, [0x14004cfa8]
mov ecx, 0x5c
sub rdx, rax
mov word [rax], cx
lea rax, [rax + 2]
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x1400056b9
mov rdx, r15
mov word [rax], bx
lea rcx, [rsp + 0x40]
call fcn.140002188
xor edx, edx
lea rcx, [rsp + 0x40]
lea r8d, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
je 0x1400057c5
mov rdx, r15
lea rcx, str.___Module___ws__loaded_for_pattern_search_r_n
call fcn.140003224
mov rcx, rsi
cmp r13d, 0x23f0
jae 0x140005776
lea rdx, [rbp + 0x398]
mov qword [rbp + 0x398], rbx
call qword [sym.imp.ntdll.dll_LdrFindEntryForAddress]
test eax, eax
js 0x1400057a8
mov rax, qword [rbp + 0x398]
mov rdx, rbx
mov ecx, dword [rax + 0x40]
mov eax, 0xc0000001
add rcx, 0xfffffffffffffffc
je 0x14000578f
cmp dword [rdx + rsi], 0x1d8806eb
je 0x140005763
inc rdx
cmp rdx, rcx
jb 0x140005741
jmp 0x14000578f
mov r14, qword [rdi + r8 + 0x18]
mov r12d, dword [rdi + r8 + 0x20]
jmp 0x140005644
movsxd rdi, dword [rdx + rsi + 4]
mov eax, ebx
add rdi, 8
add rdi, rdx
add rdi, r14
jmp 0x14000578f
mov r9d, r13d
lea r8, [rbp + 0x3a0]
mov rdx, r14
call fcn.14000525c
mov rdi, qword [rbp + 0x3a0]
test eax, eax
js 0x1400057a8
cmp rdi, r14
jb 0x1400057bc
mov eax, r12d
add rax, r14
cmp rdi, rax
ja 0x1400057bc
mov rbx, rdi
jmp 0x1400057bc
mov r8d, eax
lea rdx, str.____Error:_NTSTATUS__0x_lX__r_n
mov ecx, 1
call fcn.1400103f0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rbx
jmp 0x1400057e0
mov r8, r15
lea rdx, str.____Abort__could_not_query___ws__image_base_r_n
mov ecx, 1
call fcn.1400103f0
xor eax, eax
mov rbx, qword [rsp + 0x4a8]
add rsp, 0x450
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret