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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x1016e750]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, edx
lea eax, [ebp - 0x1c]
push esi
mov ebx, ecx
mov dword [ebp - 0x20], esi
push str.LoadTreeFromDisk__s_
push eax
mov dword [ebp - 0x28], ebx
call fcn.10044f30
mov edx, dword [ebp - 0x1c]
add esp, 0xc
mov ecx, str.PathTree
call fcn.10043b30
mov edx, dword [ebp - 0x1c]
or eax, 0xffffffff
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x10034969
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebx + 8], 0
cmp word [esi], 0
jne 0x1003498c
mov eax, 3
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10103392
mov esp, ebp
pop ebp
ret
push 0x200
mov dword [ebp - 0x3c], 0x200
mov dword [ebp - 0x40], 0x200
call fcn.10104809
mov esi, eax
push 0x200
mov dword [ebp - 0x38], esi
call fcn.10104809
add esp, 8
mov edi, eax
mov dword [ebp - 0xc], edi
push 0
push 0
push 3
push 0
push 1
push SysReAllocStringLen
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
je 0x10034d92
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea eax, [ebp - 0x18]
push ebx
push dword [ebp - 0x20]
mov dword [ebp - 0x30], ebx
push str.PATHTREE_LoadTreeFromDisk__s_:_FileSize_ul
push eax
call fcn.10044f30
mov edx, dword [ebp - 0x18]
add esp, 0x10
mov ecx, str.PathTree
call fcn.10043b30
mov edx, dword [ebp - 0x18]
or ecx, 0xffffffff
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10034a2c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push 0
push 0
push 2
push 0
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x10034d49
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x10034cd1
cmp ebx, 4
jb 0x10034ce6
mov ecx, dword [eax]
mov ebx, 4
mov eax, dword [ebp - 0x28]
mov dword [eax + 0xc], ecx
cmp ecx, 2
jne 0x10034ce6
lea ecx, [ebp - 8]
call fcn.10023f70
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x24], 0
cmp ecx, 0x10
jb 0x10034cc0
mov edi, edi
lea eax, [ebx + 0xc]
mov dword [ebp - 0x2c], eax
cmp eax, ecx
ja 0x10034cde
mov ecx, dword [ebp - 0x34]
movq xmm0, qword [ebx + ecx]
mov edi, dword [ebx + ecx + 8]
movq qword [ebp - 0x5c], xmm0
cmp dword [ebp - 0x5c], 0x410509e8
jne 0x10034cde
test edi, edi
je 0x10034cde
mov ebx, dword [ebp - 0x58]
cmp dword [ebp - 0x40], ebx
jae 0x10034afa
push dword [ebp - 0xc]
call fcn.10103713
push ebx
mov dword [ebp - 0x40], ebx
call fcn.10104809
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0xc], ecx
jmp 0x10034afd
mov ecx, dword [ebp - 0xc]
lea edx, [ebx + eax]
mov dword [ebp - 0x2c], edx
cmp edx, dword [ebp - 0x30]
ja 0x10034cde
add eax, dword [ebp - 0x34]
push ebx
push eax
push ecx
call fcn.10107980
lea eax, [edi + 2]
add esp, 0xc
cmp dword [ebp - 0x3c], eax
jae 0x10034b3c
push esi
call fcn.10103713
lea eax, [edi + 2]
push eax
mov dword [ebp - 0x3c], eax
call fcn.10104809
mov esi, eax
add esp, 8
mov dword [ebp - 0x38], esi
mov ecx, dword [ebp - 0x2c]
lea eax, [edi + ecx]
mov dword [ebp - 0x2c], eax
cmp eax, dword [ebp - 0x30]
ja 0x10034cde
mov eax, dword [ebp - 0x34]
push edi
add eax, ecx
push eax
push esi
call fcn.10107980
add esp, 8
shr edi, 1
xor eax, eax
mov ecx, esp
push esi
mov word [esi + edi*2], ax
call fcn.10023fc0
mov edi, 0x5c
lea ecx, [ebp - 0x18]
mov edx, edi
call fcn.100452e0
add esp, 4
lea edx, [ebp - 0x18]
lea ecx, [ebp - 8]
call fcn.10034e50
push ecx
test al, al
je 0x10034be3
mov ecx, esp
push esi
call fcn.10023fc0
mov edx, edi
lea ecx, [ebp - 0x50]
call fcn.10045200
mov edi, dword [ebp - 0xc]
add esp, 4
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
push ebx
push edi
push 1
push dword [eax]
push esi
call fcn.10033880
mov edx, dword [ebp - 0x50]
or ecx, 0xffffffff
add edx, 0xfffffff0
mov dword [ebp - 0x24], eax
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10034c89
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10034c89
mov ecx, dword [ebp - 8]
mov esi, esp
lea ecx, [ecx - 0x10]
call fcn.10024750
add eax, 0x10
lea ecx, [ebp - 0x4c]
mov edx, edi
mov dword [esi], eax
call fcn.100452e0
add esp, 4
lea edx, [ebp - 0x18]
mov ecx, eax
call fcn.10034e50
mov esi, dword [ebp - 0x4c]
or edx, 0xffffffff
add esi, 0xfffffff0
mov byte [ebp - 0x11], al
lea ecx, [esi + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10034c2f
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0x11]
mov esi, dword [ebp - 0x38]
test al, al
je 0x10034c71
push ecx
mov ecx, esp
push esi
call fcn.10023fc0
mov edx, edi
lea ecx, [ebp - 0x44]
call fcn.10045200
mov edi, dword [ebp - 0xc]
add esp, 4
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
push ebx
mov edx, dword [edx + 0x10]
push edi
push 1
push dword [eax]
push esi
call fcn.10033880
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x24], eax
call fcn.10024080
jmp 0x10034c89
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x24]
push eax
push 1
push 0
push ecx
mov ecx, dword [ebp - 0x28]
mov edx, esi
push ebx
push edi
call fcn.10033b00
push esi
lea ecx, [ebp - 8]
call fcn.100240c0
mov edx, dword [ebp - 0x18]
or ecx, 0xffffffff
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10034caf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
lea eax, [ebx + 0xc]
cmp eax, ecx
jbe 0x10034aa0
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea ecx, [ebp - 8]
call fcn.10024080
push dword [ebp - 0x48]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
jmp 0x10034d4f
lea ecx, [ebp - 8]
call fcn.10024080
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
push eax
push str._PATHTREE_LoadTreeFromDisk:_ERROR__tree_is_malformed__LE_d
push ecx
call fcn.10044f30
add esp, 0xc
call fcn.100332f0
add esp, 4
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.10103713
push dword [ebp - 0xc]
call fcn.10103713
add esp, 8
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x28]
mov dword [eax + 8], 0
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10103392
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov eax, esp
push dword [ebp - 0x20]
push str.LoadTreeFromDisk__s_:_done
push eax
call fcn.10044f30
add esp, 0xc
call fcn.100332f0
add esp, 4
push dword [ebp - 0x1c]
call ebx
push esi
call fcn.10103713
push edi
call fcn.10103713
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10103392
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 2
jne 0x10034db5
push ecx
mov eax, esp
push dword [ebp - 0x20]
push str.PATHTREE_LoadTreeFromDisk:_file__s_doesnt_exist.
push eax
call fcn.10044f30
add esp, 0xc
jmp 0x10034dcc
call ebx
push ecx
mov ecx, esp
push eax
push dword [ebp - 0x20]
push str._PATHTREE_LoadTreeFromDisk:_FAILED_to_open_file__s__LE_d
push ecx
call fcn.10044f30
add esp, 0x10
call fcn.100332f0
add esp, 4
push esi
call fcn.10103713
push edi
call fcn.10103713
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 1
pop edi
pop esi
pop ebx
call fcn.10103392
mov esp, ebp
pop ebp
ret