Function at 0x140012c60
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 0x140012dc8
mov rdi, rcx
test r15, r15
js 0x140012fb3
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, 0x4100000000000004
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.140028950
mov r13, qword [rsp + 0x188]
test r13, r13
je 0x140012fa8
mov dword [rsp + 0x220], 0
jle 0x140012fa8
mov rbp, qword [rsp + 0x180]
xor r15d, r15d
mov esi, 0x40000000
lea r12, [rsp + 0x220]
nop word cs:[rax + rax]
cmp r13, r15
jbe 0x140013653
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 0x140012fa3
test eax, eax
je 0x140012fa3
add r15, rcx
cmp r15, r13
jl 0x140012d70
jmp 0x140012fa8
cmp byte [0x1400aaba8], 1
jne 0x140012e26
mov rcx, r15
mov rdx, r14
call fcn.140034de0
mov rcx, qword [0x1400aac80]
mov rdx, r15
mov r8, r14
call fcn.140034d10
cmp qword [rbx + 8], 0
je 0x140013618
mov rcx, qword [0x1400aac78]
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.140034c00
test r15, r15
js 0x140013349
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, 0x4100000000000004
mov qword [rsp + 0x1f8], rax
mov qword [rsp + 0x200], rbx
movabs rax, 0x600000000000001
mov qword [rsp + 0x208], rax
lea rax, [rsp + 0x1f0]
mov qword [rsp + 0xe0], rax
mov qword [rsp + 0xe8], 2
mov rsi, qword [0x1400ab0f0]
lea rdi, [rsp + 0x220]
mov r8d, 0x400
mov rcx, rdi
xor edx, edx
call fcn.14007da20
movups xmmword [rsp + 0xa0], xmm6
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x38], rsi
lea rax, [0x140038110]
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, [0x140041e20]
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.140028fc0
jmp 0x14001360d
call sub.KERNEL32.dll_GetLastError
mov r12, rbx
mov rbx, qword [rsp + 0x1b8]
test r14, r14
je 0x1400130d7
cmp r14, 2
je 0x1400131d7
cmp r14, 1
jne 0x140013618
xorps xmm0, xmm0
movaps xmmword [rsp + 0x170], xmm0
movaps xmmword [rsp + 0x160], xmm0
mov qword [rsp + 0x160], rbx
movabs rax, 0x600000000000001
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.140028950
mov r14, qword [rsp + 0x158]
test r14, r14
je 0x140013618
mov dword [rsp + 0x220], 0
jle 0x140013618
mov r15, qword [rsp + 0x150]
xor esi, esi
mov ebp, 0x40000000
lea rbx, [rsp + 0x220]
nop dword [rax]
cmp r14, rsi
jbe 0x140013634
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 0x14001333f
test eax, eax
je 0x14001333f
add rsi, rcx
cmp rsi, r14
jl 0x140013080
jmp 0x140013618
xorps xmm0, xmm0
movaps xmmword [rsp + 0x110], xmm0
movaps xmmword [rsp + 0x100], xmm0
mov qword [rsp + 0x100], rbx
movabs rax, 0x600000000000001
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.140028950
mov r14, qword [rsp + 0xf8]
test r14, r14
je 0x140013618
mov dword [rsp + 0x220], 0
jle 0x140013618
mov r15, qword [rsp + 0xf0]
xor esi, esi
mov ebp, 0x40000000
lea rbx, [rsp + 0x220]
cmp r14, rsi
jbe 0x140013634
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 0x14001333f
test eax, eax
je 0x14001333f
add rsi, rcx
cmp rsi, r14
jl 0x140013180
jmp 0x140013618
mov dword [rsp + 0x220], 0
xor esi, esi
lea r15, [0x1400896b8]
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 0x14001323c
test eax, eax
je 0x14001323c
add rsi, rcx
cmp rsi, 2
jbe 0x140013200
jmp 0x140013241
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, 0x600000000000001
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.140028950
mov r14, qword [rsp + 0x128]
test r14, r14
je 0x140013618
mov dword [rsp + 0x220], 0
jle 0x140013618
mov r15, qword [rsp + 0x120]
xor esi, esi
mov ebp, 0x40000000
lea rbx, [rsp + 0x220]
nop word [rax + rax]
cmp r14, rsi
jbe 0x140013634
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 0x14001333f
test eax, eax
je 0x14001333f
add rsi, rcx
cmp rsi, r14
jl 0x1400132f0
jmp 0x140013618
call sub.KERNEL32.dll_GetLastError
jmp 0x140013618
cmp qword [rbx + 8], 0
je 0x140013618
xorps xmm6, xmm6
cmp r14, 1
jne 0x1400134d3
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, 0x600000000000001
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 [0x1400ab0f0]
lea rdi, [rsp + 0x220]
mov r8d, 0x400
mov rcx, rdi
xor edx, edx
call fcn.14007da20
movups xmmword [rsp + 0xa0], xmm6
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x38], rsi
lea rax, [0x140038110]
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, [0x140041e20]
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, [0x14008bbd8]
lea rcx, [rsp + 0x30]
lea rdx, [rsp + 0xd0]
jmp 0x140013605
movaps xmmword [rsp + 0xc0], xmm6
movaps xmmword [rsp + 0xb0], xmm6
mov qword [rsp + 0xb0], rbx
movabs rax, 0x600000000000001
mov qword [rsp + 0xb8], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], 1
mov rsi, qword [0x1400ab0f0]
lea rdi, [rsp + 0x220]
mov r8d, 0x400
mov rcx, rdi
xor edx, edx
call fcn.14007da20
movups xmmword [rsp + 0xa0], xmm6
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x38], rsi
lea rax, [0x140038110]
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, [0x140041e20]
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, [0x14008bbd8]
lea rcx, [rsp + 0x30]
lea rdx, [rsp + 0xc0]
mov r9, r12
call fcn.140028db0
mov rcx, rdi
mov rdx, r12
call fcn.14003cee0
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:_programs_odin_core_os_file_windows.odin
mov edx, 0x5b
mov r8d, 0x30
mov r9, rsi
call fcn.14005d190
mov qword [rsp + 0x20], r13
lea rcx, str.c:_programs_odin_core_os_file_windows.odin
mov edx, 0x5b
mov r8d, 0x30
mov r9, r15
call fcn.14005d190
int3