Function at 0x140005900
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xc0]
sub rsp, 0x1c0
mov rax, qword [0x140017040]
xor rax, rsp
mov qword [rbp + 0xb0], rax
mov rbx, rcx
lea rax, [fcn.140007740]
mov qword [rsp + 0x20], rax
lea r9, [0x140007730]
mov edx, 0x10
mov r8d, edx
lea rcx, [rbp - 0x50]
call fcn.14000f508
nop
lea r9, [rbx + 0x5d70]
mov qword [rbx + 0x5f4], 0xffffffffffffffff
mov dword [rsp + 0x34], 2
xor r12d, r12d
cmp byte [r9 + 0x525], r12b
jne 0x140005994
cmp byte [r9 + 0x524], r12b
jne 0x140005994
mov eax, r12d
jmp 0x14000599c
mov eax, dword [rbx + 0x5e8]
inc eax
mov dword [rbx + 0x5ec], eax
cmp byte [rbx + 0x6292], r12b
je 0x140005bb9
mov dword [rsp + 0x34], 0x10
mov r11d, 3
mov dword [rsp + 0x30], r11d
lea rdx, [rbx + 0x5758]
mov qword [rsp + 0x58], rdx
lea r15, [rbp + 0xa0]
nop word [rax + rax]
mov r14d, r12d
mov r9d, dword [rbx + 0x54]
test r9d, r9d
jle 0x140005b96
lea ecx, [r11 + 8]
mov r10d, 1
shl r10d, cl
mov dword [rsp + 0x4c], r10d
lea ecx, [r11 + 4]
mov eax, 1
shl eax, cl
mov dword [rsp + 0x40], eax
mov ecx, r11d
mov eax, 1
shl eax, cl
mov dword [rsp + 0x44], eax
xor ecx, ecx
mov qword [rsp + 0x38], rcx
nop word [rax + rax]
mov rax, qword [rbx + 0x5760]
movzx ecx, word [rcx + rax + 2]
mov rax, qword [rdx]
add rax, r12
mov qword [rsp + 0x50], rax
mov r8d, ecx
mov edi, ecx
and edi, r10d
mov eax, edi
neg eax
sbb cl, cl
and cl, 0x80
movzx edx, cl
mov esi, r8d
movzx eax, dl
or al, 0x40
movzx ecx, al
and esi, dword [rsp + 0x40]
cmove ecx, edx
movzx edx, cl
mov r10d, dword [rsp + 0x44]
and r10d, r8d
mov dword [rsp + 0x48], r10d
movzx eax, dl
or al, 0x20
movzx ecx, al
test r10d, r10d
cmove ecx, edx
movzx edx, cl
cmp r11d, 3
jne 0x140005ab4
mov eax, dword [rbx + 0x5f0]
test eax, eax
jle 0x140005aa8
dec eax
cmp r14d, eax
jne 0x140005aa8
or dl, 0x10
lea eax, [r9 - 1]
cmp r14d, eax
jne 0x140005ab4
or dl, 0x18
mov r8d, dword [r15 - 0x80]
lea rcx, [r15 - 0x80]
call fcn.140007810
inc dword [r15 - 0x80]
test edi, edi
je 0x140005ae8
mov rax, qword [rsp + 0x58]
mov rax, qword [rax]
mov r8d, dword [r15 - 0x40]
movzx edx, byte [r12 + rax + 4]
lea rcx, [r15 - 0x40]
call fcn.140007810
inc dword [r15 - 0x40]
test esi, esi
je 0x140005b25
mov rax, qword [rsp + 0x58]
mov rax, qword [rax]
movzx edi, word [r12 + rax]
lea rsi, [r15 - 0xc0]
movzx edx, di
shr dx, 8
mov r8d, dword [rsi]
mov rcx, rsi
call fcn.140007810
inc dword [rsi]
mov r8d, dword [rsi]
movzx edx, dil
mov rcx, rsi
call fcn.140007810
inc dword [rsi]
cmp dword [rsp + 0x48], 0
je 0x140005b62
mov rdx, qword [rsp + 0x50]
mov eax, dword [rdx + 0xc]
sar eax, 8
mov edx, dword [rdx + 8]
shl edx, 8
sub edx, 0x100
or edx, eax
lea rcx, [rbx + 0xb0]
call fcn.14000ed80
mov r8d, dword [r15]
movzx edx, al
mov rcx, r15
call fcn.140007810
inc dword [r15]
inc r14d
mov rcx, qword [rsp + 0x38]
add rcx, 4
mov qword [rsp + 0x38], rcx
add r12, 0x14
mov r9d, dword [rbx + 0x54]
cmp r14d, r9d
mov rdx, qword [rsp + 0x58]
mov r11d, dword [rsp + 0x30]
mov r10d, dword [rsp + 0x4c]
jl 0x140005a30
xor r12d, r12d
dec r11d
mov dword [rsp + 0x30], r11d
sub rdx, 8
mov qword [rsp + 0x58], rdx
sub r15, 0x10
test r11d, r11d
jns 0x1400059e0
jmp 0x1400060a0
mov r13d, r12d
cmp dword [rbx + 0x54], r12d
jle 0x14000603c
lea r8, [rbx + 0x88]
mov r15, r12
mov rsi, r12
mov qword [rsp + 0x38], r12
mov edx, dword [rbp - 0x50]
nop dword [rax + rax]
cmp r13d, dword [rbx + 0x5f0]
jne 0x140005bf8
mov eax, dword [rbp - 0x40]
mov dword [rbx + 0x5f4], eax
mov dword [rbx + 0x5f8], edx
cmp byte [r9 + 0x525], 0
jne 0x140005c0c
cmp byte [r9 + 0x524], 0
je 0x140005c87
mov edi, r12d
mov ecx, dword [rbx + 0x5ec]
test ecx, ecx
js 0x140005c87
lea rax, [rbx + 0x5770]
cmp r13d, dword [rax]
je 0x140005c31
inc edi
add rax, 4
cmp edi, ecx
jle 0x140005c20
jmp 0x140005c87
test edi, edi
js 0x140005c87
movsxd rcx, edi
mov eax, dword [rbp - 0x40]
mov dword [rbx + rcx*4 + 0x5b70], eax
mov dword [rbx + rcx*4 + 0x5970], edx
cmp byte [r9 + 0x524], 0
je 0x140005c87
mov edx, dword [rbx + 0x108]
mov rcx, r8
call fcn.14000ed80
mov edx, eax
lea rcx, [rbp - 0x40]
call fcn.140007550
mov r8d, dword [rbp - 0x40]
movzx edx, dil
lea rcx, [rbp - 0x40]
call fcn.140007810
inc dword [rbp - 0x40]
lea r8, [rbx + 0x88]
mov rax, qword [rbx + 0x5760]
movzx r14d, word [rax + rsi + 2]
cmp word [rax + rsi], 0
je 0x140005cd5
cmp dword [rbx + 0x68], 1
jle 0x140005cd5
mov edx, dword [rbx + 0x104]
mov rcx, r8
call fcn.14000ed80
mov edx, eax
lea rcx, [rbp - 0x40]
call fcn.140007550
mov rax, qword [rbx + 0x5760]
mov r8d, dword [rbp - 0x40]
movzx edx, byte [rsi + rax]
lea rcx, [rbp - 0x40]
call fcn.140007810
inc dword [rbp - 0x40]
mov edx, r14d
lea rcx, [rbx + 0x88]
call fcn.14000ed80
mov esi, eax
mov eax, 0x80808081
imul esi
add edx, esi
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul eax, edx, 0xff
sub esi, eax
mov r8d, dword [rbp - 0x40]
test edx, edx
jle 0x140005d2c
mov edi, edx
nop dword [rax + rax]
xor edx, edx
lea rcx, [rbp - 0x40]
call fcn.140007810
mov r8d, dword [rbp - 0x40]
inc r8d
mov dword [rbp - 0x40], r8d
sub rdi, 1
jne 0x140005d10
lea edx, [rsi + 1]
lea rcx, [rbp - 0x40]
call fcn.140007810
mov r8d, dword [rbp - 0x40]
inc r8d
mov dword [rbp - 0x40], r8d
mov edi, r14d
test r14b, r14b
jns 0x140005d64
mov rax, qword [rbx + 0x5758]
movzx edx, byte [rax + r15 + 4]
lea rcx, [rbp - 0x40]
call fcn.140007810
inc dword [rbp - 0x40]
test dil, 0x40
je 0x140005d87
mov rax, qword [rbx + 0x5750]
mov r8d, dword [rbp - 0x40]
movzx edx, byte [rax + r15 + 4]
lea rcx, [rbp - 0x40]
call fcn.140007810
inc dword [rbp - 0x40]
test dil, 0x20
je 0x140005daa
mov rax, qword [rbx + 0x5748]
mov r8d, dword [rbp - 0x40]
movzx edx, byte [rax + r15 + 4]
lea rcx, [rbp - 0x40]
call fcn.140007810
inc dword [rbp - 0x40]
test dil, 0x10
je 0x140005dcd
mov rax, qword [rbx + 0x5740]
mov r8d, dword [rbp - 0x40]
movzx edx, byte [rax + r15 + 4]
lea rcx, [rbp - 0x40]
call fcn.140007810
inc dword [rbp - 0x40]
test r14b, 8
je 0x140005df7
mov rax, qword [rbx + 0x5758]
mov r8d, dword [rbp - 0x50]
movzx edx, word [r15 + rax]
lea rcx, [rbp - 0x50]
call fcn.140007770
mov edx, dword [rbp - 0x50]
add edx, 2
mov dword [rbp - 0x50], edx
jmp 0x140005dfa
mov edx, dword [rbp - 0x50]
test dil, 4
je 0x140005e21
mov rax, qword [rbx + 0x5750]
mov r8d, edx
movzx edx, word [r15 + rax]
lea rcx, [rbp - 0x50]
call fcn.140007770
mov edx, dword [rbp - 0x50]
add edx, 2
mov dword [rbp - 0x50], edx
test dil, 2
je 0x140005e48
mov rax, qword [rbx + 0x5748]
mov r8d, edx
movzx edx, word [r15 + rax]
lea rcx, [rbp - 0x50]
call fcn.140007770
mov edx, dword [rbp - 0x50]
add edx, 2
mov dword [rbp - 0x50], edx
test dil, 1
je 0x140005e6f
mov rax, qword [rbx + 0x5740]
mov r8d, edx
movzx edx, word [r15 + rax]
lea rcx, [rbp - 0x50]
call fcn.140007770
mov edx, dword [rbp - 0x50]
add edx, 2
mov dword [rbp - 0x50], edx
mov r12d, 0xfffffff4
bt r14d, 0xf
jae 0x140005edd
mov rdi, qword [rbx + 0x5758]
mov eax, dword [rdi + r15 + 0xc]
sar eax, 8
mov edx, dword [rdi + r15 + 8]
shl edx, 8
sub edx, 0x100
or edx, eax
lea rcx, [rbx + 0xb0]
call fcn.14000ed80
mov ecx, 0x12
cmp byte [rdi + r15 + 0x10], 0
mov edx, 0xc
cmovne ecx, edx
lea eax, [rax + rax*2]
lea edi, [rcx + rax*4]
mov r8d, dword [rbp - 0x50]
movzx edx, di
lea rcx, [rbp - 0x50]
call fcn.140007770
mov edx, dword [rbp - 0x50]
add edx, 2
mov dword [rbp - 0x50], edx
lea r12d, [rdi - 6]
bt r14d, 0xd
jae 0x140005f44
mov rsi, qword [rbx + 0x5750]
mov eax, dword [rsi + r15 + 0xc]
sar eax, 8
mov edx, dword [rsi + r15 + 8]
shl edx, 8
sub edx, 0x100
or edx, eax
lea rcx, [rbx + 0xb0]
call fcn.14000ed80
lea ecx, [rax + rax*2]
shl ecx, 2
sub ecx, r12d
lea edi, [rcx + 6]
cmp byte [rsi + r15 + 0x10], 0
cmovne edi, ecx
mov r8d, dword [rbp - 0x50]
movzx edx, di
lea rcx, [rbp - 0x50]
call fcn.140007770
mov edx, dword [rbp - 0x50]
add edx, 2
mov dword [rbp - 0x50], edx
add r12d, 6
add r12d, edi
bt r14d, 0xb
jae 0x140005fab
mov rsi, qword [rbx + 0x5748]
mov eax, dword [rsi + r15 + 0xc]
sar eax, 8
mov edx, dword [rsi + r15 + 8]
shl edx, 8
sub edx, 0x100
or edx, eax
lea rcx, [rbx + 0xb0]
call fcn.14000ed80
lea ecx, [rax + rax*2]
shl ecx, 2
sub ecx, r12d
lea edi, [rcx + 6]
cmp byte [rsi + r15 + 0x10], 0
cmovne edi, ecx
mov r8d, dword [rbp - 0x50]
movzx edx, di
lea rcx, [rbp - 0x50]
call fcn.140007770
mov edx, dword [rbp - 0x50]
add edx, 2
mov dword [rbp - 0x50], edx
add r12d, 6
add r12d, edi
bt r14d, 9
jae 0x140006009
mov rdi, qword [rbx + 0x5740]
mov eax, dword [rdi + r15 + 0xc]
sar eax, 8
mov edx, dword [rdi + r15 + 8]
shl edx, 8
sub edx, 0x100
or edx, eax
lea rcx, [rbx + 0xb0]
call fcn.14000ed80
lea ecx, [rax + rax*2]
shl ecx, 2
sub ecx, r12d
lea edx, [rcx + 6]
cmp byte [rdi + r15 + 0x10], 0
cmovne dx, cx
mov r8d, dword [rbp - 0x50]
lea rcx, [rbp - 0x50]
call fcn.140007770
mov edx, dword [rbp - 0x50]
add edx, 2
mov dword [rbp - 0x50], edx
inc r13d
mov rsi, qword [rsp + 0x38]
add rsi, 4
mov qword [rsp + 0x38], rsi
add r15, 0x14
cmp r13d, dword [rbx + 0x54]
mov r12d, 0
lea r8, [rbx + 0x88]
lea r9, [rbx + 0x5d70]
jl 0x140005be0
lea rcx, [rbx + 0x88]
mov edx, dword [rbx + 0x100]
call fcn.14000ed80
mov esi, eax
mov eax, 0x80808081
imul esi
add edx, esi
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul eax, edx, 0xff
sub esi, eax
mov r8d, dword [rbp - 0x40]
test edx, edx
jle 0x140006091
mov edi, edx
xor edx, edx
lea rcx, [rbp - 0x40]
call fcn.140007810
mov r8d, dword [rbp - 0x40]
inc r8d
mov dword [rbp - 0x40], r8d
sub rdi, 1
jne 0x140006075
lea edx, [rsi + 1]
lea rcx, [rbp - 0x40]
call fcn.140007810
inc dword [rbp - 0x40]
mov rcx, rbx
call fcn.140004270
mov r15d, dword [rsp + 0x34]
mov r14d, r15d
lea r13, [rbx + 0x5d70]
cmp byte [r13 + 0x51c], 0
je 0x1400061bb
mov r9d, r12d
mov r10d, r12d
mov r11d, r12d
mov rdx, r12
cmp r15, 2
jb 0x140006101
lea rax, [rbp - 0x40]
lea rcx, [r15 - 2]
shr rcx, 1
inc rcx
lea rdx, [rcx + rcx]
nop dword [rax]
add r9d, dword [rax - 0x10]
add r10d, dword [rax]
lea rax, [rax + 0x20]
sub rcx, 1
jne 0x1400060f0
cmp rdx, r15
jge 0x14000610e
add rdx, rdx
mov r11d, dword [rbp + rdx*8 - 0x50]
mov r8d, dword [rbx + 0xa8]
mov eax, 0x80808081
imul r8d
add edx, r8d
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0xff
sub r8d, eax
mov eax, dword [rbx + 0xd0]
lea ecx, [rax + rax*2]
shl edx, 8
lea eax, [r8 + rdx]
lea ecx, [rax + rcx*2]
lea edi, [r9 + rcx*2]
add r10d, 0x2c
add edi, r10d
add edi, r11d
lea r8, [0x1400126fc]
lea rdx, [r13 + 0x210]
lea rcx, [rsp + 0x58]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
je 0x140006178
xor bl, bl
jmp 0x140006475
lea rdx, [r13 + 0x210]
lea rcx, str.Writing_LSP_insane_player_source_code___s__n
call fcn.140002b00
mov r9d, dword [rbp - 0x50]
mov r8d, edi
mov rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140004460
test al, al
je 0x1400061b0
mov rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140004c40
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea rdx, [r13 + 8]
lea r8, [0x140012920]
lea rcx, [rsp + 0x58]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
jne 0x14000624d
mov edx, dword [rbx + 0x7c]
mov rcx, qword [rsp + 0x58]
call fcn.1400075d0
cmp byte [rbx + 0x628d], 0
je 0x140006205
movsxd r8, dword [rbx + 0x4c]
mov r9, qword [rsp + 0x58]
mov edx, 1
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
jmp 0x140006242
mov edi, 1
lea rsi, [rbx + 0x110]
lea r15d, [rdi + 0x1e]
test dword [rbx + 0x78], edi
je 0x140006231
movsxd r8, dword [rsi + 8]
mov r9, qword [rsp + 0x58]
mov edx, 1
mov rcx, qword [rsi]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
rol edi, 1
add rsi, 0x28
sub r15, 1
jne 0x140006215
mov r15d, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
movzx eax, byte [rbx + 0x6292]
mov byte [rsp + 0x20], al
mov r9d, r15d
lea r8, [rbp - 0x50]
mov rdx, r13
mov rcx, rbx
call fcn.1400051a0
mov ecx, dword [rbx + 0x50]
mov edx, dword [rbx + 0x4c]
add ecx, 0x3ff
add edx, ecx
sar edx, 0xa
lea rcx, str.LSP_File........:__3d_KiB_n
call fcn.140002b00
mov edx, dword [rbx + 0x4c]
lea rcx, str.__LSP_Samples...:__d_bytes_n
call fcn.140002b00
mov edx, dword [rbx + 0x50]
lea rcx, str.__LSP_Score.....:__d_bytes_n
call fcn.140002b00
mov r8d, dword [rbx + 0x80]
mov eax, 0x88888889
imul r8d
add edx, r8d
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3c
sub r8d, eax
lea rcx, str.__Duration......:__02d:_02d_n
call fcn.140002b00
mov edx, dword [rbx + 0x54]
lea rcx, str.__LSP_Frames....:__d_n
call fcn.140002b00
cmp byte [r13 + 0x525], 0
je 0x140006301
mov edx, dword [rbx + 0x5ec]
shl edx, 3
lea rcx, str.__SetPos_enabled___d_bytes__n
call fcn.140002b00
cmp byte [r13 + 0x524], 0
je 0x140006320
mov eax, dword [rbx + 0x5ec]
lea edx, [rax + rax*2]
lea rcx, str.__GetPos_enabled___d_bytes__n
call fcn.140002b00
cmp byte [rbx + 0x628e], 0
je 0x14000638f
mov edx, dword [rbx + 0xf8]
lea rcx, str.__Periods_count.:__d_n
call fcn.140002b00
mov edx, dword [rbx + 0xd0]
lea rcx, str.__LSP_Instruments:__d_n
call fcn.140002b00
mov edx, dword [rbx + 0xa8]
lea rcx, str.__Cmd_count......:__d_n
call fcn.140002b00
lea rcx, str.__Stream_details:_n
call fcn.140002b00
lea rdi, [rbp - 0x50]
nop
mov r8d, dword [rdi]
mov edx, r12d
lea rcx, str.____Stream__02d:__d_bytes_n
call fcn.140002b00
inc r12d
lea rdi, [rdi + 0x10]
sub r14, 1
jne 0x140006370
cmp byte [rbx + 0x6292], 0
je 0x1400063a4
lea rcx, str.NOTE:__micro_option_enabled__please_use_LightSpeedPlayer_Micro.asm_replayer__n
call fcn.140002b00
cmp byte [rbx + 0x6291], 0
je 0x1400063f7
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x78], xmm0
movups xmmword [rbp - 0x78], xmm0
movups xmmword [rbp - 0x68], xmm0
mov qword [rbp - 0x58], rax
lea rcx, [rsp + 0x78]
call fcn.140002b80
lea r9, [rbx + 0x6188]
lea r8, [rbx + 0x5d78]
lea rdx, [rbx + 0x5e7c]
movzx eax, byte [rbx + 0x628e]
mov byte [rsp + 0x20], al
lea rcx, [rsp + 0x78]
call fcn.140002bd0
cmp byte [rbx + 0x6293], 0
je 0x140006473
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x60]
call fcn.140002b60
nop
lea rsi, [rbx + 0x5e7c]
xor r8d, r8d
mov rdx, rsi
lea rcx, [rsp + 0x60]
call fcn.140004040
test al, al
je 0x140006469
mov edi, dword [rsp + 0x68]
mov rbx, qword [rsp + 0x60]
mov rdx, rsi
lea rcx, str.Packing_estimation_for___s__n
call fcn.140002b00
mov edx, edi
mov rcx, rbx
call fcn.140009d50
mov r8d, eax
mov edx, edi
lea rcx, str.Packing_from__d_to__d_bytes_n
call fcn.140002b00
nop
lea rcx, [rsp + 0x60]
call fcn.140002b90
mov bl, 1
lea r9, [fcn.140007740]
mov edx, 0x10
mov r8d, edx
lea rcx, [rbp - 0x50]
call fcn.14000f578
movzx eax, bl
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.14000fa60
lea r11, [rsp + 0x1c0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret