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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push ecx
mov eax, esp
mov dword [ebp - 0x40], esp
push ebx
push str.LoadTreeFromDisk__s_
push eax
call fcn.0046d760
add esp, 0xc
call fcn.0048ddd0
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [ecx + 8], 0
cmp word [ebx], 0
jne 0x48f2b7
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, 0x200
push edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
call fcn.004bc352
push edi
mov esi, eax
call fcn.004bc352
add esp, 8
push 0
push 0
push 3
push 0
push 1
push SysReAllocStringLen
push ebx
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x30], edi
cmp edi, 0xffffffff
je 0x48f709
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ecx
mov edx, esp
mov dword [ebp - 0x40], esp
push eax
push ebx
push str.PATHTREE_LoadTreeFromDisk__s_:_FileSize_ul
push edx
mov dword [ebp - 0x10], eax
call fcn.0046d760
add esp, 0x10
call fcn.0048ddd0
add esp, 4
push 0
push 0
push 0
push 2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x48f63b
push 0
push 0
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
je 0x48f631
mov ebx, 4
cmp dword [ebp - 0x10], ebx
jb 0x48f6a8
mov ecx, dword [ebp + 8]
mov eax, dword [edi]
mov edx, ecx
mov dword [ecx + 0xc], eax
cmp dword [edx + 0xc], 2
mov dword [ebp - 0x18], ebx
jne 0x48f6a8
lea ecx, [ebp - 0xc]
call fcn.00422487
cmp dword [ebp - 0x10], 0x10
mov dword [ebp - 0x14], 0
jb 0x48f608
jmp 0x48f3a3
mov ebx, dword [ebp - 0x18]
lea ecx, [ebx + 0xc]
mov dword [ebp - 0x34], ecx
cmp ecx, dword [ebp - 0x10]
ja 0x48f689
mov eax, dword [ebx + edi]
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebx + edi + 4]
mov edi, dword [edx + edi + 8]
cmp eax, 0x410509e8
jne 0x48f689
test edi, edi
je 0x48f689
cmp dword [ebp - 0x24], ebx
jae 0x48f3f3
mov eax, dword [ebp - 8]
push eax
call fcn.004bc235
push ebx
mov dword [ebp - 0x24], ebx
call fcn.004bc352
mov ecx, dword [ebp - 0x34]
add esp, 8
mov dword [ebp - 8], eax
lea eax, [ebx + ecx]
mov dword [ebp - 0x34], eax
cmp eax, dword [ebp - 0x10]
ja 0x48f689
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 8]
push ebx
add ecx, edx
push ecx
push eax
call fcn.004bbd70
lea eax, [edi + 2]
add esp, 0xc
cmp dword [ebp - 0x28], eax
jae 0x48f434
push esi
call fcn.004bc235
lea eax, [edi + 2]
push eax
mov dword [ebp - 0x28], eax
call fcn.004bc352
add esp, 8
mov esi, eax
mov eax, dword [ebp - 0x34]
lea ecx, [edi + eax]
mov dword [ebp - 0x34], ecx
cmp ecx, dword [ebp - 0x10]
ja 0x48f689
mov ecx, dword [ebp - 0x1c]
push edi
add eax, ecx
push eax
push esi
call fcn.004bbd70
mov edx, dword [ebp - 0x34]
add esp, 0xc
push 0x5c
push ecx
xor eax, eax
mov ecx, esp
mov dword [ebp - 0x34], esp
shr edi, 1
push esi
mov dword [ebp - 0x18], edx
mov word [esi + edi*2], ax
call fcn.004247f7
lea ecx, [ebp - 0x20]
push ecx
call fcn.0046db70
mov ecx, dword [ebp - 0x20]
xor eax, eax
add esp, 0xc
test ecx, ecx
setne al
test eax, eax
je 0x48f67f
mov edx, dword [ebp - 0xc]
push ecx
push edx
call fcn.004bbd30
add esp, 8
test eax, eax
sete al
test al, al
je 0x48f503
push 0x5c
push ecx
mov ecx, esp
mov dword [ebp - 0x34], esp
push esi
call fcn.004247f7
lea eax, [ebp - 0x38]
push eax
call fcn.0046da90
mov ecx, dword [ebp - 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
add esp, 0xc
push ebx
push ecx
push 1
push eax
mov eax, dword [ebp + 8]
push esi
push edx
push eax
call fcn.0048e3d0
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x48f5bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x48f5bc
mov edx, dword [ebp - 0xc]
lea ecx, [ebp - 0x20]
push ecx
push 0x5c
push ecx
add edx, 0xfffffff0
mov dword [ebp - 0x34], esp
mov edi, esp
push edx
call fcn.00425450
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0x3c]
add esp, 4
push eax
call fcn.0046db70
add esp, 0xc
push eax
call fcn.00469010
mov byte [ebp - 1], al
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffff0
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x48f55a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 1], 0
je 0x48f5a0
push 0x5c
push ecx
mov ecx, esp
mov dword [ebp - 0x34], esp
push esi
call fcn.004247f7
lea ecx, [ebp - 0x40]
push ecx
call fcn.0046da90
mov edx, dword [ebp - 8]
mov eax, dword [eax]
add esp, 0xc
push ebx
push edx
mov edx, dword [ebp + 8]
push 1
push eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x10]
push esi
push ecx
push edx
call fcn.0048e3d0
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x40]
jmp 0x48f4de
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x14]
push ecx
push 0
push 0
push ebx
push edx
push esi
push eax
mov eax, 1
call fcn.0048e620
test esi, esi
jne 0x48f5c4
xor eax, eax
jmp 0x48f5cd
push esi
call fcn.004bbaea
add esp, 4
push eax
push esi
lea ecx, [ebp - 0xc]
call fcn.004253df
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x48f5f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
add ecx, 0xc
cmp ecx, dword [ebp - 0x10]
jbe 0x48f3a0
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x48f62e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x30]
push ecx
mov ecx, dword [ebp + 0xc]
mov eax, esp
mov dword [ebp + 8], esp
push ecx
push str.LoadTreeFromDisk__s_:_done
push eax
call fcn.0046d760
add esp, 0xc
call fcn.0048ddd0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.004bc235
mov edx, dword [ebp - 8]
push edx
call fcn.004bc235
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.00422000
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x48f6a8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x40], esp
push eax
push str._PATHTREE_LoadTreeFromDisk:_ERROR__tree_is_malformed__LE_d
push ecx
call fcn.0046d760
add esp, 0xc
call fcn.0048ddd0
mov edx, dword [ebp - 0x30]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.004bc235
mov eax, dword [ebp - 8]
push eax
call fcn.004bc235
mov ecx, dword [ebp + 0xc]
add esp, 8
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 2
jne 0x48f72d
push ecx
mov eax, esp
mov dword [ebp + 8], esp
push ebx
push str.PATHTREE_LoadTreeFromDisk:_file__s_doesnt_exist.
push eax
call fcn.0046d760
add esp, 0xc
jmp 0x48f745
call edi
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push eax
push ebx
push str._PATHTREE_LoadTreeFromDisk:_FAILED_to_open_file__s__LE_d
push ecx
call fcn.0046d760
add esp, 0x10
call fcn.0048ddd0
add esp, 4
push esi
call fcn.004bc235
mov edx, dword [ebp - 8]
push edx
call fcn.004bc235
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8