Function at 0x1400046d4
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], rbx
mov dword [rsp + 8], ecx
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 esi, 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 0x1400049ae
call fcn.1400018c4
mov r8, rax
test rax, rax
je 0x140004823
mov r9d, ebx
cmp dword [rax], ebx
jbe 0x1400047fc
lea r14, [rax + 0x2e]
movzx r10d, word [r14]
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 0x1400047f2
test r10, r10
je 0x1400047e1
test r11, r11
je 0x1400047e1
sub r10, r11
movzx edx, byte [r10 + r11]
lea ecx, [rdx - 0x41]
cmp cl, 0x19
lea eax, [rdx + 0x20]
movzx r13d, al
cmova r13d, edx
movzx edx, byte [r11]
lea ecx, [rdx - 0x41]
cmp cl, 0x19
lea eax, [rdx + 0x20]
cmova eax, edx
inc r11
test r13b, r13b
je 0x1400047d6
cmp r13b, al
je 0x1400047a3
movsx eax, al
movsx ecx, r13b
sub ecx, eax
je 0x1400047f2
inc r9d
add r14, 0x128
cmp r9d, dword [r8]
jb 0x140004774
jmp 0x1400047fc
mov rsi, qword [rdi + r8 + 0x18]
mov r12d, dword [rdi + r8 + 0x20]
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]
mov r13d, dword [rbp + 0x390]
lea rcx, [rsp + 0x20]
call qword [sym.imp.ntdll.dll_RtlFreeAnsiString]
test rsi, rsi
je 0x1400049ae
mov edx, 0x104
mov word [rsp + 0x40], bx
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1400049c2
lea rax, [rsp + 0x40]
cmp word [rsp + 0x40], bx
je 0x140004869
add rax, 2
cmp word [rax], bx
jne 0x140004860
lea rdx, [0x14003a64c]
mov ecx, 0x5c
sub rdx, rax
mov word [rax], cx
lea rax, [rax + 2]
movzx ecx, word [rdx + rax]
test cx, cx
jne 0x140004878
mov rdx, r15
mov word [rax], bx
lea rcx, [rsp + 0x40]
call fcn.1400013dc
xor edx, edx
lea rcx, [rsp + 0x40]
lea r8d, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov r14, rax
test rax, rax
je 0x14000498c
mov rdx, r15
lea rcx, str.___Module___ws__loaded_for_pattern_search_r_n
call fcn.140002fb8
mov rcx, r14
cmp r13d, 0x23f0
jae 0x14000492b
lea rdx, [rbp + 0x398]
mov qword [rbp + 0x398], rbx
call qword [sym.imp.ntdll.dll_LdrFindEntryForAddress]
test eax, eax
js 0x140004973
mov rax, qword [rbp + 0x398]
mov rdx, rbx
mov ecx, dword [rax + 0x40]
mov eax, 0xc0000001
add rcx, 0xfffffffffffffffc
je 0x140004944
cmp dword [rdx + r14], 0x1d8806eb
je 0x140004918
inc rdx
cmp rdx, rcx
jb 0x140004904
jmp 0x140004944
movsxd rdi, dword [rdx + r14 + 4]
mov eax, ebx
add rdi, 8
add rdi, rdx
add rdi, rsi
jmp 0x140004944
mov r9d, r13d
lea r8, [rbp + 0x3a0]
mov rdx, rsi
call fcn.140004280
mov rdi, qword [rbp + 0x3a0]
test eax, eax
js 0x140004973
cmp rdi, rsi
jb 0x14000495d
mov eax, r12d
add rax, rsi
cmp rdi, rax
ja 0x14000495d
mov rbx, rdi
jmp 0x140004981
mov r8, rdi
lea rdx, str.____Resolved_address_0x_llX_does_not_belong_required_module._r_n
mov ecx, 1
call fcn.140011458
jmp 0x140004981
mov edx, eax
lea rcx, str.____Failed_to_locate_kernel_variable_address
call fcn.1400122e0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1400049a9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, r15
lea rdx, str.____Could_not_load___ws___GetLastError__lu_r_n
mov r9d, eax
mov ecx, 1
call fcn.140011458
mov rax, rbx
jmp 0x1400049c4
mov r8, r15
lea rdx, str.____Abort__could_not_query___ws__image_base_r_n
mov ecx, 1
call fcn.140011458
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