Function at 0x480f40
Capabilities:
Delete file
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x24
push edi
mov edi, dword [ebp + 0xc]
mov dword [eax + 8], 0
cmp word [edi], 0
jne 0x480f66
mov eax, 3
pop edi
mov esp, ebp
pop ebp
ret 8
push ebx
push esi
mov esi, 0x200
push esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
call fcn.004a4a82
mov ebx, eax
push esi
mov dword [ebp - 8], ebx
call fcn.004a4a82
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 0x4811ff
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
lea ecx, [ebp - 0x20]
push str.PATHTREE_LoadTreeFromDisk:_FileSize_ul
push ecx
mov dword [ebp - 0xc], ebx
call fcn.00461920
mov edx, dword [eax]
push edx
push str.PATHTREE
call fcn.0045f370
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x480ffa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0
push 0
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
mov dword [ebp - 0x24], edi
test edi, edi
je 0x481153
push 0
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x48114c
cmp ebx, 4
jb 0x48117d
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], ecx
mov ecx, edx
cmp dword [ecx + 0xc], 2
mov edi, 4
jne 0x48117d
cmp ebx, 0x10
jb 0x481142
jmp 0x481063
mov ebx, dword [ebp - 0xc]
lea edx, [edi + 0xc]
mov dword [ebp - 0x20], edx
cmp edx, ebx
ja 0x48117d
mov ecx, dword [edi + eax]
mov ebx, dword [edi + eax + 4]
mov esi, dword [edi + eax + 8]
cmp ecx, 0x410509e8
jne 0x48117a
test esi, esi
je 0x48117a
cmp dword [ebp - 0x18], ebx
jae 0x4810b0
mov edx, dword [ebp - 4]
push edx
call fcn.004a4965
push ebx
mov dword [ebp - 0x18], ebx
call fcn.004a4a82
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 0x48117a
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
push ebx
add edx, eax
push edx
push ecx
call fcn.004a4600
lea edi, [esi + 2]
add esp, 0xc
cmp dword [ebp - 0x1c], edi
jae 0x4810f2
mov edx, dword [ebp - 8]
push edx
call fcn.004a4965
push edi
mov dword [ebp - 0x1c], edi
call fcn.004a4a82
add esp, 8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x20]
lea edi, [esi + eax]
cmp edi, dword [ebp - 0xc]
ja 0x48117a
mov edx, dword [ebp - 0x10]
mov ecx, eax
mov eax, dword [ebp - 8]
push esi
add ecx, edx
push ecx
push eax
call fcn.004a4600
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
add esp, 0xc
xor ecx, ecx
push ecx
push ebx
push edx
push eax
shr esi, 1
mov word [eax + esi*2], cx
mov eax, dword [ebp + 8]
push eax
lea eax, [ecx + 1]
call fcn.00480350
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
lea ecx, [edi + 0xc]
cmp ecx, dword [ebp - 0xc]
jbe 0x481060
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edi, dword [ebp - 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 8]
push edx
call fcn.004a4965
mov eax, dword [ebp - 4]
push eax
call fcn.004a4965
add esp, 8
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x24]
push str._PATHTREE_LoadTreeFromDisk:_ERROR__tree_is_malformed__LE_d
push edx
call fcn.00461920
mov eax, dword [eax]
push eax
push str.PATHTREE
call fcn.0045f370
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4811c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
push ecx
call fcn.004a4965
mov edx, dword [ebp - 4]
push edx
call fcn.004a4965
mov eax, dword [ebp + 0xc]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp + 8]
pop esi
pop ebx
mov dword [ecx + 8], 0
mov eax, 2
pop edi
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea ecx, [ebp + 8]
push str._PATHTREE_LoadTreeFromDisk:_FAILED_to_open_file__s__LE_d
push ecx
call fcn.00461920
mov edx, dword [eax]
push edx
push str.PATHTREE
call fcn.0045f370
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
add esp, 0x18
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x481244
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
call fcn.004a4965
mov ecx, dword [ebp - 4]
push ecx
call fcn.004a4965
add esp, 8
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret 8