Function at 0x4b1650
Capabilities:
Check if file exists
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5692d2
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x61308c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, str.Restore.vbs
lea ecx, [ebp - 0x2c]
xor bl, bl
call fcn.00411d80
mov dword [ebp - 4], 0
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4b16be
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
setne bl
xor eax, eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x34], 0
mov word [ebp - 0x44], ax
mov byte [ebp - 4], 2
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x60], 7
mov dword [ebp - 0x64], eax
mov word [ebp - 0x74], ax
mov byte [ebp - 4], 4
lea eax, [ebp - 0x74]
push dword [ebp + 8]
push str.if_obj.Restore__d_____0_Then_r_n
push eax
call fcn.0040d480
add esp, 0xc
lea ecx, [ebp - 0x44]
push 0x5d
push str.Set_obj__GetObject__winmgmts:impersonationLevelimpersonate_root_default:SystemRestore___r_n
call fcn.00404d30
cmp dword [ebp - 0x60], 8
lea edx, [ebp - 0x74]
cmovae edx, dword [ebp - 0x74]
cmp word [edx], 0
jne 0x4b1734
xor ecx, ecx
jmp 0x4b174f
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b1740
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x44]
call fcn.00406f60
push 8
push str.End_If_r_n
lea ecx, [ebp - 0x44]
call fcn.00406f60
push 0x85
push str.Set_OpSysSet__GetObject__winmgmts:_Shutdown___._root_cimv2__.ExecQuery__select__from_Win32_OperatingSystem_where_Primarytrue___r_n
lea ecx, [ebp - 0x44]
call fcn.00406f60
push 0x1c
push str.for_each_OpSys_in_OpSysSet_r_n
lea ecx, [ebp - 0x44]
call fcn.00406f60
push 0x10
push str.OpSys.Reboot___r_n
lea ecx, [ebp - 0x44]
call fcn.00406f60
push 6
push str.next_r_n
lea ecx, [ebp - 0x44]
call fcn.00406f60
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x5c], 0
mov byte [ebp - 4], 5
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x30], 8
lea ecx, [ebp - 0x5c]
cmovae eax, dword [ebp - 0x44]
push eax
call fcn.0040d560
mov byte [ebp - 4], 6
mov dword [ebp - 0x80], vtable.CBaseFile.0
mov dword [ebp - 0x78], 0
mov byte [ebp - 0x7c], 0
mov byte [ebp - 4], 7
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x80]
push 0x1a
cmovae eax, dword [ebp - 0x2c]
push eax
call fcn.00404380
test al, al
je 0x4b1861
cmp dword [ebp - 0x48], 0x10
lea eax, [ebp - 0x5c]
cmovae eax, dword [ebp - 0x5c]
cmp byte [ebp - 0x7c], 0
je 0x4b1842
mov ecx, dword [ebp - 0x78]
test ecx, ecx
je 0x4b1859
push ecx
push dword [ebp - 0x4c]
push 1
push eax
call fcn.0052edd8
push dword [ebp - 0x78]
call fcn.0052eb75
add esp, 0x14
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x4b1859
push eax
call fcn.0052e84e
add esp, 4
test eax, eax
jne 0x4b185d
mov dword [ebp - 0x78], eax
mov byte [ebp - 0x7c], 0
mov bl, 1
jmp 0x4b18bf
cmp dword [ebp - 0x18], 8
lea edi, [ebp - 0x2c]
mov esi, dword [0x618d28]
cmovae edi, dword [ebp - 0x2c]
test esi, esi
jne 0x4b189d
push 0x70
call fcn.005120b2
add esp, 4
mov dword [ebp - 0x84], eax
mov byte [ebp - 4], 8
mov ecx, eax
call fcn.00409ee0
mov esi, eax
mov byte [ebp - 4], 7
mov dword [0x618d28], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str._S_open_failed__d__r_n
push 0x2b1
push str.SystemRestoreThreadSystemRestore.cpp
push 1
push esi
call fcn.0040a3e0
add esp, 0x1c
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push 0
cmovae eax, dword [ebp - 0x2c]
mov edx, 0x5bf5ac
push ecx
push 0
push eax
call fcn.00412ad0
add esp, 0x10
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x80], vtable.CBaseFile.0
test eax, eax
je 0x4b18ff
push eax
call fcn.0052e84e
add esp, 4
test eax, eax
jne 0x4b1903
mov dword [ebp - 0x78], eax
mov byte [ebp - 0x7c], 0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x48]
cmp eax, 0x10
jb 0x4b191c
inc eax
lea ecx, [ebp - 0x5c]
push eax
push dword [ebp - 0x5c]
call fcn.00409490
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x5c], 0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x60]
cmp eax, 8
jb 0x4b1947
inc eax
lea ecx, [ebp - 0x74]
push eax
push dword [ebp - 0x74]
call fcn.00404be0
xor eax, eax
mov dword [ebp - 0x60], 7
mov dword [ebp - 0x64], 0
mov word [ebp - 0x74], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x30]
cmp eax, 8
jb 0x4b1973
inc eax
lea ecx, [ebp - 0x44]
push eax
push dword [ebp - 0x44]
call fcn.00404be0
xor eax, eax
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x34], 0
mov word [ebp - 0x44], ax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x4b19a3
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00404be0
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
mov al, bl
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret 4