Function at 0x1400d7f9c
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.140007418
mov dword [rsp + 0x70], r12d
test rbx, rbx
jne 0x1400d8029
lea r9d, [r12 + 0x57]
mov esi, r12d
mov edi, r9d
mov rcx, qword [0x14015a290]
lea rax, [0x14015a290]
cmp rcx, rax
je 0x1400d81e0
test byte [rcx + 0x1c], 8
je 0x1400d81e0
lea edx, [rbx + 0x65]
lea rax, str.pwszXmlFilename
mov rcx, qword [rcx + 0x10]
lea r8, [0x14012ee18]
mov qword [rsp + 0x20], rax
call fcn.1400d5cb0
jmp 0x1400d81e0
test r15, r15
jne 0x1400d8066
lea r9d, [r15 + 0x57]
mov esi, r12d
mov edi, r9d
mov rcx, qword [0x14015a290]
lea rax, [0x14015a290]
cmp rcx, rax
je 0x1400d81e0
test byte [rcx + 0x1c], 8
je 0x1400d81e0
lea edx, [r15 + 0x66]
lea rax, str.pwszXmlDoc
jmp 0x1400d800f
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 0x1400d80e3
mov esi, r12d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14015a290]
lea rax, [0x14015a290]
cmp rcx, rax
je 0x1400d81e0
test byte [rcx + 0x1c], 8
je 0x1400d81e0
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov rcx, qword [0x14015a290]
lea edx, [rbx + 0x68]
mov r9d, eax
lea rax, str.GetLastError__
jmp 0x1400d800f
lea rdx, str.__xml_version_1.0__encoding_UTF_16___
mov rbp, rbx
inc rbp
cmp word [rdx + rbp*2], r12w
jne 0x1400d80ed
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 0x1400d817d
cmp dword [rsp + 0x70], ebp
jne 0x1400d817d
inc rbx
cmp word [r15 + rbx*2], r12w
jne 0x1400d8119
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 0x1400d814c
cmp dword [rsp + 0x70], ebx
je 0x1400d81d2
mov esi, r12d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14015a290]
lea rax, [0x14015a290]
cmp rcx, rax
je 0x1400d81d2
test byte [rcx + 0x1c], 8
je 0x1400d81d2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edx, 0x69
jmp 0x1400d81ac
mov esi, r12d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14015a290]
lea rax, [0x14015a290]
cmp rcx, rax
je 0x1400d81d2
test byte [rcx + 0x1c], 8
je 0x1400d81d2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edx, 0x68
mov rcx, qword [0x14015a290]
lea r8, [0x14012ee18]
mov r9d, eax
lea rax, str.GetLastError__
mov qword [rsp + 0x20], rax
mov rcx, qword [rcx + 0x10]
call fcn.1400d5cb0
test r14, r14
je 0x1400d81e0
mov rcx, r14
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
lea rcx, str.AsrWriteXmlToSifFile
call fcn.1400073f0
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