Function at 0x4c2290
Capabilities:
Check if file exists
Get file attributes
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x54ec1e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x238
mov eax, dword [0x5ab980]
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x38], ebp
mov dword [esp + 0x14], eax
xor ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x250], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
push ebx
lea ecx, [esp + 0x78]
mov byte [esp + 0x254], 3
call fcn.0042d230
push fcn.005128e4
push 0x432ae0
push 6
lea eax, [esp + 0x48]
push 4
push eax
mov byte [esp + 0x264], 4
call fcn.004fa7f1
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push 0x80
push 3
push ebx
push ebx
push bind
push str.C:ABTXLOG
mov byte [esp + 0x26c], 5
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x4c23a5
push fcn.005128e4
push 6
lea ecx, [esp + 0x44]
push 4
push ecx
mov byte [esp + 0x260], 4
call fcn.004fa713
lea ecx, [esp + 0x74]
mov byte [esp + 0x250], 3
call fcn.0042d3e0
lea ecx, [esp + 0x18]
mov byte [esp + 0x250], 2
call fcn.005128e4
lea ecx, [esp + 0x10]
mov byte [esp + 0x250], 1
call fcn.005128e4
lea ecx, [esp + 0x20]
mov byte [esp + 0x250], bl
call fcn.005128e4
lea ecx, [esp + 0x14]
mov dword [esp + 0x250], edi
call fcn.005128e4
or eax, edi
jmp 0x4c28ab
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push str.C:ABUNDO32.TXT
call esi
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
jne 0x4c244c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push fcn.005128e4
push 6
lea edx, [esp + 0x44]
push 4
push edx
mov byte [esp + 0x260], 4
call fcn.004fa713
lea ecx, [esp + 0x74]
mov byte [esp + 0x250], 3
call fcn.0042d3e0
lea ecx, [esp + 0x18]
mov byte [esp + 0x250], 2
call fcn.005128e4
lea ecx, [esp + 0x10]
mov byte [esp + 0x250], 1
call fcn.005128e4
lea ecx, [esp + 0x20]
mov byte [esp + 0x250], 0
call fcn.005128e4
lea ecx, [esp + 0x14]
mov dword [esp + 0x250], 0xffffffff
call fcn.005128e4
mov eax, 0xfffffffe
jmp 0x4c28ab
mov eax, dword [esp + 0x258]
lea ecx, [esp + 0x74]
push eax
call fcn.0042d520
push 1
lea ecx, [esp + 0x78]
call fcn.0042da00
push str.Building_Undo_Script
lea ecx, [esp + 0x78]
call fcn.0042d700
lea ecx, [esp + 0x54]
mov dword [esp + 0x1c], ebx
push ecx
push edi
mov ecx, ebp
or ebx, 0xffffffff
call fcn.004c02a0
mov esi, eax
cmp esi, 1
jl 0x4c24d8
cmp byte [esp + 0x5c], 1
je 0x4c24cf
lea edx, [esp + 0x54]
mov ecx, ebp
push edx
push edi
call fcn.004c01d0
mov esi, eax
cmp esi, 1
jl 0x4c24d8
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x58]
lea eax, [esp + 0x54]
inc esi
push eax
push edi
mov ecx, ebp
mov dword [esp + 0x24], esi
call fcn.004c02a0
mov esi, eax
cmp esi, 1
jge 0x4c2491
jmp 0x4c24d8
cmp esi, 1
jge 0x4c2599
mov ecx, dword [0x5ab980]
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x250], 6
test eax, eax
push eax
jbe 0x4c24ff
lea edx, [esp + 0x2c]
push str.Log_File_is_damaged._Can_only_undo__d_items.
push edx
jmp 0x4c2509
lea eax, [esp + 0x2c]
push str.Log_File_is_damaged._No_items_were_recovered.
push eax
call fcn.0050e6c7
add esp, 0xc
lea ecx, [esp + 0x2c]
push str.Do_you_want_to_continue_building_the_UNDO_script_
call fcn.00512952
lea ecx, [esp + 0x30]
push 0x4fda
push ecx
mov byte [esp + 0x258], 7
call fcn.00422640
push 0
push 0x31
push eax
lea edx, [esp + 0x3c]
lea eax, [esp + 0x40]
push edx
push eax
mov byte [esp + 0x26c], 8
call fcn.0042e160
add esp, 0x1c
lea ecx, [esp + 0x30]
mov ebp, eax
mov byte [esp + 0x250], 7
call fcn.005128e4
lea ecx, [esp + 0x2c]
mov byte [esp + 0x250], 6
call fcn.005128e4
cmp ebp, 1
mov byte [esp + 0x250], 5
lea ecx, [esp + 0x28]
je 0x4c2594
call fcn.005128e4
jmp 0x4c2826
call fcn.005128e4
mov ecx, dword [esp + 0x260]
push str.WININIT.INI
lea edx, [esp + 0x34]
push ecx
push edx
call fcn.00512b79
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x254], 9
call fcn.00512a1d
lea ecx, [esp + 0x30]
mov byte [esp + 0x250], 5
call fcn.005128e4
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 0xffffffff
je 0x4c262e
mov ecx, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x78]
call fcn.0042d7a0
lea ecx, [esp + 0x74]
call fcn.0042da30
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push str.DEL__s_r_n
push eax
call fcn.0050e6c7
mov eax, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x34]
mov ecx, dword [eax - 8]
push 0
push edx
push ecx
push eax
mov eax, dword [esp + 0x34]
push eax
call ebp
push 0x5668
lea ecx, [esp + 0x18]
call fcn.00517fef
mov ecx, dword [esp + 0x14]
push ecx
lea ecx, [esp + 0x78]
call fcn.0042d700
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x74]
push edx
push 0
call fcn.0042d8b0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x58], ebx
test eax, eax
mov dword [esp + 0x2c], 0
jle 0x4c2826
mov eax, dword [esp + 0x58]
test eax, eax
jl 0x4c281a
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x58]
push 0
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4c2821
mov ebx, dword [esp + 0x38]
lea ecx, [esp + 0x54]
push ecx
push edi
mov ecx, ebx
call fcn.004c02a0
mov esi, eax
cmp esi, 1
jl 0x4c2826
lea ecx, [esp + 0x74]
call fcn.0042da30
mov al, byte [esp + 0x5c]
test al, al
jne 0x4c2803
lea edx, [esp + 0x3c]
lea eax, [esp + 0x54]
push edx
push eax
push edi
mov ecx, ebx
call fcn.004c0150
mov esi, eax
cmp esi, 1
jl 0x4c2826
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx - 8]
test eax, eax
je 0x4c2803
mov eax, dword [esp + 0x5d]
and eax, 0xff
dec eax
je 0x4c27b9
dec eax
je 0x4c2791
dec eax
jne 0x4c2803
lea edx, [esp + 0x40]
lea ecx, [esp + 0x10]
push edx
call fcn.00512a1d
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x74]
push eax
call fcn.0042d7a0
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00512a1d
mov edx, dword [esp + 0x18]
mov eax, dword [edx - 8]
test eax, eax
jne 0x4c2773
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
call fcn.00512a1d
mov ecx, dword [esp + 0x25c]
mov eax, dword [ecx]
lea ecx, [esp + 0x18]
push eax
push 3
call fcn.0050df1d
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x1c]
push str.move__s__s_r_n
push ecx
call fcn.0050e6c7
add esp, 0x10
jmp 0x4c27ec
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x14]
call fcn.00512a1d
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x74]
push edx
call fcn.0042d7a0
mov eax, dword [esp + 0x10]
push eax
push str.DEL__s_r_n
jmp 0x4c27df
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x24]
call fcn.00512a1d
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x74]
push edx
call fcn.0042d7a0
mov eax, dword [esp + 0x20]
push eax
push str.RD__s_r_n
lea ecx, [esp + 0x1c]
push ecx
call fcn.0050e6c7
add esp, 0xc
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x34]
push 0
push edx
mov ecx, dword [eax - 8]
push ecx
push eax
mov eax, dword [esp + 0x34]
push eax
call ebp
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
inc eax
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x4c2672
jmp 0x4c2826
mov esi, 0xfffffff6
jmp 0x4c2826
mov esi, 0xfffffff5
mov ecx, dword [esp + 0x24]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call ebp
push edi
call ebp
push fcn.005128e4
push 6
lea edx, [esp + 0x44]
push 4
push edx
mov byte [esp + 0x260], 4
call fcn.004fa713
lea ecx, [esp + 0x74]
mov byte [esp + 0x250], 3
call fcn.0042d3e0
lea ecx, [esp + 0x18]
mov byte [esp + 0x250], 2
call fcn.005128e4
lea ecx, [esp + 0x10]
mov byte [esp + 0x250], 1
call fcn.005128e4
lea ecx, [esp + 0x20]
mov byte [esp + 0x250], 0
call fcn.005128e4
lea ecx, [esp + 0x14]
mov dword [esp + 0x250], 0xffffffff
call fcn.005128e4
mov eax, esi
mov ecx, dword [esp + 0x248]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x244
ret 0xc