Function at 0x140073de0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x2a0]
sub rsp, 0x3a0
mov rdi, rcx
lea r9, [rbp + 0x2c0]
mov rcx, qword [rcx + 0x70]
lea rdx, [rbp - 0x10]
xor esi, esi
mov r8d, pe_nt_image_headers64
mov dword [rbp + 0x2c0], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp + 0x31], 0x66326453
je 0x140073e37
mov eax, 0x8004020c
add rsp, 0x3a0
pop rdi
pop rsi
pop rbp
ret
mov eax, dword [rbp + 0x43]
lea r8, [0x14012f1c8]
bswap eax
mov qword [rsp + 0x398], rbx
lea rcx, [rdi + 0x58]
mov dword [rbp + 0x43], eax
mov r9d, 0xffffffff
mov eax, dword [rbp + 0x47]
mov qword [rsp + 0x390], r12
bswap eax
mov qword [rsp + 0x388], r13
lea edx, [r9 + 3]
mov qword [rsp + 0x380], r14
mov dword [rbp + 0x47], eax
mov qword [rsp + 0x378], r15
mov byte [rdi + 0x2c1], 1
call fcn.140025fb0
mov rcx, rdi
call fcn.140023ca0
mov ebx, dword [rbp + 0x43]
xor r9d, r9d
mov rcx, qword [rdi + 0x70]
add ebx, 0x7f
and ebx, 0xffffff80
mov dword [rdi + 0x20], 1
sub ebx, 0xffffff80
mov dword [rdi + 0x28], 0xac44
mov edx, ebx
xor r8d, r8d
mov qword [rdi + 0x290], pe_nt_image_headers64
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x2c0]
mov r8d, reloc.WSOCK32.dll_recv
mov dword [rbp + 0x2c0], esi
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0x64]
xor r9d, r9d
mov eax, dword [rsp + 0x60]
xor r8d, r8d
bswap eax
add eax, ebx
mov dword [rsp + 0x60], eax
mov eax, dword [rsp + 0x68]
bswap eax
bswap ecx
add ecx, ebx
mov dword [rsp + 0x68], eax
mov eax, dword [rsp + 0x6c]
bswap eax
mov dword [rsp + 0x64], ecx
mov edx, ecx
mov rcx, qword [rdi + 0x70]
mov dword [rsp + 0x6c], eax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x2c0]
xor ebx, ebx
lea rdx, [rbp - 0x70]
mov dword [rbp + 0x2c0], ebx
mov qword [rsp + 0x20], rbx
lea r8d, [rbx + 0x1c]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [rbp - 0x58]
xor r9d, r9d
mov rcx, qword [rdi + 0x70]
xor r8d, r8d
ror ax, 8
movzx esi, ax
movzx eax, word [rbp - 0x56]
ror ax, 8
movzx r15d, ax
mov word [rbp - 0x58], si
add esi, dword [rsp + 0x64]
mov word [rbp - 0x56], r15w
add r15d, dword [rsp + 0x64]
mov edx, esi
mov dword [rsp + 0x74], esi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [rdi + 0x70]
lea r9, [rbp + 0x2c0]
lea r8d, [rbx + 2]
mov dword [rbp + 0x2c0], ebx
lea rdx, [rbp + 0x2c8]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
ror word [rbp + 0x2c8], 8
lea r13d, [rsi + 2]
mov dword [rsp + 0x58], ebx
mov rcx, qword [rdi + 0x70]
xor r9d, r9d
mov edx, r13d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400744c2
mov rcx, qword [rdi + 0x70]
lea r9, [rsp + 0x30]
mov r8d, 8
mov dword [rsp + 0x30], ebx
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [rsp + 0x3e]
add r13d, 8
ror word [rsp + 0x3c], 8
mov r12d, 0x3e8
ror ax, 8
movzx ebx, ax
mov word [rsp + 0x3e], bx
add ebx, esi
mov dword [rsp + 0x70], r13d
xor esi, esi
lea r13d, [r12 + 1]
nop dword [rax]
mov rcx, qword [rdi + 0x70]
xor r9d, r9d
mov edx, ebx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140074497
mov rcx, qword [rdi + 0x70]
lea r9, [rsp + 0x30]
xor eax, eax
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
lea r8d, [rax + 0xc]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [rsp + 0x42]
add ebx, 0xc
ror word [rsp + 0x40], 8
mov ecx, 0xffff
ror ax, 8
mov word [rsp + 0x42], ax
cmp ax, cx
jne 0x1400740aa
mov dword [rbp + 0x170], 0x6c696e
jmp 0x14007411d
mov rcx, qword [rdi + 0x70]
xor r9d, r9d
movzx edx, ax
xor r8d, r8d
add edx, r15d
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [rdi + 0x70]
lea r9, [rsp + 0x30]
xor eax, eax
lea rdx, [rbp + 0x2c0]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
lea r8d, [rax + 1]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx r8d, byte [rbp + 0x2c0]
lea r9, [rsp + 0x30]
mov rcx, qword [rdi + 0x70]
lea rdx, [rbp + 0x170]
xor eax, eax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, byte [rbp + 0x2c0]
mov byte [rbp + rax + 0x170], 0
movzx ecx, byte [rsp + 0x45]
xor r9d, r9d
movzx edx, byte [rsp + 0x46]
xor r8d, r8d
movzx eax, byte [rsp + 0x47]
shl ecx, 0x10
add ecx, dword [rsp + 0x60]
shl edx, 8
add edx, ecx
mov rcx, qword [rdi + 0x70]
add edx, eax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, qword [rdi + 0x70]
lea r9, [rsp + 0x30]
xor eax, eax
lea rdx, [rbp + 0x2d0]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
lea r8d, [rax + 4]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rbp + 0x2d0]
bswap eax
mov dword [rbp + 0x2d0], eax
mov eax, dword [rsp + 0x38]
cmp eax, 0x20525453
jne 0x14007436f
movzx eax, word [rsp + 0x40]
cmp ax, r12w
jne 0x14007425e
lea rdx, str.sample_size
lea rcx, [rbp + 0x170]
call fcn.140104fa4
test eax, eax
jne 0x14007424a
mov r8d, dword [rbp + 0x2d0]
lea r9, [rsp + 0x30]
mov rcx, qword [rdi + 0x70]
lea rdx, [rbp + 0x70]
xor eax, eax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsx rax, byte [rbp + 0x70]
lea r8, [rbp + 0x2d8]
lea rdx, [0x14012ccb8]
lea rcx, [rbp + 0x71]
mov byte [rbp + rax + 0x71], 0
call fcn.140010150
mov ecx, dword [rbp + 0x2d8]
sub ecx, 1
je 0x140074223
sub ecx, 1
je 0x14007421a
cmp ecx, 1
jne 0x14007423d
lea r8, [0x14012f1d8]
jmp 0x14007422a
lea r8, [0x14012f1c8]
jmp 0x14007422a
lea r8, [0x14012f1f8]
mov r9d, 0xffffffff
lea rcx, [rdi + 0x58]
lea edx, [r9 + 3]
call fcn.140025fb0
mov rcx, rdi
call fcn.140023ca0
jmp 0x140074488
mov eax, dword [rsp + 0x38]
cmp eax, 0x20525453
jne 0x14007436f
movzx eax, word [rsp + 0x40]
cmp ax, r13w
jne 0x1400742ee
lea rdx, str.sample_rate
lea rcx, [rbp + 0x170]
call fcn.140104fa4
test eax, eax
jne 0x1400742da
mov r8d, dword [rbp + 0x2d0]
lea r9, [rsp + 0x30]
mov rcx, qword [rdi + 0x70]
lea rdx, [rbp + 0x70]
xor eax, eax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsx rax, byte [rbp + 0x70]
lea r8, [rsp + 0x50]
lea rdx, [0x14012f1c4]
mov dword [rsp + 0x50], 0
lea rcx, [rbp + 0x71]
mov byte [rbp + rax + 0x71], 0
call fcn.140010150
cvttss2si rax, dword [rsp + 0x50]
mov dword [rdi + 0x28], eax
jmp 0x140074488
mov eax, dword [rsp + 0x38]
cmp eax, 0x20525453
jne 0x14007436f
movzx eax, word [rsp + 0x40]
mov ecx, 0x3ea
cmp ax, cx
jne 0x140074405
lea rdx, str.channels
lea rcx, [rbp + 0x170]
call fcn.140104fa4
test eax, eax
jne 0x14007436b
mov r8d, dword [rbp + 0x2d0]
lea r9, [rsp + 0x30]
mov rcx, qword [rdi + 0x70]
lea rdx, [rbp + 0x70]
xor eax, eax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsx rax, byte [rbp + 0x70]
lea r8, [rsp + 0x54]
lea rdx, [0x14012ccb8]
mov dword [rsp + 0x54], 0
lea rcx, [rbp + 0x71]
mov byte [rbp + rax + 0x71], 0
call fcn.140010150
mov eax, dword [rsp + 0x54]
mov dword [rdi + 0x20], eax
jmp 0x140074488
mov eax, dword [rsp + 0x38]
cmp eax, 0x4c4c6473
jne 0x1400743f5
cmp word [rsp + 0x40], r12w
jne 0x140074488
cmp dword [rbp + 0x2d0], 0x16
jb 0x140074488
mov rcx, qword [rdi + 0x70]
lea r9, [rsp + 0x30]
xor eax, eax
lea rdx, [rsp + 0x78]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
lea r8d, [rax + 0x16]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [rbp - 0x76]
mov ecx, dword [rbp - 0x80]
mov edx, dword [rbp - 0x7c]
ror ax, 8
mov byte [rdi + 0x38], 1
bswap ecx
bswap edx
cmp ax, 0x75
je 0x1400743d9
cmp ax, 0x76
je 0x1400743d9
xor r8b, r8b
jmp 0x1400743dc
mov r8b, 1
cmp ax, 0x76
mov byte [rdi + 0x44], r8b
mov dword [rdi + 0x48], ecx
sete al
mov dword [rdi + 0x4c], edx
mov byte [rdi + 0x45], al
jmp 0x140074488
cmp eax, 0x20525453
jne 0x140074488
movzx eax, word [rsp + 0x40]
mov ecx, 0x934
cmp ax, cx
jne 0x140074488
lea rdx, str.midi_note
lea rcx, [rbp + 0x170]
call fcn.140104fa4
test eax, eax
jne 0x140074488
mov r8d, dword [rbp + 0x2d0]
lea r9, [rsp + 0x30]
mov rcx, qword [rdi + 0x70]
lea rdx, [rbp - 0x50]
xor eax, eax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsx rax, byte [rbp - 0x50]
lea r8, [rbp + 0x2d8]
lea rdx, [0x14012ccb8]
mov dword [rbp + 0x2d8], 0xffffffff
lea rcx, [rbp - 0x4f]
mov byte [rbp + rax - 0x4f], 0
call fcn.140010150
mov eax, dword [rbp + 0x2d8]
cmp eax, 0x7f
ja 0x140074488
mov byte [rdi + 0x38], 1
mov byte [rdi + 0x3d], al
movzx eax, word [rsp + 0x3c]
inc esi
cmp esi, eax
jle 0x140074040
mov r12d, dword [rsp + 0x58]
mov ebx, 0
movzx eax, word [rbp + 0x2c8]
inc r12d
mov r13d, dword [rsp + 0x70]
mov esi, dword [rsp + 0x74]
mov dword [rsp + 0x58], r12d
cmp r12d, eax
jle 0x140073fd0
mov ecx, dword [rdi + 0x2ac]
xor edx, edx
mov eax, dword [rbp + 0x43]
mov r15, qword [rsp + 0x378]
mov r14, qword [rsp + 0x380]
mov r13, qword [rsp + 0x388]
mov r12, qword [rsp + 0x390]
mov rbx, qword [rsp + 0x398]
shr ecx, 3
imul ecx, dword [rdi + 0x20]
div ecx
mov ecx, eax
xor eax, eax
mov qword [rdi + 0x18], rcx
add rsp, 0x3a0
pop rdi
pop rsi
pop rbp
ret