Function at 0x412870
Capabilities:
Delete file
Get file attributes
Move file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x43f00b
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x44fb64]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44fb64]
xor eax, esp
push eax
lea eax, [esp + 0x250]
mov dword fs:[0], eax
mov eax, dword [esp + 0x26c]
mov ebp, dword [esp + 0x260]
mov edi, edx
mov edx, eax
and edx, 1
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], ecx
cmp dl, 1
jne 0x4128ef
push eax
mov eax, dword [esp + 0x26c]
push ecx
mov ecx, dword [esp + 0x26c]
push eax
push ecx
push ebp
mov ecx, edi
call fcn.00412f70
add esp, 0x14
jmp 0x412cb9
push 0x8000
call fcn.00413c36
mov edx, dword [esp + 0x268]
mov esi, eax
mov eax, dword [esp + 0x26c]
add esp, 4
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
call fcn.00413c41
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x412932
push 0x80004005
call fcn.0040a000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x258], 0
mov ecx, dword [str.Tipray_LdSafe]
mov edx, dword [0x447f8c]
mov eax, dword [0x447f90]
push 0x208
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], ecx
mov cx, word [0x447f94]
lea edx, [esp + 0x48]
push 0
push edx
mov dword [esp + 0x48], eax
mov word [esp + 0x4c], cx
call fcn.00425400
lea edx, [esp + 0x50]
add esp, 0xc
mov eax, ebp
sub edx, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x412992
mov al, byte [0x453d0c]
cmp al, 6
jne 0x4129cf
lea eax, [esp + 0x44]
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4129b0
mov ecx, dword [str..ldres]
mov dx, word [0x448f40]
mov dword [eax], ecx
mov cl, byte [0x448f42]
jmp 0x412a1d
cmp al, 8
lea eax, [esp + 0x44]
jne 0x4129fe
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4129d8
mov edx, dword [str..ldres]
mov cx, word [0x448f40]
mov dword [eax], edx
mov dl, byte [0x448f42]
mov word [eax + 4], cx
mov byte [eax + 6], dl
jmp 0x412a24
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x412a00
mov ecx, dword [str..ldtmp]
mov dx, word [0x448f48]
mov dword [eax], ecx
mov cl, byte [0x448f4a]
mov word [eax + 4], dx
mov byte [eax + 6], cl
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x1c]
push str.SplitFile_szTmpFile__s__
push eax
call fcn.00409910
mov ecx, dword [esp + 0x24]
add esp, 0xc
push 0
push ecx
push 0x453d11
call fcn.0040d890
lea edx, [esp + 0x44]
push 0x447e34
push edx
call fcn.0042292f
add esp, 8
mov ebx, eax
mov dword [esp + 0x1c], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebp
lea eax, [esp + 0x20]
test ebx, ebx
je 0x412c67
push str.SplitFile_fopen__path__s__GetLastError__d_
push eax
call fcn.00409910
mov ecx, dword [esp + 0x28]
add esp, 0x10
push 0
push ecx
push 0x453d11
call fcn.0040d890
push edi
call fcn.0042309e
add esp, 4
test eax, eax
jne 0x412b99
jmp 0x412ab4
mov esi, dword [esp + 0x20]
mov edi, 0x8000
push edi
push 0
push esi
call fcn.00425400
add esp, 0xc
cmp dword [esp + 0x28], 0
jl 0x412ad4
jg 0x412ad8
cmp dword [esp + 0x24], edi
ja 0x412ad8
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push edx
push edi
push 1
push esi
call fcn.004233a6
mov esi, eax
add esp, 0x10
cmp esi, edi
jne 0x412b7f
mov eax, dword [esp + 0x26c]
and eax, 2
mov dword [esp + 0x258], 0
cmp al, 2
jne 0x412b3a
mov edi, dword [esp + 0x20]
push esi
lea eax, [esp + 0x38]
call fcn.00413480
add esp, 4
push ebx
push esi
mov ecx, edi
push 1
push ecx
call fcn.0042301c
add esp, 0x10
cmp esi, eax
je 0x412b4f
mov dword [esp + 0x1c], 0xfffffffd
jmp 0x412b99
mov edx, dword [esp + 0x20]
push ebx
push esi
push 1
push edx
call fcn.0042301c
add esp, 0x10
cmp eax, esi
jne 0x412b91
mov ecx, dword [esp + 0x24]
sub ecx, eax
sbb dword [esp + 0x28], 0
mov dword [esp + 0x24], ecx
test ecx, ecx
jne 0x412b68
cmp dword [esp + 0x28], ecx
je 0x412b99
mov eax, dword [esp + 0x2c]
push eax
call fcn.0042309e
add esp, 4
test eax, eax
je 0x412ab0
jmp 0x412b99
mov dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0x258], 0
jmp 0x412b99
mov dword [esp + 0x1c], 0xfffffffc
push ebx
call fcn.004229bd
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and eax, 0xfffffffe
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebp
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
push ebp
lea ecx, [esp + 0x20]
push str.SplitFile_DeleteFile__s__GetLastError__d_
push ecx
call fcn.00409910
mov edx, dword [esp + 0x28]
add esp, 0x10
push 0
push edx
push 0x453d11
call fcn.0040d890
push 1
push ebp
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
call edi
push eax
push ebp
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x24]
push str.SplitFile_MoveFileEx__s_To__s__GetLastError__d_
push edx
call fcn.00409910
mov edi, dword [esp + 0x2c]
add esp, 0x14
push 0
push edi
push 0x453d11
call fcn.0040d890
lea eax, [esp + 0x44]
push eax
call esi
cmp dword [esp + 0x1c], 1
jne 0x412c58
push 2
push ebp
call dword [sym.imp.KERNEL32.dll__lopen]
mov esi, eax
test esi, esi
je 0x412c58
mov ecx, dword [esp + 0x30]
push ecx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
mov edx, dword [esp + 0x20]
push edx
call fcn.00413c2b
add esp, 4
jmp 0x412c8e
push str.fopen_error_path:_s_Error_code:__d
push eax
call fcn.00409910
mov edi, dword [esp + 0x28]
add esp, 0x10
push 0
push edi
push 0x453d11
call fcn.0040d890
mov dword [esp + 0x1c], 0
lea eax, [edi - 0x10]
mov dword [esp + 0x258], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412cb5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x250]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.00421f65
add esp, 0x248
ret