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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7bb524
mov eax, dword fs:[0]
push eax
sub esp, 0x838
mov eax, dword [0x89b044]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], 1
lea ecx, [ebp - 0x14]
call fcn.00405e90
mov dword [ebp - 4], 0
lea eax, [ebp - 0x14]
push eax
call fcn.00587e70
add esp, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jge 0x58563a
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00405ef0
jmp 0x58584e
lea ecx, [ebp - 0x14]
call fcn.00403b90
movzx ecx, al
test ecx, ecx
je 0x58565d
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00405ef0
jmp 0x58584e
push 0
mov ecx, dword [ebp + 8]
add ecx, 0x78
call fcn.00405e80
push eax
lea ecx, [ebp - 0x14]
call fcn.00403920
cmp eax, 0xffffffff
jne 0x58568c
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00405ef0
jmp 0x58584e
mov ecx, dword [ebp + 8]
add ecx, 0x7c
call fcn.00531e90
movzx edx, al
test edx, edx
jne 0x585830
push 0x208
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.007202b0
add esp, 0xc
push 0
push 0x25
lea ecx, [ebp - 0x224]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x208
push 0
lea edx, [ebp - 0x42c]
push edx
call fcn.007202b0
add esp, 0xc
call fcn.006351a0
test eax, eax
je 0x5856fd
push 0
push 0x29
lea eax, [ebp - 0x42c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov dword [ebp - 0x430], 0
mov dword [ebp - 0x434], 0
jmp 0x585722
mov ecx, dword [ebp - 0x434]
add ecx, 1
mov dword [ebp - 0x434], ecx
mov ecx, dword [ebp + 8]
add ecx, 0x7c
call fcn.00531e70
cmp dword [ebp - 0x434], eax
jae 0x585816
movzx edx, word [ebp - 0x224]
test edx, edx
je 0x5857a5
push 0x208
push 0
lea eax, [ebp - 0x63c]
push eax
call fcn.007202b0
add esp, 0xc
mov ecx, dword [ebp - 0x434]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x7c
call fcn.00531eb0
mov ecx, eax
call fcn.00405e80
push eax
lea edx, [ebp - 0x224]
push edx
lea eax, [ebp - 0x63c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea ecx, [ebp - 0x63c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x5857a5
mov dword [ebp - 0x430], 1
jmp 0x585816
movzx edx, word [ebp - 0x42c]
test edx, edx
je 0x585811
push 0x208
push 0
lea eax, [ebp - 0x844]
push eax
call fcn.007202b0
add esp, 0xc
mov ecx, dword [ebp - 0x434]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x7c
call fcn.00531eb0
mov ecx, eax
call fcn.00405e80
push eax
lea edx, [ebp - 0x42c]
push edx
lea eax, [ebp - 0x844]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea ecx, [ebp - 0x844]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x585811
mov dword [ebp - 0x430], 1
jmp 0x585816
jmp 0x585713
cmp dword [ebp - 0x430], 0
je 0x585830
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00405ef0
jmp 0x58584e
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00405ef0
xor edx, edx
jne 0x585602
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0071fe0b
mov esp, ebp
pop ebp
ret 4