Function at 0x140022dfc
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor r15d, r15d
bt r8d, 0x10
mov ebp, r8d
mov rdi, rdx
mov rsi, rcx
jb 0x140022e31
mov r12d, r15d
test r8b, 0x40
jne 0x140022e37
mov r12d, 1
lea rcx, [rsp + 0x88]
mov edx, 0x41c
and ebp, 0x40
call fcn.14005bce8
mov rbx, qword [rsp + 0x88]
mov ecx, 0x208
mov rdx, rbx
mov word [rbx], r15w
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea rdx, str.__OldDir
mov r8, rbx
mov rcx, rsi
call fcn.14005b2f4
lea rdx, str.CurFile.real
mov r8, rdi
mov rcx, rsi
call fcn.14005b2f4
lea rcx, [rsp + 0x20]
mov rdx, rdi
call fcn.1400668e8
mov r14d, 0x61
cmp rdi, r15
je 0x140022eeb
lea rdx, str.CurFile.Raw
mov r8, rdi
mov rcx, rsi
call fcn.14005b2f4
lea eax, [r14 - 0x3e]
cmp ax, word [rdi]
jne 0x140022ecb
movzx eax, word [rdi + 2]
sub ax, 0x30
cmp ax, 9
jbe 0x140022eeb
lea rcx, str.101
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
cmp eax, r15d
jne 0x140023038
lea rdi, [0x1400fefa8]
mov rdx, qword [rsp + 0x88]
mov rcx, qword [0x140119df0]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov r8, qword [rsp + 0x88]
lea rdx, str.CurFile.File
mov rcx, rsi
call fcn.14005b2f4
cmp rdi, r15
je 0x140022f32
lea rcx, [rsp + 0x88]
mov rdx, rdi
call fcn.14005bdb0
mov rdi, qword [rsp + 0x88]
mov rbx, rdi
movzx eax, word [rbx]
cmp ax, r14w
jb 0x140022f57
cmp ax, 0x7a
ja 0x140022f57
mov ecx, 0xffdf
and ax, cx
mov word [rbx], ax
lea rdx, str.CurFile
mov r8, rdi
mov rcx, rsi
call fcn.14005b2f4
cmp r12d, r15d
je 0x140022f7d
lea rcx, [0x1400fef74]
mov rdx, rdi
call fcn.140059cc4
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 0x5c]
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
mov rdi, rax
cmp rax, r15
je 0x140022f99
mov word [rax + 2], r15w
cmp ebp, r15d
jne 0x140022fa6
mov rcx, rbx
call fcn.1400184e4
cmp rdi, r15
je 0x140022faf
mov word [rdi], r15w
lea rdx, [0x1400fef58]
mov r8, rbx
mov rcx, rsi
call fcn.14005b2f4
cmp r12d, r15d
je 0x140022fd5
lea rcx, [0x1400fef5c]
mov rdx, rbx
call fcn.140059cc4
cmp ebp, r15d
jne 0x140022fdf
call fcn.14001c1ac
lea rdx, str.CurDrv
mov r8, rbx
mov rcx, rsi
mov word [rbx + 4], r15w
call fcn.14005b2f4
cmp r12d, r15d
je 0x14002300a
lea rcx, [0x1400fef44]
mov rdx, rbx
call fcn.140059cc4
lea rcx, [rsp + 0x20]
call fcn.140053e80
lea rcx, [rsp + 0x88]
call fcn.140053e80
mov rbx, qword [rsp + 0x70]
xor eax, eax
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r8d, 0x2a
cmp r8w, word [rdi]
jne 0x140023083
lea rax, [rdi + 2]
cmp r8w, word [rax]
je 0x140023072
lea ecx, [r8 + 0x43]
cmp cx, word [rax]
jne 0x140023083
cmp r14w, word [rdi + 4]
jne 0x140023083
lea ecx, [r8 + 0x46]
cmp cx, word [rdi + 6]
jne 0x140023083
lea ecx, [r8 + 0x10]
cmp cx, word [rdi + 8]
jne 0x140023083
mov rdi, rax
mov qword [rsp + 0x78], rax
cmp rax, r15
jne 0x140022eeb
lea rcx, [rsp + 0x78]
call fcn.140015700
mov rdi, qword [rsp + 0x78]
mov rcx, rdi
cmp r8w, word [rdi]
jne 0x14002309f
lea rcx, [rdi + 2]
mov r13d, r15d
mov eax, 0x22
mov rbx, rcx
cmp ax, word [rdi]
sete r13b
cmp r13d, r15d
je 0x1400230e0
add rcx, 2
mov rbx, rcx
cmp word [rcx], r15w
je 0x1400230d2
cmp ax, word [rbx]
je 0x1400230d2
add rbx, 2
cmp word [rbx], r15w
jne 0x1400230c3
cmp word [rbx], r15w
je 0x1400230e0
mov word [rbx], r15w
add rbx, 2
lea rdx, [rsp + 0x20]
call fcn.14001a0d4
mov r8, qword [rsp + 0x20]
lea rdx, str.CurFile.File
mov rcx, rsi
call fcn.14005b2f4
cmp r13d, r15d
je 0x140023116
cmp word [rbx], r15w
je 0x140023116
lea rcx, [rsp + 0x20]
mov rdx, rbx
call fcn.14005bdb0
movzx eax, word [rdi]
mov rbx, qword [rsp + 0x20]
mov ecx, 0x2a
cmp cx, ax
je 0x140023134
mov ecx, 0x23
cmp cx, ax
cmovne rdi, rbx
lea rdx, str.CurFile.File
mov r8, rdi
mov rcx, rsi
call fcn.14005b2f4
jmp 0x140022f3d