Function at 0x4966b0
Capabilities:
Check if file exists
Delete file
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x64f494]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0x21c], ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x214], edi
cmp dword [esi + 0x10], 0
jne 0x4968f1
test edi, edi
je 0x4968f1
test ebx, ebx
js 0x4968f1
mov ecx, dword [esi + 0x20]
mov eax, 0x532ae21d
sub ecx, dword [esi + 0x1c]
imul ecx
sar edx, 8
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jge 0x4968f1
imul ecx, ebx, 0x314
lfence
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x210], ecx
mov eax, dword [eax + ecx]
test byte [eax + 0x26], 0x10
jne 0x4968f1
lfence
mov eax, dword [esi + 0x1c]
xor ebx, ebx
mov eax, dword [eax + ecx]
test byte [eax + 8], 1
jne 0x4968d5
push 0x208
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.00520870
push edi
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0053c29f
add esp, 0x18
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x49679a
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4968cf
mov ecx, dword [ebp - 0x210]
lfence
mov eax, dword [esi + 0x1c]
mov eax, dword [eax + ecx]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x218], eax
test eax, eax
jne 0x4967e2
lea ebx, [eax + 1]
jmp 0x4968c4
push 0
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4968c4
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x4968c4
push 0
push 0
push 0
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x228], eax
test eax, eax
je 0x4968c4
push 0
push 0
push 0
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x224], eax
test eax, eax
je 0x4968b8
push dword [ebp - 0x218]
mov ecx, esi
push eax
push dword [ebp - 0x21c]
call fcn.00496940
test eax, eax
je 0x4968ac
mov eax, dword [esi + 0x1c]
mov ecx, dword [ebp - 0x210]
mov ecx, dword [ecx + eax]
lea eax, [ebp - 0x230]
push eax
movzx eax, word [ecx + 0xc]
push eax
movzx eax, word [ecx + 0xe]
push eax
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
test eax, eax
je 0x4968a7
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x4968a7
lea eax, [ebp - 0x220]
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov ebx, 1
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x4968dc
mov edi, dword [ebp - 0x214]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00465208
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00465208
mov esp, ebp
pop ebp
ret 8