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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
push ecx
mov eax, esp
mov esi, edx
push esi
xorps xmm0, xmm0
xor ebx, ebx
push str.PATHTREE_SaveEntireTreeToDisk__s_
push eax
mov edi, ecx
mov dword [ebp - 0x18], ebx
movq qword [ebp - 0x14], xmm0
call fcn.1003a800
add esp, 0xc
call fcn.1002fdf0
add esp, 4
cmp word [esi], bx
jne 0x10031032
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x100000
mov dword [ebp - 0x14], 0x100000
call fcn.1006bba0
mov ecx, eax
add esp, 4
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x100310a8
mov edx, dword [ebp - 0x18]
mov dword [edi + 0xc], 2
lea eax, [edx + 4]
cmp eax, 0x100000
jb 0x10031084
push 0x200000
push ecx
mov dword [ebp - 0x14], 0x200000
call fcn.1006c6bc
mov ecx, eax
add esp, 8
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x100310a8
mov edx, dword [ebp - 0x18]
mov eax, dword [edi + 0xc]
mov dword [ecx + edx], eax
lea eax, [ebp - 0x18]
mov edx, dword [edi + 8]
mov ecx, edi
add dword [ebp - 0x18], 4
push eax
push 0x10030fb0
push 0
call fcn.10030e30
mov ebx, 1
mov eax, dword [0x100b2fac]
test eax, eax
jne 0x1003115a
push esi
call fcn.1006c1a9
add esp, 4
mov dword [0x100b2fa8], eax
push 0x5c
push eax
call fcn.1006ade1
add esp, 8
mov edi, 0x5f
test eax, eax
je 0x100310f7
jmp 0x100310e0
push 0x5c
push dword [0x100b2fa8]
mov word [eax], di
call fcn.1006ade1
add esp, 8
test eax, eax
jne 0x100310e0
push 0x3a
push dword [0x100b2fa8]
call fcn.1006ade1
add esp, 8
test eax, eax
je 0x10031127
jmp 0x10031110
push 0x3a
push dword [0x100b2fa8]
mov word [eax], di
call fcn.1006ade1
add esp, 8
test eax, eax
jne 0x10031110
push dword [0x100b2fa8]
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [0x100b2fac], eax
test eax, eax
jne 0x1003115a
push dword [0x100b2fa8]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x100b2fac], eax
test eax, eax
je 0x10031163
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push esi
lea eax, [ebp - 4]
push str._s._d.tmp
push eax
call fcn.1003a800
mov ecx, dword [ebp - 0x10]
add esp, 0xc
mov edx, esp
movsx eax, byte [ecx + 7]
push eax
movsx eax, byte [ecx + 6]
push eax
movsx eax, byte [ecx + 5]
push eax
movsx eax, byte [ecx + 4]
push eax
movsx eax, byte [ecx + 3]
push eax
movsx eax, byte [ecx + 2]
push eax
movsx eax, byte [ecx + 1]
push eax
movsx eax, byte [ecx]
push eax
push dword [ebp - 4]
push esi
push str.PATHTREE_SaveEntireTreeToDisk__s_:_writing_to_temp_file:__s:__.2X__.2X__.2X__.2X__.2X__.2X__.2X__.2X
push edx
call fcn.1003a800
add esp, 0x30
call fcn.1002fdf0
add esp, 4
push 0
push SysReAllocStringLen
push 2
push 0
push 0
push 0x40000000
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
mov edi, eax
mov dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10031205
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x18]
je 0x10031207
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov eax, esp
push esi
push str.PATHTREE_SaveEntireTreeToDisk__s_:_finished_writing_to_temp_file
push eax
call fcn.1003a800
add esp, 0xc
call fcn.1002fdf0
mov eax, esp
push esi
push str.PATHTREE_SaveEntireTreeToDisk__s_:_deleting_final_file
push eax
call fcn.1003a800
add esp, 0xc
call fcn.1002fdf0
mov ecx, esp
push esi
call fcn.10022bb0
call fcn.1003c4e0
mov eax, esp
push dword [ebp - 4]
push esi
push str.PATHTREE_SaveEntireTreeToDisk__s_:_renaming_temp_to_final_file_to:__s
push eax
call fcn.1003a800
add esp, 0x10
call fcn.1002fdf0
add esp, 4
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push ecx
mov eax, esp
push esi
push str.PATHTREE_SaveEntireTreeToDisk__s_:_finished_transaction
push eax
call fcn.1003a800
add esp, 0xc
call fcn.1002fdf0
mov edx, dword [ebp - 4]
add esp, 4
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100312ac
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x100b2fac]
test eax, eax
je 0x100312bc
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x10]
call fcn.1006ac0c
add esp, 4
test ebx, ebx
jne 0x100312fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
push eax
push esi
push str._PATHTREE_SaveEntireTreeToDisk__s_:_FAILED__LE_d
push ecx
call fcn.1003a800
add esp, 0x10
call fcn.1002fdf0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
mov ecx, esp
push esi
push str.PATHTREE_SaveEntireTreeToDisk__s_:_done
push ecx
call fcn.1003a800
add esp, 0xc
call fcn.1002fdf0
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret