Function at 0x4022c0
Capabilities:
Get common file path

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x370
mov rbx, qword [sym.imp.ucrtbase.dll__wcsicmp]
mov r12, rdx
mov r13, rcx
lea rdx, str.runtime.system32
mov rcx, r12
call rbx
test eax, eax
je 0x4022fd
lea rdx, str.runtime.drivers
mov rcx, r12
call rbx
test eax, eax
jne 0x4023d8
lea rcx, [r13 + 0x38]
call sym.assembly_is_wow64.isra.0
cmp eax, 1
sbb r8d, r8d
and r8d, 0xfffffffc
add r8d, 0x29
lea r13, [rsp + 0x160]
xor ecx, ecx
mov r9d, 1
mov rdx, r13
call qword [sym.imp.shell32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4023a8
lea rdx, str.runtime.inf
mov rcx, r12
call rbx
test eax, eax
jne 0x402370
lea rdx, str.inf
mov rcx, r13
call qword [sym.imp.ucrtbase.dll_wcscat]
mov rcx, r13
call qword [sym.imp.ucrtbase.dll__wcsdup]
add rsp, 0x370
pop rbx
pop r12
pop r13
ret
lea rdx, str.runtime.drivers
mov rcx, r12
call rbx
test eax, eax
je 0x4023c0
lea rdx, str.runtime.wbem
mov rcx, r12
call rbx
test eax, eax
jne 0x402351
lea rdx, str.wbem
mov rcx, r13
call qword [sym.imp.ucrtbase.dll_wcscat]
jmp 0x402351
test byte [section..data], 2
jne 0x402410
xor eax, eax
add rsp, 0x370
pop rbx
pop r12
pop r13
ret
lea rdx, str.drivers
mov rcx, r13
call qword [sym.imp.ucrtbase.dll_wcscat]
jmp 0x402351
lea rdx, str.runtime.wbem
mov rcx, r12
call rbx
test eax, eax
je 0x4022fd
lea rdx, str.runtime.windows
mov rcx, r12
call rbx
test eax, eax
jne 0x402558
mov r8d, 0x24
jmp 0x402314
lea rax, [0x0040a034]
test r12, r12
je 0x402529
mov rax, r12
shr rax, 0x10
je 0x402658
mov rdx, 0xffffffffffffffff
mov rcx, r12
call qword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov r8d, eax
lea rax, [0x0040a03b]
test r8d, r8d
jne 0x402529
cmp word [r12], 0
je 0x40267b
xor eax, eax
nop
mov ecx, eax
add rax, 1
cmp word [r12 + rax*2], 0
jne 0x402460
mov edx, 0x224c
lea r9, str.0123456789abcdefcabinet_copy_file
lea r8, [rsp + 0x152]
mov word [rsp + 0x30], dx
lea rdx, [rsp + 0x32]
jmp 0x4024c6
cmp ax, 9
je 0x4025c0
cmp ax, 0xa
jne 0x4025e1
mov eax, 0x6e5c
add rdx, 2
mov word [rdx - 2], ax
nop dword [rax]
lea eax, [rcx - 1]
test ecx, ecx
jle 0x402500
cmp rdx, r8
ja 0x402500
mov ecx, eax
movzx eax, word [r12]
add r12, 2
cmp ax, 0xd
je 0x4025a8
jbe 0x402490
cmp ax, 0x22
je 0x402640
cmp ax, 0x5c
jne 0x4025d2
mov r10d, 0x5c5c
add rdx, 2
mov word [rdx - 2], r10w
jmp 0x4024b8
mov byte [rdx], 0x22
test eax, eax
jle 0x40268f
mov ecx, 0x2e2e
mov byte [rdx + 3], 0x2e
lea rax, [rdx + 4]
mov word [rdx + 1], cx
mov byte [rax], 0
lea rcx, [rsp + 0x30]
call sym.__wine_dbg_strdup
mov qword [rsp + 0x20], rax
lea r9, str.Failed_to_get_folder_path_for__s_n
lea r8, str.lookup_expression
mov ecx, 1
lea rdx, section..data
call sym.wine_dbg_log.constprop.0
xor eax, eax
jmp 0x4023b3
lea rdx, str.runtime.inf
mov rcx, r12
call rbx
test eax, eax
je 0x402400
lea rdx, str.runtime.programfiles
mov rcx, r12
call rbx
test eax, eax
jne 0x402698
lea rcx, [r13 + 0x38]
call sym.assembly_is_wow64.isra.0
mov r8d, 0x26
test eax, eax
je 0x402314
mov r8d, 0x2a
jmp 0x402314
mov r13d, 0x725c
add rdx, 2
mov word [rdx - 2], r13w
jmp 0x4024b8
mov ebx, 0x745c
add rdx, 2
mov word [rdx - 2], bx
jmp 0x4024b8
lea r10d, [rax - 0x20]
cmp r10w, 0x5e
jbe 0x402670
mov r10d, eax
mov byte [rdx], 0x5c
add rdx, 5
shr r10w, 0xc
and r10d, 0xf
movzx r10d, byte [r9 + r10]
mov byte [rdx - 4], r10b
mov r10d, eax
shr r10w, 8
and r10d, 0xf
movzx r10d, byte [r9 + r10]
mov byte [rdx - 3], r10b
mov r10d, eax
and eax, 0xf
shr r10w, 4
movzx eax, byte [r9 + rax]
and r10d, 0xf
movzx r10d, byte [r9 + r10]
mov byte [rdx - 1], al
mov byte [rdx - 2], r10b
jmp 0x4024b8
mov r11d, 0x225c
add rdx, 2
mov word [rdx - 2], r11w
jmp 0x4024b8
movzx edx, r12w
lea rcx, [0x0040a02e]
call sym.wine_dbg_sprintf.constprop.0
jmp 0x402529
mov byte [rdx], al
add rdx, 1
jmp 0x4024b8
mov eax, 0x224c
mov byte [rsp + 0x32], 0x22
lea rdx, [rsp + 0x32]
mov word [rsp + 0x30], ax
lea rax, [rdx + 1]
jmp 0x40251c
lea rdx, str.runtime.commonfiles
mov rcx, r12
call rbx
test eax, eax
jne 0x4026ca
lea rcx, [r13 + 0x38]
call sym.assembly_is_wow64.isra.0
mov r8d, 0x2b
test eax, eax
je 0x402314
mov r8d, 0x2c
jmp 0x402314
lea rdx, str.runtime.programfilesx86
mov rcx, r12
call rbx
test eax, eax
je 0x402597
lea rdx, str.runtime.commonfilesx86
mov rcx, r12
call rbx
test eax, eax
je 0x4026bf
lea rdx, str.runtime.programdata
mov rcx, r12
call rbx
mov r8d, 0x23
test eax, eax
je 0x402314
lea rdx, str.runtime.fonts
mov rcx, r12
call rbx
mov r8d, 0x14
test eax, eax
je 0x402314
test byte [section..data], 1
je 0x4023b1
or edx, 0xffffffff
mov rcx, r12
call sym.wine_dbgstr_wn
lea r9, str.Unknown_expression__s_n
lea r8, str.lookup_expression
xor ecx, ecx
mov qword [rsp + 0x20], rax
lea rdx, section..data
call sym.wine_dbg_log.constprop.0
xor eax, eax
jmp 0x40235a