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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59c315
mov eax, dword fs:[0]
push eax
sub esp, 0x268
mov eax, dword [0x60f520]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
xor esi, esi
mov byte [ebp - 4], 1
or edi, 0xffffffff
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], esi
je 0x461e72
push 0x208
call fcn.00551ee7
mov esi, eax
add esp, 4
mov dword [ebp - 0x274], esi
test esi, esi
je 0x461e72
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0
push 0x19
push esi
push 0
call ebx
test eax, eax
je 0x461c6a
push 0x5c0ab8
lea ecx, [ebp - 0x268]
call fcn.0040c2d0
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
push ecx
mov edx, eax
lea ecx, [ebp - 0x26c]
call fcn.00428a60
add esp, 4
push 0x5beef0
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x270]
call fcn.00414260
add esp, 4
push dword [eax]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [ebp - 0x270]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x461bf7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x26c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x461c1a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, edi
mov edx, dword [ebp - 0x268]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x461c3d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x250
lea eax, [ebp - 0x264]
push 0
push eax
call fcn.00559380
add esp, 0xc
lea eax, [ebp - 0x264]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x461e64
push 0
push 0x10
push esi
push 0
call ebx
test eax, eax
je 0x461d66
push 0x5c0ab8
lea ecx, [ebp - 0x270]
call fcn.0040c2d0
lea ecx, [ebp + 8]
mov byte [ebp - 4], 4
push ecx
mov edx, eax
lea ecx, [ebp - 0x26c]
call fcn.00428a60
add esp, 4
push 0x5beef0
mov edx, eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x268]
call fcn.00414260
add esp, 4
push dword [eax]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [ebp - 0x268]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x461ce4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov ecx, edi
mov edx, dword [ebp - 0x26c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x461d07
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, edi
mov edx, dword [ebp - 0x270]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x461d2a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x250
lea eax, [ebp - 0x264]
push 0
push eax
call fcn.00559380
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea eax, [ebp - 0x264]
add esp, 0xc
push eax
push esi
call ebx
cmp eax, 0xffffffff
je 0x461d6c
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, 1
jmp 0x461e74
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea ecx, [ebp - 0x268]
call fcn.004fbab0
push dword [eax]
push 0x104
push esi
call fcn.00555e17
mov edx, dword [ebp - 0x268]
add esp, 0xc
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x461da6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, esi
lea edx, [ecx + 2]
jmp 0x461db0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461db0
sub ecx, edx
sar ecx, 1
je 0x461e72
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x461e72
push 0x5c0ab8
lea ecx, [ebp - 0x270]
call fcn.0040c2d0
lea ecx, [ebp + 8]
mov byte [ebp - 4], 6
push ecx
mov edx, eax
lea ecx, [ebp - 0x26c]
call fcn.00428a60
add esp, 4
push 0x5beef0
mov edx, eax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x268]
call fcn.00414260
add esp, 4
push dword [eax]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x268]
call fcn.0040c450
lea ecx, [ebp - 0x26c]
call fcn.0040c450
lea ecx, [ebp - 0x270]
call fcn.0040c450
push 0x250
lea eax, [ebp - 0x264]
push 0
push eax
call fcn.00559380
add esp, 0xc
lea eax, [ebp - 0x264]
push eax
push esi
call ebx
cmp eax, 0xffffffff
je 0x461e72
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, 1
jmp 0x461e74
xor ebx, ebx
push esi
call fcn.00551f79
mov dword [ebp - 4], 0xffffffff
add esp, 4
mov esi, dword [ebp + 8]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x461e9e
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0055199a
mov esp, ebp
pop ebp
ret