Function at 0x412680
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4d1630
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x4ff0f4]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
push ebp
push esi
mov eax, dword [0x4ff0f4]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.Wow64DisableWow64FsRedirection
xor ebx, ebx
push 0x4e9520
mov esi, ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x4126e5
lea ecx, [esp + 0x18]
push ecx
call eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], ebx
cmp dword [esp + 0x3c], ebx
je 0x41289a
lea edx, [esp + 0x10]
push esi
push edx
call fcn.004120f0
add esp, 8
mov byte [esp + 0x34], 1
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], 1
mov byte [esp + 0x17], bl
jge 0x41271e
push 0x80070057
call fcn.00401000
movzx ecx, word [eax + 2]
cmp cx, 0x3a
jne 0x41273c
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov eax, dword [esp + 0x10]
je 0x41273c
mov byte [esp + 0x17], 1
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
mov byte [esp + 0x1a], bl
call esi
cmp eax, 0xffffffff
je 0x412752
test al, 0x10
jne 0x41278b
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], ebx
jl 0x412775
push str.hkey_
push eax
call fcn.004aa1b6
add esp, 8
cmp eax, ebx
je 0x412775
sub eax, dword [esp + 0x10]
sar eax, 1
je 0x41278b
mov eax, dword [esp + 0x10]
push eax
call fcn.00412310
add esp, 4
test al, al
je 0x41278b
mov byte [esp + 0x16], 1
cmp byte [esp + 0x40], bl
je 0x41279d
mov ecx, dword [esp + 0x10]
mov eax, dword [edi]
push ecx
call fcn.00405070
mov edx, dword [esp + 0x10]
push edx
call esi
or esi, 0xffffffff
cmp eax, esi
je 0x4127d5
test al, 0x10
je 0x4127d5
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
push edi
push eax
push ecx
push edx
lea eax, [esp + 0x26]
push eax
lea ecx, [esp + 0x24]
push 1
push ecx
call fcn.004128f0
add esp, 0x1c
jmp 0x4127f0
mov edx, dword [esp + 0x10]
push 0x80
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [esp + 0x17], bl
je 0x41284c
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41284c
mov edx, dword [esp + 0x10]
push 4
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov byte [esp + 0x34], bl
lea ecx, [esp + 0x10]
call fcn.00405410
mov dword [esp + 0x34], esi
cmp dword [esp + 0x1c], ebx
je 0x412848
push str.Wow64RevertWow64FsRedirection
push 0x4e955c
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x412848
mov ecx, dword [esp + 0x18]
push ecx
call eax
xor al, al
jmp 0x4128c7
cmp byte [esp + 0x16], bl
je 0x41288b
mov byte [esp + 0x34], bl
lea ecx, [esp + 0x10]
call fcn.00405410
mov dword [esp + 0x34], esi
cmp dword [esp + 0x1c], ebx
je 0x412887
push str.Wow64RevertWow64FsRedirection
push 0x4e955c
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x412887
mov edx, dword [esp + 0x18]
push edx
call eax
xor al, al
jmp 0x4128c7
mov byte [esp + 0x34], bl
lea ecx, [esp + 0x10]
call fcn.00405410
jmp 0x41289d
or esi, 0xffffffff
mov dword [esp + 0x34], esi
cmp dword [esp + 0x1c], ebx
je 0x4128c5
push str.Wow64RevertWow64FsRedirection
push 0x4e955c
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x4128c5
mov ecx, dword [esp + 0x18]
push ecx
call eax
mov al, 1
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.004a974c
add esp, 0x28
ret