Function at 0x4087a0
Capabilities:
Check if file exists
Delete file
Get file attributes
Get file size
Read file on windows
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42bed5
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x438040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x14], esi
mov edx, ecx
lea ecx, [ebp - 0x18]
push 0x433f24
call fcn.00402e00
mov edx, eax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.0040eca0
add esp, 4
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40880f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
je 0x4089a1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4089a1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], vtable.CFile.0
push 0
push 0x80
push 4
push 0
push 0
push 0x80000000
mov byte [ebp - 4], 4
push dword [ebp - 0x10]
call edi
mov edi, eax
mov dword [ebp - 0x24], edi
cmp edi, 0xffffffff
je 0x4088d2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov eax, 0xc907da4f
mul ecx
mov ebx, edx
shr ebx, 9
imul eax, ebx, 0x28c
mov dword [ebp - 0x18], eax
sub ecx, eax
je 0x4088e9
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
mov esi, dword [ebp - 0x10]
test eax, eax
mov eax, 0xffffffff
push esi
cmovg edi, eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4088d2
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4088d2
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor bl, bl
cmp edi, 0xffffffff
je 0x4089ad
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4089ad
mov ecx, dword [esi + 4]
mov eax, ecx
sub eax, dword [esi]
sar eax, 2
imul edx, eax, 0x451ab30b
mov dword [ebp - 0x1c], ecx
cmp ebx, edx
jae 0x40890a
mov eax, dword [esi]
add eax, dword [ebp - 0x18]
mov dword [esi + 4], eax
jmp 0x40894c
jbe 0x40894c
mov eax, dword [esi + 8]
sub eax, dword [esi]
sar eax, 2
imul eax, eax, 0x451ab30b
cmp ebx, eax
jbe 0x408929
push ecx
push ebx
mov ecx, esi
call fcn.0040f390
jmp 0x40894c
mov eax, ebx
sub eax, edx
je 0x408949
imul esi, eax, 0x28c
push esi
push 0
push ecx
call fcn.00411750
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
add ecx, esi
mov esi, dword [ebp - 0x14]
mov dword [esi + 4], ecx
test ebx, ebx
jle 0x408983
xor esi, esi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
add eax, esi
cmp edi, 0xffffffff
je 0x408978
push 0
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push ecx
push 0x28c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
add esi, 0x28c
sub ebx, 1
jne 0x408952
cmp edi, 0xffffffff
je 0x40899a
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
test eax, eax
mov eax, 0xffffffff
cmovg edi, eax
mov bl, 1
jmp 0x4088d4
mov eax, dword [esi]
cmp eax, dword [esi + 4]
je 0x4089ab
mov dword [esi + 4], eax
mov bl, 1
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4089cf
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret