Function at 0x10012210
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc3c
mov eax, dword [0x101c5068]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
xor edi, edi
mov dword [ebp - 0xc38], ecx
lea eax, [ebp - 0xc34]
xor ebx, ebx
push edi
push eax
call fcn.10136bc0
push 0x208
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.10136bc0
push 0x208
lea eax, [ebp - 0x61c]
push edi
push eax
call fcn.10136bc0
push 0x208
lea eax, [ebp - 0xa2c]
push edi
push eax
call fcn.10136bc0
push 0x208
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.10136bc0
push 0x208
lea eax, [ebp - 0x414]
push edi
push eax
call fcn.10136bc0
add esp, 0x48
lea eax, [ebp - 0xc34]
push edi
push 0x1a
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xc34]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x100122b2
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.10136dcd
add esp, 8
test eax, eax
je 0x100124cd
xor ecx, ecx
mov word [eax], cx
nop dword [eax + eax]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x826], ax
test ax, ax
jne 0x100122f0
lea ecx, [ebp - 0x824]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10012311
mov eax, dword [str.Local]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov dword [ecx], eax
mov eax, dword [0x10162298]
mov dword [ecx + 4], eax
mov eax, dword [0x1016229c]
mov dword [ecx + 8], eax
mov ax, word [0x101622a0]
mov word [ecx + 0xc], ax
lea eax, [ebp - 0x824]
push eax
call esi
test eax, eax
mov ecx, 1
mov eax, ebx
cmovne eax, ecx
xor ecx, ecx
mov dword [ebp - 0xc3c], eax
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x10012361
lea ecx, [ebp - 0x61c]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10012382
mov eax, dword [str.LocalLow]
mov dword [ecx], eax
mov eax, dword [0x101622a8]
mov dword [ecx + 4], eax
mov eax, dword [0x101622ac]
mov dword [ecx + 8], eax
mov eax, dword [0x101622b0]
mov dword [ecx + 0xc], eax
mov eax, dword [0x101622b4]
mov dword [ecx + 0x10], eax
lea eax, [ebp - 0x61c]
push eax
call esi
test eax, eax
mov eax, 1
cmovne ebx, eax
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0xa2e], ax
test ax, ax
jne 0x100123d0
lea ecx, [ebp - 0xa2c]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x100123f1
mov eax, dword [str.Roaming]
mov dword [ecx], eax
mov eax, dword [0x101622bc]
mov dword [ecx + 4], eax
mov eax, dword [0x101622c0]
mov dword [ecx + 8], eax
mov eax, dword [0x101622c4]
mov dword [ecx + 0xc], eax
mov ax, word [0x101622c8]
mov word [ecx + 0x10], ax
lea eax, [ebp - 0xa2c]
push eax
call esi
test eax, eax
mov eax, 1
cmovne edi, eax
cmp dword [ebp - 0xc3c], 0
je 0x100124cd
test ebx, ebx
je 0x100124cd
test edi, edi
je 0x100124cd
push str.HKTcsc
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push 0x101622cc
push eax
call fcn.10012790
add esp, 0x10
lea eax, [ebp - 0x414]
push eax
call esi
test eax, eax
jne 0x1001248e
lea eax, [ebp - 0x414]
push eax
call fcn.10017821
add esp, 4
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10012497
sub ecx, edx
lea eax, [ebp - 0x414]
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0xc38]
push eax
add ecx, 0x1c
call fcn.10009a50
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10026dd3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc38]
call fcn.10011ca0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10026dd3
mov esp, ebp
pop ebp
ret