Function at 0x1400037c0
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 r12, r8
mov r13, rcx
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x48], xmm0
xor r14d, r14d
mov qword [rbp - 0x38], r14
mov dword [rbp - 0x30], 0xffffffff
lea eax, [r15 + r15*4]
movsxd r8, eax
mov qword [rbp - 0x50], r8
test eax, eax
je 0x14000382c
movabs rax, 0x1fffffffffffffff
cmp r8, rax
ja 0x140003a53
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x48]
call fcn.140004670
lea eax, [r15 + 5]
movsxd rbx, eax
mov rsi, qword [rbp - 0x40]
mov rcx, rsi
mov rdi, qword [rbp - 0x48]
sub rcx, rdi
sar rcx, 3
cmp rbx, rcx
jae 0x140003850
lea rsi, [rdi + rbx*8]
jmp 0x140003897
jbe 0x14000389b
mov rax, qword [rbp - 0x38]
sub rax, rdi
sar rax, 3
cmp rbx, rax
jbe 0x14000387c
lea r8, [rbp + 0x58]
mov rdx, rbx
lea rcx, [rbp - 0x48]
call fcn.140004f70
mov rsi, qword [rbp - 0x40]
mov rdi, qword [rbp - 0x48]
jmp 0x14000389b
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 0x1400038e7
mov rbx, r14
nop
mov r8, qword [r12 + rbx*8]
lea rdx, [rbp - 0x48]
mov rcx, r13
call fcn.140003f10
test al, al
je 0x14000391a
inc rbx
cmp rbx, r15
jne 0x1400038c0
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 0x14000392a
mov qword [rsi], 0x474e4142
add rsi, 8
jmp 0x140003942
mov r14, 0xfffffffffffffffd
mov rdi, qword [rbp - 0x48]
jmp 0x1400039f5
lea r8, [rbp - 0x50]
mov rdx, rsi
lea rcx, [rbp - 0x48]
call fcn.140005100
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 0x140003963
lea r14, [rdi - 2]
jmp 0x1400039f5
mov rbx, qword [r13]
mov dword [rbp + 0x58], r14d
mov qword [rbp - 0x28], r14
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x20], 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 0x1400039ed
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 0x1400039e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400039e3
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 0x1400039e3
mov r14, r15
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r14, [r14*4 - 4]
test rdi, rdi
je 0x140003a35
mov rdx, qword [rbp - 0x38]
sub rdx, rdi
and rdx, 0xfffffffffffffff8
mov rax, rdi
cmp rdx, 0x1000
jb 0x140003a2d
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003a2d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.140051634
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.140003ad0
nop
int3