Function at 0x4d07f1
Capabilities:
Check if file exists
Enumerate files on windows
Query environment variable
Read .ini file

Disassembly:
push 0x294
mov eax, 0x5d91aa
call fcn.00506dfb
mov dword [ebp - 0x29c], ecx
call fcn.0041279d
push eax
lea ecx, [ebp - 0x280]
call fcn.00411d94
and dword [ebp - 4], 0
lea ecx, [ebp - 0x280]
and dword [ebp - 0x264], 0
mov ebx, 0x800
push ebx
push ebx
call fcn.0041299c
push eax
push str._appdata_KuGou8kugou.ini
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x280]
call fcn.004349e4
mov edi, dword [ebp - 0x280]
cmp dword [edi - 0xc], 0
je 0x4d0bfa
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4d0bfa
call fcn.0041279d
push eax
lea ecx, [ebp - 0x278]
call fcn.00411d94
mov byte [ebp - 4], 1
call fcn.0041279d
push eax
lea ecx, [ebp - 0x274]
call fcn.00411d94
mov byte [ebp - 4], 2
call fcn.0041279d
push eax
lea ecx, [ebp - 0x270]
call fcn.00411d94
push edi
push ebx
push ebx
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 3
call fcn.0041299c
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebx, str.DownloadConfigSection
push eax
push 0x5f1b30
push str.DownloadPath
push ebx
call esi
push edi
mov eax, 0x800
lea ecx, [ebp - 0x274]
push eax
push eax
call fcn.0041299c
push eax
push 0x5f1b30
push str.MVCacheFolder
push ebx
call esi
push edi
mov eax, 0x800
lea ecx, [ebp - 0x270]
push eax
push eax
call fcn.0041299c
push eax
push 0x5f1b30
push str.TempPath
push ebx
call esi
push 0xffffffffffffffff
lea ecx, [ebp - 0x278]
call fcn.004349e4
push 0xffffffffffffffff
lea ecx, [ebp - 0x274]
call fcn.004349e4
push 0xffffffffffffffff
lea ecx, [ebp - 0x270]
call fcn.004349e4
xor eax, eax
mov dword [ebp - 0x290], eax
mov dword [ebp - 0x28c], eax
mov dword [ebp - 0x288], eax
mov eax, dword [ebp - 0x278]
mov byte [ebp - 4], 4
cmp dword [eax - 0xc], 0
je 0x4d0971
lea eax, [ebp - 0x278]
push eax
lea ecx, [ebp - 0x290]
call fcn.004366b4
mov eax, dword [ebp - 0x274]
cmp dword [eax - 0xc], 0
je 0x4d098f
lea eax, [ebp - 0x274]
push eax
lea ecx, [ebp - 0x290]
call fcn.004366b4
mov ebx, dword [ebp - 0x270]
cmp dword [ebx - 0xc], 0
je 0x4d09b3
lea eax, [ebp - 0x270]
push eax
lea ecx, [ebp - 0x290]
call fcn.004366b4
mov ebx, dword [ebp - 0x270]
mov esi, dword [ebp - 0x28c]
mov eax, dword [ebp - 0x290]
sub esi, eax
sar esi, 2
mov dword [ebp - 0x27c], eax
test esi, esi
jmp 0x4d0bbf
cmp dword [0x683574], 0
je 0x4d09e5
mov eax, dword [ebp - 0x26c]
jmp 0x4d0b99
push 0x250
lea eax, [ebp - 0x260]
push 0
push eax
call fcn.0056b050
push 0x621df8
push dword [ebp - 0x27c]
lea eax, [ebp - 0x294]
push eax
call fcn.0042dfbd
add esp, 0x18
lea ecx, [ebp - 0x260]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ecx, dword [ebp - 0x294]
mov dword [ebp - 0x26c], eax
lea ecx, [ecx - 0x10]
call fcn.00412ac4
mov eax, dword [ebp - 0x26c]
cmp eax, 0xffffffff
jne 0x4d0a4c
and dword [ebp - 0x264], 0
jmp 0x4d0bb5
cmp dword [0x683574], 0
jne 0x4d0b93
test byte [ebp - 0x260], 0x10
jne 0x4d0b65
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x268]
call fcn.00413f09
push 3
lea eax, [ebp - 0x298]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x268]
call fcn.00434d0c
push eax
lea ecx, [ebp - 0x268]
mov byte [ebp - 4], 6
call fcn.00411f3a
mov ecx, dword [ebp - 0x298]
mov byte [ebp - 4], 5
lea ecx, [ecx - 0x10]
call fcn.00412ac4
push 0x621ea4
lea ecx, [ebp - 0x268]
call fcn.0042e69b
test eax, eax
je 0x4d0aee
push 0x621eac
lea ecx, [ebp - 0x268]
call fcn.0042e69b
test eax, eax
je 0x4d0aee
push 0x621f6c
lea ecx, [ebp - 0x268]
call fcn.0042e69b
test eax, eax
jne 0x4d0b4d
mov eax, dword [ebp - 0x27c]
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00412393
add eax, 0x10
mov dword [ebp - 0x264], eax
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x264]
push 0x621e48
push eax
call fcn.004607c0
add esp, 0xc
mov ecx, esp
push 0x61ffb0
call fcn.00413f09
mov esi, dword [ebp - 0x264]
mov ecx, dword [ebp - 0x29c]
push esi
call fcn.0045ed1e
lea ecx, [esi - 0x10]
call fcn.00412ac4
mov ecx, dword [ebp - 0x268]
mov byte [ebp - 4], 4
lea ecx, [ecx - 0x10]
call fcn.00412ac4
mov eax, dword [ebp - 0x26c]
lea ecx, [ebp - 0x260]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
mov eax, dword [ebp - 0x26c]
jne 0x4d0a4c
mov esi, dword [ebp - 0x284]
mov dword [ebp - 0x264], 1
jmp 0x4d0ba0
mov esi, dword [ebp - 0x284]
and dword [ebp - 0x264], 0
cmp eax, 0xffffffff
je 0x4d0bb5
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
or eax, 0xffffffff
mov dword [ebp - 0x26c], eax
add dword [ebp - 0x27c], 4
sub esi, 1
mov dword [ebp - 0x284], esi
jne 0x4d09d1
lea ecx, [ebp - 0x290]
call fcn.00436307
lea ecx, [ebx - 0x10]
call fcn.00412ac4
mov ecx, dword [ebp - 0x274]
lea ecx, [ecx - 0x10]
call fcn.00412ac4
mov ecx, dword [ebp - 0x278]
lea ecx, [ecx - 0x10]
call fcn.00412ac4
lea ecx, [edi - 0x10]
call fcn.00412ac4
mov eax, dword [ebp - 0x264]
call fcn.00506da5
ret