Function at 0x140008070
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x638
movaps xmmword [rsp + 0x620], xmm6
mov r15, r9
mov rbx, r8
mov r14, rdx
mov r12, qword [rsp + 0x6a0]
test rcx, rcx
je 0x1400081d8
mov rdi, rcx
test r15, r15
js 0x1400083c3
mov qword [rsp + 0x1b8], rbx
xorps xmm0, xmm0
movaps xmmword [rsp + 0x1a0], xmm0
movaps xmmword [rsp + 0x190], xmm0
mov qword [rsp + 0x1c8], r15
lea rax, [rsp + 0x1c8]
mov qword [rsp + 0x190], rax
movabs rax, 0x4100000000000005
mov qword [rsp + 0x198], rax
lea rax, [rsp + 0x190]
mov qword [rsp + 0x1a0], rax
mov qword [rsp + 0x1a8], 1
movaps xmmword [rsp + 0x180], xmm0
lea rdx, str.PRC
lea rcx, [rsp + 0x180]
lea r8, [rsp + 0x1a0]
mov rbx, r12
mov r9, r12
call fcn.14001c530
mov r13, qword [rsp + 0x188]
test r13, r13
je 0x1400083b8
mov dword [rsp + 0x220], 0
jle 0x1400083b8
mov rbp, qword [rsp + 0x180]
xor r15d, r15d
mov esi, 0x40000000
lea r12, [rsp + 0x220]
nop word cs:[rax + rax]
cmp r13, r15
jbe 0x140008a63
mov r8d, r13d
sub r8d, r15d
cmp r8d, 0x40000000
cmovge r8d, esi
lea rdx, [rbp + r15]
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov r9, r12
call sub.KERNEL32.dll_WriteFile
mov ecx, dword [rsp + 0x220]
test rcx, rcx
je 0x1400083b3
test eax, eax
je 0x1400083b3
add r15, rcx
cmp r15, r13
jl 0x140008180
jmp 0x1400083b8
cmp byte [0x14009e2d8], 1
jne 0x140008236
mov rcx, r15
mov rdx, r14
call fcn.1400451b0
mov rcx, qword [0x14009e3b0]
mov rdx, r15
mov r8, r14
call fcn.1400450e0
cmp qword [rbx + 8], 0
je 0x140008a28
mov rcx, qword [0x14009e3a8]
mov rdx, rbx
mov r8, r12
movaps xmm6, xmmword [rsp + 0x620]
add rsp, 0x638
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140044fd0
test r15, r15
js 0x140008759
xorps xmm6, xmm6
movaps xmmword [rsp + 0xe0], xmm6
movaps xmmword [rsp + 0x1f0], xmm6
movaps xmmword [rsp + 0x200], xmm6
mov qword [rsp + 0x1c0], r15
lea rax, [rsp + 0x1c0]
mov qword [rsp + 0x1f0], rax
movabs rax, 0x4100000000000005
mov qword [rsp + 0x1f8], rax
mov qword [rsp + 0x200], rbx
movabs rax, 0x600000000000002
mov qword [rsp + 0x208], rax
lea rax, [rsp + 0x1f0]
mov qword [rsp + 0xe0], rax
mov qword [rsp + 0xe8], 2
mov rsi, qword [0x14009e820]
lea rdi, [rsp + 0x220]
mov r8d, 0x400
mov rcx, rdi
xor edx, edx
call fcn.140073060
movups xmmword [rsp + 0xa0], xmm6
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x38], rsi
lea rax, [0x140027800]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], 0
mov dword [rsp + 0xa0], 0
movups xmmword [rsp + 0x78], xmm6
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], 0x400
movaps xmmword [rsp + 0x30], xmm6
lea rdi, [rsp + 0x68]
mov qword [rsp + 0x38], rdi
lea rax, [0x14004b280]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea rdx, str.______n
lea rcx, [rsp + 0x30]
lea r8, [rsp + 0xe0]
mov r9, r12
call fcn.14001e100
jmp 0x140008a1d
call sub.KERNEL32.dll_GetLastError
mov r12, rbx
mov rbx, qword [rsp + 0x1b8]
test r14, r14
je 0x1400084e7
cmp r14, 2
je 0x1400085e7
cmp r14, 1
jne 0x140008a28
xorps xmm0, xmm0
movaps xmmword [rsp + 0x170], xmm0
movaps xmmword [rsp + 0x160], xmm0
mov qword [rsp + 0x160], rbx
movabs rax, 0x600000000000002
mov qword [rsp + 0x168], rax
lea rax, [rsp + 0x160]
mov qword [rsp + 0x170], rax
mov qword [rsp + 0x178], 1
movaps xmmword [rsp + 0x150], xmm0
lea rdx, str.ERR
lea rcx, [rsp + 0x150]
lea r8, [rsp + 0x170]
mov r9, r12
call fcn.14001c530
mov r14, qword [rsp + 0x158]
test r14, r14
je 0x140008a28
mov dword [rsp + 0x220], 0
jle 0x140008a28
mov r15, qword [rsp + 0x150]
xor esi, esi
mov ebp, 0x40000000
lea rbx, [rsp + 0x220]
nop dword [rax]
cmp r14, rsi
jbe 0x140008a44
mov r8d, r14d
sub r8d, esi
cmp r8d, 0x40000000
cmovge r8d, ebp
lea rdx, [r15 + rsi]
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov r9, rbx
call sub.KERNEL32.dll_WriteFile
mov ecx, dword [rsp + 0x220]
test rcx, rcx
je 0x14000874f
test eax, eax
je 0x14000874f
add rsi, rcx
cmp rsi, r14
jl 0x140008490
jmp 0x140008a28
xorps xmm0, xmm0
movaps xmmword [rsp + 0x110], xmm0
movaps xmmword [rsp + 0x100], xmm0
mov qword [rsp + 0x100], rbx
movabs rax, 0x600000000000002
mov qword [rsp + 0x108], rax
lea rax, [rsp + 0x100]
mov qword [rsp + 0x110], rax
mov qword [rsp + 0x118], 1
movaps xmmword [rsp + 0xf0], xmm0
lea rdx, str.MSG
lea rcx, [rsp + 0xf0]
lea r8, [rsp + 0x110]
mov r9, r12
call fcn.14001c530
mov r14, qword [rsp + 0xf8]
test r14, r14
je 0x140008a28
mov dword [rsp + 0x220], 0
jle 0x140008a28
mov r15, qword [rsp + 0xf0]
xor esi, esi
mov ebp, 0x40000000
lea rbx, [rsp + 0x220]
cmp r14, rsi
jbe 0x140008a44
mov r8d, r14d
sub r8d, esi
cmp r8d, 0x40000000
cmovge r8d, ebp
lea rdx, [r15 + rsi]
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov r9, rbx
call sub.KERNEL32.dll_WriteFile
mov ecx, dword [rsp + 0x220]
test rcx, rcx
je 0x14000874f
test eax, eax
je 0x14000874f
add rsi, rcx
cmp rsi, r14
jl 0x140008590
jmp 0x140008a28
mov dword [rsp + 0x220], 0
xor esi, esi
lea r15, [0x140088f88]
lea r14, [rsp + 0x220]
nop word cs:[rax + rax]
mov r8d, 3
sub r8d, esi
lea rdx, [r15 + rsi]
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov r9, r14
call sub.KERNEL32.dll_WriteFile
mov ecx, dword [rsp + 0x220]
test rcx, rcx
je 0x14000864c
test eax, eax
je 0x14000864c
add rsi, rcx
cmp rsi, 2
jbe 0x140008610
jmp 0x140008651
call sub.KERNEL32.dll_GetLastError
xorps xmm0, xmm0
movaps xmmword [rsp + 0x140], xmm0
movaps xmmword [rsp + 0x130], xmm0
mov qword [rsp + 0x130], rbx
movabs rax, 0x600000000000002
mov qword [rsp + 0x138], rax
lea rax, [rsp + 0x130]
mov qword [rsp + 0x140], rax
mov qword [rsp + 0x148], 1
movaps xmmword [rsp + 0x120], xmm0
lea rdx, str.MSG
lea rcx, [rsp + 0x120]
lea r8, [rsp + 0x140]
mov r9, r12
call fcn.14001c530
mov r14, qword [rsp + 0x128]
test r14, r14
je 0x140008a28
mov dword [rsp + 0x220], 0
jle 0x140008a28
mov r15, qword [rsp + 0x120]
xor esi, esi
mov ebp, 0x40000000
lea rbx, [rsp + 0x220]
nop word [rax + rax]
cmp r14, rsi
jbe 0x140008a44
mov r8d, r14d
sub r8d, esi
cmp r8d, 0x40000000
cmovge r8d, ebp
lea rdx, [r15 + rsi]
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov r9, rbx
call sub.KERNEL32.dll_WriteFile
mov ecx, dword [rsp + 0x220]
test rcx, rcx
je 0x14000874f
test eax, eax
je 0x14000874f
add rsi, rcx
cmp rsi, r14
jl 0x140008700
jmp 0x140008a28
call sub.KERNEL32.dll_GetLastError
jmp 0x140008a28
cmp qword [rbx + 8], 0
je 0x140008a28
xorps xmm6, xmm6
cmp r14, 1
jne 0x1400088e3
movaps xmmword [rsp + 0xd0], xmm6
movaps xmmword [rsp + 0x1d0], xmm6
movaps xmmword [rsp + 0x1e0], xmm6
lea rax, str._ERROR_
mov qword [rsp + 0x210], rax
mov qword [rsp + 0x218], 7
lea rax, [rsp + 0x210]
mov qword [rsp + 0x1d0], rax
movabs rax, 0x600000000000002
mov qword [rsp + 0x1d8], rax
mov qword [rsp + 0x1e0], rbx
mov qword [rsp + 0x1e8], rax
lea rax, [rsp + 0x1d0]
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0xd8], 2
mov rsi, qword [0x14009e820]
lea rdi, [rsp + 0x220]
mov r8d, 0x400
mov rcx, rdi
xor edx, edx
call fcn.140073060
movups xmmword [rsp + 0xa0], xmm6
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x38], rsi
lea rax, [0x140027800]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], 0
mov dword [rsp + 0xa0], 0
movups xmmword [rsp + 0x78], xmm6
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], 0x400
movaps xmmword [rsp + 0x30], xmm6
lea rdi, [rsp + 0x68]
mov qword [rsp + 0x38], rdi
lea rax, [0x14004b280]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea r8, [0x14008b5f8]
lea rcx, [rsp + 0x30]
lea rdx, [rsp + 0xd0]
jmp 0x140008a15
movaps xmmword [rsp + 0xc0], xmm6
movaps xmmword [rsp + 0xb0], xmm6
mov qword [rsp + 0xb0], rbx
movabs rax, 0x600000000000002
mov qword [rsp + 0xb8], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], 1
mov rsi, qword [0x14009e820]
lea rdi, [rsp + 0x220]
mov r8d, 0x400
mov rcx, rdi
xor edx, edx
call fcn.140073060
movups xmmword [rsp + 0xa0], xmm6
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x38], rsi
lea rax, [0x140027800]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], 0
mov dword [rsp + 0xa0], 0
movups xmmword [rsp + 0x78], xmm6
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], 0x400
movaps xmmword [rsp + 0x30], xmm6
lea rdi, [rsp + 0x68]
mov qword [rsp + 0x38], rdi
lea rax, [0x14004b280]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea r8, [0x14008b5f8]
lea rcx, [rsp + 0x30]
lea rdx, [rsp + 0xc0]
mov r9, r12
call fcn.14001def0
mov rcx, rdi
mov rdx, r12
call fcn.14004b100
movaps xmm6, xmmword [rsp + 0x620]
add rsp, 0x638
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x20], r14
lea rcx, str.c:_odin_core_os_file_windows.odin
mov edx, 0x5b
mov r8d, 0x30
mov r9, rsi
call fcn.1400525f0
mov qword [rsp + 0x20], r13
lea rcx, str.c:_odin_core_os_file_windows.odin
mov edx, 0x5b
mov r8d, 0x30
mov r9, r15
call fcn.1400525f0
int3