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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b4859
mov eax, dword fs:[0]
push eax
sub esp, 0x1ac
mov eax, dword [0x4e13b0]
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 eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1b4], eax
test eax, eax
je 0x422614
lea ecx, [ebp - 0x19c]
call fcn.00425c90
mov dword [ebp - 4], 0
mov dword [ebp - 0x1b0], 0
mov dword [ebp - 0x1ac], 0
mov dword [ebp - 0x1a8], 0
mov edi, dword [ebx]
mov esi, dword [ebx + 4]
mov byte [ebp - 4], 1
cmp edi, esi
jae 0x421f8f
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x421de3
test al, 0x10
je 0x421de3
mov esi, dword [ebp - 0x1ac]
cmp dword [ebp - 0x1a8], esi
je 0x421dd1
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.00407390
add eax, 0x10
add esp, 4
mov dword [esi], eax
add dword [ebp - 0x1ac], 4
jmp 0x421f7d
push edi
push esi
lea ecx, [ebp - 0x1b0]
call fcn.0041ed20
jmp 0x421f7d
mov eax, dword [0x4e4b8c]
test al, 1
jne 0x421e22
or eax, 1
mov dword [0x4e4b8c], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x4b8b10
mov dword [0x4e4b80], 0x4ba668
mov dword [0x4e4b84], eax
mov byte [0x4e4b88], 0
call fcn.00428c30
mov eax, dword [0x4e4b8c]
add esp, 4
test al, 2
jne 0x421e7e
or eax, 2
mov dword [0x4e4b90], 0x4ba680
mov dword [0x4e4b8c], eax
xor eax, eax
push 0x4b8b40
mov dword [0x4e4b94], 0x4e4b80
mov dword [0x4e4ba4], 2
mov dword [0x4e4b9c], 0
mov dword [0x4e4ba0], 0
mov dword [0x4e4ba8], eax
mov dword [0x4e4b98], 0x4e4b90
call fcn.00428c30
add esp, 4
mov eax, dword [0x4e4b90]
mov ecx, 0x4e4b90
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1a0], eax
lea eax, [ebp - 0x1a0]
mov byte [ebp - 4], 2
push eax
push edi
call fcn.0041bcb0
add esp, 8
test eax, eax
je 0x421f45
push dword [ebp - 0x1a0]
push dword [edi]
push str.cut__s_to__s_success
call fcn.00414af0
add esp, 0xc
push 4
push 0
push dword [ebp - 0x1a0]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push dword [ebp - 0x1a0]
test eax, eax
je 0x421eee
push str.write__s_to_pending_success
call fcn.00414af0
add esp, 8
jmp 0x421f5b
lea ecx, [ebp - 0x94]
call fcn.0041f3c0
push dword [eax]
lea eax, [ebp - 0x19c]
mov byte [ebp - 4], 3
push str.del__q___s___r_n
push eax
call fcn.00425dc0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 2
cmp eax, ecx
je 0x421f30
push eax
call fcn.00469256
add esp, 4
push dword [ebp - 0x1a0]
push str.write_to_runonce_bat:__s
call fcn.00414af0
add esp, 8
jmp 0x421f5b
push dword [edi]
push str.cut__s_to_temp_failed__delete_by_pending
call fcn.00414af0
push dword [edi]
call fcn.0041c8d0
add esp, 0xc
mov edx, dword [ebp - 0x1a0]
or eax, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x421f7d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebx + 4]
add edi, 4
cmp edi, esi
jb 0x421d93
mov edi, dword [ebx]
cmp edi, esi
je 0x421fb4
mov edx, dword [edi]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x421fab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 4
cmp edi, esi
jne 0x421f91
mov edi, dword [ebx]
mov esi, dword [ebp - 0x1b0]
mov dword [ebx + 4], edi
cmp esi, dword [ebp - 0x1ac]
jae 0x422289
nop dword [eax]
push dword [esi]
call fcn.0041c400
add esp, 4
test eax, eax
jne 0x42227a
mov eax, dword [0x4e4b8c]
test al, 1
jne 0x422021
or eax, 1
mov dword [0x4e4b8c], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x4b8b10
mov dword [0x4e4b80], 0x4ba668
mov dword [0x4e4b84], eax
mov byte [0x4e4b88], 0
call fcn.00428c30
mov eax, dword [0x4e4b8c]
add esp, 4
test al, 2
jne 0x42207d
or eax, 2
mov dword [0x4e4b90], 0x4ba680
mov dword [0x4e4b8c], eax
xor eax, eax
push 0x4b8b40
mov dword [0x4e4b94], 0x4e4b80
mov dword [0x4e4ba4], 2
mov dword [0x4e4b9c], 0
mov dword [0x4e4ba0], 0
mov dword [0x4e4ba8], eax
mov dword [0x4e4b98], 0x4e4b90
call fcn.00428c30
add esp, 4
mov eax, dword [0x4e4b90]
mov ecx, 0x4e4b90
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1a0], eax
lea eax, [ebp - 0x1a0]
mov byte [ebp - 4], 4
push eax
push esi
call fcn.0041bcb0
add esp, 8
test eax, eax
je 0x422242
push dword [ebp - 0x1a0]
push dword [esi]
push str.cut__s_to__s_success
call fcn.00414af0
add esp, 0xc
push 4
push 0
push dword [ebp - 0x1a0]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x4220f0
push dword [ebp - 0x1a0]
push str.write__s_to_pending_success
call fcn.00414af0
add esp, 8
jmp 0x422258
mov ebx, dword [ebp - 0x1a0]
lea eax, [ebp - 0x90]
mov dword [ebp - 0x1b8], ebx
mov dword [ebp - 0x94], eax
test ebx, ebx
jne 0x422119
xor eax, eax
mov dword [ebp - 0x94], eax
jmp 0x4221f7
mov ecx, ebx
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x422120
sub ecx, edx
sar ecx, 1
push 0x80
lea eax, [ecx + 1]
lea edi, [eax*4]
mov dword [ebp - 0x1a4], eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x94]
push edi
push eax
call fcn.00406b50
add esp, 0x10
push 0
push 0
push edi
push dword [ebp - 0x94]
mov edi, dword [ebp - 0x1a4]
push edi
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ebx, ebx
test eax, eax
sete bl
test eax, eax
jne 0x4221e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4221e9
mov ebx, dword [ebp - 0x1b8]
push 0
push 0
push 0
push 0
push edi
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
lea eax, [ebp - 0x90]
push 0x80
push eax
lea eax, [ebp - 0x94]
push edi
push eax
call fcn.00406b50
add esp, 0x10
push 0
push 0
push edi
push dword [ebp - 0x94]
push dword [ebp - 0x1a4]
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
test ebx, ebx
jne 0x422636
mov eax, dword [ebp - 0x94]
push eax
lea eax, [ebp - 0x19c]
mov byte [ebp - 4], 5
push str.rd__s__q___s___r_n
push eax
call fcn.00425dc0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 4
cmp eax, ecx
je 0x42222d
push eax
call fcn.00469256
add esp, 4
push dword [ebp - 0x1a0]
push str.write_to_runonce_bat:__s
call fcn.00414af0
add esp, 8
jmp 0x422258
push dword [esi]
push str.cut__s_to_temp_failed_delete_by_pending
call fcn.00414af0
push dword [esi]
call fcn.0041c8d0
add esp, 0xc
mov edx, dword [ebp - 0x1a0]
or eax, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x42227a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, dword [ebp - 0x1ac]
jb 0x421fd0
mov ebx, dword [ebp - 0x1b4]
push ebx
call fcn.0041c400
add esp, 4
test eax, eax
jne 0x4223cb
lea ecx, [ebp - 0x1a0]
call fcn.00409930
push ebx
lea ecx, [ebp - 0x1a4]
mov byte [ebp - 4], 6
call fcn.00406d80
lea eax, [ebp - 0x1a0]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x1a4]
push eax
call fcn.0041bcb0
mov edx, dword [ebp - 0x1a4]
add esp, 8
mov esi, eax
mov byte [ebp - 4], 6
add edx, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4222f9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x422395
push dword [ebp - 0x1a0]
push ebx
push str.cut__s_to__s_success
call fcn.00414af0
add esp, 0xc
push 4
push 0
push dword [ebp - 0x1a0]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push dword [ebp - 0x1a0]
test eax, eax
je 0x42233e
push str.write__s_to_pending_success
call fcn.00414af0
add esp, 8
jmp 0x4223a9
lea ecx, [ebp - 0x94]
call fcn.0041f3c0
push dword [eax]
lea eax, [ebp - 0x19c]
mov byte [ebp - 4], 8
push str.rd__q___s___r_n
push eax
call fcn.00425dc0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 6
cmp eax, ecx
je 0x422380
push eax
call fcn.00469256
add esp, 4
push dword [ebp - 0x1a0]
push str.write_to_runonce_bat:__s
call fcn.00414af0
add esp, 8
jmp 0x4223a9
push ebx
push str.cut__s_to_temp_failed_delete_by_pending
call fcn.00414af0
push ebx
call fcn.0041c8d0
add esp, 0xc
mov edx, dword [ebp - 0x1a0]
or eax, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4223cb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x1a4]
call fcn.00409930
movzx eax, word [ebx]
push eax
lea eax, [ebp - 0x1a4]
mov byte [ebp - 4], 9
push str._c:.temp
push eax
call fcn.0040a920
mov esi, dword [ebp - 0x1a4]
add esp, 0xc
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
test eax, eax
je 0x42240f
push str.write__s_to_pending_success
jmp 0x422457
lea ecx, [ebp - 0x94]
call fcn.0041f3c0
push dword [eax]
lea eax, [ebp - 0x19c]
mov byte [ebp - 4], 0xa
push str.rd__q___s___r_n
push eax
call fcn.00425dc0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 9
cmp eax, ecx
je 0x422451
push eax
call fcn.00469256
add esp, 4
push esi
push str.write_to_runonce_bat:__s
call fcn.00414af0
add esp, 8
lea ecx, [ebp - 0x19c]
call fcn.00425cc0
test al, al
je 0x422558
lea ecx, [ebp - 0x19c]
call fcn.00425cf0
push eax
lea eax, [ebp - 0x19c]
push str.del__q___s___r_n
push eax
call fcn.00425dc0
add esp, 0xc
lea ecx, [ebp - 0x19c]
call fcn.00425cf0
mov dword [ebp - 0x1b4], eax
test eax, eax
je 0x4224f3
mov ecx, eax
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4224b0
sub ecx, edx
lea ebx, [ecx + 1]
cmp ebx, 0x3fffffff
jg 0x4224f3
lea eax, [ebx + ebx]
call fcn.00428cf0
mov edi, esp
test edi, edi
je 0x4224f3
push ebx
push edi
push 0xffffffffffffffff
push dword [ebp - 0x1b4]
xor eax, eax
push eax
push 3
mov word [edi], ax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
test eax, eax
cmove edi, ecx
jmp 0x4224f5
xor edi, edi
push edi
push str.write_to_runonce_bat:__s
call fcn.00414af0
add esp, 8
lea ecx, [ebp - 0x19c]
call fcn.00425cd0
mov edi, eax
test edi, edi
je 0x422558
lea ecx, [ebp - 0x19c]
call fcn.00425cf0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x422522
sub eax, edx
lea ecx, [ebp - 0x19c]
push eax
call fcn.00425cf0
push eax
push 1
push edi
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
push str.write_runonce_bat_to_registry
call fcn.00414af0
add esp, 4
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x422574
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x1b0]
mov byte [ebp - 4], 0
test esi, esi
je 0x422604
mov edi, dword [ebp - 0x1ac]
cmp esi, edi
je 0x4225b7
mov edx, dword [esi]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4225aa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, edi
jne 0x422590
mov esi, dword [ebp - 0x1b0]
mov ecx, dword [ebp - 0x1a8]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x4225dc
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x422655
push ecx
push esi
call fcn.0042883a
add esp, 8
mov dword [ebp - 0x1b0], 0
mov dword [ebp - 0x1ac], 0
mov dword [ebp - 0x1a8], 0
lea ecx, [ebp - 0x19c]
call fcn.00425ca0
mov eax, 1
lea esp, [ebp - 0x1c8]
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.00428c45
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x90]
push eax
push dword [ebp - 0x94]
call fcn.00406c50
add esp, 0xc
call fcn.00407240
call fcn.00449bc9
int3