Function at 0x1400d7360
Capabilities:
Write file on windows

Disassembly:
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0xb0
mov r14, rcx
mov rdx, qword gs:[0x58]
movsxd r8, dword [0x1401924e8]
mov rax, qword [0x14018b5c0]
xor rax, rsp
lea r12, [r14 + 8]
mov qword [rsp + 0xa0], rax
mov r15, qword [rdx + r8*8]
cmp qword [r12 + 0x80], 0
jne 0x1400d73b2
xor r13d, r13d
xor ebp, ebp
jmp 0x1400d7499
mov rdx, qword [r12 + 0x18]
lea rax, [r14 + 0x78]
cmp rax, qword [rdx]
je 0x1400d763d
mov r13, r12
cmp qword [r12 + 0x68], 0
je 0x1400d73d7
cmp byte [r12 + 0x71], 0
jne 0x1400d73de
xor ebp, ebp
jmp 0x1400d7485
mov rax, qword [r12]
mov rcx, r12
mov edx, 0xffffffff
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x1400d7480
mov rcx, qword [r12 + 0x68]
mov r10, rsp
lea rdx, [r14 + 0x7c]
lea r8, [rsp + 0x80]
mov rax, qword [rcx]
lea r9, [rsp + 0xa0]
lea rbp, [rsp + 0x58]
mov qword [r10 + 0x20], rbp
call qword [rax + 0x40]
test eax, eax
je 0x1400d7439
cmp eax, 1
je 0x1400d743f
cmp eax, 3
jne 0x1400d7480
mov byte [r12 + 0x71], 0
xor ebp, ebp
jmp 0x1400d7485
mov byte [r12 + 0x71], 0
mov rbp, qword [rsp + 0x58]
lea rax, [rsp + 0x80]
sub rbp, rax
je 0x1400d7474
mov r9, qword [r12 + 0x80]
lea rcx, [rsp + 0x80]
mov edx, 1
mov r8, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rbp, rax
jne 0x1400d7480
cmp byte [r12 + 0x71], 0
je 0x1400d73d7
xor r13d, r13d
xor ebp, ebp
mov rcx, qword [r12 + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test eax, eax
cmovne r13, rbp
xor eax, eax
lea r10, [r14 + 0x10]
mov byte [r12 + 0x7c], al
lea rdx, [r14 + 0x18]
mov byte [r12 + 0x71], al
lea r11, [r14 + 0x30]
mov qword [r12 + 0x18], r10
lea r8, [r14 + 0x38]
mov qword [r12 + 0x20], rdx
lea rcx, [r14 + 0x50]
mov qword [r12 + 0x38], r11
lea r9, [r14 + 0x54]
mov qword [r12 + 0x40], r8
mov qword [rdx], rbp
mov qword [r8], rbp
mov dword [r9], eax
mov qword [r10], rbp
mov qword [r11], rbp
mov dword [rcx], eax
mov rdx, qword [0x140190b80]
mov qword [r12 + 0x50], rcx
mov qword [r12 + 0x58], r9
mov qword [r12 + 0x80], rbp
mov qword [r14 + 0x7c], rdx
mov qword [r12 + 0x68], rbp
test r13, r13
je 0x1400d753f
mov rcx, qword [rsp + 0xa0]
mov qword [rsp + 0xa0], 0
xor rcx, rsp
cmp rcx, qword [0x14018b5c0]
jne 0x1400d753a
add rsp, 0xb0
pop rbp
pop r15
pop r14
pop r13
pop r12
ret
call fcn.14013ad30
mov rdx, qword [r14]
mov ecx, 4
movsxd rbp, dword [rdx + 4]
cmp qword [rbp + r14 + 0x48], 0
mov edx, dword [rbp + r14 + 0x10]
cmove eax, ecx
or edx, 0xffffffe2
or edx, eax
and edx, 0x17
mov r8d, dword [rbp + r14 + 0x14]
mov dword [rbp + r14 + 0x10], edx
and edx, r8d
je 0x1400d7509
test dl, 4
je 0x1400d757e
lea rbp, str.ios_base::badbit_set
jmp 0x1400d7593
test dl, 2
lea rax, str.ios_base::failbit_set
lea rbp, str.ios_base::eofbit_set
cmovne rbp, rax
mov eax, 4
mov edx, dword [0x140190ac0]
cmp edx, dword [r15 + rax]
jg 0x1400d75fd
mov eax, 1
lea r9, [0x140190a10]
movss xmm0, dword [rsp + 0x64]
lea rdx, [rsp + 0x70]
mov qword [rdx - 8], r9
lea rcx, [rsp + 0x30]
mov r8, rbp
movd xmm1, eax
unpcklps xmm1, xmm0
movhps xmm1, qword [rdx - 8]
mov dword [rdx - 0x10], eax
movups xmmword [rdx], xmm1
call fcn.1400f9780
lea rdx, [0x140145170]
lea rcx, [rsp + 0x30]
lea rax, vtable.std::ios_base::failure.0
mov qword [rcx], rax
call sub.VCRUNTIME140.dll__CxxThrowException
jmp 0x1400d7509
lea rcx, [0x140190ac0]
call fcn.14013af9c
cmp dword [0x140190ac0], 0xffffffff
jne 0x1400d75a4
movups xmm0, xmmword [0x140145350]
lea rcx, [method.CTableS1.virtual_48]
movups xmmword [0x140190a10], xmm0
call fcn.14013b2e4
lea rcx, [0x140190ac0]
call fcn.14013af3c
jmp 0x1400d75a4
mov rax, qword [r12 + 0x88]
mov rbp, qword [r12 + 0x90]
mov qword [rdx], rax
sub rbp, rax
mov rdx, qword [r12 + 0x38]
mov qword [rdx], rax
mov r8, qword [r12 + 0x50]
mov dword [r8], ebp
jmp 0x1400d73c4