Function at 0x410570
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41377b
mov eax, dword fs:[0]
push eax
sub esp, 0x5c8
mov eax, dword [0x41a634]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x59c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x590], eax
xor eax, eax
mov dword [ebp - 0x5a8], eax
mov dword [ebp - 0x5d4], eax
mov dword [ebp - 0x5d0], edi
mov dword [ebp - 0x5b0], eax
mov dword [ebp - 0x5cc], eax
cmp dword [esi + 0x14], 0x10
mov eax, esi
mov dword [ebp - 4], edi
jb 0x4105e1
mov eax, dword [esi]
push 1
push 0x41451c
push dword [esi + 0x10]
push eax
call fcn.004021e0
add esp, 0x10
test al, al
je 0x4107c0
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push eax
push 0x400
lea eax, [ebp - 0x410]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x14
test eax, eax
je 0x410678
push eax
lea eax, [ebp - 0x410]
push eax
push edi
lea ecx, [ebp - 0x5d4]
call fcn.0040d530
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push eax
push 0x400
lea eax, [ebp - 0x410]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edi, dword [ebp - 0x5d0]
add esp, 0x14
test eax, eax
jne 0x410620
mov eax, dword [ebp - 0x5cc]
mov dword [ebp - 0x5b0], eax
mov eax, dword [ebp - 0x5d4]
mov dword [ebp - 0x5a8], eax
jmp 0x41067a
xor eax, eax
mov ecx, edi
sub ecx, eax
mov dword [ebp - 0x594], ecx
test eax, eax
je 0x41079b
test ecx, ecx
je 0x41079b
push 0x158
lea eax, [ebp - 0x568]
mov dword [ebp - 0x584], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [ebp - 0x588]
mov dword [ebp - 0x5c8], 0
mov dword [ebp - 0x57c], eax
mov eax, dword [ebp - 0x5a8]
push 0
mov dword [ebp - 0x4c8], eax
mov eax, dword [ebp - 0x594]
push 0
mov dword [ebp - 0x4c4], eax
lea eax, [ebp - 0x588]
mov dword [ebp - 0x5c4], 0x40dc30
mov dword [ebp - 0x5c0], 0x40e5d0
mov dword [ebp - 0x5bc], 0x40dc10
vmovdqu xmm0, xmmword [ebp - 0x5c8]
push 0
push eax
mov dword [ebp - 0x588], 0x40dc50
mov dword [ebp - 0x580], 0x40dcc0
vmovdqu xmmword [ebp - 0x578], xmm0
mov dword [ebp - 0x4c0], 0
call fcn.0040e7a0
add esp, 0x1c
test eax, eax
je 0x41079b
push dword [ebp - 0x594]
push str.read_wav
push str._s:_read__zu_bytes_from_stdin_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0040c0a0
add esp, 0x10
mov cx, word [ebp - 0x538]
cmp cx, 1
je 0x41080e
cmp cx, 2
je 0x41080e
cmp dword [esi + 0x14], 0x10
jb 0x41078b
mov esi, dword [esi]
push esi
push str.read_wav
push str._s:_WAV_file__s_must_be_mono_or_stereo_n
jmp 0x41088d
push str.error:_failed_to_open_WAV_file_from_stdin_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0040c0a0
add esp, 8
mov byte [ebp - 0x589], 0
jmp 0x410c0d
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x4107ca
mov eax, dword [esi]
push 0
push eax
lea eax, [ebp - 0x588]
push eax
call fcn.00410fb0
add esp, 0xc
test eax, eax
jne 0x410768
cmp dword [esi + 0x14], 0x10
jb 0x4107e8
mov esi, dword [esi]
push esi
push str.error:_failed_to_open__s_as_WAV_file_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0040c0a0
add esp, 0xc
mov byte [ebp - 0x589], 0
jmp 0x410c0d
cmp byte [ebp + 0x14], 0
je 0x41082f
cmp cx, 2
je 0x41082f
cmp dword [esi + 0x14], 0x10
jb 0x410822
mov esi, dword [esi]
push esi
push str.read_wav
push str._s:_WAV_file__s_must_be_stereo_for_diarization_n
jmp 0x41088d
cmp dword [ebp - 0x53c], 0x3e80
je 0x410870
cmp dword [esi + 0x14], 0x10
jb 0x410843
mov esi, dword [esi]
push 0x10
push esi
push str.read_wav
push str._s:_WAV_file__s_must_be__i_kHz_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0040c0a0
add esp, 0x14
mov byte [ebp - 0x589], 0
jmp 0x410c0d
cmp word [ebp - 0x536], 0x10
je 0x4108ad
cmp dword [esi + 0x14], 0x10
jb 0x410882
mov esi, dword [esi]
push esi
push str.read_wav
push str._s:_WAV_file__s_must_be_16_bit_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0040c0a0
add esp, 0x10
mov byte [ebp - 0x589], 0
jmp 0x410c0d
mov eax, dword [ebp - 0x5a8]
cmp eax, edi
jne 0x4108cb
mov edx, dword [ebp - 0x52c]
mov edi, dword [ebp - 0x530]
mov dword [ebp - 0x598], edx
jmp 0x4108eb
sub edi, eax
movzx ecx, cx
add ecx, ecx
mov dword [ebp - 0x598], 0
mov eax, edi
xor edx, edx
div ecx
mov cx, word [ebp - 0x538]
mov edi, eax
xor esi, esi
xor eax, eax
mov dword [ebp - 0x594], esi
mov dword [ebp - 0x5c4], esi
mov dword [ebp - 0x5c0], esi
mov dword [ebp - 0x5ac], eax
mov dword [ebp - 0x5bc], eax
movzx eax, cx
imul eax, edi
mov byte [ebp - 4], 1
test eax, eax
je 0x410946
lea ecx, [ebp - 0x589]
push ecx
push eax
lea ecx, [ebp - 0x5c4]
call fcn.0040d720
mov eax, dword [ebp - 0x5bc]
mov esi, dword [ebp - 0x5c4]
mov dword [ebp - 0x5ac], eax
mov dword [ebp - 0x594], esi
push esi
push dword [ebp - 0x598]
lea eax, [ebp - 0x588]
push edi
push eax
call fcn.004112d0
lea eax, [ebp - 0x588]
push eax
call fcn.004119d0
mov ecx, dword [ebp - 0x59c]
add esp, 0x14
push edi
call fcn.00410ca0
cmp word [ebp - 0x538], 1
vmovss xmm1, dword [0x415f84]
vxorpd xmm0, xmm0, xmm0
jne 0x4109fd
cmp dword [ebp - 0x598], 0
vmovlpd qword [ebp - 0x5a4], xmm0
jb 0x410a74
ja 0x4109aa
test edi, edi
je 0x410a74
mov edx, dword [ebp - 0x5a0]
mov ecx, dword [ebp - 0x5a4]
nop word [eax + eax]
movsx eax, word [esi + ecx*2]
mov esi, dword [ebp - 0x59c]
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, eax
vmulss xmm0, xmm0, xmm1
mov eax, dword [esi]
mov esi, dword [ebp - 0x594]
vmovss dword [eax + ecx*4], xmm0
add ecx, 1
adc edx, 0
cmp edx, dword [ebp - 0x598]
jb 0x4109c0
ja 0x410a74
cmp ecx, edi
jb 0x4109c0
jmp 0x410a74
cmp dword [ebp - 0x598], 0
vmovlpd qword [ebp - 0x5b8], xmm0
jb 0x410a74
ja 0x410a14
test edi, edi
je 0x410a74
mov eax, dword [ebp - 0x5b4]
vmovss xmm1, dword [0x415f80]
mov edx, dword [ebp - 0x5b8]
mov dword [ebp - 0x5a0], eax
nop
movsx eax, word [esi + edx*4]
movsx ecx, word [esi + edx*4 + 2]
add ecx, eax
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, ecx
mov ecx, dword [ebp - 0x59c]
vmulss xmm0, xmm0, xmm1
mov eax, dword [ecx]
vmovss dword [eax + edx*4], xmm0
mov eax, dword [ebp - 0x5a0]
add edx, 1
adc eax, 0
mov dword [ebp - 0x5a0], eax
cmp eax, dword [ebp - 0x598]
jb 0x410a30
ja 0x410a74
cmp edx, edi
jb 0x410a30
cmp byte [ebp + 0x14], 0
je 0x410bd3
mov ecx, dword [ebp - 0x590]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x5a0], eax
cmp eax, 2
jbe 0x410ad0
mov ecx, dword [ebp - 0x590]
push ecx
mov esi, dword [ecx]
mov eax, dword [ecx + 4]
add esi, 0x18
push eax
push esi
call fcn.00401c70
mov ecx, dword [ebp - 0x590]
add esp, 0xc
mov dword [ecx + 4], esi
mov esi, dword [ebp - 0x594]
jmp 0x410b10
jae 0x410b0a
mov edx, dword [ebp - 0x590]
mov eax, 0x2aaaaaab
mov ecx, dword [edx + 8]
sub ecx, dword [edx]
imul ecx
mov ecx, dword [ebp - 0x590]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jae 0x410c3f
lea eax, [ebp - 0x589]
push eax
push 2
call fcn.0040d970
mov ecx, dword [ebp - 0x590]
mov ecx, dword [ecx]
push edi
call fcn.00410ca0
mov eax, dword [ebp - 0x590]
push edi
mov ecx, dword [eax]
add ecx, 0xc
call fcn.00410ca0
mov edx, dword [ebp - 0x598]
vxorpd xmm0, xmm0, xmm0
vmovlpd qword [ebp - 0x5b8], xmm0
test edx, edx
jb 0x410bd3
ja 0x410b4d
test edi, edi
je 0x410bd3
mov eax, dword [ebp - 0x590]
vmovss xmm1, dword [0x415f84]
mov eax, dword [eax]
mov ecx, dword [eax]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x59c], eax
mov eax, dword [ebp - 0x5b4]
mov dword [ebp - 0x594], ecx
mov ecx, dword [ebp - 0x5b8]
mov dword [ebp - 0x5a0], eax
movsx eax, word [esi + ecx*4]
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, eax
mov eax, dword [ebp - 0x594]
vmulss xmm0, xmm0, xmm1
vmovss dword [eax + ecx*4], xmm0
movsx eax, word [esi + ecx*4 + 2]
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, eax
mov eax, dword [ebp - 0x59c]
vmulss xmm0, xmm0, xmm1
vmovss dword [eax + ecx*4], xmm0
mov eax, dword [ebp - 0x5a0]
add ecx, 1
adc eax, 0
mov dword [ebp - 0x5a0], eax
cmp eax, edx
jb 0x410b80
ja 0x410bd3
cmp ecx, edi
jb 0x410b80
mov byte [ebp - 0x589], 1
test esi, esi
je 0x410c0d
mov ecx, dword [ebp - 0x5ac]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x410c03
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410c39
push ecx
push esi
call fcn.00411dbe
add esp, 8
mov ecx, dword [ebp - 0x5a8]
test ecx, ecx
je 0x410c70
mov edx, dword [ebp - 0x5b0]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x410c66
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x410c66
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
mov eax, 2
sub eax, dword [ebp - 0x5a0]
push eax
mov eax, dword [ecx + 4]
push eax
call fcn.0040db20
mov ecx, dword [ebp - 0x590]
add esp, 0xc
mov dword [ecx + 4], eax
jmp 0x410b10
push edx
push ecx
call fcn.00411dbe
add esp, 8
mov al, byte [ebp - 0x589]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004120d2
mov esp, ebp
pop ebp
ret