Function at 0x471a10
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 0x471a36
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.0048e812
mov ebx, eax
push esi
mov dword [ebp - 8], ebx
call fcn.0048e812
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 0x471ccf
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.004559f0
mov edx, dword [eax]
push edx
push str.PATHTREE
call fcn.00453960
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 0x471aca
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 0x471c23
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 0x471c1c
cmp ebx, 4
jb 0x471c4d
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 0x471c4d
cmp ebx, 0x10
jb 0x471c12
jmp 0x471b33
mov ebx, dword [ebp - 0xc]
lea edx, [edi + 0xc]
mov dword [ebp - 0x20], edx
cmp edx, ebx
ja 0x471c4d
mov ecx, dword [edi + eax]
mov ebx, dword [edi + eax + 4]
mov esi, dword [edi + eax + 8]
cmp ecx, 0x410509e8
jne 0x471c4a
test esi, esi
je 0x471c4a
cmp dword [ebp - 0x18], ebx
jae 0x471b80
mov edx, dword [ebp - 4]
push edx
call fcn.0048e6f5
push ebx
mov dword [ebp - 0x18], ebx
call fcn.0048e812
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 0x471c4a
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
push ebx
add edx, eax
push edx
push ecx
call fcn.0048e390
lea edi, [esi + 2]
add esp, 0xc
cmp dword [ebp - 0x1c], edi
jae 0x471bc2
mov edx, dword [ebp - 8]
push edx
call fcn.0048e6f5
push edi
mov dword [ebp - 0x1c], edi
call fcn.0048e812
add esp, 8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x20]
lea edi, [esi + eax]
cmp edi, dword [ebp - 0xc]
ja 0x471c4a
mov edx, dword [ebp - 0x10]
mov ecx, eax
mov eax, dword [ebp - 8]
push esi
add ecx, edx
push ecx
push eax
call fcn.0048e390
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.00470e20
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
lea ecx, [edi + 0xc]
cmp ecx, dword [ebp - 0xc]
jbe 0x471b30
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.0048e6f5
mov eax, dword [ebp - 4]
push eax
call fcn.0048e6f5
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.004559f0
mov eax, dword [eax]
push eax
push str.PATHTREE
call fcn.00453960
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 0x471c91
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.0048e6f5
mov edx, dword [ebp - 4]
push edx
call fcn.0048e6f5
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.004559f0
mov edx, dword [eax]
push edx
push str.PATHTREE
call fcn.00453960
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 0x471d14
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
call fcn.0048e6f5
mov ecx, dword [ebp - 4]
push ecx
call fcn.0048e6f5
add esp, 8
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret 8