Function at 0x4020c0
Capabilities:
Create directory
Delete file
Get common file path
Move file
Query or enumerate registry value
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x115c
call fcn.00408a70
mov dl, byte [0x40c4e8]
mov eax, dword [0x40c4e0]
mov ecx, dword [str..log]
push ebx
push esi
mov byte [ebp - 0x18], dl
mov dl, byte [0x433eb0]
push edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], ecx
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0xd5b]
mov byte [ebp - 0xd5c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x55b]
mov byte [ebp - 0x55c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, dword [str.SoftwareRealNetworksPreferencesNumberOfLogFiles]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
stosb byte es:[edi], al
lea eax, [ebp - 4]
xor ebx, ebx
push eax
push 1
push ebx
push ecx
push 0x80000001
mov dword [ebp - 8], 1
mov dword [ebp - 4], ebx
call esi
test eax, eax
jne 0x4021bf
mov dl, byte [0x433eb0]
mov ecx, 0x3f
lea edi, [ebp - 0x15b]
mov byte [ebp - 0x15c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 8]
lea ecx, [ebp - 0x15c]
push eax
mov eax, dword [ebp - 4]
lea edx, [ebp - 0xc]
push ecx
push edx
push ebx
push ebx
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x15c]
mov dword [ebp - 4], ebx
push edx
call dword [sym.imp.PNCRT.dll_atoi]
add esp, 4
cmp eax, 1
mov dword [ebp - 8], eax
jb 0x4021b8
cmp eax, 0x2710
jbe 0x4021bf
mov dword [ebp - 8], 1
mov ecx, dword [str.SoftwareRealNetworksPreferencesUserDataPath]
lea eax, [ebp - 4]
push eax
push 1
push ebx
push ecx
push 0x80000001
call esi
test eax, eax
jne 0x40220a
lea edx, [ebp - 0xc]
lea eax, [ebp - 0x55c]
push edx
mov edx, dword [ebp - 4]
lea ecx, [ebp - 0x14]
push eax
push ecx
push ebx
push ebx
push edx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], ebx
mov esi, 0x433eb0
lea eax, [ebp - 0x55c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x402239
test cl, cl
je 0x402235
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x402239
add eax, 2
add esi, 2
test cl, cl
jne 0x402215
xor eax, eax
jmp 0x40223e
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40226f
lea eax, [ebp - 0x55c]
push 0x400
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x55c]
push 0x5c
push ecx
call dword [sym.imp.PNCRT.dll_strrchr]
add esp, 8
cmp eax, ebx
je 0x40226f
mov byte [eax + 1], 0
lea edx, [ebp - 0xd5c]
push edx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, str.ErrorLogs
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x55c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x55c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [ebp - 0x55c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov al, byte [0x433eb0]
xor edx, edx
mov byte [ebp - 0x44], al
mov byte [ebp - 0x30], al
xor eax, eax
mov dword [ebp - 0x43], edx
mov dword [ebp - 0x2f], eax
mov dword [ebp - 0x3f], edx
mov dword [ebp - 0x2b], eax
mov dword [ebp - 0x3b], edx
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x37], edx
mov ebx, dword [sym.imp.PNCRT.dll_sprintf]
mov dword [ebp - 0x23], eax
mov word [ebp - 0x33], dx
mov edx, dword [ebp - 8]
lea ecx, [ebp - 0x1c]
mov word [ebp - 0x1f], ax
push ecx
lea eax, [ebp - 0x10]
push edx
push eax
lea ecx, [ebp - 0x30]
push str._s_lu_s
push ecx
call ebx
add esp, 0x14
lea edx, [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [ebp - 8]
cmp esi, 1
jbe 0x402371
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileA]
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x10]
push eax
push esi
push ecx
lea edx, [ebp - 0x44]
push str._s_lu_s
push edx
call ebx
add esp, 0x14
lea eax, [ebp - 0x1c]
dec esi
lea ecx, [ebp - 0x10]
push eax
push esi
push ecx
lea edx, [ebp - 0x30]
push str._s_lu_s
push edx
call ebx
add esp, 0x14
lea eax, [ebp - 0x44]
lea ecx, [ebp - 0x30]
push eax
push ecx
call edi
cmp esi, 1
ja 0x402333
mov dl, byte [0x433eb0]
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x115b]
mov byte [ebp - 0x115c], dl
mov byte [ebp - 0x95c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x95b]
mov edx, dword [str.SymbolsPath]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
push 0
stosb byte es:[edi], al
mov eax, dword [str.SoftwareRealNetworks_s_d._dPreferences_s]
push 6
push str.RealPlayer
lea ecx, [ebp - 0x115c]
push eax
push ecx
call ebx
add esp, 0x18
lea edx, [ebp - 4]
lea eax, [ebp - 0x115c]
push edx
push 0x20019
push 0
push eax
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40241b
lea ecx, [ebp - 0x14]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x95c]
push ecx
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0xc]
push edx
push eax
push 0
push 0
push ecx
mov dword [ebp - 0x14], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 0x433eb0
lea eax, [ebp - 0x95c]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40244e
test cl, cl
je 0x40244a
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40244e
add eax, 2
add esi, 2
test cl, cl
jne 0x402426
xor eax, eax
jmp 0x402453
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x402484
lea eax, [ebp - 0x95c]
push 0x400
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x95c]
push 0x5c
push ecx
call dword [sym.imp.PNCRT.dll_strrchr]
add esp, 8
test eax, eax
je 0x402484
mov byte [eax], 0
lea ecx, [ebp - 0x5c]
call fcn.00408dd0
lea edx, [ebp - 0x95c]
lea ecx, [ebp - 0x5c]
push edx
call fcn.00406fa0
lea eax, [ebp - 0x30]
lea ecx, [ebp - 0x5c]
push eax
call fcn.00406eb0
lea ecx, [ebp - 0x5c]
call fcn.00408540
lea ecx, [ebp - 0x5c]
call fcn.00408200
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push ecx
push edx
lea ecx, [ebp - 0x5c]
call fcn.00408120
lea ecx, [ebp - 0x5c]
call fcn.00407fb0
lea ecx, [ebp - 0x5c]
call fcn.00408010
lea ecx, [ebp - 0x5c]
call fcn.00408100
lea esi, [ebp - 0xd5c]
mov eax, 0x433eb0
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x402514
test cl, cl
je 0x402510
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x402514
add eax, 2
add esi, 2
test cl, cl
jne 0x4024ec
xor eax, eax
jmp 0x402519
sbb eax, eax
sbb eax, 0xffffffff
pop edi
pop esi
test eax, eax
pop ebx
je 0x40252d
lea eax, [ebp - 0xd5c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x5c]
call fcn.00406e90
mov esp, ebp
pop ebp
ret