Function at 0x14009a110
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x7fd0]
mov eax, 0x80d0
call fcn.1400b3d50
sub rsp, rax
mov qword [rbp - 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x8110], rbx
mov qword [rsp + 0x8118], rsi
mov rax, qword [0x1401730f8]
xor rax, rsp
mov qword [rbp + 0x7fc0], rax
mov rsi, rdx
mov r15, rcx
xor r12d, r12d
mov edi, r12d
or rbx, 0xffffffffffffffff
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], r12
mov dword [rsp + 0x58], r12d
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x50]
call fcn.14009a5a0
test eax, eax
jne 0x14009a3bb
lea rcx, [rsi + 8]
cmp qword [rcx + 0x18], 8
jb 0x14009a1a1
mov rcx, qword [rcx]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14009a3b5
mov rbx, rax
mov qword [rbp - 0x50], rax
nop dword [rax]
mov r9, qword [r15 + 8]
lea r8, [rsp + 0x58]
mov edx, 0x4000
lea rcx, [rbp - 0x40]
call fcn.140048730
test eax, eax
je 0x14009a3ab
cmp dword [rsp + 0x58], 0
je 0x14009a321
lea rax, [rbp - 0x40]
mov qword [rsp + 0x50], rax
nop dword [rax]
nop word [rax + rax]
mov dword [rsp + 0x68], 0x4000
lea rax, [rbp + 0x3fc0]
mov qword [rsp + 0x60], rax
lea rcx, [rsp + 0x50]
call fcn.14009a770
mov edi, eax
cmp eax, 2
je 0x14009a31a
add eax, 4
cmp eax, 1
jbe 0x14009a2a8
mov esi, 0x4000
sub esi, dword [rsp + 0x68]
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
mov r8d, esi
lea rdx, [rbp + 0x3fc0]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14009a2a0
cmp dword [rsp + 0x40], esi
jne 0x14009a29b
cmp dword [rsp + 0x68], 0
je 0x14009a220
cmp edi, 1
je 0x14009a321
jmp 0x14009a1e0
or edi, 0xffffffff
jmp 0x14009a2a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp qword [rbp - 0x80], 0
je 0x14009a3bd
mov r8, qword [rbp - 0x78]
test r8, r8
je 0x14009a3bd
mov rdx, qword [rsp + 0x78]
test rdx, rdx
je 0x14009a3bd
lea rax, [rsp + 0x50]
cmp qword [rdx], rax
jne 0x14009a3bd
mov eax, dword [rdx + 8]
sub eax, 0x3f34
cmp eax, 0x1f
ja 0x14009a3bd
mov rax, qword [rdx + 0x40]
test rax, rax
je 0x14009a309
mov rdx, rax
mov rcx, qword [rbp - 0x70]
call r8
mov r8, qword [rbp - 0x78]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rbp - 0x70]
call r8
mov qword [rsp + 0x78], r12
jmp 0x14009a3bd
mov edi, 0xfffffffd
jmp 0x14009a2a8
cmp qword [rbp - 0x80], 0
je 0x14009a37a
mov r8, qword [rbp - 0x78]
test r8, r8
je 0x14009a37a
mov rdx, qword [rsp + 0x78]
test rdx, rdx
je 0x14009a37a
lea rax, [rsp + 0x50]
cmp qword [rdx], rax
jne 0x14009a37a
mov eax, dword [rdx + 8]
sub eax, 0x3f34
cmp eax, 0x1f
ja 0x14009a37a
mov rax, qword [rdx + 0x40]
test rax, rax
je 0x14009a36e
mov rdx, rax
mov rcx, qword [rbp - 0x70]
call r8
mov r8, qword [rbp - 0x78]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rbp - 0x70]
call r8
mov qword [rsp + 0x78], r12
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp edi, 1
jne 0x14009a39d
lea r9, [r15 + 0x10]
lea r8, [r15 + 0x20]
lea rdx, [r15 + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFileTime]
mov esi, 0xfffffffd
cmp edi, 1
cmove esi, r12d
jmp 0x14009a3bf
lea rcx, [rsp + 0x50]
call fcn.14009bf40
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov esi, edi
cmp rbx, 0xffffffffffffffff
je 0x14009a3e0
cmp qword [sym.imp.KERNEL32.dll_CloseHandle], 0
je 0x14009a3e0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x50], 0xffffffffffffffff
mov eax, esi
mov rcx, qword [rbp + 0x7fc0]
xor rcx, rsp
call fcn.1400b31f0
lea r11, [rsp + 0x80d0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret