Function at 0x40f430
Capabilities:
Check if file exists
Delete file
Delete registry value
Get common file path
Get file attributes
Persist via run registry key
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4e15e6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x5820
call fcn.0047af40
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [esp + 0x14]
push eax
push 2
xor ebx, ebx
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push reloc.OLEAUT32.dll_SysReAllocString
call edi
mov ebp, dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
jne 0x40f48c
mov ecx, dword [esp + 0x14]
push 0x4eae80
push ecx
call ebp
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
lea eax, [esp + 0x14]
push eax
push 2
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push closesocket
call edi
test eax, eax
jne 0x40f4bd
mov ecx, dword [esp + 0x14]
push 0x4eae80
push ecx
call ebp
mov edx, dword [esp + 0x14]
push edx
call esi
push 0x4ffe
lea ecx, [esp + 0x836]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x83c], ax
call fcn.0047a4b0
add esp, 0xc
push 0x400
lea edx, [esp + 0x834]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x400
lea eax, [esp + 0x1034]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea ecx, [esp + 0x1030]
push ecx
lea edx, [esp + 0x1834]
push str._s_system
push edx
call fcn.0047bd15
lea eax, [esp + 0x103c]
push eax
lea ecx, [esp + 0x2040]
push str._s_system32
push ecx
call fcn.0047bd15
add esp, 0x18
push ebx
push 0x1a
lea edx, [esp + 0x2838]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [esp + 0x2830]
push eax
lea ecx, [esp + 0x3034]
push str._sMra
push ecx
call fcn.0047bd15
lea edx, [esp + 0x303c]
push edx
lea eax, [esp + 0x3840]
push str._sUpdate
push eax
call fcn.0047bd15
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea esi, [esp + 0x848]
lea ebp, [esp + 0x48]
mov ecx, esi
add esp, 0x18
mov dword [esp + 0x14], esi
sub ebp, ecx
mov dword [esp + 0x18], 8
jmp 0x40f5b0
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f5b5
sub eax, edx
sar eax, 1
je 0x40fa4e
mov eax, esi
lea esp, [esp]
movzx ecx, word [eax]
mov word [eax + ebp], cx
add eax, 2
cmp cx, bx
jne 0x40f5d0
lea eax, [esp + 0x30]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f5e6
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x2e], 0x5c
lea eax, [esp + 0x30]
jne 0x40f635
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40f604
mov edx, dword [str.Mra.exe]
mov ecx, dword [0x4eb1c4]
mov dword [eax], edx
mov edx, dword [0x4eb1c8]
mov dword [eax + 4], ecx
mov ecx, dword [0x4eb1cc]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
jmp 0x40f67a
add eax, 0xfffffffe
jmp 0x40f640
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40f640
mov edx, dword [0x4eb1ac]
mov ecx, dword [0x4eb1b0]
mov dword [eax], edx
mov edx, dword [0x4eb1b4]
mov dword [eax + 4], ecx
mov ecx, dword [0x4eb1b8]
mov dword [eax + 8], edx
mov dx, word [0x4eb1bc]
mov dword [eax + 0xc], ecx
mov word [eax + 0x10], dx
lea eax, [esp + 0x30]
push eax
call edi
cmp eax, 0xffffffff
je 0x40f695
and eax, 0xfffffffd
push eax
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
movzx ecx, word [eax]
mov word [eax + ebp], cx
add eax, 2
cmp cx, bx
jne 0x40f6a2
lea eax, [esp + 0x30]
lea edx, [eax + 2]
jmp 0x40f6c0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f6c0
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x2e], 0x5c
jne 0x40f728
lea eax, [esp + 0x30]
add eax, 0xfffffffe
mov edi, edi
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40f6e0
mov ecx, dword [0x4e90b4]
mov edx, dword [0x4e90b8]
mov dword [eax], ecx
mov ecx, dword [0x4e90bc]
mov dword [eax + 4], edx
mov edx, dword [0x4e90c0]
mov dword [eax + 8], ecx
mov ecx, dword [0x4e90c4]
mov dword [eax + 0xc], edx
mov dx, word [0x4e90c8]
mov dword [eax + 0x10], ecx
mov word [eax + 0x14], dx
jmp 0x40f7be
push 0x4e90cc
lea ecx, [esp + 0x28]
call fcn.00418470
mov dword [esp + 0x583c], ebx
push 0x4e90b4
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00404a80
add esp, 0xc
mov byte [esp + 0x583c], 1
mov eax, dword [eax]
mov edx, eax
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f760
lea edi, [esp + 0x30]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x40f774
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 byte [esp + 0x583c], bl
lea ecx, [esp + 0x1c]
call fcn.00417490
mov dword [esp + 0x583c], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00417490
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, dword [esp + 0x14]
lea ecx, [esp + 0x30]
push ecx
call edi
cmp eax, 0xffffffff
je 0x40f7d9
and eax, 0xfffffffd
push eax
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
movzx ecx, word [eax]
mov word [eax + ebp], cx
add eax, 2
cmp cx, bx
jne 0x40f7e6
lea eax, [esp + 0x30]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f800
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x2e], 0x5c
lea eax, [esp + 0x30]
jne 0x40f865
add eax, 0xfffffffe
mov edi, edi
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40f820
mov ecx, dword [str.mractl.dll]
mov edx, dword [0x4eb198]
mov dword [eax], ecx
mov ecx, dword [0x4eb19c]
mov dword [eax + 4], edx
mov edx, dword [0x4eb1a0]
mov dword [eax + 8], ecx
mov ecx, dword [0x4eb1a4]
mov dword [eax + 0xc], edx
mov dx, word [0x4eb1a8]
mov dword [eax + 0x10], ecx
mov word [eax + 0x14], dx
jmp 0x40f8b1
add eax, 0xfffffffe
jmp 0x40f870
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40f870
mov ecx, dword [0x4eb17c]
mov edx, dword [0x4eb180]
mov dword [eax], ecx
mov ecx, dword [0x4eb184]
mov dword [eax + 4], edx
mov edx, dword [0x4eb188]
mov dword [eax + 8], ecx
mov ecx, dword [0x4eb18c]
mov dword [eax + 0xc], edx
mov edx, dword [0x4eb190]
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], edx
lea eax, [esp + 0x30]
push eax
call edi
cmp eax, 0xffffffff
je 0x40f8cc
and eax, 0xfffffffd
push eax
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
lea esp, [esp]
movzx ecx, word [eax]
mov word [eax + ebp], cx
add eax, 2
cmp cx, bx
jne 0x40f8e0
lea eax, [esp + 0x30]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f8f6
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x2e], 0x5c
jne 0x40f957
lea eax, [esp + 0x30]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40f914
mov ecx, dword [str.mraaway.dll]
mov edx, dword [0x4eb168]
mov dword [eax], ecx
mov ecx, dword [0x4eb16c]
mov dword [eax + 4], edx
mov edx, dword [0x4eb170]
mov dword [eax + 8], ecx
mov ecx, dword [0x4eb174]
mov dword [eax + 0xc], edx
mov edx, dword [0x4eb178]
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], edx
jmp 0x40f984
lea edi, [esp + 0x30]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40f960
mov ecx, 6
mov esi, 0x4eb148
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x30]
push eax
call edi
cmp eax, 0xffffffff
je 0x40f99f
and eax, 0xfffffffd
push eax
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
lea esp, [esp]
movzx ecx, word [eax]
mov word [eax + ebp], cx
add eax, 2
cmp cx, bx
jne 0x40f9b0
lea eax, [esp + 0x30]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f9c6
sub eax, edx
lea edi, [esp + 0x30]
sar eax, 1
add edi, 0xfffffffe
cmp word [esp + eax*2 + 0x2e], 0x5c
jne 0x40fa00
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40f9e4
mov ecx, 7
mov esi, str.mrasearch.dll
rep movsd dword es:[edi], dword [esi]
jmp 0x40fa1a
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40fa00
mov ecx, 7
mov esi, 0x4eb10c
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40fa39
and eax, 0xfffffffd
push eax
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, dword [esp + 0x14]
add esi, 0x800
sub ebp, 0x800
sub dword [esp + 0x18], 1
mov dword [esp + 0x14], esi
jne 0x40f5b0
mov ecx, dword [esp + 0x5834]
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret