Function at 0x40a246
Capabilities:
Check if file exists
Delete registry key
Get common file path
Get file attributes
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x4339ac]
push ebx
push esi
push edi
push dword [eax + 0x138]
mov dword [ebp - 0xc], eax
call dword [sym.imp.USER32.dll_SetCursor]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
xor edi, edi
cmp dword [ebp + 8], edi
mov dword [ebp - 0x14], eax
jne 0x40a397
mov eax, dword [ebp - 0xc]
add eax, 0x454
push eax
lea eax, [ebp - 0x120]
push eax
call ebx
push 0x4263c4
lea eax, [ebp - 0x120]
push eax
call esi
push str.PlugData
lea eax, [ebp - 0x120]
push eax
call esi
push edi
lea eax, [ebp - 8]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
lea eax, [ebp - 0x120]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x40a2de
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0xc]
add eax, 0x454
push eax
lea eax, [ebp - 0x120]
push eax
call ebx
push 0x4263c4
lea eax, [ebp - 0x120]
push eax
call esi
push str.BaseData
lea eax, [ebp - 0x120]
push eax
call esi
push edi
lea eax, [ebp - 8]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
lea eax, [ebp - 0x120]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp - 4], edi
jne 0x40a397
lea eax, [ebp - 0x1c]
push eax
push edi
push edi
push edi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x224]
push eax
mov dword [ebp - 4], edi
push edi
jmp 0x40a377
cmp eax, edi
je 0x40a352
inc dword [ebp - 4]
jmp 0x40a362
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 8]
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyA]
lea eax, [ebp - 0x1c]
push eax
push edi
push edi
push edi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
jne 0x40a349
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], edi
cmp dword [ebp + 8], 1
jne 0x40a3b2
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
cmp ecx, dword [eax + 0x79c]
jne 0x40a46c
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 4]
call fcn.00409dcd
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40a46c
push str._s__
lea eax, [ebp - 0x224]
push eax
call ebx
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x224]
push eax
call esi
push 0x42c908
lea eax, [ebp - 0x224]
push eax
call esi
push 0x104
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str._regedit.exe
lea eax, [ebp - 0x120]
push eax
call esi
push edi
push str.RegEdit_RegEdit
push edi
push edi
call dword [sym.imp.USER32.dll_FindWindowExA]
cmp eax, edi
je 0x40a440
push edi
push edi
push 0x10
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x42c904
lea eax, [ebp - 0x120]
push eax
call esi
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x120]
push eax
call esi
push 1
lea eax, [ebp - 0x120]
push eax
call fcn.00409f0a
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x1f
jle 0x40a39a
cmp dword [ebp + 8], edi
jne 0x40a53b
lea eax, [ebp - 0x120]
push eax
push 0x30
call fcn.00409dcd
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40a53b
push str._s__
lea eax, [ebp - 0x224]
push eax
call ebx
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x224]
push eax
call esi
push 0x42c908
lea eax, [ebp - 0x224]
push eax
call esi
push 0x104
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str._regedit.exe
lea eax, [ebp - 0x120]
push eax
call esi
push edi
push str.RegEdit_RegEdit
push edi
push edi
call dword [sym.imp.USER32.dll_FindWindowExA]
cmp eax, edi
je 0x40a50f
push edi
push edi
push 0x10
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x42c904
lea eax, [ebp - 0x120]
push eax
call esi
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x120]
push eax
call esi
push 1
lea eax, [ebp - 0x120]
push eax
call fcn.00409f0a
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetCursor]
pop edi
pop esi
pop ebx
leave
ret 4