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

Disassembly:
push 0x18
mov eax, 0x50a131
call fcn.004cc273
mov ebx, ecx
mov esi, dword [ebp + 0x10]
lea edi, [ebx + 0xc]
mov ecx, dword [edi]
test ecx, ecx
je 0x498096
push dword [ebx + 0x18]
mov eax, dword [ecx]
push esi
push 1
call dword [eax + 0xc]
mov ecx, edi
call fcn.0049c0ed
test al, al
je 0x4980ab
mov eax, 0xe0000008
jmp 0x4982e3
test esi, esi
je 0x4980ca
cmp esi, dword [ebp + 0x14]
jne 0x4980ca
mov ecx, dword [edi]
test ecx, ecx
je 0x4980c3
mov eax, dword [ecx]
push 0
push 1
call dword [eax + 0x10]
xor eax, eax
jmp 0x4982e3
lea ecx, [ebx + 0x1c]
xor dl, dl
push 0
call fcn.00475160
mov esi, eax
pop ecx
test esi, esi
je 0x4980f6
mov ecx, dword [edi]
test ecx, ecx
je 0x4982e1
mov edx, dword [ecx]
push 0
push esi
push 0
call dword [edx + 0x28]
jmp 0x4982e1
mov esi, dword [ebp + 0x14]
mov ecx, ebx
push esi
call fcn.004984c4
mov dword [ebp - 0x24], eax
and dword [ebp - 0x20], 0
and dword [ebp - 4], 0
cmp eax, 0xffffffff
jne 0x498147
mov ecx, edi
call fcn.0049c0ed
test al, al
je 0x498126
mov esi, 0xe0000008
jmp 0x4982cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi]
mov esi, eax
test ecx, ecx
je 0x4982cb
mov eax, dword [ecx]
push 0
push esi
push 0
call dword [eax + 0x28]
jmp 0x4982cb
mov ecx, dword [edi]
test esi, esi
je 0x498154
test ecx, ecx
je 0x49815f
push esi
jmp 0x49815a
test ecx, ecx
je 0x49815f
push 0
mov eax, dword [ecx]
call dword [eax + 0x1c]
and dword [ebp + 0x14], 0
push 0xc800
lea ecx, [ebp + 0x14]
mov byte [ebp - 4], 1
call fcn.00489bf4
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
push dword [ebx + 4]
call fcn.004989d5
and dword [ebp - 0x14], 0
mov esi, eax
test esi, esi
jne 0x49825b
cmp dword [ebp - 0x10], eax
jbe 0x498225
mov edx, 0xc800
mov dword [ebp - 0x18], edx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x10]
cmp dword [ebp - 0x10], edx
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 1
cmovbe eax, ecx
lea ecx, [ebp - 0x14]
push ecx
mov ecx, ebx
push dword [eax]
push dword [ebp + 0x14]
push dword [ebx + 4]
call fcn.00498939
mov esi, eax
test esi, esi
jne 0x49825b
cmp dword [ebp - 0x14], eax
je 0x498225
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
push dword [ebp + 0x14]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4982eb
mov ecx, dword [edi]
test ecx, ecx
je 0x498201
mov eax, dword [ecx]
push dword [ebp - 0x1c]
call dword [eax + 0x1c]
lea eax, [ebx + 0x38]
mov ecx, edi
push eax
call fcn.0049c104
mov ecx, edi
call fcn.0049c0ed
test al, al
je 0x498174
mov esi, 0xe0000008
jmp 0x4982ba
cmp dword [ebp + 0x10], 0
mov esi, dword [ebp - 0x24]
jbe 0x4982fc
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [ebp + 0x10]
jae 0x4982fc
cmp byte [ebx + 0x88], 0
je 0x4982f5
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
push esi
jmp 0x49828e
cmp esi, 0x2ee2
je 0x49827b
cmp esi, 0x2efe
je 0x49827b
cmp esi, 0x2eff
je 0x49827b
cmp esi, 0x2f83
jne 0x4982a2
cmp byte [ebx + 0x88], 0
je 0x4982a2
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x24]
push dword [ebp + 8]
mov ecx, ebx
call fcn.0049889a
mov esi, eax
test esi, esi
je 0x498174
cmp esi, 0xe0000008
je 0x4982ba
mov ecx, dword [edi]
test ecx, ecx
je 0x4982ba
mov eax, dword [ecx]
push 0
push esi
push 0
call dword [eax + 0x28]
mov byte [ebp - 4], 0
push dword [ebp + 0x14]
call fcn.004cbcfc
and dword [ebp + 0x14], 0
pop ecx
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4982e1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 0x24], 0
mov eax, esi
call fcn.004cc23c
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4982aa
mov esi, 0xe000000f
jmp 0x4982aa
test esi, esi
je 0x49830c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov dword [ebp - 0x24], esi
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 0x4982eb
mov ecx, dword [edi]
test ecx, ecx
je 0x498334
mov eax, dword [ecx]
push 0
push 1
call dword [eax + 0x10]
xor esi, esi
jmp 0x4982ba