Function at 0x140143ce4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov rax, qword [0x14017d140]
xor rax, rsp
mov qword [rbp + 0x170], rax
or rsi, 0xffffffffffffffff
mov r13, r8
mov r15d, edx
mov r12, rcx
cmp qword [rcx], rsi
jne 0x140143d3e
lea r8, [0x140014950]
lea rcx, [0x140014920]
mov edx, 0x109
call fcn.1400a8be8
mov rbx, qword [0x14017e470]
and qword [rsp + 0x40], 0
xor edi, edi
and dword [rsp + 0x48], edi
mov qword [rsp + 0x50], rdi
test rbx, rbx
jne 0x140143d7a
lea r8, [0x140014ad0]
lea rcx, [0x140014920]
mov edx, 0x335
call fcn.1400a8be8
mov rbx, qword [0x14017e470]
lea rcx, [rsp + 0x60]
xor r14d, r14d
xor edx, edx
mov r8d, 0x202
mov qword [rsp + 0x58], r14
call sub.msvcrt.dll_memset
lea r8, [rsp + 0x60]
mov r9d, 0x100
mov edx, r15d
mov rcx, rbx
call qword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jne 0x140143dc5
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140143dde
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x60]
xor r8d, r8d
call fcn.1400a99e4
mov r14, qword [rsp + 0x58]
mov ebx, eax
test ebx, ebx
jns 0x140143e2e
mov rcx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rcx, rax
je 0x140143ff3
test byte [rcx + 0x1c], 1
je 0x140143ff3
cmp byte [rcx + 0x19], 2
jb 0x140143ff3
mov rcx, qword [rcx + 0x10]
lea r8, [0x140014ae8]
mov edx, CoRevokeClassObject
mov r9d, r15d
mov dword [rsp + 0x20], ebx
call fcn.1400285b4
jmp 0x140143ff3
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], r13
xor r15d, r15d
mov r9d, 0x400
xor r8d, r8d
mov rdx, r14
mov ecx, 0x500
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
jne 0x140143eab
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rcx, rax
je 0x140143ff3
test byte [rcx + 0x1c], 1
je 0x140143ff3
cmp byte [rcx + 0x19], 2
jb 0x140143ff3
lea edx, [r15 + 0x11]
mov r9, r14
jmp 0x140143f86
mov rcx, qword [rsp + 0x40]
lea rdi, [0x1400149c4]
lea r8, [rsp + 0x50]
mov rdx, rdi
call fcn.1400a9ab8
mov ebx, eax
test eax, eax
jns 0x140143f16
mov rcx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rcx, rax
je 0x140143f0c
test byte [rcx + 0x1c], 1
je 0x140143f0c
cmp byte [rcx + 0x19], 2
jb 0x140143f0c
mov r9, qword [rsp + 0x40]
mov rcx, qword [rcx + 0x10]
lea r8, [0x140014ae8]
mov edx, CoDisconnectObject
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdi
call fcn.140028ec8
mov rdi, qword [rsp + 0x50]
jmp 0x140143ff3
mov rdi, qword [rsp + 0x50]
inc rsi
cmp word [rdi + rsi*2], r15w
jne 0x140143f1b
mov rcx, qword [r12]
add esi, esi
lea r9, [rsp + 0x48]
mov r8d, esi
mov rdx, rdi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140143f9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rcx, rax
je 0x140143ff3
test byte [rcx + 0x1c], 1
je 0x140143ff3
cmp byte [rcx + 0x19], 2
jb 0x140143ff3
mov r9, qword [rsp + 0x40]
mov edx, reloc.ole32.dll_CoDisconnectObject
mov rcx, qword [rcx + 0x10]
lea r8, [0x140014ae8]
mov dword [rsp + 0x20], ebx
call fcn.14001ecbc
jmp 0x140143ff3
cmp dword [rsp + 0x48], esi
je 0x140143fba
lea r8, [0x1400149a0]
lea rcx, [0x140014920]
mov edx, 0x143
call fcn.1400a8be8
mov rcx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rcx, rax
je 0x140143ff3
test byte [rcx + 0x1c], 1
je 0x140143ff3
cmp byte [rcx + 0x19], 5
jb 0x140143ff3
mov r9, qword [rsp + 0x40]
mov rcx, qword [rcx + 0x10]
lea r8, [0x140014ae8]
mov edx, 0x14
call fcn.14001ec40
mov rcx, r14
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, rdi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.140168920
mov rbx, qword [rsp + 0x2d8]
add rsp, 0x280
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret