Function at 0x140064090
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
mov rbx, r9
mov esi, r8d
mov r15, rdx
mov rdi, rcx
mov eax, dword [0x140131a18]
test eax, eax
je 0x1400640e3
lea r8, str.stdout
lea rcx, [0x1401319a0]
call fcn.14000de50
mov eax, dword [0x140131a18]
cmp eax, 2
je 0x140064521
lea rax, vtable.TextStream.0
mov qword [rbp - 0x19], rax
xor r13d, r13d
mov qword [rbp - 0x11], r13
mov dword [rbp - 9], r13d
mov dword [rbp - 5], 0xffffffff
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x17], xmm0
mov ecx, dword [0x140136ec8]
cmp ecx, 0xffffffff
je 0x140064131
mov dword [rbp - 5], ecx
lea rdx, [rbp - 1]
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x140064131
mov byte [rbp + 5], r13b
lea rax, vtable.TextFile.0
mov qword [rbp - 0x19], rax
mov qword [rbp + 0x27], 0xffffffffffffffff
mov r9d, dword [rdi + 0xbe4]
mov r8d, 2
mov rdx, rbx
lea rcx, [rbp - 0x19]
call fcn.1400d3360
mov rcx, qword [rbp + 0x1f]
test rcx, rcx
jne 0x140064270
mov ecx, 0x2000
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rcx, rax
mov qword [rbp + 0x1f], rax
mov ebx, dword [rbp - 0xd]
lea r10, [fcn.1400d3fb0]
test rcx, rcx
je 0x1400643e4
test esi, esi
jne 0x1400641b3
mov rsi, 0xffffffffffffffff
nop word [rax + rax]
inc rsi
cmp word [r15 + rsi*2], 0
jne 0x1400641a0
test esi, esi
je 0x1400643e4
add rbx, rcx
lea r12, [rcx + 0x1ffc]
mov rdi, r15
mov eax, esi
lea r14, [r15 + rax*2]
mov r8d, 0x3ff
mov edx, ntohs
cmp dword [rbp - 5], 0x4b0
je 0x1400642e0
cmp rdi, r14
jae 0x14006422f
movzx eax, word [rdi]
test eax, 0xffffff80
jne 0x14006422b
cmp rbx, r12
jae 0x140064333
cmp eax, 0xa
jne 0x14006421a
test byte [rbp - 0x11], 4
je 0x14006421a
cmp rdi, r15
movzx eax, word [rbp + 0x13]
je 0x14006420e
movzx eax, word [rdi - 2]
cmp ax, 0xd
je 0x14006421a
mov byte [rbx], ntohs
inc rbx
movzx eax, byte [rdi]
mov byte [rbx], al
inc rbx
add rdi, 2
cmp rdi, r14
jb 0x1400641e3
mov rcx, qword [rbp + 0x1f]
cmp rbx, r12
jb 0x14006435e
sub ebx, ecx
mov rax, qword [rbp - 0x19]
mov r9, qword [rax + 0x20]
mov r8d, ebx
mov rdx, rcx
cmp r9, r10
jne 0x14006433c
mov dword [rbp - 0x29], r13d
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x29]
mov rcx, qword [rbp + 0x27]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbp - 0x29]
jmp 0x140064343
mov rdx, qword [rbp + 0x17]
test rdx, rdx
je 0x14006417c
mov eax, dword [rbp - 0xd]
sub rdx, rax
sub rdx, rcx
mov rax, qword [rbp - 0x19]
mov r9, qword [rax + 0x28]
lea rax, [method.TextFile.virtual_40]
cmp r9, rax
jne 0x1400642c0
mov r9d, 1
xor r8d, r8d
mov rcx, qword [rbp + 0x27]
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov qword [rbp + 0x17], r13
mov ebx, r13d
mov dword [rbp - 0xd], ebx
mov rcx, qword [rbp + 0x1f]
jmp 0x14006417f
mov r8d, 1
lea rcx, [rbp - 0x19]
call r9
mov qword [rbp + 0x17], r13
mov ebx, r13d
mov dword [rbp - 0xd], ebx
mov rcx, qword [rbp + 0x1f]
jmp 0x14006417f
cmp rdi, r14
jae 0x14006422f
nop dword [rax]
cmp rbx, r12
jae 0x140064333
cmp word [rdi], 0xa
jne 0x14006431b
test byte [rbp - 0x11], 4
je 0x14006431b
cmp rdi, r15
movzx eax, word [rbp + 0x13]
je 0x14006430e
movzx eax, word [rdi - 2]
cmp ax, 0xd
je 0x14006431b
mov word [rbx], dx
add rbx, 2
movzx eax, word [rdi]
mov word [rbx], ax
add rbx, 2
add rdi, 2
cmp rdi, r14
jb 0x1400642f0
jmp 0x14006422b
mov rcx, qword [rbp + 0x1f]
jmp 0x140064238
lea rcx, [rbp - 0x19]
call r9
cmp eax, ebx
jb 0x140064422
mov rcx, qword [rbp + 0x1f]
mov rbx, rcx
lea r10, [fcn.1400d3fb0]
jmp 0x1400641c6
cmp rdi, r14
je 0x1400643d6
mov eax, 0x2800
add ax, word [rdi]
cmp ax, r8w
ja 0x14006438d
lea rcx, [rdi + 2]
cmp rcx, r14
jae 0x14006438d
mov eax, 0x2400
add ax, word [rcx]
cmp ax, r8w
mov esi, 2
jbe 0x140064392
mov esi, 1
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rbx
mov r9d, esi
mov r8, rdi
xor edx, edx
mov ecx, dword [rbp - 5]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rcx, eax
add rbx, rcx
mov eax, esi
lea rdi, [rdi + rax*2]
mov rcx, qword [rbp + 0x1f]
lea r10, [fcn.1400d3fb0]
jmp 0x1400641c6
movzx eax, word [r14 - 2]
mov word [rbp + 0x13], ax
sub ebx, ecx
mov dword [rbp - 0xd], ebx
test ebx, ebx
je 0x14006442c
cmp qword [rbp + 0x17], 0
jne 0x14006442c
mov rax, qword [rbp - 0x19]
mov r9, qword [rax + 0x20]
mov r8d, ebx
mov rdx, rcx
cmp r9, r10
jne 0x14006441b
mov dword [rbp - 0x29], r13d
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x29]
mov rcx, qword [rbp + 0x27]
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140064422
lea rcx, [rbp - 0x19]
call r9
mov ebx, r13d
mov dword [rbp - 0xd], ebx
mov rcx, qword [rbp + 0x1f]
mov word [rbp + 0x13], r13w
mov rax, qword [rbp - 0x19]
mov rdx, qword [rax + 0x10]
lea rax, [method.TextFile.virtual_16]
cmp rdx, rax
jne 0x14006447b
mov r10, qword [rbp + 0x27]
cmp r10, 0xffffffffffffffff
je 0x14006448c
mov eax, dword [rbp - 0x11]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x14006446e
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x1f]
mov ebx, dword [rbp - 0xd]
mov r10, 0xffffffffffffffff
mov qword [rbp + 0x27], r10
jmp 0x14006448c
lea rcx, [rbp - 0x19]
call rdx
mov r10, qword [rbp + 0x27]
mov rcx, qword [rbp + 0x1f]
mov ebx, dword [rbp - 0xd]
lea rax, vtable.TextFile.0
mov qword [rbp - 0x19], rax
test ebx, ebx
je 0x1400644ca
cmp qword [rbp + 0x17], 0
jne 0x1400644ca
mov dword [rbp - 0x29], r13d
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x29]
mov r8d, ebx
mov rdx, rcx
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rbp - 0xd], r13d
mov r10, qword [rbp + 0x27]
mov rcx, qword [rbp + 0x1f]
mov word [rbp + 0x13], r13w
cmp r10, 0xffffffffffffffff
je 0x1400644f9
mov eax, dword [rbp - 0x11]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x1400644f1
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x1f]
mov qword [rbp + 0x27], 0xffffffffffffffff
lea rax, vtable.TextStream.0
mov qword [rbp - 0x19], rax
test rcx, rcx
je 0x140064521
xor edx, edx
mov r8d, 0x2000
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rbp + 0x1f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
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