Function at 0x1400363c0
Capabilities:
Check if file exists
Create process on windows
Get file attributes
Get file size
Write and execute a file
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x500
mov rax, qword [0x140153558]
xor rax, rsp
mov qword [rsp + 0x4f0], rax
mov rax, qword [rcx + 0x28]
mov r15, r8
mov qword [rsp + 0x58], rdx
mov rbx, rcx
test rax, rax
jne 0x14003642a
call fcn.140036b10
mov rcx, qword [rbx + 0x28]
mov rdi, rax
test rcx, rcx
je 0x140036414
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test rdi, rdi
je 0x14003648b
mov rcx, rdi
call fcn.14004deb0
mov qword [rbx + 0x28], rax
test rax, rax
je 0x140036491
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor esi, esi
cmp eax, 0xffffffff
je 0x14003652f
test al, 0x10
jne 0x14003652f
cmp dword [rbx + 0x10], esi
je 0x14003652f
mov rcx, qword [rbx]
lea edx, [rsi + 0x32]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x140036599
test eax, eax
je 0x1400364c1
cmp eax, 0x102
jne 0x140036599
mov r8d, dword [rbx + 0x10]
lea rcx, str.Editor_Already_Open_n__file_s_n__pid_ld
mov rdx, qword [rbx + 0x28]
call fcn.14004cfd0
xor eax, eax
jmp 0x140036496
xor esi, esi
mov qword [rbx + 0x28], rsi
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x4f0]
xor rcx, rsp
call fcn.1400fbfe0
mov rbx, qword [rsp + 0x558]
add rsp, 0x500
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edi, dword [rbx + 0x10]
mov rcx, rbx
call fcn.140036870
cmp dword [0x140159ee8], esi
je 0x1400364ff
mov r8d, dword [0x140166d10]
lea rcx, str._EDITOR_REAPED:_pid_ld_open_d_n
mov edx, edi
call fcn.140010500
cmp dword [0x140159ee8], esi
je 0x1400364ff
mov edx, edi
lea rcx, str._REAPED_EXTERNAL_EDITOR:_PID__ld_n
call fcn.140010500
mov rcx, rbx
call fcn.140036b10
mov rcx, qword [rbx + 0x28]
mov rdi, rax
test rcx, rcx
je 0x140036519
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test rdi, rdi
je 0x140036528
mov rcx, rdi
call fcn.14004deb0
jmp 0x14003652b
mov rax, rsi
mov qword [rbx + 0x28], rax
mov r14, qword [rbx + 0x28]
lea rbp, [0x14010129c]
mov qword [rsp + 0x30], rsi
test r15, r15
mov dword [rsp + 0x28], 0x80
mov edx, 0x40000000
cmovne rbp, r15
mov dword [rsp + 0x20], 2
xor eax, eax
xor r9d, r9d
mov qword [rbx + 0x18], rax
xor r8d, r8d
mov rcx, r14
mov qword [rbx + 0x20], rax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x1400365ba
call fcn.140036100
mov r8, rax
lea rcx, str.ERROR:_couldnt_create_file__s:__s
mov rdx, r14
call fcn.14004cfd0
jmp 0x140036491
call fcn.140036100
mov r9d, dword [rbx + 0x10]
lea rcx, str.ERROR:_WaitForSingleObject___failed:__s_nfile_s__pid_ld
mov r8, qword [rbx + 0x28]
mov rdx, rax
call fcn.14004cfd0
jmp 0x140036491
mov rdi, 0xffffffffffffffff
inc rdi
cmp byte [rdi + rbp], sil
jne 0x1400365c1
lea r9, [rsp + 0x50]
mov dword [rsp + 0x50], esi
mov r8d, edi
mov qword [rsp + 0x20], rsi
mov rdx, rbp
mov rcx, r12
mov r15d, esi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140036607
call fcn.140036100
mov r8, rax
lea rcx, str.ERROR:_WriteFile____s:__s
mov rdx, r14
call fcn.14004cfd0
jmp 0x140036623
mov r8d, dword [rsp + 0x50]
cmp r8d, edi
je 0x140036629
mov r9d, edi
lea rcx, str.ERROR:_WriteFile____s:_wrote_only__lu_bytes__expected__lu
mov rdx, r14
call fcn.14004cfd0
mov r15d, 0xffffffff
lea rdx, [rbx + 0x20]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x140036651
call fcn.140036100
mov r8, rax
lea rcx, str.ERROR:_save_file__s_:_GetFileSizeEx___failed:__s_n
mov rdx, r14
call fcn.14004cfd0
lea r9, [rsp + 0x60]
mov rcx, r12
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
jne 0x140036684
call fcn.140036100
mov r8, rax
lea rcx, str.ERROR:_save_file__s_:_GetFileTime___failed:__s_n
mov rdx, r14
call fcn.14004cfd0
mov rax, qword [rsp + 0x60]
mov rcx, r12
mov qword [rbx + 0x18], rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r15d, r15d
js 0x140036491
cmp dword [0x140159ee8], esi
mov rdi, qword [rbx + 0x28]
mov rbp, qword [rsp + 0x58]
je 0x1400366c2
mov r8, rdi
lea rcx, str.start_editor___cmd_s__filename_s_n
mov rdx, rbp
call fcn.140010500
xorps xmm0, xmm0
mov qword [rsp + 0x20], rdi
xor eax, eax
lea r8, [0x14010237c]
movups xmmword [rsp + 0x80], xmm0
mov r9, rbp
mov edx, 0x400
movups xmmword [rsp + 0xb0], xmm0
lea rcx, [rsp + 0xf0]
mov dword [rsp + 0x80], 0x68
movups xmmword [rsp + 0xc0], xmm0
mov dword [rsp + 0xbc], esi
movups xmmword [rbx], xmm0
mov word [rsp + 0xc0], si
mov qword [rbx + 0x10], rax
movups xmmword [rsp + 0x90], xmm0
mov qword [rsp + 0xe0], rax
movups xmmword [rsp + 0xa0], xmm0
movups xmmword [rsp + 0xd0], xmm0
call fcn.140036ce0
mov qword [rsp + 0x48], rbx
lea rax, [rsp + 0x80]
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0xf0]
mov qword [rsp + 0x38], rsi
xor r9d, r9d
mov qword [rsp + 0x30], rsi
xor r8d, r8d
mov dword [rsp + 0x28], esi
xor ecx, ecx
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x1400367b8
call fcn.140036100
mov r8, rax
lea rdx, [rsp + 0xf0]
lea rcx, str.CreateProcess___failed_to_start__s:__s
call fcn.14004cfd0
cmp dword [0x140159ee8], esi
je 0x140036491
lea rcx, str.Editor_failed_to_start_n
call fcn.140010500
jmp 0x140036491
mov r8d, dword [0x140166d10]
mov eax, r8d
inc r8d
mov dword [0x140166d10], r8d
test eax, eax
jne 0x14003680b
cmp qword [0x140166d18], rsi
je 0x14003680b
cmp dword [0x140159ee8], esi
je 0x1400367ed
lea rcx, str.____TIMER:_STARTING_UPDATES_n
call fcn.140010500
mov rdx, qword [0x140166d18]
xor r8d, r8d
movsd xmm0, qword [0x14010a1d8]
call fcn.140042de0
mov r8d, dword [0x140166d10]
cmp dword [0x140159ee8], esi
je 0x140036822
mov edx, dword [rbx + 0x10]
lea rcx, str.____EDITOR_STARTED:_pid__ld_open_d_n
call fcn.140010500
mov rcx, qword [0x140166d18]
test rcx, rcx
je 0x140036864
xor edx, edx
call fcn.1400444b0
test eax, eax
jne 0x140036864
cmp dword [0x140159ee8], esi
je 0x14003684d
lea rcx, str.____Editor_opened:_STARTING_UPDATE_TIMER_n
call fcn.140010500
mov rdx, qword [0x140166d18]
xor r8d, r8d
movsd xmm0, qword [0x14010a1d8]
call fcn.140042de0
xor eax, eax
jmp 0x140036496