Function at 0x4018e0
Capabilities:
Check if file exists
Delete directory
Delete file
Delete registry key
Get file attributes
Move file
Query or enumerate registry value

Disassembly:
sub esp, 0x32c
mov eax, dword [0x4231e0]
xor eax, esp
mov dword [esp + 0x328], eax
push ebx
mov ebx, dword [esp + 0x334]
push esi
mov esi, dword [esp + 0x33c]
push edi
push 0x104
lea eax, [esp + 0x234]
push eax
push 0
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], 0x104
mov byte [esp + 0x1b], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x401b24
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0x14]
push ecx
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
call ebp
test eax, eax
jne 0x401acb
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0
push str.ProgramFilesDir
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401ac0
lea eax, [esp + 0x2c]
add eax, 0xffffffff
lea ebx, [ebx]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x401990
mov ecx, dword [str.OpenAL]
mov edx, dword [0x41e3b0]
mov dword [eax], ecx
mov dword [eax + 4], edx
xor eax, eax
lea ecx, [ecx]
mov cl, byte [esp + eax + 0x2c]
mov byte [esp + eax + 0x130], cl
add eax, 1
test cl, cl
jne 0x4019b0
lea eax, [esp + 0x234]
push eax
call fcn.004013c0
add esp, 4
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4019d4
lea edi, [esp + 0x2c]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4019e6
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [esp + 0x2c]
push ecx
call esi
cmp eax, 0xffffffff
je 0x401a38
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x401a38
push 4
push eax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x401a38
mov byte [esp + 0x13], 1
lea ecx, [esp + 0x130]
push ecx
call esi
cmp eax, 0xffffffff
je 0x401a73
lea edx, [esp + 0x130]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x401a73
push 4
push eax
lea eax, [esp + 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x401a73
mov byte [esp + 0x13], 1
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x1c]
push edx
push 0
push 0xf003f
push 0
push 0x41e334
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x401abc
mov eax, dword [esp + 0x18]
push 0x41e344
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x14]
push eax
push 0xf003f
push 0
push str.SOFTWAREOpenAL
push 0x80000002
call ebp
test eax, eax
jne 0x401af7
mov ecx, dword [esp + 0x14]
push str.RefCount
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
lea edx, [esp + 0x14]
push edx
push 0xf003f
push 0
push str.SOFTWARE
push 0x80000002
call ebp
test eax, eax
pop ebp
jne 0x401b24
mov eax, dword [esp + 0x10]
push 0x41e344
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push ebx
call edi
cmp eax, 0xffffffff
je 0x401b4d
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x401b4d
push 4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
mov bl, 1
jne 0x401b51
mov bl, byte [esp + 0xf]
push esi
call edi
cmp eax, 0xffffffff
je 0x401b74
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x401b74
push 4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
mov al, 1
jne 0x401b76
mov al, bl
mov ecx, dword [esp + 0x334]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004064d4
add esp, 0x32c
ret