Function at 0x140188740
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.1401da720
sub rsp, rax
mov rax, qword [0x1402aa5c0]
xor rax, rsp
mov qword [rsp + 0x16f8], rax
mov rax, qword [rsp + 0x1710]
cmp qword [rax + 8], 0
jne 0x140188785
xor al, al
jmp 0x140188ad0
cmp qword [rsp + 0x1718], 0
jne 0x1401887a4
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.1401883e0
movzx eax, al
test eax, eax
jne 0x1401887f8
xor al, al
jmp 0x140188ad0
lea rdx, [rsp + 0xc80]
mov rcx, qword [rsp + 0x1710]
call fcn.140188530
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.140010290
movzx eax, byte [rsp + 0xeb0]
test eax, eax
je 0x1401888c7
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xa70]
mov r8, qword [rsp + 0x1718]
xor edx, edx
lea rcx, [rsp + 0x10e0]
call fcn.1400ac140
lea rcx, [rsp + 0x10e0]
call fcn.1400a8944
mov rdx, rax
mov eax, VarDateFromDisp
mov word [rsp + rdx*2 + 0x10de], ax
xor eax, eax
cmp eax, 0x5c
je 0x1401888b5
lea rcx, [rsp + 0x10e0]
call fcn.1400a8944
mov rdx, rax
xor eax, eax
mov word [rsp + rdx*2 + 0x10de], ax
lea rcx, [rsp + 0x10e0]
call fcn.1401883e0
jmp 0x140188ad0
movzx eax, byte [rsp + 0x1720]
test eax, eax
je 0x140188921
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.1400ac0b0
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.1400ac140
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xa70]
lea r8, [rsp + 0x850]
xor edx, edx
lea rcx, [rsp + 0xed0]
call fcn.1400ac140
lea rcx, [rsp + 0xed0]
call fcn.1401884c0
movzx eax, al
test eax, eax
jne 0x140188964
xor al, al
jmp 0x140188ad0
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 0x1401889b0
xor al, al
jmp 0x140188ad0
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140062cf0
test eax, eax
je 0x1401889cc
xor al, al
jmp 0x140188ad0
mov dword [rsp + 0xa60], 0
mov r8d, 0x800
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140062d20
mov dword [rsp + 0xa60], eax
cmp dword [rsp + 0xa60], 0
jle 0x140188a5c
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 0x140188a4f
mov eax, dword [rsp + 0xa60]
cmp dword [rsp + 0x16f0], eax
je 0x140188a5c
mov dword [rsp + 0xa60], 0xffffffff
jmp 0x140188a6a
cmp dword [rsp + 0xa60], 0
jg 0x1401889d7
mov rcx, qword [rsp + 0xec0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x1710]
mov rcx, qword [rcx + 8]
call fcn.140063290
cmp dword [rsp + 0xa60], 0
jne 0x140188aa7
mov edx, dword [rsp + 0xe98]
lea rcx, [rsp + 0xed0]
call fcn.140187f50
cmp dword [rsp + 0xa60], 0
jne 0x140188abe
mov dword [rsp + 0x16f4], 1
jmp 0x140188ac9
mov dword [rsp + 0x16f4], 0
mov al, byte [rsp + 0x16f4]
mov rcx, qword [rsp + 0x16f8]
xor rcx, rsp
call fcn.1400a8790
add rsp, 0x1700
pop rdi
ret