Function at 0x409580
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454d0c
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x474298]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
movzx eax, word [ebx + 0xc]
lea esi, [ebx + 0xc]
mov edi, dword [ebp + 8]
test ax, ax
jne 0x4095d6
push 0
push 0x1a
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp word [esi], 0
je 0x40984a
mov ecx, ebx
call fcn.0040a5b0
cmp word [eax], 0
je 0x40984a
cmp dword [edi + 0x10], 1
jbe 0x40984a
xor eax, eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
cmp dword [edi + 0x14], 8
mov dword [ebp - 4], eax
mov eax, edi
jb 0x409619
mov eax, dword [edi]
cmp word [eax], 0x62
je 0x409628
xor bl, bl
mov al, bl
jmp 0x40984c
push 3
push 0x459d10
lea ecx, [ebp - 0x40]
call fcn.00403170
mov ecx, 7
mov dword [ebp - 0x28], 0
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], ecx
mov word [ebp - 0x28], ax
cmp dword [edi + 0x10], 1
mov byte [ebp - 4], 1
jbe 0x40986a
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x40966b
mov eax, dword [edi]
movzx eax, word [eax + 2]
add eax, 0xffffff9a
cmp eax, 0x11
ja case.0x409682.103
movzx eax, byte [eax + 0x40988c]
jmp dword [eax*4 + 0x409874]
mov eax, str.wpsoffice
jmp 0x4096aa
mov eax, 0x459d2c
jmp 0x4096aa
mov eax, 0x459d34
jmp 0x4096aa
mov eax, 0x459d3c
jmp 0x4096aa
mov eax, 0x459d44
push eax
lea ecx, [ebp - 0x28]
call fcn.004091e0
mov ecx, ebx
call fcn.0040a5b0
mov ecx, ebx
mov esi, eax
call fcn.0040a590
push eax
lea ecx, [ebp - 0xf4]
call fcn.00401890
push str.Kingsoftoffice6cache_
push eax
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 2
push eax
call fcn.00401480
push esi
push eax
lea eax, [ebp - 0xc4]
mov byte [ebp - 4], 3
push eax
call fcn.00401480
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
push ecx
push eax
lea eax, [ebp - 0xac]
push eax
call fcn.00408880
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 5
push ecx
push eax
lea eax, [ebp - 0x94]
push eax
call fcn.00408880
push str.cache.merge
push eax
lea eax, [ebp - 0x7c]
mov byte [ebp - 4], 6
push eax
call fcn.00401480
add esp, 0x3c
mov ecx, edi
push eax
call fcn.004022e0
lea ecx, [ebp - 0x7c]
call fcn.00401fd0
lea ecx, [ebp - 0x94]
call fcn.00401fd0
lea ecx, [ebp - 0xac]
call fcn.00401fd0
lea ecx, [ebp - 0xc4]
call fcn.00401fd0
lea ecx, [ebp - 0xdc]
call fcn.00401fd0
lea ecx, [ebp - 0xf4]
call fcn.00401fd0
xor eax, eax
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
jb 0x4097a3
mov edi, dword [edi]
lea eax, [ebp - 0x64]
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x4097c4
cmp dword [ebp - 0x44], 0x2800000
ja 0x4097c4
mov ecx, dword [ebp - 0x14]
mov bl, 1
jmp 0x4097c9
mov ecx, dword [ebp - 0x14]
xor bl, bl
cmp ecx, 8
jb 0x4097fc
lea edx, [ecx*2 + 2]
mov ecx, dword [ebp - 0x28]
mov eax, ecx
cmp edx, 0x1000
jb 0x4097f2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40986f
push edx
push ecx
call fcn.004266ec
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp edx, 8
jb 0x409846
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40983c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40986f
push edx
push ecx
call fcn.004266ec
add esp, 8
mov al, bl
jmp 0x40984c
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00426959
mov esp, ebp
pop ebp
ret 4
call fcn.00402c80
call fcn.0042b04f
movsd dword es:[edi], dword [esi]
xchg esi, eax
inc eax
add byte [ecx - 0x68ffbf6a], cl
xchg esi, eax
inc eax
add byte [esi - 0x6fffbf6a], bl
xchg esi, eax
inc eax
add bh, al
xchg edi, eax
inc eax
add byte [eax], al
add eax, 0x5050505
add eax, 33621253
add eax, 84214533
add eax, 1439484932
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454d55
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x474298]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
movzx eax, word [ebp + 8]
mov edi, dword [ebp + 0xc]
add eax, 0xffffff96
cmp eax, 0xf
ja case.0x4098e3.107
movzx eax, byte [eax + 0x4099d8]
jmp dword [eax*4 + 0x4099c0]
mov eax, dword [esi]
push edi
mov eax, dword [eax + 4]
call eax
test al, al
jne 0x4099b6
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00426959
mov esp, ebp
pop ebp
ret 8
push edi
call fcn.00409fa0
jmp 0x4098f2
push edi
call fcn.00409dd0
jmp 0x4098f2
movzx eax, word [esi + 0xc]
lea ebx, [esi + 0xc]
test ax, ax
jne 0x409949
push 0
push 0x1a
push ebx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp word [ebx], 0
je case.0x4098e3.107
mov ecx, esi
call fcn.0040a590
push eax
lea ecx, [ebp - 0x58]
call fcn.00401890
push str.Kingsoft_
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
call fcn.00401480
push edi
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
call fcn.00408880
add esp, 0x18
mov ecx, edi
push eax
call fcn.004022e0
lea ecx, [ebp - 0x28]
call fcn.00401fd0
lea ecx, [ebp - 0x40]
call fcn.00401fd0
lea ecx, [ebp - 0x58]
call fcn.00401fd0
mov al, 1
jmp 0x4098fc
push edi
call fcn.00409580
test al, al
je case.0x4098e3.107
mov al, 1
jmp 0x4098fc