Function at 0x497eca
Capabilities:
Delete file
Get file size
Move file
Write file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x20]
mov ebx, ecx
push esi
push edi
lea edi, [ebx + 0xc]
mov ecx, dword [edi]
test ecx, ecx
je 0x497eeb
push dword [ebx + 0x18]
mov eax, dword [ecx]
push ebp
push 1
call dword [eax + 0xc]
mov ecx, edi
call fcn.004a2a45
test al, al
je 0x497f00
mov eax, 0xe0000008
jmp 0x4980f7
mov esi, dword [esp + 0x2c]
test ebp, ebp
je 0x497f22
cmp ebp, esi
jne 0x497f22
mov ecx, dword [edi]
test ecx, ecx
je 0x497f1b
mov eax, dword [ecx]
push 0
push 1
call dword [eax + 0x10]
xor eax, eax
jmp 0x4980f7
lea ecx, [ebx + 0x1c]
xor dl, dl
push 0
call fcn.00471b90
mov ebp, eax
pop ecx
test ebp, ebp
je 0x497f47
push 0
push ebp
push ecx
mov ecx, edi
call fcn.004a2a29
mov eax, ebp
jmp 0x4980f7
push esi
mov ecx, ebx
call fcn.004982c1
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x497f83
mov ecx, edi
call fcn.004a2a45
test al, al
je 0x497f6b
mov esi, 0xe0000008
jmp 0x4980ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
mov esi, eax
push esi
push ecx
mov ecx, edi
call fcn.004a2a29
jmp 0x4980ee
mov ecx, dword [edi]
test esi, esi
je 0x497f90
test ecx, ecx
je 0x497f9b
push esi
jmp 0x497f96
test ecx, ecx
je 0x497f9b
push 0
mov eax, dword [ecx]
call dword [eax + 0x1c]
and dword [esp + 0x2c], 0
lea ecx, [esp + 0x2c]
push 0xc800
call fcn.0044ec3e
lea eax, [esp + 0x14]
mov ecx, ebx
push eax
push dword [ebx + 4]
call fcn.004987a9
and dword [esp + 0x10], 0
mov esi, eax
test esi, esi
jne 0x498085
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x498058
mov edx, 0xc800
cmp ecx, edx
mov eax, edx
cmovb eax, ecx
lea ecx, [esp + 0x10]
push ecx
push eax
push dword [esp + 0x34]
mov ecx, ebx
push dword [ebx + 4]
call fcn.0049870d
mov esi, eax
test esi, esi
jne 0x498085
cmp dword [esp + 0x10], eax
je 0x498058
push eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x18]
push dword [esp + 0x38]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x498101
mov ecx, dword [edi]
test ecx, ecx
je 0x498034
mov eax, dword [ecx]
push dword [esp + 0x18]
call dword [eax + 0x1c]
lea eax, [ebx + 0x38]
mov ecx, edi
push eax
call fcn.004a2a5c
mov ecx, edi
call fcn.004a2a45
test al, al
je 0x497fae
mov esi, 0xe0000008
jmp 0x4980e0
mov esi, dword [esp + 0x28]
test esi, esi
je 0x49810b
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, esi
jae 0x49810b
cmp byte [ebx + 0x88], 0
jne 0x4980ae
mov esi, 0xe000000f
jmp 0x4980d5
cmp esi, 0x2ee2
je 0x4980a5
cmp esi, 0x2efe
je 0x4980a5
cmp esi, 0x2eff
je 0x4980a5
cmp esi, 0x2f83
jne 0x4980cd
cmp byte [ebx + 0x88], 0
je 0x4980cd
lea eax, [esp + 0x28]
mov ecx, ebx
push eax
push dword [esp + 0x28]
push ebp
push dword [esp + 0x2c]
call fcn.00498665
mov esi, eax
test esi, esi
je 0x497fae
cmp esi, 0xe0000008
je 0x4980e0
push 0
push esi
push ecx
mov ecx, edi
call fcn.004a2a29
push dword [esp + 0x2c]
call fcn.004d0771
pop ecx
test ebp, ebp
je 0x4980f5
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4980d5
test ebp, ebp
je 0x498118
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebx + 0x18]
push dword [ebx + 0x1c]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x498101
mov ecx, dword [edi]
test ecx, ecx
je 0x498140
mov eax, dword [ecx]
push 0
push 1
call dword [eax + 0x10]
xor esi, esi
jmp 0x4980e0