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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f1b13
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x536204]
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 - 0x238], eax
test eax, eax
je 0x41fe4d
lea ecx, [ebp - 0x21c]
call fcn.0042e6a0
mov dword [ebp - 4], 0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
mov edi, dword [ebx]
mov esi, dword [ebx + 4]
mov byte [ebp - 4], 1
cmp edi, esi
jae 0x41f8cb
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41f7b3
test al, 0x10
je 0x41f7b3
mov esi, dword [ebp - 0x22c]
cmp dword [ebp - 0x228], esi
je 0x41f7a1
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.00406f60
add eax, 0x10
add esp, 4
mov dword [esi], eax
add dword [ebp - 0x22c], 4
jmp 0x41f8b9
push edi
push esi
lea ecx, [ebp - 0x230]
call fcn.0041da30
jmp 0x41f8b9
call fcn.004073d0
mov ecx, eax
test ecx, ecx
je 0x41fe69
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
mov byte [ebp - 4], 2
push eax
push edi
call fcn.0042d860
add esp, 8
test eax, eax
je 0x41f881
push dword [ebp - 0x220]
push dword [edi]
push str.cut__s_to__s_success
call fcn.004224b0
add esp, 0xc
push 4
push 0
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push dword [ebp - 0x220]
test eax, eax
je 0x41f82a
push str.write__s_to_pending_success
call fcn.004224b0
add esp, 8
jmp 0x41f897
lea ecx, [ebp - 0x94]
call fcn.0041de30
push dword [eax]
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 3
push str.del__q___s___r_n
push eax
call fcn.0042e7d0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 2
cmp eax, ecx
je 0x41f86c
push eax
call fcn.004998ef
add esp, 4
push dword [ebp - 0x220]
push str.write_to_runonce_bat:__s
call fcn.004224b0
add esp, 8
jmp 0x41f897
push dword [edi]
push str.cut__s_to_temp_failed__delete_by_pending
call fcn.004224b0
push dword [edi]
call fcn.0042e330
add esp, 0xc
mov edx, dword [ebp - 0x220]
or eax, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41f8b9
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 0x41f763
mov edi, dword [ebx]
cmp edi, esi
je 0x41f8f3
nop dword [eax]
mov edx, dword [edi]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41f8ea
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 4
cmp edi, esi
jne 0x41f8d0
mov edi, dword [ebx]
mov esi, dword [ebp - 0x230]
mov dword [ebx + 4], edi
cmp esi, dword [ebp - 0x22c]
jae 0x41fb2b
push dword [esi]
call fcn.0042dfe0
add esp, 4
test eax, eax
jne 0x41fb1c
call fcn.004073d0
mov ecx, eax
test ecx, ecx
je 0x41fe69
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
mov byte [ebp - 4], 4
push eax
push esi
call fcn.0042d860
add esp, 8
test eax, eax
je 0x41fae4
push dword [ebp - 0x220]
push dword [esi]
push str.cut__s_to__s_success
call fcn.004224b0
add esp, 0xc
push 4
push 0
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x41f994
push dword [ebp - 0x220]
push str.write__s_to_pending_success
call fcn.004224b0
add esp, 8
jmp 0x41fafa
mov ebx, dword [ebp - 0x220]
lea eax, [ebp - 0x90]
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x94], eax
test ebx, ebx
jne 0x41f9bd
xor eax, eax
mov dword [ebp - 0x94], eax
jmp 0x41fa99
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41f9c2
sub ecx, edx
sar ecx, 1
push 0x80
lea eax, [ecx + 1]
lea edi, [eax*4]
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x94]
push edi
push eax
call fcn.0041d8f0
add esp, 0x10
push 0
push 0
push edi
push dword [ebp - 0x94]
mov edi, dword [ebp - 0x224]
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 0x41fa8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x41fa8b
mov ebx, dword [ebp - 0x234]
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.0041d8f0
add esp, 0x10
push 0
push 0
push edi
push dword [ebp - 0x94]
push dword [ebp - 0x224]
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 0x41fe73
mov eax, dword [ebp - 0x94]
push eax
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 5
push str.rd__s__q___s___r_n
push eax
call fcn.0042e7d0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 4
cmp eax, ecx
je 0x41facf
push eax
call fcn.004998ef
add esp, 4
push dword [ebp - 0x220]
push str.write_to_runonce_bat:__s
call fcn.004224b0
add esp, 8
jmp 0x41fafa
push dword [esi]
push str.cut__s_to_temp_failed_delete_by_pending
call fcn.004224b0
push dword [esi]
call fcn.0042e330
add esp, 0xc
mov edx, dword [ebp - 0x220]
or eax, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41fb1c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, dword [ebp - 0x22c]
jb 0x41f908
call fcn.004073d0
mov ecx, eax
test ecx, ecx
je 0x41fe69
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x224], eax
mov ebx, dword [ebp - 0x238]
mov byte [ebp - 4], 6
movzx eax, word [ebx]
push eax
lea eax, [ebp - 0x224]
push str._c:.temp
push eax
call fcn.00407310
mov esi, dword [ebp - 0x224]
add esp, 0xc
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
test eax, eax
je 0x41fb87
push str.write__s_to_pending_success
jmp 0x41fbcf
lea ecx, [ebp - 0x94]
call fcn.0041de30
push dword [eax]
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 7
push str.rd__q___s___r_n
push eax
call fcn.0042e7d0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 6
cmp eax, ecx
je 0x41fbc9
push eax
call fcn.004998ef
add esp, 4
push esi
push str.write_to_runonce_bat:__s
call fcn.004224b0
add esp, 8
lea ecx, [ebp - 0x21c]
call fcn.0042e6d0
test al, al
je 0x41fd86
lea ecx, [ebp - 0x21c]
call fcn.0042e700
push eax
lea eax, [ebp - 0x21c]
push str.del__q___s___r_n
push eax
call fcn.0042e7d0
add esp, 0xc
lea ecx, [ebp - 0x21c]
call fcn.0042e700
mov edi, eax
lea eax, [ebp - 0x110]
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x114], eax
test edi, edi
jne 0x41fc3a
xor eax, eax
mov dword [ebp - 0x114], eax
jmp 0x41fcfe
mov ecx, edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41fc40
sub ecx, edx
lea eax, [ebp - 0x110]
push 0x80
push eax
lea eax, [ebp - 0x114]
lea ebx, [ecx + 1]
push ebx
push eax
mov dword [ebp - 0x234], ebx
call fcn.0041d970
add esp, 0x10
push ebx
push dword [ebp - 0x114]
push ebx
push edi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ebx, ebx
test eax, eax
sete bl
test eax, eax
jne 0x41fcea
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x41fcea
mov ebx, dword [ebp - 0x234]
push 0
push 0
push ebx
push edi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
lea eax, [ebp - 0x110]
push 0x80
push eax
lea eax, [ebp - 0x114]
push edi
push eax
call fcn.0041d970
add esp, 0x10
push edi
push dword [ebp - 0x114]
push ebx
push dword [ebp - 0x220]
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
test ebx, ebx
jne 0x41fe92
mov eax, dword [ebp - 0x114]
mov ebx, dword [ebp - 0x238]
push eax
push str.write_to_runonce_bat:__s
mov byte [ebp - 4], 8
call fcn.004224b0
mov eax, dword [ebp - 0x114]
lea ecx, [ebp - 0x110]
add esp, 8
mov byte [ebp - 4], 6
cmp eax, ecx
je 0x41fd2d
push eax
call fcn.004998ef
add esp, 4
lea ecx, [ebp - 0x21c]
call fcn.0042e6e0
mov edi, eax
test edi, edi
je 0x41fd86
lea ecx, [ebp - 0x21c]
call fcn.0042e700
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fd50
sub eax, edx
lea ecx, [ebp - 0x21c]
push eax
call fcn.0042e700
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.004224b0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41fda9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x230]
mov byte [ebp - 4], 0
test esi, esi
je 0x41fe3d
mov edi, dword [ebp - 0x22c]
cmp esi, edi
je 0x41fdec
mov edx, dword [esi]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41fddf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, edi
jne 0x41fdc5
mov esi, dword [ebp - 0x230]
mov ecx, dword [ebp - 0x228]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x41fe15
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41feb1
push ecx
push esi
call fcn.004451ca
add esp, 8
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
lea ecx, [ebp - 0x21c]
call fcn.0042e6b0
mov eax, 1
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.004455da
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00403b30
push 0x80
lea eax, [ebp - 0x90]
push eax
push dword [ebp - 0x94]
call fcn.0041d9f0
add esp, 0xc
call fcn.0041e240
push 0x80
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x114]
call fcn.0041da10
add esp, 0xc
call fcn.0041e240
call fcn.004793b6
int3