Function at 0x40beb0
Capabilities:
Delete file
Move file
Print debug messages
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x439e9b
mov eax, dword fs:[0]
push eax
sub esp, 0x16c
mov eax, dword [0x449cd0]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x449cd0]
xor eax, esp
push eax
lea eax, [esp + 0x180]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x1a0]
mov esi, dword [esp + 0x190]
mov edi, dword [esp + 0x194]
mov ebx, dword [esp + 0x19c]
mov eax, ebp
and eax, 1
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x28], ebx
cmp al, 1
jne 0x40bf40
push str._SplitFile_OldSplitFile
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0x198]
push ebp
push ebx
push ecx
push edi
push esi
call fcn.0040ba10
add esp, 0x14
jmp 0x40c228
push 0x8000
call fcn.0040f12f
mov esi, dword [esp + 0x19c]
add esp, 4
mov ebp, eax
mov dword [esp + 0x20], esi
call fcn.00410194
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40bf74
push 0x80004005
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov ecx, dword [str.Tipray_LdSafe]
mov edx, dword [0x43b568]
mov eax, dword [0x43b56c]
push 0x140
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], ecx
mov cx, word [0x43b570]
lea edx, [esp + 0x40]
push 0
push edx
mov dword [esp + 0x194], 0
mov dword [esp + 0x40], eax
mov word [esp + 0x44], cx
call fcn.0041ec20
lea edx, [esp + 0x48]
add esp, 0xc
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40bfd4
mov al, byte [0x44b3c4]
cmp al, 6
jne 0x40c00f
lea eax, [esp + 0x3c]
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40bff0
mov ecx, dword [str..ldres]
mov dx, word [0x43c1d4]
mov dword [eax], ecx
mov cl, byte [0x43c1d6]
jmp 0x40c05d
cmp al, 8
lea eax, [esp + 0x3c]
jne 0x40c03e
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40c018
mov edx, dword [str..ldres]
mov cx, word [0x43c1d4]
mov dword [eax], edx
mov dl, byte [0x43c1d6]
mov word [eax + 4], cx
mov byte [eax + 6], dl
jmp 0x40c064
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40c040
mov ecx, dword [str..ldtmp]
mov dx, word [0x43c1cc]
mov dword [eax], ecx
mov cl, byte [0x43c1ce]
mov word [eax + 4], dx
mov byte [eax + 6], cl
lea edx, [esp + 0x3c]
push 0x43b580
push edx
call fcn.0041e83b
add esp, 8
mov ebx, eax
mov dword [esp + 0x14], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
test ebx, ebx
je 0x40c1ce
lea eax, [esp + 0x24]
push str.fopen__path:_s
push eax
call fcn.00401ce0
mov ecx, dword [esp + 0x2c]
add esp, 0x10
push 0
push ecx
mov ecx, 0x44b3c5
call fcn.0040aa20
mov edx, dword [esp + 0x24]
push edx
call fcn.0041e452
add esp, 4
test eax, eax
jne 0x40c189
jmp 0x40c0d4
mov esi, dword [esp + 0x20]
push 0x8000
push 0
push ebp
call fcn.0041ec20
add esp, 0xc
mov edi, 0x8000
cmp esi, 0x8000
ja 0x40c0f3
mov edi, esi
mov eax, dword [esp + 0x24]
push eax
push edi
push 1
push ebp
call fcn.0041e75a
mov esi, eax
add esp, 0x10
cmp esi, edi
jne 0x40c16f
mov ecx, dword [esp + 0x1a0]
xor edi, edi
and ecx, 2
mov dword [esp + 0x188], edi
cmp cl, 2
jne 0x40c141
push 0xd
lea edx, [esp + 0x30]
push edx
push esi
push ebp
call fcn.0040ee70
push ebx
push esi
push 1
push ebp
call fcn.0041e3d0
add esp, 0x20
cmp esi, eax
jmp 0x40c150
push ebx
push esi
push 1
push ebp
call fcn.0041e3d0
add esp, 0x10
cmp eax, esi
jne 0x40c181
sub dword [esp + 0x20], eax
je 0x40c185
mov eax, dword [esp + 0x24]
push eax
call fcn.0041e452
add esp, 4
test eax, eax
je 0x40c0d0
jmp 0x40c185
mov dword [esp + 0x14], 0
mov byte [esp + 0x188], 0
jmp 0x40c185
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x18]
push ebx
call fcn.0041e1f2
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 4
push edi
call esi
push edi
lea ecx, [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
lea edx, [esp + 0x3c]
push edx
call esi
cmp dword [esp + 0x14], 0
je 0x40c1c3
mov eax, dword [esp + 0x28]
push eax
push edi
call fcn.00407c50
add esp, 8
push ebp
call fcn.0040f13a
add esp, 4
jmp 0x40c1f9
lea ecx, [esp + 0x24]
push str.fopen_error_path:_s_Error_code:__d
push ecx
call fcn.00401ce0
mov edx, dword [esp + 0x2c]
add esp, 0x10
push 0
push edx
mov ecx, 0x44b3c5
call fcn.0040aa20
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x188], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c224
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.0041d4f4
add esp, 0x178
ret