Function at 0x48c040
Capabilities:
Check mutex on windows
Delete file
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
push edi
push ecx
xor eax, eax
mov dword [ebp - 8], esp
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov eax, esp
push ebx
xor edi, edi
push str.PATHTREE_SaveEntireTreeToDisk__s_
push eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], edi
call fcn.0046aaf0
add esp, 0xc
call fcn.0048aea0
add esp, 4
cmp word [ebx], di
jne 0x48c084
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 0x100000
mov dword [ebp - 0x14], 0x100000
call fcn.004b9282
add esp, 4
mov dword [ebp - 0x10], eax
cmp eax, edi
je 0x48c0e0
mov eax, dword [ebp + 8]
add eax, 0xc
push eax
mov edi, 4
lea esi, [ebp - 0x18]
mov dword [eax], 2
call fcn.0048b030
add esp, 4
test eax, eax
je 0x48c0de
mov eax, dword [ebp + 8]
mov edx, dword [eax + 8]
mov ecx, esi
push ecx
push 0x48c010
push 0
push edx
push eax
call fcn.0048bec0
mov dword [ebp - 4], 1
xor edi, edi
mov eax, dword [0x529454]
cmp eax, edi
jne 0x48c191
push ebx
call fcn.004bb4b9
push 0x5c
push eax
mov dword [0x529458], eax
call fcn.004b94c8
add esp, 0xc
cmp eax, edi
je 0x48c12d
jmp 0x48c110
mov edx, dword [0x529458]
mov ecx, 0x5f
push 0x5c
push edx
mov word [eax], cx
call fcn.004b94c8
add esp, 8
cmp eax, edi
jne 0x48c110
mov eax, dword [0x529458]
push 0x3a
push eax
call fcn.004b94c8
add esp, 8
cmp eax, edi
je 0x48c15e
mov edx, dword [0x529458]
mov ecx, 0x5f
push 0x3a
push edx
mov word [eax], cx
call fcn.004b94c8
add esp, 8
cmp eax, edi
jne 0x48c141
mov eax, dword [0x529458]
push eax
push edi
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [0x529454], eax
cmp eax, edi
jne 0x48c191
mov ecx, dword [0x529458]
push ecx
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x529454], eax
cmp eax, edi
je 0x48c19a
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push ebx
lea edx, [ebp + 8]
push str._s._d.tmp
push edx
call fcn.0046aaf0
mov eax, dword [ebp - 0x10]
movsx ecx, byte [eax + 7]
add esp, 0xc
mov edx, esp
mov dword [ebp - 0xc], esp
push ecx
movsx ecx, byte [eax + 6]
push ecx
movsx ecx, byte [eax + 5]
push ecx
movsx ecx, byte [eax + 4]
push ecx
movsx ecx, byte [eax + 3]
push ecx
movsx ecx, byte [eax + 2]
push ecx
movsx ecx, byte [eax + 1]
movsx eax, byte [eax]
push ecx
mov ecx, dword [ebp + 8]
push eax
push ecx
push ebx
push str.PATHTREE_SaveEntireTreeToDisk__s_:_writing_to_temp_file:__s:__.2X__.2X__.2X__.2X__.2X__.2X__.2X__.2X
push edx
call fcn.0046aaf0
add esp, 0x30
call fcn.0048aea0
mov edx, dword [ebp + 8]
add esp, 4
push edi
push SysReAllocStringLen
push 2
push edi
push edi
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
push edi
mov esi, eax
lea eax, [ebp - 8]
push eax
push ecx
push edx
push esi
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x48c23b
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x18]
je 0x48c23e
mov dword [ebp - 4], edi
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov ecx, esp
mov dword [ebp - 0xc], esp
push ebx
push str.PATHTREE_SaveEntireTreeToDisk__s_:_finished_writing_to_temp_file
push ecx
call fcn.0046aaf0
add esp, 0xc
call fcn.0048aea0
mov edx, esp
mov dword [ebp - 0xc], esp
push ebx
push str.PATHTREE_SaveEntireTreeToDisk__s_:_deleting_final_file
push edx
call fcn.0046aaf0
add esp, 0xc
call fcn.0048aea0
mov ecx, esp
mov dword [ebp - 0xc], esp
push ebx
call fcn.004247f3
call fcn.0046dbf0
mov ecx, dword [ebp + 8]
mov eax, esp
mov dword [ebp - 0xc], esp
push ecx
push ebx
push str.PATHTREE_SaveEntireTreeToDisk__s_:_renaming_temp_to_final_file_to:__s
push eax
call fcn.0046aaf0
add esp, 0x10
call fcn.0048aea0
mov edx, dword [ebp + 8]
add esp, 4
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push ecx
mov eax, esp
mov dword [ebp - 0xc], esp
push ebx
push str.PATHTREE_SaveEntireTreeToDisk__s_:_finished_transaction
push eax
call fcn.0046aaf0
add esp, 0xc
call fcn.0048aea0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x48c2f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [0x529454]
cmp eax, edi
je 0x48c306
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004b9165
mov esi, dword [ebp - 4]
add esp, 4
cmp esi, edi
jne 0x48c34e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, esp
mov dword [ebp + 8], esp
push eax
push ebx
push str._PATHTREE_SaveEntireTreeToDisk__s_:_FAILED__LE_d
push edx
call fcn.0046aaf0
add esp, 0x10
call fcn.0048aea0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push ecx
mov eax, esp
mov dword [ebp + 8], esp
push ebx
push str.PATHTREE_SaveEntireTreeToDisk__s_:_done
push eax
call fcn.0046aaf0
add esp, 0xc
call fcn.0048aea0
add esp, 4
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4