Function at 0x4224f1
Capabilities:
Get common file path

Disassembly:
mov eax, 0x466155
call fcn.00452ab4
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.00450e4d
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.004418d2
add esp, 0x14
push ebx
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x20], 0xf
call fcn.0041acc8
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 0x422566
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x38]
push eax
call fcn.0041c33e
jmp 0x4226ed
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x422632
push str.__use_SHGetKnownFolderPath
push ebx
call fcn.004418d2
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 0x422632
push dword [ebp - 0x10]
lea esi, [ebp - 0x70]
call fcn.00415bef
push ebx
push ebx
mov eax, esi
push eax
lea eax, [ebp - 0x54]
push eax
mov byte [ebp - 4], 3
call fcn.0044de70
add esp, 0x10
push ebx
push edi
mov ecx, esi
mov byte [ebp - 4], 5
call fcn.00416bdc
push dword [ebp - 0x10]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp - 0x3c], 0x10
mov eax, dword [ebp - 0x50]
jae 0x4225e1
lea eax, [ebp - 0x50]
push eax
push str.__got_path__s
push ebx
call fcn.004418d2
mov eax, dword [ebp + 0x14]
add esp, 0xc
cmp dword [eax + 0x14], ebx
je 0x422615
push eax
lea esi, [ebp - 0x54]
call fcn.004227bc
test al, al
pop ecx
jne 0x422615
push str.__no_write_
push ebx
call fcn.004418d2
pop ecx
pop ecx
jmp 0x422624
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041af25
push ebx
push edi
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.0041b413
cmp dword [ebp - 0x24], ebx
jne 0x4226d8
push str.__use_SHGetSpecialFolderPath
push ebx
call fcn.004418d2
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 0x4226a2
lea eax, [ebp - 0x174]
push eax
push str.__got_path__s
push ebx
call fcn.004418d2
add esp, 0xc
lea eax, [ebp - 0x174]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041bbeb
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x4226a2
mov byte [eax], 1
mov eax, dword [ebp + 0x14]
cmp dword [eax + 0x14], ebx
je 0x4226d5
cmp dword [ebp - 0x24], ebx
je 0x4226d5
push eax
lea esi, [ebp - 0x38]
call fcn.004227bc
test al, al
pop ecx
jne 0x4226d5
push str.__no_write_
push ebx
call fcn.004418d2
pop ecx
pop ecx
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0x38]
call fcn.0041ac57
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.0041c33e
push ebx
lea ecx, [ebp - 0x38]
push edi
mov dword [ebp - 0x14], edi
call fcn.0041b413
lea esi, [ebp - 0x18]
mov byte [ebp - 4], bl
call fcn.0041bdf9
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret