Function at 0x14003bea0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
movzx r14d, r9b
movzx r15d, r8b
mov r12, rdx
mov rsi, rcx
lea rdi, vtable.TextStream.0
xor ebx, ebx
mov dword [rbp - 0x15], 0xffffffff
xorps xmm0, xmm0
mov ecx, dword [0x140136ec8]
mov qword [rbp - 0x29], rdi
mov qword [rbp - 0x21], rbx
mov dword [rbp - 0x19], ebx
movdqa xmmword [rbp + 7], xmm0
cmp qword [0x140132b68], rbx
je 0x14003bfcc
cmp ecx, 0xffffffff
je 0x14003bf21
mov dword [rbp - 0x15], ecx
lea rdx, [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x14003bf21
mov byte [rbp - 0xb], bl
lea r13, vtable.TextMem.0
mov qword [rbp - 0x29], r13
mov qword [rbp + 0x17], rbx
mov dword [rbp + 0x1f], ebx
mov byte [rbp + 0x23], bl
mov qword [rbp + 0x27], rbx
mov qword [rsp + 0x28], rbx
mov byte [rsp + 0x20], r14b
movzx r9d, r15b
mov r8, r12
lea rdx, [rbp - 0x29]
mov rcx, rsi
call fcn.14003b800
mov r14d, eax
cmp eax, 3
jne 0x14003bf6e
lea rdx, [rbp - 0x29]
mov rcx, rsi
call fcn.14003c0e0
mov r14d, eax
mov qword [rbp - 0x29], r13
mov rcx, qword [rbp + 0x17]
test rcx, rcx
je 0x14003bf9f
cmp byte [rbp + 0x23], 0
je 0x14003bf9b
mov r8d, dword [rbp + 0x1f]
test r8, r8
je 0x14003bf95
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbp + 0x17], rbx
mov qword [rbp - 0x29], rdi
mov rcx, qword [rbp + 0xf]
test rcx, rcx
je 0x14003c0ad
xor edx, edx
mov r8d, 0x2000
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rbp + 0xf]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x14003c0ad
cmp ecx, 0xffffffff
je 0x14003bfe5
mov dword [rbp - 0x15], ecx
lea rdx, [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x14003bfe5
mov byte [rbp - 0xb], bl
lea r13, vtable.TextFile.0
mov qword [rbp - 0x29], r13
mov qword [rbp + 0x17], 0xffffffffffffffff
mov qword [rsp + 0x28], rbx
mov byte [rsp + 0x20], r14b
movzx r9d, r15b
mov r8, r12
lea rdx, [rbp - 0x29]
mov rcx, rsi
call fcn.14003b800
mov r14d, eax
cmp eax, 3
jne 0x14003c02c
lea rdx, [rbp - 0x29]
mov rcx, rsi
call fcn.14003c0e0
mov r14d, eax
mov qword [rbp - 0x29], r13
mov r8d, dword [rbp - 0x1d]
test r8d, r8d
je 0x14003c05d
cmp qword [rbp + 7], 0
jne 0x14003c05d
mov dword [rbp - 0x39], ebx
mov qword [rsp + 0x20], rbx
lea r9, [rbp - 0x39]
mov rdx, qword [rbp + 0xf]
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rbp - 0x1d], ebx
mov word [rbp + 3], bx
mov rcx, qword [rbp + 0x17]
cmp rcx, 0xffffffffffffffff
je 0x14003c088
mov eax, dword [rbp - 0x21]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x14003c080
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp + 0x17], 0xffffffffffffffff
mov qword [rbp - 0x29], rdi
mov rcx, qword [rbp + 0xf]
test rcx, rcx
je 0x14003c0ad
xor edx, edx
mov r8d, 0x2000
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rbp + 0xf]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov eax, r14d
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret