Function at 0x4b8610
Capabilities:
Clear file content
Get disk information
Get file size

Disassembly:
sub esp, 0x234
push edi
mov edi, ecx
mov eax, dword [edi + 0x34]
cmp eax, 0xffffffff
jne 0x4b5ffe
mov eax, 1
pop edi
add esp, 0x234
ret
push esi
xor esi, esi
test byte [edi + 0x3c], 2
je 0x4b61ca
mov esi, dword [edi + 0x18]
lea ecx, [esp + 0xc]
push ebx
mov ebx, dword [edi + 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4b602e
cmp dword [esp + 0x10], esi
jne 0x4b602e
cmp dword [esp + 0x14], ebx
je 0x4b607f
test byte [edi + 0x3c], 2
jne 0x4b603e
mov esi, 0x8202000a
jmp 0x4b61c9
push 0
push 0
push ebx
push esi
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x4b6072
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp + 0xc], esi
test esi, esi
js 0x4b61c9
jne 0x4b6212
xor esi, esi
jmp 0x4b621b
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x4b6051
mov dword [edi + 0x18], esi
mov dword [edi + 0x10], esi
xor esi, esi
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x14], ebx
mov dword [esp + 0xc], esi
mov eax, dword [edi + 0x20]
xor ecx, ecx
test eax, eax
mov dword [esp + 0x18], ecx
mov ebx, 0x570fe0
mov dword [esp + 0x1c], ecx
cmovne ebx, eax
mov dword [esp + 0x20], ecx
cmp dword [edi + 0x24], ecx
jne 0x4b6100
push ecx
push ecx
push ecx
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetFinalPathNameByHandleW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x4b6100
inc eax
lea ecx, [esp + 0x18]
push eax
call fcn.00408200
test al, al
je 0x4b6100
mov eax, dword [esp + 0x18]
mov ecx, 0x570fe0
push 0
push dword [esp + 0x14]
test eax, eax
cmovne ecx, eax
push ecx
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetFinalPathNameByHandleW]
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x4b61b8
mov ebx, ecx
test ebx, ebx
je 0x4b61b8
cmp word [ebx], 0
je 0x4b61b8
push ebx
call dword [sym.imp.SHLWAPI.dll_PathIsUNCW]
test eax, eax
jne 0x4b6151
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x40]
push 0x104
push eax
call fcn.00495a00
add esp, 0x10
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripToRootW]
test eax, eax
je 0x4b61b8
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 4
jne 0x4b61b8
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x64
lea ecx, [esp + 0x38]
mov dword [esp + 0x28], 0x64
mov dword [esp + 0x2c], 0xc8
mov ebx, eax
mov dword [esp + 0x30], 0x12c
mov dword [esp + 0x34], 0x1f4
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x4b61b8
mov esi, ecx
lea ecx, [ecx]
mov eax, dword [ebx]
push dword [edi + 0x34]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x4b61b4
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 4
cmp ebx, esi
jne 0x4b6190
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4b61c9
push eax
call fcn.0040bd60
add esp, 4
pop ebx
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
lea ecx, [edi + 0x20]
mov dword [edi + 0x34], 0xffffffff
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x3c], 0
call fcn.00408200
mov eax, esi
pop esi
pop edi
add esp, 0x234
ret
movzx esi, si
or esi, 0x83ff0000
mov dword [esp + 0xc], esi
test esi, esi
js 0x4b61c9
jmp 0x4b6091
push esi
mov esi, ecx
mov eax, dword [esi + 0x4c]
test eax, eax
je 0x4b8628
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x4c], 0
mov ecx, esi
pop esi
jmp 0x4b5fe0