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

Disassembly:
push 0xffffffffffffffff
push 0x43efab
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 0x41288f
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.00412f10
add esp, 0x14
jmp 0x412c59
push 0x8000
call fcn.00413bd6
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.00413be1
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4128d2
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 [0x44802c]
mov eax, dword [0x448030]
push 0x208
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], ecx
mov cx, word [0x448034]
lea edx, [esp + 0x48]
push 0
push edx
mov dword [esp + 0x48], eax
mov word [esp + 0x4c], cx
call fcn.004253a0
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 0x412932
mov al, byte [0x453d0c]
cmp al, 6
jne 0x41296f
lea eax, [esp + 0x44]
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x412950
mov ecx, dword [str..ldres]
mov dx, word [0x448fc8]
mov dword [eax], ecx
mov cl, byte [0x448fca]
jmp 0x4129bd
cmp al, 8
lea eax, [esp + 0x44]
jne 0x41299e
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x412978
mov edx, dword [str..ldres]
mov cx, word [0x448fc8]
mov dword [eax], edx
mov dl, byte [0x448fca]
mov word [eax + 4], cx
mov byte [eax + 6], dl
jmp 0x4129c4
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4129a0
mov ecx, dword [str..ldtmp]
mov dx, word [0x448fd0]
mov dword [eax], ecx
mov cl, byte [0x448fd2]
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 0x447ed4
push edx
call fcn.004228cf
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 0x412c07
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.0042303e
add esp, 4
test eax, eax
jne 0x412b39
jmp 0x412a54
mov esi, dword [esp + 0x20]
mov edi, 0x8000
push edi
push 0
push esi
call fcn.004253a0
add esp, 0xc
cmp dword [esp + 0x28], 0
jl 0x412a74
jg 0x412a78
cmp dword [esp + 0x24], edi
ja 0x412a78
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push edx
push edi
push 1
push esi
call fcn.00423346
mov esi, eax
add esp, 0x10
cmp esi, edi
jne 0x412b1f
mov eax, dword [esp + 0x26c]
and eax, 2
mov dword [esp + 0x258], 0
cmp al, 2
jne 0x412ada
mov edi, dword [esp + 0x20]
push esi
lea eax, [esp + 0x38]
call fcn.00413420
add esp, 4
push ebx
push esi
mov ecx, edi
push 1
push ecx
call fcn.00422fbc
add esp, 0x10
cmp esi, eax
je 0x412aef
mov dword [esp + 0x1c], 0xfffffffd
jmp 0x412b39
mov edx, dword [esp + 0x20]
push ebx
push esi
push 1
push edx
call fcn.00422fbc
add esp, 0x10
cmp eax, esi
jne 0x412b31
mov ecx, dword [esp + 0x24]
sub ecx, eax
sbb dword [esp + 0x28], 0
mov dword [esp + 0x24], ecx
test ecx, ecx
jne 0x412b08
cmp dword [esp + 0x28], ecx
je 0x412b39
mov eax, dword [esp + 0x2c]
push eax
call fcn.0042303e
add esp, 4
test eax, eax
je 0x412a50
jmp 0x412b39
mov dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0x258], 0
jmp 0x412b39
mov dword [esp + 0x1c], 0xfffffffc
push ebx
call fcn.0042295d
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 0x412bf8
push 2
push ebp
call dword [sym.imp.KERNEL32.dll__lopen]
mov esi, eax
test esi, esi
je 0x412bf8
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.00413bcb
add esp, 4
jmp 0x412c2e
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 0x412c55
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.00421f05
add esp, 0x248
ret