Function at 0x1800713a0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push r13
push r14
mov rbp, rsp
sub rsp, 0x80
mov eax, dword [rcx + 4]
mov r13, r9
mov r14, r8
mov rbx, rdx
mov qword [rbp - 0x18], rdx
mov rsi, rcx
test eax, eax
js 0x180071775
cmp byte [rcx + 0x12], 0
mov qword [rsp + 0xb8], rdi
je 0x1800713e0
call fcn.180071170
mov rcx, qword [rsi + 8]
mov qword [rsp + 0xc0], r12
mov qword [rsp + 0xc8], r15
call qword [sym.imp.MSVCR100.dll__fileno]
mov ecx, eax
mov edi, eax
call qword [sym.imp.MSVCR100.dll__isatty]
test eax, eax
je 0x18007162f
mov ecx, edi
call qword [sym.imp.MSVCR100.dll__get_osfhandle]
lea rdx, [rbp - 0x10]
mov rcx, rax
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x18007162f
mov rcx, qword [rsi + 8]
call qword [sym.imp.MSVCR100.dll_fflush]
test eax, eax
jne 0x180071613
xor r12d, r12d
lea rax, [rbp - 0x40]
lea rdi, str.D:_tinderboxwin_4.2_srcVBoxRuntime_r3_stream.cpp
lea r8, [rbp - 0x48]
xor r9d, r9d
mov rdx, r14
mov rcx, rbx
mov qword [rsp + 0x28], rdi
mov dword [rbp + 0x30], r12d
mov qword [rsp + 0x20], rax
mov qword [rbp - 0x48], r12
mov qword [rbp - 0x40], r12
call sym.VBoxRT.dll_RTStrToUtf16ExTag
mov ebx, eax
test eax, eax
js 0x180071756
mov r8d, dword [rbp - 0x40]
mov rdx, qword [rbp - 0x48]
lea r9, [rbp + 0x30]
mov rcx, r15
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x180071509
mov edx, r12d
mov dword [rbp + 0x30], edx
cmp qword [rbp - 0x40], rdx
je 0x18007150c
nop dword [rax + rax]
mov rax, qword [rbp - 0x48]
mov ecx, edx
lea r9, [rbp - 0x28]
lea rdx, [rax + rcx*2]
mov r8d, 1
mov rcx, r15
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x1800714ee
cmp dword [rbp - 0x28], 1
jne 0x180071509
mov edx, dword [rbp + 0x30]
inc edx
mov eax, edx
mov dword [rbp + 0x30], edx
cmp rax, qword [rbp - 0x40]
jne 0x1800714b0
jmp 0x18007150c
test r13, r13
je 0x1800714fa
mov edx, dword [rbp + 0x30]
test edx, edx
jne 0x18007150c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.VBoxRT.dll_RTErrConvertFromErrno
mov ebx, eax
mov edx, dword [rbp + 0x30]
test ebx, ebx
js 0x180071608
mov eax, edx
cmp rax, qword [rbp - 0x40]
jne 0x180071537
test r13, r13
je 0x180071608
mov rcx, qword [rbp - 0x48]
mov qword [r13], r14
call sym.VBoxRT.dll_RTUtf16Free
jmp 0x180071622
test r13, r13
je 0x180071603
mov r12, qword [rbp - 0x18]
mov r8, qword [rbp - 0x48]
mov qword [rbp - 0x38], r8
mov rdi, r12
mov qword [rbp - 0x30], r12
test edx, edx
je 0x1800715f1
mov r14d, 0xd800
mov r15d, 0xdfff
mov r12d, 0xfffe
nop dword [rax]
movzx eax, word [r8]
cmp ax, r14w
jb 0x1800715a0
cmp ax, r15w
jbe 0x180071586
cmp ax, r12w
jb 0x1800715a0
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x38]
call sym.VBoxRT.dll_RTUtf16GetCpExInternal
mov edx, dword [rbp + 0x30]
mov r8, qword [rbp - 0x38]
mov rdi, qword [rbp - 0x30]
jmp 0x1800715ae
add r8, 2
movzx eax, ax
mov qword [rbp - 0x38], r8
mov dword [rbp - 0x50], eax
movzx eax, byte [rdi]
test al, al
js 0x1800715c4
inc rdi
movzx eax, al
mov qword [rbp - 0x30], rdi
mov dword [rbp - 0x50], eax
jmp 0x1800715dc
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x30]
call sym.VBoxRT.dll_RTStrGetCpExInternal
mov edx, dword [rbp + 0x30]
mov r8, qword [rbp - 0x38]
mov rdi, qword [rbp - 0x30]
mov rcx, r8
mov eax, edx
sub rcx, qword [rbp - 0x48]
sar rcx, 1
cmp rcx, rax
jb 0x180071570
mov r12, qword [rbp - 0x18]
mov rcx, qword [rbp - 0x48]
sub rdi, r12
mov qword [r13], rdi
call sym.VBoxRT.dll_RTUtf16Free
jmp 0x180071622
mov ebx, 0xffffff90
mov rcx, qword [rbp - 0x48]
call sym.VBoxRT.dll_RTUtf16Free
jmp 0x180071622
call qword [sym.imp.MSVCR100.dll__errno]
mov ecx, dword [rax]
call sym.VBoxRT.dll_RTErrConvertFromErrno
mov ebx, eax
test ebx, ebx
jns 0x18007175b
jmp 0x180071756
cmp byte [rsi + 0x10], 0
je 0x180071703
cmp byte [rsi + 0x11], 0
jne 0x180071703
cmp byte [rbp + 0x50], 0
je 0x180071703
xor r12d, r12d
lea rdi, str.D:_tinderboxwin_4.2_srcVBoxRuntime_r3_stream.cpp
mov r15d, r12d
cmp byte [rbx + r14], r12b
je 0x180071681
mov r8, rdi
mov rdx, r14
mov rcx, rbx
call sym.VBoxRT.dll_RTStrDupNTag
mov r15, rax
mov rbx, rax
test rax, rax
jne 0x180071681
lea ebx, [rax - 0x40]
jmp 0x180071756
lea rcx, [rbp - 0x20]
mov r8, rdi
mov rdx, rbx
call sym.VBoxRT.dll_RTStrUtf8ToCurrentCPTag
mov ebx, eax
test eax, eax
js 0x1800716f5
mov r10, qword [rbp - 0x20]
mov r9, qword [rsi + 8]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r10
repne scasb al, byte [rdi]
lea r8d, [rax + 1]
not rcx
lea rdx, [rcx - 1]
mov rcx, r10
call qword [sym.imp.MSVCR100.dll_fwrite]
cmp rax, 1
jne 0x1800716ce
test r13, r13
je 0x1800716ec
mov qword [r13], r14
jmp 0x1800716ec
mov rcx, qword [rsi + 8]
call qword [sym.imp.MSVCR100.dll_ferror]
test eax, eax
jne 0x1800716e7
test r13, r13
je 0x1800716ec
mov qword [r13], r12
jmp 0x1800716ec
mov ebx, 0xffffff90
mov rcx, qword [rbp - 0x20]
call sym.VBoxRT.dll_RTStrFree
mov rcx, r15
call sym.VBoxRT.dll_RTStrFree
test ebx, ebx
jns 0x18007175b
jmp 0x180071756
mov r9, qword [rsi + 8]
mov rcx, rbx
test r13, r13
je 0x180071738
mov r8, r14
mov edx, 1
call qword [sym.imp.MSVCR100.dll_fwrite]
mov qword [r13], rax
cmp rax, r14
je 0x180071734
mov rcx, qword [rsi + 8]
call qword [sym.imp.MSVCR100.dll_ferror]
test eax, eax
jne 0x180071751
xor eax, eax
jmp 0x18007175d
mov r8d, 1
mov rdx, r14
call qword [sym.imp.MSVCR100.dll_fwrite]
cmp rax, 1
jne 0x180071726
xor eax, eax
jmp 0x18007175d
mov ebx, 0xffffff90
mov eax, ebx
xchg dword [rsi + 4], eax
mov eax, ebx
mov r12, qword [rsp + 0xc0]
mov r15, qword [rsp + 0xc8]
mov rdi, qword [rsp + 0xb8]
add rsp, 0x80
pop r14
pop r13
pop rsi
pop rbx
pop rbp
ret