Function at 0x46b2d0
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 0x46b2f6
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.00485790
mov ebx, eax
push esi
mov dword [ebp - 8], ebx
call fcn.00485790
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 0x46b58f
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.00452370
mov edx, dword [eax]
push edx
push str.PATHTREE
call fcn.00450750
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 0x46b38a
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 0x46b4e3
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 0x46b4dc
cmp ebx, 4
jb 0x46b50d
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 0x46b50d
cmp ebx, 0x10
jb 0x46b4d2
jmp 0x46b3f3
mov ebx, dword [ebp - 0xc]
lea edx, [edi + 0xc]
mov dword [ebp - 0x20], edx
cmp edx, ebx
ja 0x46b50d
mov ecx, dword [edi + eax]
mov ebx, dword [edi + eax + 4]
mov esi, dword [edi + eax + 8]
cmp ecx, 0x410509e8
jne 0x46b50a
test esi, esi
je 0x46b50a
cmp dword [ebp - 0x18], ebx
jae 0x46b440
mov edx, dword [ebp - 4]
push edx
call fcn.004856b3
push ebx
mov dword [ebp - 0x18], ebx
call fcn.00485790
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 0x46b50a
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
push ebx
add edx, eax
push edx
push ecx
call fcn.004862a0
lea edi, [esi + 2]
add esp, 0xc
cmp dword [ebp - 0x1c], edi
jae 0x46b482
mov edx, dword [ebp - 8]
push edx
call fcn.004856b3
push edi
mov dword [ebp - 0x1c], edi
call fcn.00485790
add esp, 8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x20]
lea edi, [esi + eax]
cmp edi, dword [ebp - 0xc]
ja 0x46b50a
mov edx, dword [ebp - 0x10]
mov ecx, eax
mov eax, dword [ebp - 8]
push esi
add ecx, edx
push ecx
push eax
call fcn.004862a0
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.0046a6e0
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
lea ecx, [edi + 0xc]
cmp ecx, dword [ebp - 0xc]
jbe 0x46b3f0
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.004856b3
mov eax, dword [ebp - 4]
push eax
call fcn.004856b3
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.00452370
mov eax, dword [eax]
push eax
push str.PATHTREE
call fcn.00450750
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 0x46b551
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.004856b3
mov edx, dword [ebp - 4]
push edx
call fcn.004856b3
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.00452370
mov edx, dword [eax]
push edx
push str.PATHTREE
call fcn.00450750
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 0x46b5d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
call fcn.004856b3
mov ecx, dword [ebp - 4]
push ecx
call fcn.004856b3
add esp, 8
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret 8