Function at 0x402fb4
Capabilities:
Check if file exists
Delete file
Delete registry value
Get common file path
Get file attributes
Move file
Persist via run registry key
Query or enumerate registry value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
push ebx
lea eax, [ebp - 4]
push esi
push edi
xor esi, esi
push eax
push 0x4013b4
mov dword [ebp - 4], esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x403288
push esi
mov edi, 0x40157c
push esi
push esi
push esi
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40327f
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0x11c]
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ecx
call ebx
push 0x40156c
lea ecx, [ebp - 0x11c]
push ecx
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
call edi
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 8], eax
cmp eax, esi
je 0x403104
push 0x40155c
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4030fb
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x18]
push ecx
push edx
call eax
add esp, 8
test eax, eax
je 0x4030fb
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0x11c]
push eax
push ecx
call ebx
push 0x40154c
lea ecx, [ebp - 0x11c]
push ecx
call edi
push esi
lea ecx, [ebp - 0x11c]
push pe_nt_image_headers32
push 2
push esi
push esi
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x4030fb
push esi
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], esi
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4030f2
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x10], eax
jne 0x4030f2
mov esi, 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0x11c]
push eax
push ecx
call ebx
push 0x40156c
lea ecx, [ebp - 0x11c]
push ecx
call edi
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0x11c]
push eax
test esi, esi
push ecx
je 0x4031df
mov esi, 0x40153c
call ebx
push esi
lea ecx, [ebp - 0x11c]
push ecx
call edi
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0x11c]
push eax
push ecx
call ebx
push 0x40152c
lea ecx, [ebp - 0x11c]
push ecx
call edi
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x220]
lea edx, [ebp - 0x11c]
push ecx
push edx
call ebx
push 0x40154c
lea ecx, [ebp - 0x11c]
push ecx
call edi
lea ecx, [ebp - 0x220]
lea edx, [ebp - 0x324]
push ecx
push edx
call ebx
push esi
lea ecx, [ebp - 0x324]
push ecx
call edi
lea ecx, [ebp - 0x324]
lea edx, [ebp - 0x11c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
jmp 0x403288
mov esi, 0x40152c
call ebx
push esi
lea ecx, [ebp - 0x11c]
push ecx
call edi
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x403288
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0x11c]
push eax
push ecx
call ebx
push 0x40153c
lea ecx, [ebp - 0x11c]
push ecx
call edi
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x220]
lea edx, [ebp - 0x11c]
push ecx
push edx
call ebx
push esi
lea ecx, [ebp - 0x11c]
push ecx
call edi
lea ecx, [ebp - 0x220]
lea edx, [ebp - 0x324]
push ecx
push edx
call ebx
push 0x40153c
lea ecx, [ebp - 0x324]
push ecx
call edi
lea ecx, [ebp - 0x324]
lea edx, [ebp - 0x11c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
jmp 0x403288
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret