Function at 0x1400036d0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
movsxd r15, r9d
mov r13, r8
mov r12, rcx
xor r14d, r14d
mov edi, r14d
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x38], r14
mov dword [rbp - 0x30], 0xffffffff
mov esi, r14d
mov qword [rbp - 0x40], r14
lea eax, [r15 + r15*4]
movsxd rdx, eax
test eax, eax
je 0x140003742
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
ja 0x140003963
lea rcx, [rbp - 0x48]
call fcn.140003aa0
mov rsi, qword [rbp - 0x40]
mov rdi, qword [rbp - 0x48]
lea eax, [r15 + 5]
movsxd rbx, eax
mov rcx, rsi
sub rcx, rdi
sar rcx, 3
cmp rbx, rcx
jae 0x14000375e
lea rsi, [rdi + rbx*8]
jmp 0x1400037a5
jbe 0x1400037a9
mov rax, qword [rbp - 0x38]
sub rax, rdi
sar rax, 3
cmp rbx, rax
jbe 0x14000378a
lea r8, [rbp + 0x58]
mov rdx, rbx
lea rcx, [rbp - 0x48]
call fcn.140005380
mov rsi, qword [rbp - 0x40]
mov rdi, qword [rbp - 0x48]
jmp 0x1400037a9
sub rbx, rcx
lea rbx, [rbx*8]
mov r8, rbx
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
add rsi, rbx
mov qword [rbp - 0x40], rsi
mov qword [rdi], 0x4d4f524b
mov qword [rdi + 8], r14
mov qword [rdi + 0x10], r15
mov ecx, 3
mov dword [rbp - 0x30], ecx
mov qword [rdi + 0x18], r14
test r15, r15
je 0x1400037f8
mov rbx, r14
nop dword [rax]
mov r8, qword [r13 + rbx*8]
lea rdx, [rbp - 0x48]
mov rcx, r12
call fcn.1400040f0
test al, al
je 0x14000382b
inc rbx
cmp rbx, r15
jne 0x1400037d0
mov ecx, dword [rbp - 0x30]
mov rsi, qword [rbp - 0x40]
mov rdi, qword [rbp - 0x48]
movsxd rax, dword [rbp + 0x48]
mov qword [rdi + 8], rax
inc ecx
mov dword [rbp - 0x30], ecx
movsxd rax, ecx
mov qword [rdi + rax*8], 0x4b524f4d
mov qword [rbp - 0x50], 0x474e4142
cmp rsi, qword [rbp - 0x38]
je 0x14000383b
mov qword [rsi], 0x474e4142
add rsi, 8
jmp 0x140003853
mov r14, 0xfffffffffffffffd
mov rdi, qword [rbp - 0x48]
jmp 0x140003905
lea r8, [rbp - 0x50]
mov rdx, rsi
lea rcx, [rbp - 0x48]
call fcn.140004b30
mov rsi, qword [rbp - 0x40]
mov rdi, qword [rbp - 0x48]
sub rsi, rdi
sar rsi, 3
mov qword [rdi + 0x18], rsi
lea rsi, [rsi*8]
test rdi, rdi
jne 0x140003874
lea r14, [rdi - 2]
jmp 0x140003905
mov rbx, qword [r12]
mov dword [rbp + 0x58], r14d
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
movups xmmword [rbp - 0x18], xmm0
xor r9d, r9d
xor r8d, r8d
mov r15d, 1
mov edx, r15d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbp - 0x10], rax
test rax, rax
je 0x1400038fd
lea rax, [rbp - 0x28]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x58]
mov r8d, esi
mov rdx, rdi
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400038f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400038f3
mov r9d, r15d
lea r8, [rbp + 0x58]
lea rdx, [rbp - 0x28]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
cmovne r14, r15
jmp 0x1400038f3
mov r14, r15
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r14, [r14*4 - 4]
test rdi, rdi
je 0x140003945
mov rdx, qword [rbp - 0x38]
sub rdx, rdi
and rdx, 0xfffffffffffffff8
mov rax, rdi
cmp rdx, 0x1000
jb 0x14000393d
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000393d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.140041c60
mov rax, r14
mov rbx, qword [rsp + 0xc0]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1400039f0
nop
int3