Function at 0x406490
Capabilities:
Create directory
Delete file
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x158
mov eax, dword [0x427550]
push ebx
xor eax, ebp
xor ebx, ebx
cmp edx, ebx
push edi
mov dword [esp + 0x15c], eax
mov edi, ecx
mov dword [esp + 0x10], edx
je 0x40665d
cmp esi, ebx
je 0x40665d
cmp dword [ebp + 8], ebx
je 0x406571
xor eax, eax
mov byte [esp + 0x18], bl
mov ecx, 0x40
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
push str.SOFTWARERising_s
stosb byte es:[edi], al
lea eax, [esp + 0x20]
push 0x104
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], 1
call fcn.00405f70
add esp, 0x10
lea ecx, [esp + 0xc]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x24]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406556
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x14]
push ecx
push esi
lea edx, [esp + 0x18]
push edx
push ebx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
push str.installpath
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
pop edi
pop ebx
mov ecx, dword [esp + 0x154]
xor ecx, ebp
call fcn.00413041
mov esp, ebp
pop ebp
ret
push str.Shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [esp + 0xc], eax
je 0x4066d8
push str.SHGetFolderPathA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
jne 0x4065ce
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.SHFolder.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [esp + 0xc], eax
je 0x4065c6
push str.SHGetFolderPathA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x4066c9
push esi
neg edi
sbb edi, edi
push 1
push 0
and edi, 7
add edi, 0x1c
push edi
push 0
call ebx
test eax, eax
jl 0x4066c9
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x4066c9
mov eax, dword [ebp + 0xc]
push str.Rising
push eax
push esi
mov ebx, 1
call fcn.00406470
lea ecx, [esp + 0x18]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
mov al, byte [esp + 0x18]
je 0x406628
test al, 0x10
jne 0x40663e
test al, 0x10
jne 0x406633
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebx, eax
cmp edi, 0xffffffff
je 0x40664a
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
jne 0x406673
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40665d
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
pop edi
pop ebx
mov ecx, dword [esp + 0x154]
xor ecx, ebp
call fcn.00413041
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
push 0x4215dc
push edi
push esi
call fcn.00406470
mov edx, dword [esp + 0x10]
push edx
push edi
push esi
call fcn.00406470
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
mov al, byte [esp + 0x18]
je 0x4066a9
test al, 0x10
jne 0x4066bd
test al, 0x10
jne 0x4066b4
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp edi, 0xffffffff
je 0x4066c9
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4066d8
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x15c]
pop edi
xor ecx, ebp
pop ebx
call fcn.00413041
mov esp, ebp
pop ebp
ret