Function at 0x4c0390
Capabilities:
Check if file exists
Check os version
Copy file
Delete directory
Delete file
Get file attributes
Set file attributes
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x54ea00
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2d8
mov eax, dword [0x5ab980]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x10], eax
xor ebp, ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x2f0], ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
push ebp
lea ecx, [esp + 0x84]
mov byte [esp + 0x2f4], 3
call fcn.0042d230
push fcn.005128e4
push 0x432ae0
push 6
lea eax, [esp + 0x54]
push 4
push eax
mov byte [esp + 0x304], 4
call fcn.004fa7f1
lea ecx, [esp + 0x254]
mov byte [esp + 0x2f0], 5
push ecx
mov dword [esp + 0x258], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x4c04af
push fcn.005128e4
push 6
lea edx, [esp + 0x50]
push 4
push edx
mov byte [esp + 0x300], 4
call fcn.004fa713
lea ecx, [esp + 0x80]
mov byte [esp + 0x2f0], 3
call fcn.0042d3e0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2f0], 2
call fcn.005128e4
lea ecx, [esp + 0x14]
mov byte [esp + 0x2f0], 1
call fcn.005128e4
lea ecx, [esp + 0x28]
mov byte [esp + 0x2f0], 0
call fcn.005128e4
lea ecx, [esp + 0x10]
mov dword [esp + 0x2f0], 0xffffffff
call fcn.005128e4
mov eax, 0xfffffffd
jmp 0x4c0dbb
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebp
push 0x80
push 3
push ebp
push ebp
push bind
push str.C:ABTXLOG
call esi
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x38], ebx
jne 0x4c054f
push fcn.005128e4
push 6
lea eax, [esp + 0x50]
push 4
push eax
mov byte [esp + 0x300], 4
call fcn.004fa713
lea ecx, [esp + 0x80]
mov byte [esp + 0x2f0], 3
call fcn.0042d3e0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2f0], 2
call fcn.005128e4
lea ecx, [esp + 0x14]
mov byte [esp + 0x2f0], 1
call fcn.005128e4
lea ecx, [esp + 0x28]
mov byte [esp + 0x2f0], 0
call fcn.005128e4
lea ecx, [esp + 0x10]
mov dword [esp + 0x2f0], ebx
call fcn.005128e4
or eax, ebx
jmp 0x4c0dbb
push ebp
push 0x80
push 2
push ebp
push ebp
push 0x40000000
push str.C:ABUNDO32.LOG
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x4c05f3
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push fcn.005128e4
push 6
lea ecx, [esp + 0x50]
push 4
push ecx
mov byte [esp + 0x300], 4
call fcn.004fa713
lea ecx, [esp + 0x80]
mov byte [esp + 0x2f0], 3
call fcn.0042d3e0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2f0], 2
call fcn.005128e4
lea ecx, [esp + 0x14]
mov byte [esp + 0x2f0], 1
call fcn.005128e4
lea ecx, [esp + 0x28]
mov byte [esp + 0x2f0], 0
call fcn.005128e4
lea ecx, [esp + 0x10]
mov dword [esp + 0x2f0], edi
call fcn.005128e4
mov eax, 0xfffffffe
jmp 0x4c0dbb
mov edx, dword [esp + 0x2f8]
lea ecx, [esp + 0x80]
push edx
call fcn.0042d520
push 1
lea ecx, [esp + 0x84]
call fcn.0042da00
cmp dword [esp + 0x304], ebp
jne 0x4c066d
lea eax, [esp + 0x30]
push 0x5660
push eax
call fcn.00422640
add esp, 8
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x2f4], 6
call fcn.00512a1d
lea ecx, [esp + 0x30]
mov byte [esp + 0x2f0], 5
call fcn.005128e4
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x20]
push ebp
mov ecx, dword [eax - 8]
push edx
push ecx
push eax
push edi
call esi
jmp 0x4c0673
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x38], ebp
push ebx
or ebp, 0xffffffff
call fcn.004c02a0
cmp eax, 1
mov dword [esp + 0x1c], eax
jl 0x4c0706
mov ebx, 0x11
mov al, byte [esp + 0x68]
cmp al, 5
jne 0x4c06a7
cmp byte [esp + 0x69], bl
je 0x4c06f2
jmp 0x4c06ab
cmp al, 1
je 0x4c06fb
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x40]
push edx
call fcn.004c01d0
cmp eax, 1
mov dword [esp + 0x1c], eax
jl 0x4c0706
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov ebp, dword [esp + 0x64]
lea eax, [esp + 0x60]
push eax
inc edx
push ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x3c], edx
call fcn.004c02a0
cmp eax, 1
mov dword [esp + 0x1c], eax
jge 0x4c0697
jmp 0x4c0706
mov dword [esp + 0x1c], ebx
jmp 0x4c0d31
cmp dword [esp + 0x1c], 1
jge 0x4c07cd
mov edx, dword [0x5ab980]
mov dword [esp + 0x24], edx
mov eax, dword [esp + 0x34]
mov byte [esp + 0x2f0], 7
test eax, eax
push eax
jbe 0x4c072d
lea eax, [esp + 0x28]
push str.Log_File_is_damaged._Can_only_undo__d_items.
push eax
jmp 0x4c0737
lea ecx, [esp + 0x28]
push str.Log_File_is_damaged._No_items_were_recovered.
push ecx
call fcn.0050e6c7
add esp, 0xc
lea ecx, [esp + 0x30]
push str.Do_you_want_to_continue_with_the_UNDO_operation_
call fcn.00512952
lea edx, [esp + 0x2c]
mov bl, 8
push 0x4fda
push edx
mov byte [esp + 0x2f8], bl
call fcn.00422640
push 0
push 0x31
push eax
lea eax, [esp + 0x38]
lea ecx, [esp + 0x44]
push eax
push ecx
mov byte [esp + 0x30c], 9
call fcn.0042e160
add esp, 0x1c
lea ecx, [esp + 0x2c]
mov esi, eax
mov byte [esp + 0x2f0], bl
call fcn.005128e4
lea ecx, [esp + 0x30]
mov byte [esp + 0x2f0], 7
call fcn.005128e4
cmp esi, 1
mov byte [esp + 0x2f0], 5
lea ecx, [esp + 0x24]
je 0x4c07c2
call fcn.005128e4
jmp 0x4c0d31
call fcn.005128e4
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x300]
push str.WININIT.INI
lea eax, [esp + 0x30]
push edx
push eax
call fcn.00512b79
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x2f4], 0xa
call fcn.00512a1d
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2f0], 5
call fcn.005128e4
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp eax, 0xffffffff
je 0x4c08eb
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x80]
push edx
call fcn.0042d7a0
lea ecx, [esp + 0x80]
call fcn.0042da30
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push str.DEL__s
push ecx
call fcn.0050e6c7
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x20]
mov ecx, dword [eax - 8]
push 0
push edx
push ecx
push eax
push edi
call esi
push str.ok_r_n
lea ecx, [esp + 0x14]
call fcn.00512a6d
mov eax, dword [esp + 0x14]
push 0x80
push eax
call ebx
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4c08d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4c08d8
lea edx, [esp + 0x2c]
push eax
push edx
call fcn.004226f0
add esp, 8
mov eax, dword [eax]
lea ecx, [esp + 0x10]
push eax
push 0x565e
push ecx
mov byte [esp + 0x2fc], 0xb
call fcn.0050e6da
add esp, 0xc
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2f0], 5
call fcn.005128e4
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x20]
push 0
push edx
mov ecx, dword [eax - 8]
push ecx
push eax
push edi
call esi
push 0x5668
lea ecx, [esp + 0x14]
call fcn.00517fef
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x80]
push eax
call fcn.0042d700
mov ecx, dword [esp + 0x34]
push ecx
push 0
lea ecx, [esp + 0x88]
call fcn.0042d8b0
mov eax, dword [esp + 0x34]
mov dword [esp + 0x64], ebp
test eax, eax
mov dword [esp + 0x24], 0
jle 0x4c0d31
mov eax, dword [esp + 0x64]
test eax, eax
jl 0x4c0d1f
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x64]
mov ebp, dword [esp + 0x38]
push 0
push 0
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4c0d29
lea eax, [esp + 0x60]
push eax
push ebp
mov ebp, dword [esp + 0x44]
mov ecx, ebp
call fcn.004c02a0
cmp eax, 1
mov dword [esp + 0x1c], eax
jl 0x4c0d31
lea ecx, [esp + 0x80]
call fcn.0042da30
mov al, byte [esp + 0x68]
test al, al
jne 0x4c0d08
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x48]
lea edx, [esp + 0x60]
push ecx
push edx
push eax
mov ecx, ebp
call fcn.004c0150
cmp eax, 1
mov dword [esp + 0x1c], eax
jl 0x4c0d31
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx - 8]
test eax, eax
je 0x4c0d08
mov eax, dword [esp + 0x69]
and eax, 0xff
dec eax
je 0x4c0c39
dec eax
je 0x4c0b69
dec eax
jne 0x4c0d08
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x14]
push edx
call fcn.00512a1d
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x80]
push eax
call fcn.0042d7a0
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00512a1d
mov edx, dword [esp + 0x18]
mov eax, dword [edx - 8]
test eax, eax
jne 0x4c0a4c
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
call fcn.00512a1d
mov ecx, dword [esp + 0x2fc]
mov eax, dword [ecx]
lea ecx, [esp + 0x18]
push eax
push 3
call fcn.0050df1d
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x18]
push str._s____s
push ecx
call fcn.0050e6c7
mov eax, dword [esp + 0x20]
add esp, 0x10
lea edx, [esp + 0x20]
mov ecx, dword [eax - 8]
push 0
push edx
push ecx
push eax
push edi
call esi
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4c0a97
mov ecx, dword [esp + 0x14]
push 0x80
push ecx
call ebx
push str.ok_r_n
lea ecx, [esp + 0x14]
call fcn.00512a6d
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4c0cf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x4c0b10
cmp eax, 0x1f
jle 0x4c0ad4
cmp eax, 0x21
jle 0x4c0b10
lea ecx, [esp + 0x2c]
push eax
push ecx
call fcn.004226f0
add esp, 8
mov edx, dword [eax]
lea eax, [esp + 0x10]
push edx
push 0x565e
push eax
mov byte [esp + 0x2fc], 0xf
call fcn.0050e6da
add esp, 0xc
mov byte [esp + 0x2f0], 5
lea ecx, [esp + 0x2c]
jmp 0x4c0cf0
push 0x5b0738
lea ecx, [esp + 0x34]
call fcn.00512952
mov ecx, dword [esp + 0x264]
lea edx, [esp + 0x30]
push ecx
lea eax, [esp + 0x18]
push edx
lea ecx, [esp + 0x20]
push eax
push ecx
mov byte [esp + 0x300], 0xe
call fcn.00420660
add esp, 0x10
lea ecx, [esp + 0x30]
mov byte [esp + 0x2f0], 5
call fcn.005128e4
push 0x566a
lea ecx, [esp + 0x14]
call fcn.00517fef
jmp 0x4c0cf5
mov eax, dword [esp + 0x304]
test eax, eax
je 0x4c0d08
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x14]
push eax
call fcn.00512a1d
mov ecx, dword [esp + 0x14]
push ecx
lea ecx, [esp + 0x84]
call fcn.0042d7a0
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push edx
push str.DEL__s
push eax
call fcn.0050e6c7
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x20]
mov ecx, dword [eax - 8]
push 0
push edx
push ecx
push eax
push edi
call esi
mov eax, dword [esp + 0x14]
push 0x80
push eax
call ebx
push str.ok_r_n
lea ecx, [esp + 0x14]
call fcn.00512a6d
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4c0cf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4c0cf5
lea edx, [esp + 0x40]
push eax
push edx
call fcn.004226f0
add esp, 8
mov eax, dword [eax]
lea ecx, [esp + 0x10]
push eax
push 0x565e
push ecx
mov byte [esp + 0x2fc], 0xd
call fcn.0050e6da
add esp, 0xc
mov byte [esp + 0x2f0], 5
lea ecx, [esp + 0x40]
jmp 0x4c0cf0
mov eax, dword [esp + 0x304]
test eax, eax
je 0x4c0d08
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x28]
push eax
call fcn.00512a1d
mov ecx, dword [esp + 0x28]
push ecx
lea ecx, [esp + 0x84]
call fcn.0042d7a0
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x10]
push edx
push str.RD__s
push eax
call fcn.0050e6c7
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x20]
mov ecx, dword [eax - 8]
push 0
push edx
push ecx
push eax
push edi
call esi
push str.ok_r_n
lea ecx, [esp + 0x14]
call fcn.00512a6d
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x4c0cf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x4c0cf5
lea ecx, [esp + 0x44]
push eax
push ecx
call fcn.004226f0
add esp, 8
mov edx, dword [eax]
lea eax, [esp + 0x10]
push edx
push 0x565e
push eax
mov byte [esp + 0x2fc], 0xc
call fcn.0050e6da
add esp, 0xc
mov byte [esp + 0x2f0], 5
lea ecx, [esp + 0x44]
call fcn.005128e4
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x20]
push 0
push edx
mov ecx, dword [eax - 8]
push ecx
push eax
push edi
call esi
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
inc eax
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x4c0935
jmp 0x4c0d31
mov dword [esp + 0x1c], 0xfffffff6
jmp 0x4c0d31
mov dword [esp + 0x1c], 0xfffffff5
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
mov eax, dword [esp + 0x38]
push eax
call esi
push fcn.005128e4
push 6
lea ecx, [esp + 0x50]
push 4
push ecx
mov byte [esp + 0x300], 4
call fcn.004fa713
lea ecx, [esp + 0x80]
mov byte [esp + 0x2f0], 3
call fcn.0042d3e0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2f0], 2
call fcn.005128e4
lea ecx, [esp + 0x14]
mov byte [esp + 0x2f0], 1
call fcn.005128e4
lea ecx, [esp + 0x28]
mov byte [esp + 0x2f0], 0
call fcn.005128e4
lea ecx, [esp + 0x10]
mov dword [esp + 0x2f0], 0xffffffff
call fcn.005128e4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2e8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2e4
ret 0x10