Function at 0x402240
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 0x40227d
lea rdx, str.runtime.drivers
mov rcx, r12
call rbx
test eax, eax
jne 0x402388
mov r13, qword [r13 + 0x38]
lea rdx, [0x0040b102]
mov rcx, r13
call rbx
test eax, eax
jne 0x402330
mov 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 0x402350
lea rdx, str.runtime.inf
mov rcx, r12
call rbx
test eax, eax
jne 0x4022f8
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 0x402370
lea rdx, str.runtime.wbem
mov rcx, r12
call rbx
test eax, eax
jne 0x4022dc
lea rdx, str.wbem
mov rcx, r13
call qword [sym.imp.ucrtbase.dll_wcscat]
jmp 0x4022dc
lea rdx, str.wow64
mov rcx, r13
call rbx
mov r8d, 0x25
test eax, eax
jne 0x40229b
jmp 0x402295
test byte [section..data], 2
jne 0x4023c0
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 0x4022dc
lea rdx, str.runtime.wbem
mov rcx, r12
call rbx
test eax, eax
je 0x40227d
lea rdx, str.runtime.windows
mov rcx, r12
call rbx
test eax, eax
jne 0x402508
mov r8d, 0x24
jmp 0x40229b
lea rax, [0x0040b00e]
test r12, r12
je 0x4024d9
mov rax, r12
shr rax, 0x10
je 0x402608
mov rdx, 0xffffffffffffffff
mov rcx, r12
call qword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov r8d, eax
lea rax, [0x0040b015]
test r8d, r8d
jne 0x4024d9
cmp word [r12], 0
je 0x40262b
xor eax, eax
nop
mov ecx, eax
add rax, 1
cmp word [r12 + rax*2], 0
jne 0x402410
mov eax, 0x224c
lea rdx, [rsp + 0x32]
lea r9, str.0123456789abcdefcabinet_copy_file
mov word [rsp + 0x30], ax
lea r8, [rsp + 0x152]
jmp 0x402476
cmp ax, 9
je 0x402570
cmp ax, 0xa
jne 0x402591
mov eax, 0x6e5c
add rdx, 2
mov word [rdx - 2], ax
nop dword [rax]
lea eax, [rcx - 1]
test ecx, ecx
jle 0x4024b0
cmp rdx, r8
ja 0x4024b0
mov ecx, eax
movzx eax, word [r12]
add r12, 2
cmp ax, 0xd
je 0x402558
jbe 0x402440
cmp ax, 0x22
je 0x4025f0
cmp ax, 0x5c
jne 0x402582
mov r10d, 0x5c5c
add rdx, 2
mov word [rdx - 2], r10w
jmp 0x402468
mov byte [rdx], 0x22
test eax, eax
jle 0x40263f
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 0x40235b
lea rdx, str.runtime.inf
mov rcx, r12
call rbx
test eax, eax
je 0x4023b0
lea rdx, str.runtime.programfiles
mov rcx, r12
call rbx
test eax, eax
jne 0x402648
mov r13, qword [r13 + 0x38]
lea rdx, [0x0040b102]
mov rcx, r13
call rbx
test eax, eax
jne 0x402713
mov r8d, 0x2a
jmp 0x40229b
mov r13d, 0x725c
add rdx, 2
mov word [rdx - 2], r13w
jmp 0x402468
mov ebx, 0x745c
add rdx, 2
mov word [rdx - 2], bx
jmp 0x402468
lea r10d, [rax - 0x20]
cmp r10w, 0x5e
jbe 0x402620
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 0x402468
mov r11d, 0x225c
add rdx, 2
mov word [rdx - 2], r11w
jmp 0x402468
movzx edx, r12w
lea rcx, [0x0040b008]
call sym.wine_dbg_sprintf.constprop.0
jmp 0x4024d9
mov byte [rdx], al
add rdx, 1
jmp 0x402468
mov byte [rsp + 0x32], 0x22
mov edx, 0x224c
mov word [rsp + 0x30], dx
lea rdx, [rsp + 0x32]
lea rax, [rdx + 1]
jmp 0x4024cc
lea rdx, str.runtime.commonfiles
mov rcx, r12
call rbx
test eax, eax
jne 0x40267b
mov r13, qword [r13 + 0x38]
lea rdx, [0x0040b102]
mov rcx, r13
call rbx
test eax, eax
jne 0x402732
mov r8d, 0x2c
jmp 0x40229b
lea rdx, str.runtime.programfilesx86
mov rcx, r12
call rbx
test eax, eax
je 0x402548
lea rdx, str.runtime.commonfilesx86
mov rcx, r12
call rbx
test eax, eax
je 0x402670
lea rdx, str.runtime.programdata
mov rcx, r12
call rbx
mov r8d, 0x23
test eax, eax
je 0x40229b
lea rdx, str.runtime.fonts
mov rcx, r12
call rbx
mov r8d, 0x14
test eax, eax
je 0x40229b
test byte [section..data], 1
je 0x402359
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 0x4022e5
lea rdx, str.wow64
mov rcx, r13
call rbx
mov r8d, 0x26
test eax, eax
jne 0x40229b
jmp 0x402548
lea rdx, str.wow64
mov rcx, r13
call rbx
mov r8d, 0x2b
test eax, eax
jne 0x40229b
jmp 0x402670