Function at 0x14018d170
Capabilities:
Write file on windows

Disassembly:
mov byte [rsp + 0x18], r8b
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
mov eax, 0x1700
call fcn.1401e9500
sub rsp, rax
mov rax, qword [0x1402bd5c0]
xor rax, rsp
mov qword [rsp + 0x16f8], rax
mov rax, qword [rsp + 0x1710]
cmp qword [rax + 8], 0
jne 0x14018d1b5
xor al, al
jmp 0x14018d500
cmp qword [rsp + 0x1718], 0
jne 0x14018d1d4
mov rax, qword [rsp + 0x1710]
add rax, 0x10
mov qword [rsp + 0x1718], rax
xor eax, eax
mov word [rsp + 0x850], ax
lea rdi, [rsp + 0x852]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
xor r9d, r9d
lea r8, [rsp + 0x850]
mov edx, 0x104
mov rcx, qword [rsp + 0x1718]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea rcx, [rsp + 0x850]
call fcn.14018ce10
movzx eax, al
test eax, eax
jne 0x14018d228
xor al, al
jmp 0x14018d500
lea rdx, [rsp + 0xc80]
mov rcx, qword [rsp + 0x1710]
call fcn.14018cf60
xor edx, edx
mov word [rsp + 0xa70], dx
lea rdi, [rsp + 0xa72]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
mov r8d, 0x104
lea rdx, [rsp + 0xa70]
lea rcx, [rsp + 0xc80]
call fcn.140011920
movzx eax, byte [rsp + 0xeb0]
test eax, eax
je 0x14018d2f7
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xa70]
mov r8, qword [rsp + 0x1718]
xor edx, edx
lea rcx, [rsp + 0x10e0]
call fcn.1400ad3cc
lea rcx, [rsp + 0x10e0]
call fcn.1400a99d4
mov rdx, rax
mov eax, VarDateFromDisp
mov word [rsp + rdx*2 + 0x10de], ax
xor eax, eax
cmp eax, 0x5c
je 0x14018d2e5
lea rcx, [rsp + 0x10e0]
call fcn.1400a99d4
mov rdx, rax
xor eax, eax
mov word [rsp + rdx*2 + 0x10de], ax
lea rcx, [rsp + 0x10e0]
call fcn.14018ce10
jmp 0x14018d500
movzx eax, byte [rsp + 0x1720]
test eax, eax
je 0x14018d351
lea rax, [rsp + 0x14f0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x12f0]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xa70]
call fcn.1400ad33c
lea rdx, [rsp + 0x14f0]
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x12f0]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xa70]
call fcn.1400ad3cc
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xa70]
lea r8, [rsp + 0x850]
xor edx, edx
lea rcx, [rsp + 0xed0]
call fcn.1400ad3cc
lea rcx, [rsp + 0xed0]
call fcn.14018cef0
movzx eax, al
test eax, eax
jne 0x14018d394
xor al, al
jmp 0x14018d500
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0xed0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0xec0], rax
cmp qword [rsp + 0xec0], 0xffffffffffffffff
jne 0x14018d3e0
xor al, al
jmp 0x14018d500
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140063d30
test eax, eax
je 0x14018d3fc
xor al, al
jmp 0x14018d500
mov dword [rsp + 0xa60], 0
mov r8d, 0x800
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140063d60
mov dword [rsp + 0xa60], eax
cmp dword [rsp + 0xa60], 0
jle 0x14018d48c
mov dword [rsp + 0x16f0], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x16f0]
mov r8d, dword [rsp + 0xa60]
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0xec0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14018d47f
mov eax, dword [rsp + 0xa60]
cmp dword [rsp + 0x16f0], eax
je 0x14018d48c
mov dword [rsp + 0xa60], 0xffffffff
jmp 0x14018d49a
cmp dword [rsp + 0xa60], 0
jg 0x14018d407
mov rcx, qword [rsp + 0xec0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.1400642d0
cmp dword [rsp + 0xa60], 0
jne 0x14018d4d7
mov edx, dword [rsp + 0xe98]
lea rcx, [rsp + 0xed0]
call fcn.14018c980
cmp dword [rsp + 0xa60], 0
jne 0x14018d4ee
mov dword [rsp + 0x16f4], 1
jmp 0x14018d4f9
mov dword [rsp + 0x16f4], 0
mov al, byte [rsp + 0x16f4]
mov rcx, qword [rsp + 0x16f8]
xor rcx, rsp
call fcn.1400a9820
add rsp, 0x1700
pop rdi
ret