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

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10
cmp eax, 0xffffffff
push ebx
push ebp
push esi
push edi
je 0x4b9ad6
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x4b9ad6
cmp word [ebx], 0
je 0x4b9ad6
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
test edi, edi
jl 0x4b9ad6
jg 0x4b98a4
test ebp, ebp
jb 0x4b9ad6
push ebx
call fcn.004b9330
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4b98e4
test al, 0x10
je 0x4b98d6
push 0x29c
push 4
call fcn.004b8630
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test al, 1
je 0x4b98e4
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x18], esi
jne 0x4b9921
push 0x2af
push 4
call fcn.004b8630
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push edi
push ebp
push esi
mov dword [esp + 0x28], 0
call fcn.004b9af0
add esp, 0xc
test eax, eax
je 0x4b9a8e
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, 0x10000
push esi
call fcn.008325b4
mov ebx, eax
xor eax, eax
add esp, 4
cmp ebx, eax
je 0x4b9a9f
cmp edi, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
jl 0x4b9a10
jg 0x4b9983
cmp ebp, eax
jbe 0x4b9a10
jmp 0x4b9983
mov edi, dword [esp + 0x30]
test edi, edi
jg 0x4b9993
jl 0x4b9991
cmp ebp, 0x10000
jae 0x4b9993
mov esi, ebp
sub ebp, esi
mov ecx, esi
sbb edi, 0
mov edx, ecx
mov dword [esp + 0x30], edi
xor eax, eax
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x24]
xor edi, edi
lea eax, [esp + 0x10]
push edi
push eax
push esi
push ebx
push ecx
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4b9a26
mov eax, dword [esp + 0x10]
cmp eax, esi
jb 0x4b9a40
lea edx, [esp + 0x14]
push edi
push edx
push eax
mov eax, dword [esp + 0x24]
push ebx
push eax
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b9a5a
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
cmp ecx, eax
jb 0x4b9a74
cmp dword [esp + 0x30], edi
jg 0x4b997f
jl 0x4b9a10
test ebp, ebp
ja 0x4b997f
push ebx
mov dword [esp + 0x20], 1
call fcn.008325dd
add esp, 4
jmp 0x4b9aae
push 0x2da
push 4
call fcn.004b8630
add esp, 8
push ebx
call fcn.008325dd
add esp, 4
jmp 0x4b9aae
push 0x2e0
push 4
call fcn.004b8630
add esp, 8
push ebx
call fcn.008325dd
add esp, 4
jmp 0x4b9aae
push 0x2e8
push 4
call fcn.004b8630
add esp, 8
push ebx
call fcn.008325dd
add esp, 4
jmp 0x4b9aae
push 0x2ee
push 4
call fcn.004b8630
add esp, 8
push ebx
call fcn.008325dd
add esp, 4
jmp 0x4b9aae
push 0x2ba
push 4
call fcn.004b8630
add esp, 8
jmp 0x4b9ab6
push 0x2c4
push 4
call fcn.004b8630
add esp, 8
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x1c]
test esi, esi
jne 0x4b9acc
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push 0x292
push 1
call fcn.004b8630
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret