Function at 0x429080
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 0x53d8d3
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x596334]
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 - 0x230], eax
test eax, eax
je 0x429665
lea ecx, [ebp - 0x21c]
call fcn.00434b80
mov dword [ebp - 4], 0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0
mov edi, dword [ebx]
mov esi, dword [ebx + 4]
mov byte [ebp - 4], 1
cmp edi, esi
jae 0x429286
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x429153
test al, 0x10
je 0x429153
mov esi, dword [ebp - 0x228]
cmp dword [ebp - 0x224], esi
je 0x429141
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.00407b00
add eax, 0x10
add esp, 4
mov dword [esi], eax
add dword [ebp - 0x228], 4
jmp 0x429274
push edi
push esi
lea ecx, [ebp - 0x22c]
call fcn.00425260
jmp 0x429274
call fcn.00420520
mov ecx, eax
test ecx, ecx
je 0x429681
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.00423e30
add esp, 8
test eax, eax
je 0x42923c
push dword [ebp - 0x220]
push dword [edi]
push str.cut__s_to__s_success
call fcn.0042be60
add esp, 0xc
push 4
push 0
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x4291cd
push dword [ebp - 0x220]
push str.write__s_to_pending_success
call fcn.0042be60
add esp, 8
jmp 0x429252
push 3
push dword [ebp - 0x220]
lea eax, [ebp - 0x90]
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x94], eax
call fcn.00427b10
push dword [ebp - 0x94]
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 3
push str.del__q___s___r_n
push eax
call fcn.00434cb0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 2
cmp eax, ecx
je 0x429227
push eax
call fcn.004e20ad
add esp, 4
push dword [ebp - 0x220]
push str.write_to_runonce_bat:__s
call fcn.0042be60
add esp, 8
jmp 0x429252
push dword [edi]
push str.cut__s_to_temp_failed__delete_by_pending
call fcn.0042be60
push dword [edi]
call fcn.00424e70
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 0x429274
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 0x429103
mov edi, dword [ebx]
cmp edi, esi
je 0x4292ab
mov edx, dword [edi]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4292a2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 4
cmp edi, esi
jne 0x429288
mov edi, dword [ebx]
mov esi, dword [ebp - 0x22c]
mov dword [ebx + 4], edi
cmp esi, dword [ebp - 0x228]
jae 0x429402
push dword [esi]
call fcn.00424580
add esp, 4
test eax, eax
jne 0x4293f3
call fcn.00420520
mov ecx, eax
test ecx, ecx
je 0x429681
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.00423e30
add esp, 8
test eax, eax
je 0x4293bb
push dword [ebp - 0x220]
push dword [esi]
push str.cut__s_to__s_success
call fcn.0042be60
add esp, 0xc
push 4
push 0
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x42934c
push dword [ebp - 0x220]
push str.write__s_to_pending_success
call fcn.0042be60
add esp, 8
jmp 0x4293d1
push 3
push dword [ebp - 0x220]
lea eax, [ebp - 0x90]
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x94], eax
call fcn.00427b10
push dword [ebp - 0x94]
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 5
push str.rd__s__q___s___r_n
push eax
call fcn.00434cb0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 4
cmp eax, ecx
je 0x4293a6
push eax
call fcn.004e20ad
add esp, 4
push dword [ebp - 0x220]
push str.write_to_runonce_bat:__s
call fcn.0042be60
add esp, 8
jmp 0x4293d1
push dword [esi]
push str.cut__s_to_temp_failed_delete_by_pending
call fcn.0042be60
push dword [esi]
call fcn.00424e70
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 0x4293f3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, dword [ebp - 0x228]
jb 0x4292c0
call fcn.00420520
mov ecx, eax
test ecx, ecx
je 0x429681
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
mov ebx, dword [ebp - 0x230]
mov byte [ebp - 4], 6
movzx eax, word [ebx]
push eax
lea eax, [ebp - 0x220]
push 0x555320
push eax
call fcn.0040bd20
mov esi, dword [ebp - 0x220]
add esp, 0xc
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x42945e
push esi
push str.write__s_to_pending_success
jmp 0x4294b9
push 3
lea eax, [ebp - 0x90]
push esi
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x94], eax
call fcn.00427b10
push dword [ebp - 0x94]
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 7
push str.rd__q___s___r_n
push eax
call fcn.00434cb0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
add esp, 0xc
mov byte [ebp - 4], 6
cmp eax, ecx
je 0x4294b3
push eax
call fcn.004e20ad
add esp, 4
push esi
push str.write_to_runonce_bat:__s
call fcn.0042be60
add esp, 8
lea ecx, [ebp - 0x21c]
call fcn.00434bb0
test al, al
je 0x4295a6
lea ecx, [ebp - 0x21c]
call fcn.00434be0
push eax
lea eax, [ebp - 0x21c]
push str.del__q___s___r_n
push eax
call fcn.00434cb0
add esp, 0xc
lea ecx, [ebp - 0x21c]
call fcn.00434be0
lea ecx, [ebp - 0x110]
push 3
mov dword [ebp - 0x114], ecx
lea ecx, [ebp - 0x114]
push eax
call fcn.00427a40
push dword [ebp - 0x114]
mov byte [ebp - 4], 8
push str.write_to_runonce_bat:__s
call fcn.0042be60
mov eax, dword [ebp - 0x114]
lea ecx, [ebp - 0x110]
add esp, 8
mov byte [ebp - 4], 6
cmp eax, ecx
je 0x42954d
push eax
call fcn.004e20ad
add esp, 4
lea ecx, [ebp - 0x21c]
call fcn.00434bc0
mov edi, eax
test edi, edi
je 0x4295a6
lea ecx, [ebp - 0x21c]
call fcn.00434be0
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x429570
sub eax, edx
lea ecx, [ebp - 0x21c]
push eax
call fcn.00434be0
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.0042be60
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 0x4295c9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x22c]
mov byte [ebp - 4], 0
test esi, esi
je 0x429655
mov edi, dword [ebp - 0x228]
cmp esi, edi
je 0x429608
mov edx, dword [esi]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4295fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, edi
jne 0x4295e1
mov esi, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x224]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x42962d
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x42968b
push ecx
push esi
call fcn.0045590a
add esp, 8
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0
lea ecx, [ebp - 0x21c]
call fcn.00434b90
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.00455d1a
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404c40
call fcn.004ba344
int3