Function at 0x14001d800
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x428]
sub rsp, 0x528
xor bl, bl
movzx r8d, dx
xor dil, dil
mov rsi, rcx
sub r8d, 0x100
je 0x14001d84f
sub r8d, 1
je 0x14001d84c
sub r8d, 1
je 0x14001d848
cmp r8d, 1
jne 0x14001da40
movzx ebx, r8b
movzx edi, bl
jmp 0x14001d84f
mov bl, 1
jmp 0x14001d84f
mov dil, 1
xor edx, edx
lea rcx, [rbp - 0x10]
mov r8d, 0x208
call fcn.1400ba240
xorps xmm0, xmm0
lea rcx, str.VST_bank_files__.fxb_
xor eax, eax
mov qword [rbp - 0x20], rax
test dil, dil
mov rax, qword [rsi + 0x10]
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x58], rax
lea rax, str.VST_patch_files__.fxp_
cmovne rax, rcx
mov dword [rsp + 0x50], 0x88
movups xmmword [rbp - 0x80], xmm0
mov dword [rbp - 0x78], 0x104
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x68], rax
lea rax, [rbp - 0x10]
mov qword [rbp - 0x80], rax
movups xmmword [rsp + 0x70], xmm0
mov dword [rsp + 0x7c], 1
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
test bl, bl
je 0x14001d9fb
test dil, dil
mov dword [rbp - 0x50], 0xa81804
lea rcx, str.Save_VST_bank_file
lea rax, str.Save_VST_patch_file
cmovne rax, rcx
lea rcx, [0x14012f7f8]
mov qword [rbp - 0x58], rax
lea rax, [0x14012f800]
cmovne rax, rcx
lea rcx, [rsp + 0x50]
mov qword [rbp - 0x48], rax
call qword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
test eax, eax
je 0x14001da40
xor ebx, ebx
lea rdx, [rbp + 0x458]
mov dword [rbp + 0x458], ebx
mov rcx, rsi
test dil, dil
je 0x14001d941
call fcn.14001e990
jmp 0x14001d946
call fcn.14001ec80
mov rdi, rax
test rax, rax
je 0x14001da40
mov byte [rbp + 0x410], 1
mov rcx, rbx
nop dword [rax]
movzx eax, word [rbp + rcx - 0x10]
mov word [rbp + rcx + 0x208], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x14001d960
mov qword [rsp + 0x30], rbx
lea rcx, [rbp - 0x10]
mov dword [rsp + 0x28], pe_nt_image_headers64
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x14001d9cc
mov r8d, dword [rbp + 0x458]
lea r9, [rsp + 0x40]
mov rdx, rdi
mov dword [rsp + 0x40], ebx
mov rcx, rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov bl, 1
mov rcx, rdi
call fcn.1400b60a4
cmp rsi, 0xffffffffffffffff
je 0x14001d9ec
cmp byte [rbp + 0x410], 0
je 0x14001d9ec
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, bl
add rsp, 0x528
pop rdi
pop rsi
pop rbx
pop rbp
ret
test dil, dil
mov dword [rbp - 0x50], 0xa80804
lea rcx, str.Load_VST_bank_file
lea rax, str.Load_VST_patch_file
cmovne rax, rcx
lea rcx, [0x14012f7f8]
mov qword [rbp - 0x58], rax
lea rax, [0x14012f800]
cmovne rax, rcx
lea rcx, [rsp + 0x50]
mov qword [rbp - 0x48], rax
call qword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
test eax, eax
jne 0x14001da4e
xor al, al
add rsp, 0x528
pop rdi
pop rsi
pop rbx
pop rbp
ret
xor ebx, ebx
mov qword [rsp + 0x560], r14
mov ecx, ebx
mov byte [rbp + 0x410], 1
movzx eax, word [rbp + rcx - 0x10]
mov word [rbp + rcx + 0x208], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x14001da61
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x550], r12
lea rcx, [rbp - 0x10]
mov dword [rsp + 0x28], pe_nt_image_headers64
mov edx, 0x80000000
mov qword [rsp + 0x520], r15
lea r8d, [r9 + 1]
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14001db75
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
mov r12d, ebx
cmovne r12d, dword [rsp + 0x40]
mov ecx, r12d
call fcn.1400b609c
mov r15, rax
test rax, rax
je 0x14001db75
lea r9, [rbp + 0x458]
mov dword [rbp + 0x458], ebx
mov r8d, r12d
mov qword [rsp + 0x20], rbx
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r8d, r12d
mov rdx, r15
mov rcx, rsi
test dil, dil
je 0x14001db22
call fcn.14001dc30
jmp 0x14001db27
call fcn.14001de30
mov rcx, r15
movzx edi, al
call fcn.1400b60a4
test dil, dil
je 0x14001db5b
mov rax, qword [rsi + 8]
xor r9d, r9d
xorps xmm0, xmm0
xor r8d, r8d
movss dword [rsp + 0x28], xmm0
mov rcx, rax
mov qword [rsp + 0x20], rbx
lea edx, [r9 + 0x13]
call qword [rax + htons]
jmp 0x14001db78
mov rcx, qword [rsi + 0x10]
lea r8, [rbp - 0x10]
xor r9d, r9d
lea rdx, str.Couldnt_load_the_VST_patch_bank_file_for_this_plug_in_
call qword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x14001db78
xor dil, dil
mov r15, qword [rsp + 0x520]
mov r12, qword [rsp + 0x550]
cmp r14, 0xffffffffffffffff
je 0x14001db9f
cmp byte [rbp + 0x410], bl
je 0x14001db9f
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14, qword [rsp + 0x560]
movzx eax, dil
add rsp, 0x528
pop rdi
pop rsi
pop rbx
pop rbp
ret