Function at 0x4f2260
Capabilities:
Check if file exists
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fc64b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x201c
call fcn.004ba380
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], ebx
call fcn.004f2750
xor esi, esi
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x82a]
mov word [ebp - 0x82c], si
push esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x82c]
push 6
push eax
push esi
mov dword [ebp - 0x14], esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp dword [ebx + 0x24], esi
je 0x4f22ec
lea ecx, [ebp - 0x82c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4f22ec
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x4f26e8
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
je 0x4f26e8
cmp dword [ebx + 0x24], esi
jne 0x4f2367
mov edx, dword [ebp + 8]
lea edi, [ebx + 0x28]
mov esi, 0x400
mov eax, edi
sub edx, edi
lea ecx, [esi + 0x7ffffbfe]
test ecx, ecx
je 0x4f233b
mov cx, word [edx + eax]
test cx, cx
je 0x4f233b
mov word [eax], cx
add eax, 2
dec esi
jne 0x4f231d
jmp 0x4f233f
test esi, esi
jne 0x4f2342
sub eax, 2
push str.favorder3.dat
push edi
mov word [eax], 0
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4f2365
mov dword [ebx + 0x1c], 1
xor esi, esi
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x102a]
mov edx, dword [ebp + 8]
mov word [ebp - 0x102c], si
push 0x10
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
lea eax, [ebp - 0x82c]
push 0x10
lea ecx, [ebp - 0x102c]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRelativePathToW]
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x202a]
mov word [ebp - 0x202c], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edx, str.SoftwareMicrosoftWindowsCurrentVersionExplorerMenuOrderFavorites_
lea ecx, [ebp - 0x202c]
mov edi, 0x400
lea eax, [ebp - 0x202c]
sub edx, ecx
lea ecx, [edi + 0x7ffffbfe]
test ecx, ecx
je 0x4f23e9
mov cx, word [edx + eax]
cmp cx, si
je 0x4f23e9
mov word [eax], cx
add eax, 2
dec edi
jne 0x4f23cb
jmp 0x4f23ed
cmp edi, esi
jne 0x4f23f0
sub eax, 2
mov word [eax], si
lea edx, [ebp - 0x102a]
lea eax, [ebp - 0x202c]
push edx
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ecx, dword [ebp + 8]
push ecx
mov ecx, ebx
call fcn.004f27f0
mov edi, eax
cmp edi, esi
mov dword [ebx + 0xc], edi
jle 0x4f24a6
lea eax, [edi + edi*4]
mov dword [ebp - 4], esi
lea eax, [eax + eax*4]
shl eax, 4
add eax, edi
lea edx, [eax + eax*8]
lea eax, [edx*4 + 4]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x20], eax
cmp eax, esi
mov byte [ebp - 4], 1
je 0x4f246c
push fcn.00480d20
push 0x4f2710
lea esi, [eax + 4]
push edi
push 0x3864
push esi
mov dword [eax], edi
call fcn.004ba594
mov eax, esi
xor esi, esi
jmp 0x4f246e
xor eax, eax
mov ecx, dword [ebx + 0xc]
mov byte [ebp - 4], 0
shl ecx, 2
push ecx
mov dword [ebx + 0x10], eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebx + 0xc]
mov edi, eax
shl ecx, 2
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [ebx + 0x14], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [ebp - 4], 0xffffffff
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [ebp - 0x82c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4f26ab
cmp dword [ebx + 0x1c], esi
jne 0x4f26ab
lea edx, [ebp - 0x28]
lea eax, [ebp - 0x202c]
push edx
push eax
push reloc.DSOUND.dll_DirectSoundCreate
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, esi
jne 0x4f26ab
mov eax, dword [ebp - 0x28]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x20]
push ecx
push esi
push edx
push esi
push str.Order
push eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x20], esi
call edi
mov eax, dword [ebp - 0x2c]
cmp eax, esi
jbe 0x4f26a1
push eax
mov dword [ebp - 4], 3
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea ecx, [ebp - 0x2c]
mov esi, eax
mov eax, dword [ebp - 0x28]
push ecx
lea edx, [ebp - 0x20]
push esi
push edx
push 0
push str.Order
push eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], 0xffffffff
call edi
cmp dword [ebp - 0x20], 3
jne 0x4f2698
lea edx, [ebp - 0x1c]
lea ecx, [esi + 8]
push 0
push edx
mov dword [ebp - 0x1c], ecx
call fcn.004f19c0
mov dword [ebx + 4], eax
lea eax, [ebp - 0x1c]
push 0
push eax
call fcn.004f19c0
lea ecx, [ebp - 0x1c]
push 0
push ecx
mov dword [ebx + 8], eax
call fcn.004f19c0
add esp, 0x18
xor edi, edi
test eax, eax
mov dword [ebx + 0x18], eax
mov dword [ebp - 0x18], edi
jle 0x4f2698
cmp edi, dword [ebx + 0xc]
jge 0x4f2698
mov edx, dword [ebp - 0x2c]
lea ecx, [ebx + 0x828]
add edx, esi
lea esi, [edi + edi*4]
mov dword [ebp - 0x14], edx
mov edx, dword [ebx + 0x10]
lea esi, [esi + esi*4]
shl esi, 4
add esi, edi
lea esi, [esi + esi*8]
shl esi, 2
mov eax, esi
add eax, edx
mov edx, dword [ebp + 8]
push edx
mov dword [eax], ecx
add eax, 0x181a
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebx + 0x10]
add esp, 8
push eax
push ecx
mov ecx, esi
add ecx, edx
call fcn.004f1a20
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebx + 0x10]
add ecx, eax
mov dword [ebp - 0x1c], ecx
mov ecx, esi
add ecx, edx
call fcn.004f2130
test eax, eax
mov dword [ebp - 0x14], eax
je 0x4f265a
mov eax, dword [ebp - 0x18]
xor edi, edi
test eax, eax
jle 0x4f2657
lea eax, [edi + edi*4]
mov ecx, dword [ebx + 0x10]
lea eax, [eax + eax*4]
lea edx, [ecx + esi + 0x201a]
shl eax, 4
add eax, edi
push edx
lea eax, [eax + eax*8]
lea ecx, [ecx + eax*4 + 0x201a]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrCmpW]
test eax, eax
je 0x4f2650
mov eax, dword [ebp - 0x18]
inc edi
cmp edi, eax
jl 0x4f2606
jmp 0x4f2657
mov dword [ebp - 0x14], 0
mov edi, dword [ebp - 0x18]
mov edx, dword [ebx + 0x10]
mov ecx, ebx
lea eax, [esi + edx + 0x201a]
push eax
call fcn.004f27b0
test eax, eax
je 0x4f2677
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x4f267f
mov eax, dword [ebx + 0x18]
dec edi
dec eax
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x18]
mov esi, dword [ebp - 0x24]
inc edi
mov dword [ebp - 0x14], 1
cmp edi, eax
mov dword [ebp - 0x18], edi
jl 0x4f258a
push esi
call fcn.004ba355
add esp, 4
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 8]
mov ecx, ebx
push eax
call fcn.004f2fd0
mov ecx, ebx
call fcn.004f31b0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x82c]
push esi
push ecx
mov ecx, ebx
call fcn.004f21e0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4