Function at 0x1801ec8b0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xb0
mov qword [rbp + 0x17], 0xfffffffffffffffe
mov rsi, rcx
mov eax, dword [0x180428244]
lea r15, [0x180428218]
test al, 1
jne 0x1801ec901
or eax, 1
mov dword [0x180428244], eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x1802b28d0]
call fcn.1800a0c54
mov qword [rbp + 0x1f], r15
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea rdx, [rsi + 0x78]
lea rcx, [rbp + 7]
call fcn.1800e7430
nop
lea rax, vtable.juce::OutputStream.0
mov qword [rbp - 0x59], rax
lea rax, [0x180375c60]
mov qword [rbp - 1], rax
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x51]
call fcn.18001a440
nop
lea rax, vtable.juce::FileOutputStream.0
mov qword [rbp - 0x59], rax
mov rax, qword [rbp + 7]
mov qword [rbp - 0x49], rax
lea rbx, [rax - 0x10]
lea r12, [0x1802bccb0]
cmp rbx, r12
je 0x1801ec96d
mov eax, 1
lock xadd dword [rbx], eax
xor r14d, r14d
mov qword [rbp - 0x41], r14
lea rcx, [rbp - 0x39]
call fcn.18000bdd0
nop
mov qword [rbp - 0x31], r14
mov qword [rbp - 0x29], 0x4000
mov qword [rbp - 0x21], r14
mov ecx, 0x4000
call fcn.1800a0a4c
mov qword [rbp - 0x19], rax
lea rcx, [rbp - 0x59]
call fcn.1800c36d0
nop
or edi, 0xffffffff
cmp rbx, r12
je 0x1801ec9c2
mov eax, edi
lock xadd dword [rbx], eax
dec eax
cmp eax, edi
jne 0x1801ec9c2
mov rcx, rbx
call fcn.1800a0c6c
mov rax, qword [rbp - 0x39]
cmp byte [rax], 0
je 0x1801ec9d2
xor bl, bl
jmp 0x1801ecae7
cmp qword [rbp - 0x31], 0
je 0x1801eca6f
mov rax, qword [rbp - 0x21]
test rax, rax
je 0x1801eca4a
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x1801eca46
mov dword [rbp + 0x67], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x67]
mov r8d, eax
mov rdx, qword [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1801eca46
lea rcx, [rbp + 0xf]
call fcn.1800c3cf0
mov rdx, rax
mov rax, qword [rbp - 0x39]
mov rcx, qword [rdx]
mov qword [rbp - 0x39], rcx
mov qword [rdx], rax
mov rcx, qword [rbp + 0xf]
add rcx, 0xfffffffffffffff0
cmp rcx, r12
je 0x1801eca46
mov eax, edi
lock xadd dword [rcx], eax
dec eax
cmp eax, 0xffffffff
jne 0x1801eca46
call fcn.1800a0c6c
mov qword [rbp - 0x21], r14
mov qword [rbp + 0x7f], r14
xor r9d, r9d
lea r8, [rbp + 0x83]
xor edx, edx
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x7f], eax
mov rax, qword [rbp + 0x7f]
mov qword [rbp - 0x31], rax
lea rdx, [rbp - 9]
lea rcx, [rbp - 0x59]
call fcn.1800c34a0
mov rcx, qword [rbp - 9]
add rcx, 0xfffffffffffffff0
cmp rcx, r12
je 0x1801eca9a
lock xadd dword [rcx], edi
lea eax, [rdi - 1]
cmp eax, 0xffffffff
jne 0x1801eca9a
call fcn.1800a0c6c
mov eax, dword [rsi + 0x6c]
mov dword [rbp + 0x6f], eax
mov r8d, 4
lea rdx, [rbp + 0x6f]
lea rcx, [rbp - 0x59]
mov rax, qword [rbp - 0x59]
call qword [rax + 0x20]
mov eax, dword [rsi + 0x70]
mov dword [rbp + 0x77], eax
mov r8d, 4
lea rdx, [rbp + 0x77]
lea rcx, [rbp - 0x59]
mov rax, qword [rbp - 0x59]
call qword [rax + 0x20]
movsxd r8, dword [rsi + 0x40]
shl r8, 3
mov rdx, qword [rsi + 0x38]
lea rcx, [rbp - 0x59]
call fcn.1800e38c0
mov bl, 1
lea rcx, [rbp - 0x59]
call fcn.1800e3a90
nop
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
movzx eax, bl
add rsp, 0xb0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret