Function at 0x140013580
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov r12, r8
mov rbx, rdx
mov rsi, rcx
xor r13d, r13d
mov dword [rbp + 0x80], r13d
mov rcx, rdx
cmp qword [rdx + 0x18], 8
jb 0x1400135bc
mov rcx, qword [rdx]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x40000080
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi], rax
cmp rax, 0xffffffffffffffff
jne 0x1400136d1
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x140013687
mov dword [rsp + 0x48], r13d
call fcn.14000c6e0
mov qword [rsp + 0x40], rax
lock inc dword [rsp + 0x48]
mov dword [rbp + 0x80], 1
mov rax, qword [rsp + 0x40]
test rax, rax
jne 0x14001363b
call fcn.14000c6e0
mov qword [rsp + 0x40], rax
lock inc dword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x88], 0x20
mov dword [rsp + 0x30], eax
lea rax, str.CreateFileW_failed_with_error__lu
mov qword [rsp + 0x28], rax
lea r14, str.SingleInstanceSessionFile::Create
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 0x88]
movsx edx, r13w
mov rcx, rbx
call fcn.14000ef60
nop
mov eax, dword [rbp + 0x80]
test al, 1
je 0x1400136ca
and eax, 0xfffffffe
mov dword [rbp + 0x80], eax
mov qword [rsp + 0x40], r13
mov eax, 0xffffffff
lock xadd dword [rsp + 0x48], eax
cmp eax, 1
js 0x1400136c5
nop
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rsp + 0x48], eax
cmp eax, 1
jns 0x1400136b0
lock inc dword [rsp + 0x48]
xor al, al
jmp 0x140013fea
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsi + 8]
cmp rcx, rbx
je 0x140013701
mov r8, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 8
jb 0x1400136f9
mov rbx, qword [rbx]
mov rdx, rbx
call fcn.140004260
lea r15, [rsi + 0x30]
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], r13d
mov r9d, dword [0x14012d0c0]
xor r8d, r8d
mov ebx, 2
mov edx, ebx
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_LockFileEx]
lea r14, str.SingleInstanceSessionFile::Create
test eax, eax
je 0x14001373d
mov byte [rsi + 0x28], 1
jmp 0x1400139ba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x3e5
jne 0x1400138ff
mov dword [rbp + 0x98], r13d
mov dword [rsp + 0x20], 1
lea r9d, [rax + 3]
lea r8, [rbp + 0x98]
mov rdx, r15
mov rcx, qword [rsi]
call fcn.140014010
test eax, eax
je 0x140013832
mov byte [rsi + 0x28], 1
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x1400137e6
mov dword [rsp + 0x58], r13d
call fcn.14000c6e0
mov qword [rsp + 0x50], rax
lock inc dword [rsp + 0x58]
mov dword [rbp + 0x80], ebx
lea rcx, [rsp + 0x50]
call fcn.14000c110
mov dword [rbp], 0x20
lea rcx, str.LockFileEx_succeeded__I_O_pending_
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp]
movsx edx, r13w
mov rcx, rax
call fcn.14000ef60
jmp 0x1400137ec
mov ebx, dword [rbp + 0x80]
test bl, 2
je 0x1400139ba
and ebx, 0xfffffffd
mov dword [rbp + 0x80], ebx
mov qword [rsp + 0x50], r13
mov eax, 0xffffffff
lock xadd dword [rsp + 0x58], eax
cmp eax, 1
js 0x140013828
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rsp + 0x58], eax
cmp eax, 1
jns 0x140013813
lock inc dword [rsp + 0x58]
jmp 0x1400139ba
mov byte [rsi + 0x28], r13b
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x1400138ad
mov dword [rsp + 0x68], r13d
call fcn.14000c6e0
mov qword [rsp + 0x60], rax
lock inc dword [rsp + 0x68]
mov edi, 4
mov dword [rbp + 0x80], edi
lea rcx, [rsp + 0x60]
call fcn.14000c110
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 4], 0x20
mov dword [rsp + 0x30], eax
lea rax, str.LockFileEx_failed__I_O_pending__with_error__lu
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 4]
movsx edx, r13w
mov rcx, rbx
call fcn.14000ef60
jmp 0x1400138b3
mov edi, dword [rbp + 0x80]
test dil, 4
je 0x1400139ba
and edi, 0xfffffffb
mov dword [rbp + 0x80], edi
mov qword [rsp + 0x60], r13
mov eax, 0xffffffff
lock xadd dword [rsp + 0x68], eax
cmp eax, 1
js 0x1400138f5
nop dword [rax + rax]
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rsp + 0x68], eax
cmp eax, 1
jns 0x1400138e0
lock inc dword [rsp + 0x68]
jmp 0x1400139ba
mov byte [rsi + 0x28], r13b
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x140013971
mov dword [rsp + 0x78], r13d
call fcn.14000c6e0
mov qword [rsp + 0x70], rax
lock inc dword [rsp + 0x78]
mov ebx, 8
mov dword [rbp + 0x80], ebx
lea rcx, [rsp + 0x70]
call fcn.14000c110
mov dword [rbp + 8], 0x20
mov dword [rsp + 0x30], edi
lea rcx, str.LockFileEx_failed_with_error__lu
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 8]
movsx edx, r13w
mov rcx, rax
call fcn.14000ef60
jmp 0x140013977
mov ebx, dword [rbp + 0x80]
test bl, 8
je 0x1400139ba
and ebx, 0xfffffff7
mov dword [rbp + 0x80], ebx
mov qword [rsp + 0x70], r13
mov eax, 0xffffffff
lock xadd dword [rsp + 0x78], eax
cmp eax, 1
js 0x1400139b5
nop word [rax + rax]
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rsp + 0x78], eax
cmp eax, 1
jns 0x1400139a0
lock inc dword [rsp + 0x78]
cmp byte [rsi + 0x28], 0
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
je 0x140013e7d
add ecx, eax
je 0x140013a2e
mov dword [rbp - 0x78], r13d
call fcn.14000c6e0
mov qword [rbp - 0x80], rax
lock inc dword [rbp - 0x78]
mov ebx, dword [rbp + 0x80]
or ebx, 0x10
mov dword [rbp + 0x80], ebx
lea rcx, [rbp - 0x80]
call fcn.14000c110
mov dword [rbp + 0xc], 0x20
lea rcx, str.LockFile_succeeded
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 0xc]
movsx edx, r13w
mov rcx, rax
call fcn.14000ef60
jmp 0x140013a34
mov ebx, dword [rbp + 0x80]
test bl, 0x10
je 0x140013a6d
and ebx, 0xffffffef
mov dword [rbp + 0x80], ebx
mov qword [rbp - 0x80], r13
mov eax, 0xffffffff
lock xadd dword [rbp - 0x78], eax
cmp eax, 1
js 0x140013a69
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x78], eax
cmp eax, 1
jns 0x140013a55
lock inc dword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rbp + 0x10], eax
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x24]
mov r8d, 4
lea rdx, [rbp + 0x10]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140013cfd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x3e5
jne 0x140013c41
mov dword [rbp + 0x14], r13d
mov dword [rsp + 0x20], 1
lea r9d, [rax + 3]
lea r8, [rbp + 0x14]
mov rdx, r15
mov rcx, qword [rsi]
call fcn.140014010
mov ecx, dword [0x140132b68]
test eax, eax
mov eax, dword [0x140132b64]
je 0x140013b8d
add ecx, eax
je 0x140013b3e
mov dword [rbp - 0x68], r13d
call fcn.14000c6e0
mov qword [rbp - 0x70], rax
lock inc dword [rbp - 0x68]
mov ebx, dword [rbp + 0x80]
or ebx, 0x20
mov dword [rbp + 0x80], ebx
lea rcx, [rbp - 0x70]
call fcn.14000c110
mov dword [rbp + 0x18], 0x20
lea rcx, str.WriteFile_succeeded__I_O_pending_
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 0x18]
movsx edx, r13w
mov rcx, rax
call fcn.14000ef60
jmp 0x140013b44
mov ebx, dword [rbp + 0x80]
test bl, 0x20
je 0x140013db0
and ebx, 0xffffffdf
mov dword [rbp + 0x80], ebx
mov qword [rbp - 0x70], r13
mov eax, 0xffffffff
lock xadd dword [rbp - 0x68], eax
cmp eax, 1
js 0x140013b84
nop dword [rax]
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x68], eax
cmp eax, 1
jns 0x140013b70
lock inc dword [rbp - 0x68]
jmp 0x140013db0
add ecx, eax
je 0x140013bf8
mov dword [rbp - 0x58], r13d
call fcn.14000c6e0
mov qword [rbp - 0x60], rax
lock inc dword [rbp - 0x58]
mov edi, dword [rbp + 0x80]
or edi, 0x40
mov dword [rbp + 0x80], edi
lea rcx, [rbp - 0x60]
call fcn.14000c110
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x1c], 0x20
mov dword [rsp + 0x30], eax
lea rax, str.WriteFile_failed__I_O_pending__with_error__lu
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 0x1c]
movsx edx, r13w
mov rcx, rbx
call fcn.14000ef60
jmp 0x140013bfe
mov edi, dword [rbp + 0x80]
test dil, 0x40
je 0x140013db0
and edi, 0xffffffbf
mov dword [rbp + 0x80], edi
mov qword [rbp - 0x60], r13
mov eax, 0xffffffff
lock xadd dword [rbp - 0x58], eax
cmp eax, 1
js 0x140013c38
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x58], eax
cmp eax, 1
jns 0x140013c24
lock inc dword [rbp - 0x58]
jmp 0x140013db0
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x140013cb0
mov dword [rbp - 0x48], r13d
call fcn.14000c6e0
mov qword [rbp - 0x50], rax
lock inc dword [rbp - 0x48]
mov ebx, dword [rbp + 0x80]
bts ebx, 7
mov dword [rbp + 0x80], ebx
lea rcx, [rbp - 0x50]
call fcn.14000c110
mov dword [rbp + 0x20], 0x20
mov dword [rsp + 0x30], edi
lea rcx, str.WriteFile_failed_with_error__lu
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 0x20]
movsx edx, r13w
mov rcx, rax
call fcn.14000ef60
jmp 0x140013cb6
mov ebx, dword [rbp + 0x80]
test bl, bl
jns 0x140013db0
btr ebx, 7
mov dword [rbp + 0x80], ebx
mov qword [rbp - 0x50], r13
mov eax, 0xffffffff
lock xadd dword [rbp - 0x48], eax
cmp eax, 1
js 0x140013cf4
nop dword [rax + rax]
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x48], eax
cmp eax, 1
jns 0x140013ce0
lock inc dword [rbp - 0x48]
jmp 0x140013db0
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x140013d6f
mov dword [rbp - 0x38], r13d
call fcn.14000c6e0
mov qword [rbp - 0x40], rax
lock inc dword [rbp - 0x38]
mov ebx, dword [rbp + 0x80]
bts ebx, 8
mov dword [rbp + 0x80], ebx
lea rcx, [rbp - 0x40]
call fcn.14000c110
mov dword [rbp + 0x28], 0x20
mov ecx, dword [rbp + 0x24]
mov dword [rsp + 0x30], ecx
lea rcx, str.WriteFile_succeeded__lu_bytes_written
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 0x28]
movsx edx, r13w
mov rcx, rax
call fcn.14000ef60
jmp 0x140013d75
mov ebx, dword [rbp + 0x80]
bt ebx, 8
jae 0x140013db0
btr ebx, 8
mov dword [rbp + 0x80], ebx
mov qword [rbp - 0x40], r13
mov eax, 0xffffffff
lock xadd dword [rbp - 0x38], eax
cmp eax, 1
js 0x140013dac
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x38], eax
cmp eax, 1
jns 0x140013d98
lock inc dword [rbp - 0x38]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test r12, r12
je 0x140013fe8
mov byte [r12], 0
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x140013e32
mov dword [rbp - 0x28], r13d
call fcn.14000c6e0
mov qword [rbp - 0x30], rax
lock inc dword [rbp - 0x28]
mov ebx, dword [rbp + 0x80]
bts ebx, 9
mov dword [rbp + 0x80], ebx
lea rcx, [rbp - 0x30]
call fcn.14000c110
mov dword [rbp + 0x2c], 0x20
lea rcx, str.pfAlreadyExists_is_now_false
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 0x2c]
movsx edx, r13w
mov rcx, rax
call fcn.14000ef60
jmp 0x140013e38
mov ebx, dword [rbp + 0x80]
bt ebx, 9
jae 0x140013fe8
btr ebx, 9
mov dword [rbp + 0x80], ebx
mov qword [rbp - 0x30], r13
mov eax, 0xffffffff
lock xadd dword [rbp - 0x28], eax
cmp eax, 1
js 0x140013e74
nop
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x28], eax
cmp eax, 1
jns 0x140013e60
lock inc dword [rbp - 0x28]
jmp 0x140013fe8
add ecx, eax
je 0x140013ee9
mov dword [rbp - 0x18], r13d
call fcn.14000c6e0
mov qword [rbp - 0x20], rax
lock inc dword [rbp - 0x18]
mov edi, dword [rbp + 0x80]
bts edi, 0xa
mov dword [rbp + 0x80], edi
lea rcx, [rbp - 0x20]
call fcn.14000c110
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x30], 0x20
mov dword [rsp + 0x30], eax
lea rax, str.LockFile_failed_with_error__lu
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 0x30]
movsx edx, r13w
mov rcx, rbx
call fcn.14000ef60
jmp 0x140013eef
mov edi, dword [rbp + 0x80]
bt edi, 0xa
jae 0x140013f2a
btr edi, 0xa
mov dword [rbp + 0x80], edi
mov qword [rbp - 0x20], r13
mov eax, 0xffffffff
lock xadd dword [rbp - 0x18], eax
cmp eax, 1
js 0x140013f26
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x18], eax
cmp eax, 1
jns 0x140013f12
lock inc dword [rbp - 0x18]
test r12, r12
je 0x140013fe8
mov byte [r12], 1
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x140013fa3
mov dword [rbp - 8], r13d
call fcn.14000c6e0
mov qword [rbp - 0x10], rax
lock inc dword [rbp - 8]
mov ebx, dword [rbp + 0x80]
bts ebx, 0xb
mov dword [rbp + 0x80], ebx
lea rcx, [rbp - 0x10]
call fcn.14000c110
mov dword [rbp + 0x34], 0x20
lea rcx, str.pfAlreadyExists_is_now_true
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r14
lea r9, [0x140000000]
lea r8, [rbp + 0x34]
movsx edx, r13w
mov rcx, rax
call fcn.14000ef60
jmp 0x140013fa9
mov ebx, dword [rbp + 0x80]
bt ebx, 0xb
jae 0x140013fe8
btr ebx, 0xb
mov dword [rbp + 0x80], ebx
mov qword [rbp - 0x10], r13
mov eax, 0xffffffff
lock xadd dword [rbp - 8], eax
cmp eax, 1
js 0x140013fe4
nop dword [rax]
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 8], eax
cmp eax, 1
jns 0x140013fd0
lock inc dword [rbp - 8]
mov al, 1
mov rbx, qword [rsp + 0x190]
add rsp, 0x140
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret