Function at 0x401300
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov eax, 0x4c64
mov ebp, esp
and esp, 0xfffffff0
push edi
push esi
push ebx
call fcn.0040c710
mov ebx, dword [ebp + 0xc]
call sym.___main
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x54
add eax, 0x40
mov dword [esp + 4], 1
mov dword [esp + 0x74], eax
mov dword [esp + 0xc], eax
mov dword [esp], str.mpcdec___Musepack__MPC__decoder_v1.0.0__C__2006_2009_MDT_nBuilt_Nov_23_2011_11:44:49_n
call sym._fwrite
mov byte [esp + 0x60], 0
mov byte [esp + 0x6c], 0
mov edi, dword [ebp + 8]
mov dword [esp + 8], 0x41016c
mov dword [esp + 4], ebx
mov dword [esp], edi
call sym._getopt
cmp eax, 0xffffffff
je 0x4013c0
cmp eax, 0x68
je 0x401390
cmp eax, 0x69
je 0x401383
cmp eax, 0x63
jne 0x401351
mov byte [esp + 0x60], 1
jmp 0x401351
mov byte [esp + 0x6c], 1
jmp 0x401351
mov eax, dword [ebx]
mov edx, dword [esp + 0x74]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Usage:__s___i____h___infile.mpc____outfile.wav___n_i_:_print_file_information_on_stdout_n_c_:_check_the_file_for_stream_errors_n______doesnt_fully_decode__outfile_will_be_ignored__n_h_:_print_this_help_nyou_can_use_stdin_and_stdout_as_resp.__infile.mpc__and_n_outfile.wav__replacing_the_file_name_by_____n
mov dword [esp], edx
call sym._fprintf
xor ebx, ebx
add esp, 0x4c64
mov eax, ebx
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [0x40f42c]
mov edx, edi
sub edx, eax
dec edx
cmp edx, 1
ja 0x401707
mov eax, dword [ebx + eax*4]
mov ecx, 2
mov esi, eax
mov edi, 0x410170
repe cmpsb byte [esi], byte es:[edi]
jne 0x40174a
mov edx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], 0x8000
mov eax, dword [edx + 0x10]
mov dword [esp], eax
call sym._setmode
lea eax, [esp + 0x4c2c]
mov edi, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], edi
mov dword [esp + 0x58], eax
mov dword [esp], eax
call sym._mpc_reader_init_stdio_stream
test eax, eax
js 0x401740
mov edi, dword [esp + 0x58]
mov dword [esp], edi
call sym._mpc_demux_init
mov dword [esp + 0x5c], eax
test eax, eax
je 0x401740
lea esi, [esp + 0x4ac0]
mov dword [esp], eax
mov dword [esp + 4], esi
call sym._mpc_demux_get_info
cmp byte [esp + 0x6c], 1
je 0x4018bf
cmp byte [esp + 0x60], 0
jne 0x401766
mov eax, dword [ebp + 8]
mov ecx, dword [0x40f42c]
sub eax, ecx
dec eax
jle 0x401823
xor eax, eax
lea edi, [esp + 0x488c]
mov ecx, 0x8d
mov dword [esp + 0x3c], edi
rep stosd dword es:[edi], eax
mov eax, dword [0x40f42c]
mov cl, 2
mov edi, 0x410170
mov eax, dword [ebx + eax*4 + 4]
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x401728
mov edx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], 0x8000
mov eax, dword [edx + 0x30]
mov dword [esp], eax
call sym._setmode
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov ecx, dword [esp + 0x4ac4]
mov ebx, dword [esp + 0x4af8]
mov edx, ecx
lea edi, [esp + 0x488c]
imul edx, ebx
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x4ac0]
mov dword [esp + 0x4c58], 0x401c10
mov dword [esp + 0x4c54], 0x401c40
mov dword [esp + 0x4c5c], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x10], ecx
mov dword [esp + 4], sym._mpc_wav_output_write
mov dword [esp + 8], sym._mpc_wav_output_seek
mov dword [esp + 0xc], eax
mov dword [esp], edi
call sym._waveformat_output_open
test eax, eax
je 0x401740
xor esi, esi
lea eax, [esp + 0x4c44]
mov dword [esp + 0x70], 0
lea edi, [esp + 0x8c]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x54], esi
jmp 0x4015ae
mov ebx, dword [esp + 0x4c44]
mov edx, dword [esp + 0x4ac4]
mov eax, ebx
mov dword [esp + 4], edi
imul eax, edx
lea edx, [esp + 0x488c]
mov dword [esp + 8], eax
mov dword [esp], edx
call sym._waveformat_output_process_float32
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x70]
sub esi, edx
add ecx, ebx
add eax, esi
mov dword [esp + 0x54], ecx
mov dword [esp + 0x70], eax
mov dword [esp + 0x4c4c], edi
call sym._clock
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._mpc_demux_decode
mov ebx, eax
call sym._clock
cmp dword [esp + 0x4c48], 0xffffffff
mov esi, eax
jne 0x40156a
mov esi, dword [esp + 0x54]
mov edi, 1
test ebx, ebx
jne 0x4017ef
cmp byte [esp + 0x60], 0
jne 0x401896
mov eax, dword [esp + 0x74]
mov dword [esp + 8], esi
mov dword [esp + 4], str._u_samples
mov dword [esp], eax
call sym._fprintf
mov ecx, dword [esp + 0x70]
test ecx, ecx
jle 0x401bc0
mov eax, dword [esp + 0x70]
mov edx, eax
mov dword [esp + 0x30], eax
sar edx, 0x1f
mov dword [esp + 0x34], edx
mov ecx, 0x186a0
mov eax, esi
imul ecx
mov dword [esp], eax
mov eax, dword [esp + 0x4ac0]
mov dword [esp + 0x60], eax
mov dword [esp + 4], edx
mov esi, dword [esp + 0x60]
mov edx, dword [esp + 0x34]
imul esi, edx
mul dword [esp + 0x30]
add edx, esi
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], edx
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov esi, 0x64
call sym.___udivdi3
mov dword [esp + 4], str.decoded_in__u_ms___u._02ux__n
mov edx, eax
mov ecx, eax
sar edx, 0x1f
idiv esi
mov dword [esp + 0x10], edx
mov eax, ecx
sar ecx, 0x1f
mov edx, 0x51eb851f
imul edx
sar edx, 5
mov eax, dword [esp + 0x74]
sub edx, ecx
mov dword [esp], eax
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x70]
mov dword [esp + 8], edx
call sym._fprintf
mov edx, dword [esp + 0x5c]
mov dword [esp], edx
call sym._mpc_demux_exit
mov eax, dword [esp + 0x58]
mov dword [esp], eax
call sym._mpc_reader_exit_stdio
mov edx, edi
test dl, dl
je 0x4013ac
lea eax, [esp + 0x488c]
mov dword [esp], eax
call sym._waveformat_output_close
mov eax, dword [esp + 0x4894]
mov dword [esp], eax
call sym._fclose
jmp 0x4013ac
mov eax, dword [ebx]
mov dword [esp + 4], str.Usage:__s___i____h___infile.mpc____outfile.wav___n_i_:_print_file_information_on_stdout_n_c_:_check_the_file_for_stream_errors_n______doesnt_fully_decode__outfile_will_be_ignored__n_h_:_print_this_help_nyou_can_use_stdin_and_stdout_as_resp.__infile.mpc__and_n_outfile.wav__replacing_the_file_name_by_____n
mov dword [esp + 8], eax
mov eax, dword [esp + 0x74]
mov dword [esp], eax
xor ebx, ebx
call sym._fprintf
jmp 0x4013ac
mov dword [esp + 4], 0x4102cd
mov dword [esp], eax
call sym._fopen
test eax, eax
jne 0x4014ca
mov ebx, 1
jmp 0x4013ac
lea edx, [esp + 0x4c2c]
mov dword [esp + 4], eax
mov dword [esp + 0x58], edx
mov dword [esp], edx
call sym._mpc_reader_init_stdio
jmp 0x401420
lea edi, [esp + 0x8c]
xor esi, esi
lea eax, [esp + 0x4c44]
mov dword [esp + 0x54], edi
mov dword [esp + 0x70], 0
mov dword [esp + 0x6c], eax
mov ebx, dword [esp + 0x5c]
mov edi, esi
jmp 0x4017a3
mov ecx, dword [esp + 0x70]
sub eax, esi
mov edx, dword [esp + 0x4c44]
add ecx, eax
add edi, edx
mov dword [esp + 0x70], ecx
mov eax, dword [ebx + 4]
mov edx, dword [esp + 0x54]
mov dword [esp + 0x4c4c], edx
mov dword [eax + 0x20], 0x661
call sym._clock
mov dword [esp], ebx
mov esi, eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 4], eax
call sym._mpc_demux_decode
mov dword [esp + 0x50], eax
call sym._clock
cmp dword [esp + 0x4c48], 0xffffffff
jne 0x40178e
mov esi, edi
mov ebx, dword [esp + 0x50]
xor edi, edi
jmp 0x4015ee
mov eax, dword [esp + 0x74]
mov dword [esp + 8], 0x20
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.An_error_occured_while_decoding_n
call sym._fwrite
cmp byte [esp + 0x60], 0
jne 0x4016c2
jmp 0x401601
lea edx, [esp + 0x4c44]
xor esi, esi
mov dword [esp + 0x70], 0
lea edi, [esp + 0x8c]
mov dword [esp + 0x6c], edx
jmp 0x401856
mov ecx, dword [esp + 0x70]
sub eax, ebx
mov edx, dword [esp + 0x4c44]
add ecx, eax
add esi, edx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x4c4c], edi
call sym._clock
mov edx, dword [esp + 0x5c]
mov ebx, eax
mov eax, dword [esp + 0x6c]
mov dword [esp], edx
mov dword [esp + 4], eax
call sym._mpc_demux_decode
mov dword [esp + 0x54], eax
call sym._clock
cmp dword [esp + 0x4c48], 0xffffffff
jne 0x401841
mov ebx, dword [esp + 0x54]
xor edi, edi
jmp 0x4015ee
mov edx, dword [esp + 0x74]
mov dword [esp + 8], 0xf
mov dword [esp + 0xc], edx
mov dword [esp + 4], 1
mov dword [esp], str.No_error_found_n
call sym._fwrite
jmp 0x4016c2
mov eax, dword [0x40f42c]
mov edi, dword [ebx + eax*4]
mov dword [esp], esi
call sym._mpc_streaminfo_get_length
mov dword [esp + 8], edi
fnstcw word [esp + 0x7a]
mov ax, word [esp + 0x7a]
mov ah, 0xc
mov dword [esp + 4], str.file:__s_n
mov word [esp + 0x78], ax
mov eax, dword [esp + 0x74]
fldcw word [esp + 0x78]
fistp dword [esp + 0x7c]
fldcw word [esp + 0x7a]
mov dword [esp], eax
mov ebx, dword [esp + 0x7c]
call sym._fprintf
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x4ac8]
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.stream_version__d_n
call sym._fprintf
mov edi, dword [esp + 0x74]
lea eax, [esp + 0x4b0c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.encoder:__s_n
mov dword [esp], edi
call sym._fprintf
fld dword [0x410398]
fsubr dword [esp + 0x4c10]
mov eax, dword [esp + 0x4c14]
mov dword [esp + 8], eax
mov dword [esp + 4], str.profile:__s__q_0.2f__n
mov dword [esp], edi
fstp qword [esp + 0xc]
call sym._fprintf
mov dl, byte [esp + 0x4c0c]
mov eax, str.unknow
cmp dl, 0xff
je 0x401990
mov eax, 0x4101be
test dl, dl
jne 0x401990
mov eax, 0x4101ba
mov dword [esp + 8], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 4], str.PNS:__s_n
mov dword [esp], eax
call sym._fprintf
mov eax, 0x4101be
cmp dword [esp + 0x4adc], 0
jne 0x4019bc
mov eax, 0x4101ba
mov edx, dword [esp + 0x74]
mov dword [esp + 8], eax
mov dword [esp + 4], str.mid_side_stereo:__s_n
mov dword [esp], edx
call sym._fprintf
mov eax, 0x4101be
cmp dword [esp + 0x4af0], 0
jne 0x4019e8
mov eax, 0x4101ba
mov edi, dword [esp + 0x74]
mov dword [esp + 8], eax
mov dword [esp + 4], str.gapless:__s_n
mov dword [esp], edi
call sym._fprintf
mov dword [esp + 4], str.average_bitrate:__6.1f_kbps_n
fld qword [0x4103a0]
fmul qword [esp + 0x4ad0]
mov dword [esp], edi
fstp qword [esp + 8]
call sym._fprintf
mov eax, dword [esp + 0x4ac0]
mov dword [esp + 8], eax
mov dword [esp + 4], str.samplerate:__d_Hz_n
mov dword [esp], edi
call sym._fprintf
mov eax, dword [esp + 0x4ac4]
mov dword [esp + 4], str.channels:__d_n
mov dword [esp + 8], eax
mov dword [esp], edi
call sym._fprintf
mov dword [esp], esi
call sym._mpc_streaminfo_get_length_samples
mov edx, ebx
mov ecx, 0x3c
mov dword [esp + 0x10], eax
sar edx, 0x1f
mov eax, ebx
idiv ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.length:__d:_.2d___u_samples__n
mov dword [esp], edi
call sym._fprintf
mov eax, dword [esp + 0x4c20]
mov dword [esp + 8], eax
mov dword [esp + 4], str.file_size:__d_Bytes_n
mov dword [esp], edi
call sym._fprintf
mov ax, word [esp + 0x4aee]
mov dword [esp + 4], str.track_peak:__2.2f_dB_n
and eax, 0xffff
mov dword [esp], edi
mov dword [esp + 0x7c], eax
fild dword [esp + 0x7c]
fmul dword [0x4103a8]
fstp qword [esp + 8]
call sym._fprintf
mov eax, dword [esp + 0x4ae8]
test ax, ax
jne 0x401bdd
fldz
fld st(0)
fstp qword [esp + 0x10]
fld dword [0x4103a8]
fmul st(1), st(0)
fxch st(1)
mov eax, dword [esp + 0x74]
mov dword [esp + 4], str.track_gain:__2.2f_dB____2.2f_dB_n
mov dword [esp], eax
fstp qword [esp + 8]
fstp dword [esp + 0x40]
call sym._fprintf
mov eax, dword [esp + 0x4aec]
and eax, 0xffff
mov edx, dword [esp + 0x74]
mov dword [esp + 0x7c], eax
mov dword [esp + 4], str.album_peak:__2.2f_dB_n
fild dword [esp + 0x7c]
fld dword [esp + 0x40]
fmulp st(1)
mov dword [esp], edx
fstp qword [esp + 8]
call sym._fprintf
mov ax, word [esp + 0x4aea]
test ax, ax
je 0x401bfd
and eax, 0xffff
mov dword [esp + 0x7c], eax
fild dword [esp + 0x7c]
fld dword [0x4103ac]
fmul st(1)
fadd dword [0x4103b0]
fstp qword [esp + 0x10]
fmul dword [0x4103a8]
mov edi, dword [esp + 0x74]
mov dword [esp + 4], str.album_gain:__2.2f_dB____2.2f_dB_n
mov dword [esp], edi
xor ebx, ebx
fstp qword [esp + 8]
call sym._fprintf
mov dword [esp + 4], edi
mov dword [esp], 0xa
call sym._fputc
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call sym._mpc_demux_exit
mov edx, dword [esp + 0x58]
mov dword [esp], edx
call sym._mpc_reader_exit_stdio
jmp 0x4013ac
mov dword [esp + 0x70], 1
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], 0
jmp 0x401636
and eax, 0xffff
mov dword [esp + 0x7c], eax
fild dword [esp + 0x7c]
fld dword [0x4103ac]
fmul st(1)
fadd dword [0x4103b0]
jmp 0x401ae7
fldz
fld st(0)
jmp 0x401b6f