Function at 0x140055520
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x188
mov rax, qword [0x140106438]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov rbx, rcx
xor esi, esi
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x40], esi
xor edx, edx
mov r8d, 0x104
mov edi, 1
call fcn.140093c00
mov rcx, rbx
call fcn.140003550
mov rbp, rax
mov qword [rsp + 0x48], rax
mov rax, qword [0x140158078]
test rax, rax
jne 0x1400555c9
lea rcx, str.Wimgapi
call fcn.140009360
mov rcx, rax
lea rdx, str.WIMCreateFile
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140158078], rax
test rax, rax
jne 0x1400555c9
call fcn.140041e50
mov r9, rax
lea r8, str.Wimgapi
lea rdx, str.WIMCreateFile
lea rcx, str.Unable_to_locate__s___in__s.dll:__s
call fcn.140041aa0
jmp 0x140055987
cmp qword [0x140158158], rsi
jne 0x140055628
lea rcx, str.Wimgapi
call fcn.140009360
mov rcx, rax
lea rdx, str.WIMGetImageInformation
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140158158], rax
test rax, rax
jne 0x140055621
call fcn.140041e50
mov r9, rax
lea r8, str.Wimgapi
lea rdx, str.WIMGetImageInformation
lea rcx, str.Unable_to_locate__s___in__s.dll:__s
call fcn.140041aa0
jmp 0x140055987
mov rax, qword [0x140158078]
cmp qword [0x140158180], rsi
jne 0x140055687
lea rcx, str.Wimgapi
call fcn.140009360
mov rcx, rax
lea rdx, str.WIMCloseHandle
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140158180], rax
test rax, rax
jne 0x140055680
call fcn.140041e50
mov r9, rax
lea r8, str.Wimgapi
lea rdx, str.WIMCloseHandle
lea rcx, str.Unable_to_locate__s___in__s.dll:__s
call fcn.140041aa0
jmp 0x140055987
mov rax, qword [0x140158078]
cmp dword [0x14015b408], 0xe0000
mov r9d, esi
mov ecx, 0x20000000
mov qword [rsp + 0x28], rsi
cmovae r9d, ecx
mov dword [rsp + 0x20], esi
mov rcx, rbp
mov edx, 0x80000000
mov r8d, 3
call rax
mov rbp, rax
test rax, rax
jne 0x1400556d7
call fcn.140041e50
mov rdx, rax
lea rcx, str.__Could_not_access_image:__s
call fcn.140041aa0
jmp 0x140055982
lea r8, [rsp + 0x40]
mov rcx, rbp
lea rdx, [rsp + 0x50]
call qword [0x140158158]
test eax, eax
je 0x140055965
cmp dword [rsp + 0x40], esi
je 0x140055965
mov qword [rsp + 0x1b8], r12
lea rcx, [0x140159fc0]
mov qword [rsp + 0x1c0], r13
mov qword [rsp + 0x1c8], r14
mov qword [rsp + 0x180], r15
call fcn.140003550
lea rcx, [0x1400d97a4]
mov r12, rax
call fcn.140003550
mov edx, 2
mov ecx, 0x104
mov r15, rax
call fcn.1400966e0
mov r9, rax
xor r8d, r8d
mov rdx, r15
mov rcx, r12
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, eax
test r14d, r14d
je 0x1400557b1
mov qword [rsp + 0x38], rsi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rsi
mov r9d, 0xffffffff
mov dword [rsp + 0x28], 0x104
mov r8, rbx
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r14d, eax
test eax, eax
jne 0x1400557b1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, eax
test rbx, rbx
je 0x1400557be
mov rcx, rbx
call fcn.14009b5a0
test r15, r15
je 0x1400557cb
mov rcx, r15
call fcn.14009b5a0
test r12, r12
je 0x1400557d8
mov rcx, r12
call fcn.14009b5a0
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r13, qword [rsp + 0x1c0]
mov r12, qword [rsp + 0x1b8]
test r14d, r14d
je 0x1400557fd
cmp byte [rsp + 0x60], sil
jne 0x140055826
mov eax, dword [0x1400f2638]
movsd xmm0, qword [str..RufVXml.tmp]
mov dword [rsp + 0x68], eax
movzx eax, word [0x1400f263c]
mov word [rsp + 0x6c], ax
mov byte [rsp + 0x6d], sil
movsd qword [rsp + 0x60], xmm0
lea rcx, [rsp + 0x60]
call fcn.140003550
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test rbx, rbx
je 0x140055852
mov rcx, rbx
call fcn.14009b5a0
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, [rsp + 0x60]
call fcn.140003550
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0000000
mov r8d, edi
mov dword [rsp + 0x20], 2
mov rcx, rax
mov r14, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r15d, eax
test r14, r14
je 0x1400558aa
mov rcx, r14
call fcn.14009b5a0
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r15, qword [rsp + 0x180]
mov r14, qword [rsp + 0x1c8]
cmp rbx, 0xffffffffffffffff
je 0x140055946
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x40]
mov rdx, qword [rsp + 0x50]
mov rcx, rbx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140055946
mov r8d, edi
lea rdx, [rsp + 0x60]
lea rcx, str.IMAGE_INDEX
call fcn.140020e30
test rax, rax
je 0x140055946
mov rcx, rax
call fcn.1400a5c58
cmp eax, 2
je 0x140055936
inc edi
lea rdx, [rsp + 0x60]
mov r8d, edi
lea rcx, str.IMAGE_INDEX
call fcn.140020e30
test rax, rax
jne 0x140055903
mov rcx, rbp
call qword [0x140158180]
jmp 0x140055955
mov rcx, rbp
mov esi, 1
call qword [0x140158180]
jmp 0x140055955
mov rcx, rbp
call qword [0x140158180]
cmp rbx, 0xffffffffffffffff
je 0x140055982
test rbx, rbx
je 0x140055982
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140055982
call fcn.140041e50
mov rdx, rax
lea rcx, str.__Could_not_access_WIM_info:__s
call fcn.140041aa0
mov rcx, rbp
call qword [0x140158180]
mov rbp, qword [rsp + 0x48]
cmp byte [rsp + 0x60], 0
je 0x1400559c1
lea rcx, [rsp + 0x60]
call fcn.140003550
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test rbx, rbx
je 0x1400559b9
mov rcx, rbx
call fcn.14009b5a0
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rbp
call fcn.14009b5a0
mov eax, esi
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.140092060
add rsp, 0x188
pop rdi
pop rsi
pop rbp
pop rbx
ret