Function at 0x421740
Capabilities:
Get common file path

Disassembly:
mov eax, 0x464883
call fcn.00451324
sub esp, 0x168
push ebx
push esi
push edi
mov esi, str.fs::GetSpecialFolderPath_745
xor ebx, ebx
push esi
mov dword [ebp - 0x14], ebx
call fcn.0044f750
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.0043fb8a
add esp, 0x14
push ebx
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x20], 0xf
call fcn.0041a131
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 0x4217b5
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x38]
push eax
call fcn.0041b74c
jmp 0x42193c
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x421881
push str.__use_SHGetKnownFolderPath
push ebx
call fcn.0043fb8a
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 0x421881
push dword [ebp - 0x10]
lea esi, [ebp - 0x70]
call fcn.00415058
push ebx
push ebx
mov eax, esi
push eax
lea eax, [ebp - 0x54]
push eax
mov byte [ebp - 4], 3
call fcn.0044c120
add esp, 0x10
push ebx
push edi
mov ecx, esi
mov byte [ebp - 4], 5
call fcn.00416032
push dword [ebp - 0x10]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp - 0x3c], 0x10
mov eax, dword [ebp - 0x50]
jae 0x421830
lea eax, [ebp - 0x50]
push eax
push str.__got_path__s
push ebx
call fcn.0043fb8a
mov eax, dword [ebp + 0x14]
add esp, 0xc
cmp dword [eax + 0x14], ebx
je 0x421864
push eax
lea esi, [ebp - 0x54]
call fcn.00421a0b
test al, al
pop ecx
jne 0x421864
push str.__no_write_
push ebx
call fcn.0043fb8a
pop ecx
pop ecx
jmp 0x421873
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041a38e
push ebx
push edi
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.0041a87c
cmp dword [ebp - 0x24], ebx
jne 0x421927
push str.__use_SHGetSpecialFolderPath
push ebx
call fcn.0043fb8a
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 0x4218f1
lea eax, [ebp - 0x174]
push eax
push str.__got_path__s
push ebx
call fcn.0043fb8a
add esp, 0xc
lea eax, [ebp - 0x174]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041af92
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x4218f1
mov byte [eax], 1
mov eax, dword [ebp + 0x14]
cmp dword [eax + 0x14], ebx
je 0x421924
cmp dword [ebp - 0x24], ebx
je 0x421924
push eax
lea esi, [ebp - 0x38]
call fcn.00421a0b
test al, al
pop ecx
jne 0x421924
push str.__no_write_
push ebx
call fcn.0043fb8a
pop ecx
pop ecx
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0x38]
call fcn.0041a0c0
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.0041b74c
push ebx
lea ecx, [ebp - 0x38]
push edi
mov dword [ebp - 0x14], edi
call fcn.0041a87c
lea esi, [ebp - 0x18]
mov byte [ebp - 4], bl
call fcn.0041b202
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret