Function at 0x1400cdd78
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
mov r15, rdx
mov rbx, rcx
xor r12d, r12d
lea rcx, str.AsrWriteXmlToSifFile
mov edi, r12d
lea esi, [r12 + 1]
call fcn.140008368
mov dword [rsp + 0x70], r12d
test rbx, rbx
jne 0x1400cde05
lea r9d, [r12 + 0x57]
mov esi, r12d
mov edi, r9d
mov rcx, qword [0x140154180]
lea rax, [0x140154180]
cmp rcx, rax
je 0x1400cdfbc
test byte [rcx + 0x1c], 8
je 0x1400cdfbc
lea edx, [rbx + 0x65]
lea rax, str.pwszXmlFilename
mov rcx, qword [rcx + 0x10]
lea r8, [0x140129b38]
mov qword [rsp + 0x20], rax
call fcn.1400cc0d8
jmp 0x1400cdfbc
test r15, r15
jne 0x1400cde42
lea r9d, [r15 + 0x57]
mov esi, r12d
mov edi, r9d
mov rcx, qword [0x140154180]
lea rax, [0x140154180]
cmp rcx, rax
je 0x1400cdfbc
test byte [rcx + 0x1c], 8
je 0x1400cdfbc
lea edx, [r15 + 0x66]
lea rax, str.pwszXmlDoc
jmp 0x1400cddeb
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], r12d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
or rbx, 0xffffffffffffffff
mov r14, rax
cmp rax, rbx
jne 0x1400cdebf
mov esi, r12d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x140154180]
lea rax, [0x140154180]
cmp rcx, rax
je 0x1400cdfbc
test byte [rcx + 0x1c], 8
je 0x1400cdfbc
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov rcx, qword [0x140154180]
lea edx, [rbx + 0x68]
mov r9d, eax
lea rax, str.GetLastError__
jmp 0x1400cddeb
lea rdx, str.__xml_version_1.0__encoding_UTF_16___
mov rbp, rbx
inc rbp
cmp word [rdx + rbp*2], r12w
jne 0x1400cdec9
add ebp, ebp
mov qword [rsp + 0x20], r12
mov r8d, ebp
lea r9, [rsp + 0x70]
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_WriteFile]
test eax, eax
je 0x1400cdf59
cmp dword [rsp + 0x70], ebp
jne 0x1400cdf59
inc rbx
cmp word [r15 + rbx*2], r12w
jne 0x1400cdef5
add ebx, ebx
mov qword [rsp + 0x20], r12
mov r8d, ebx
lea r9, [rsp + 0x70]
mov rdx, r15
mov rcx, r14
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_WriteFile]
test eax, eax
je 0x1400cdf28
cmp dword [rsp + 0x70], ebx
je 0x1400cdfae
mov esi, r12d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x140154180]
lea rax, [0x140154180]
cmp rcx, rax
je 0x1400cdfae
test byte [rcx + 0x1c], 8
je 0x1400cdfae
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edx, 0x69
jmp 0x1400cdf88
mov esi, r12d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x140154180]
lea rax, [0x140154180]
cmp rcx, rax
je 0x1400cdfae
test byte [rcx + 0x1c], 8
je 0x1400cdfae
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edx, 0x68
mov rcx, qword [0x140154180]
lea r8, [0x140129b38]
mov r9d, eax
lea rax, str.GetLastError__
mov qword [rsp + 0x20], rax
mov rcx, qword [rcx + 0x10]
call fcn.1400cc0d8
test r14, r14
je 0x1400cdfbc
mov rcx, r14
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
lea rcx, str.AsrWriteXmlToSifFile
call fcn.1400084a8
mov ecx, edi
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
lea r11, [rsp + 0x40]
mov eax, esi
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret