Function at 0x486ac0
Capabilities:
Check if file exists
Delete file
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x24
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [eax + 8], 0
cmp word [edi], 0
jne 0x486aea
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, 0x200
push esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
call fcn.004ac152
mov ebx, eax
push esi
mov dword [ebp - 8], ebx
call fcn.004ac152
add esp, 8
push 0
push 0
push 3
push 0
push 1
push SysReAllocStringLen
push edi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x14], esi
cmp esi, 0xffffffff
je 0x486d40
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ecx
mov ecx, esp
mov ebx, eax
mov dword [ebp - 0x24], esp
push ebx
push edi
push str.PATHTREE_LoadTreeFromDisk__s_:_FileSize_ul
push ecx
mov dword [ebp - 0xc], ebx
call fcn.00466a00
add esp, 0x10
call fcn.00485630
add esp, 4
push 0
push 0
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x486cb5
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x486cab
cmp ebx, 4
jb 0x486ce2
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xc], edx
mov edx, ecx
cmp dword [edx + 0xc], 2
mov edi, 4
jne 0x486cdf
cmp ebx, 0x10
jb 0x486ca4
jmp 0x486bc3
mov ebx, dword [ebp - 0xc]
lea edx, [edi + 0xc]
mov dword [ebp - 0x20], edx
cmp edx, ebx
ja 0x486cdf
mov ecx, dword [edi + eax]
mov ebx, dword [edi + eax + 4]
mov esi, dword [edi + eax + 8]
cmp ecx, 0x410509e8
jne 0x486cdc
test esi, esi
je 0x486cdc
cmp dword [ebp - 0x18], ebx
jae 0x486c10
mov eax, dword [ebp - 4]
push eax
call fcn.004ac035
push ebx
mov dword [ebp - 0x18], ebx
call fcn.004ac152
mov edx, dword [ebp - 0x20]
add esp, 8
mov dword [ebp - 4], eax
lea eax, [ebx + edx]
mov dword [ebp - 0x20], eax
cmp eax, dword [ebp - 0xc]
ja 0x486cdc
mov ecx, dword [ebp - 0x10]
add edx, ecx
push ebx
push edx
mov edx, dword [ebp - 4]
push edx
call fcn.004abb70
lea edi, [esi + 2]
add esp, 0xc
cmp dword [ebp - 0x1c], edi
jae 0x486c52
mov eax, dword [ebp - 8]
push eax
call fcn.004ac035
push edi
mov dword [ebp - 0x1c], edi
call fcn.004ac152
add esp, 8
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x20]
lea edi, [esi + ecx]
cmp edi, dword [ebp - 0xc]
ja 0x486cdc
mov eax, dword [ebp - 0x10]
mov edx, ecx
mov ecx, dword [ebp - 8]
push esi
add edx, eax
push edx
push ecx
call fcn.004abb70
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
add esp, 0xc
xor edx, edx
push edx
push ebx
push ecx
shr esi, 1
mov word [eax + esi*2], dx
mov edx, dword [ebp + 8]
push eax
push edx
mov eax, 1
call fcn.00485e60
mov esi, dword [ebp - 0x14]
lea eax, [edi + 0xc]
cmp eax, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
jbe 0x486bc0
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
push eax
call fcn.004ac035
mov ecx, dword [ebp - 4]
push ecx
call fcn.004ac035
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp + 0xc], esp
push eax
push str._PATHTREE_LoadTreeFromDisk:_ERROR__tree_is_malformed__LE_d
push ecx
call fcn.00466a00
add esp, 0xc
call fcn.00485630
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 8]
push edx
call fcn.004ac035
mov eax, dword [ebp - 4]
push eax
call fcn.004ac035
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], 0
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
jne 0x486d64
push ecx
mov edx, esp
mov dword [ebp + 8], esp
push edi
push str.PATHTREE_LoadTreeFromDisk:_file__s_doesnt_exist.
push edx
call fcn.00466a00
add esp, 0xc
jmp 0x486d7c
call esi
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push eax
push edi
push str._PATHTREE_LoadTreeFromDisk:_FAILED_to_open_file__s__LE_d
push ecx
call fcn.00466a00
add esp, 0x10
call fcn.00485630
add esp, 4
push ebx
call fcn.004ac035
mov edx, dword [ebp - 4]
push edx
call fcn.004ac035
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8