Function at 0x42213a
Capabilities:
Get common file path

Disassembly:
mov eax, 0x465be5
call fcn.00452544
sub esp, 0x168
push ebx
push esi
push edi
mov esi, str.fs::GetSpecialFolderPath_774
xor ebx, ebx
push esi
mov dword [ebp - 0x14], ebx
call fcn.004508dd
mov dword [ebp - 0x18], eax
push dword [ebp + 0x10]
xor edi, edi
push esi
push str.___s__fld_d_
inc edi
push ebx
mov dword [ebp - 4], edi
call fcn.00441366
add esp, 0x14
push ebx
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x20], 0xf
call fcn.0041a911
push str.shell32.dll
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
jne 0x4221af
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x38]
push eax
call fcn.0041bf87
jmp 0x422336
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x42227b
push str.__use_SHGetKnownFolderPath
push ebx
call fcn.00441366
pop ecx
pop ecx
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
call esi
cmp eax, ebx
jne 0x42227b
push dword [ebp - 0x10]
lea esi, [ebp - 0x70]
call fcn.00415838
push ebx
push ebx
mov eax, esi
push eax
lea eax, [ebp - 0x54]
push eax
mov byte [ebp - 4], 3
call fcn.0044d900
add esp, 0x10
push ebx
push edi
mov ecx, esi
mov byte [ebp - 4], 5
call fcn.00416812
push dword [ebp - 0x10]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp - 0x3c], 0x10
mov eax, dword [ebp - 0x50]
jae 0x42222a
lea eax, [ebp - 0x50]
push eax
push str.__got_path__s
push ebx
call fcn.00441366
mov eax, dword [ebp + 0x14]
add esp, 0xc
cmp dword [eax + 0x14], ebx
je 0x42225e
push eax
lea esi, [ebp - 0x54]
call fcn.00422405
test al, al
pop ecx
jne 0x42225e
push str.__no_write_
push ebx
call fcn.00441366
pop ecx
pop ecx
jmp 0x42226d
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041ab6e
push ebx
push edi
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.0041b05c
cmp dword [ebp - 0x24], ebx
jne 0x422321
push str.__use_SHGetSpecialFolderPath
push ebx
call fcn.00441366
pop ecx
pop ecx
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x174], bl
lea edi, [ebp - 0x173]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
push dword [ebp + 0x10]
stosb byte es:[edi], al
lea eax, [ebp - 0x174]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
cmp eax, ebx
je 0x4222eb
lea eax, [ebp - 0x174]
push eax
push str.__got_path__s
push ebx
call fcn.00441366
add esp, 0xc
lea eax, [ebp - 0x174]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041b834
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x4222eb
mov byte [eax], 1
mov eax, dword [ebp + 0x14]
cmp dword [eax + 0x14], ebx
je 0x42231e
cmp dword [ebp - 0x24], ebx
je 0x42231e
push eax
lea esi, [ebp - 0x38]
call fcn.00422405
test al, al
pop ecx
jne 0x42231e
push str.__no_write_
push ebx
call fcn.00441366
pop ecx
pop ecx
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0x38]
call fcn.0041a8a0
xor edi, edi
inc edi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x38]
push eax
call fcn.0041bf87
push ebx
lea ecx, [ebp - 0x38]
push edi
mov dword [ebp - 0x14], edi
call fcn.0041b05c
lea esi, [ebp - 0x18]
mov byte [ebp - 4], bl
call fcn.0041ba42
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret