Function at 0x46c872
Capabilities:
Read file on windows
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
mov eax, 0x18d48
call fcn.004798f0
sub esp, eax
mov ebx, dword [ecx]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x18cd0], edx
mov esi, dword [ecx + 8]
lea ecx, [ebp - 0x183ac]
call fcn.00457910
mov dword [ebp - 0x18cb8], 0
mov dword [ebp - 0x18cb4], 0
mov ecx, 0x2d
lea edi, [ebp - 0x18c60]
rep movsd dword es:[edi], dword [esi]
mov dword [esp], 2
mov esi, dword [dbg.__acrt_iob_func]
mov dword [ebp - 0x18cc4], esi
call esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str._n__PCM_input_file:__s
mov dword [esp], eax
call sym.fn_fprintf__iobuf__wchar_t_const__..._
mov dword [esp], 2
call esi
mov edx, dword [ebp - 0x18cd0]
mov dword [esp + 8], edx
mov dword [esp + 4], str._nMPEG_output_file:__s
mov dword [esp], eax
call sym.fn_fprintf__iobuf__wchar_t_const__..._
mov eax, dword [0x4be3a8]
mov dword [ebp - 0x18ce8], eax
mov dword [ebp - 0x18cc8], 0
test eax, eax
je 0x46c951
and eax, 2
mov dword [ebp - 0x18cc8], eax
je 0x46d3dd
mov dword [ebp - 0x18cc8], 4
mov dword [ebp - 0x18ce8], 0x4f
mov dword [0x4be39c], 0
mov dword [0x4be398], 0
mov dword [0x4be390], 0
mov dword [0x4be38c], 0
mov dword [0x4be388], 0
mov dword [0x4be384], 0
mov dword [0x4be394], 0
mov dword [esp], 0x20000
call sym.operator_new___unsigned_int_
mov dword [0x4be39c], eax
mov dword [esp], 0x120000
call sym.operator_new___unsigned_int_
mov dword [0x4be390], eax
mov dword [esp + 4], 0x4a8928
mov dword [esp], ebx
call sym._wcscmp
test eax, eax
jne 0x46d369
mov dword [esp], 0
mov esi, dword [ebp - 0x18cc4]
call esi
mov dword [0x4be384], eax
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__fileno]
mov dword [esp + 4], 0x8000
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__setmode]
mov dword [0x4be3a4], 1
mov edi, dword [0x4be384]
mov ebx, dword [0x4be390]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x800
mov dword [esp + 4], 1
lea ecx, [ebp - 0x18bac]
mov dword [esp], ecx
call sym._fread
test eax, eax
jle 0x46d226
lea edx, [ebp - 0x18cb8]
mov dword [esp + 0x10], edx
lea esi, [ebp - 0x18ca8]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
lea eax, [ebp - 0x18bac]
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._pcmhead_file
mov edi, eax
test eax, eax
je 0x46d226
mov dword [0x4be38c], 0
lea ecx, [eax - 1]
xor eax, eax
cmp ecx, 0x7fe
jbe 0x46d49e
mov esi, dword [0x4be3a4]
test esi, esi
je 0x46d3ad
mov dword [ebp - 0x18cb8], 0xffffffff
mov dword [ebp - 0x18cb4], 0xffffffff
mov edi, dword [ebp - 0x18c9c]
mov esi, dword [ebp - 0x18ca0]
mov ebx, dword [ebp - 0x18ca4]
mov edx, dword [ebp - 0x18ca8]
mov dword [ebp - 0x18cd8], edx
mov dword [esp], 2
mov ecx, dword [ebp - 0x18cc4]
call ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov edi, dword [ebp - 0x18cd8]
mov dword [esp + 8], edi
mov dword [esp + 4], str._n_pcm_file:__channels___d__bits___d___rate___d__type___d
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov eax, dword [ebp - 0x18ca8]
lea esi, [eax - 1]
cmp esi, 1
jbe 0x46d2b4
cmp dword [ebp - 0x18c9c], 3
je 0x46d2db
mov edi, dword [ebp - 0x18ca4]
mov dword [ebp - 0x18cd8], 1
lea ecx, [edi - 8]
cmp ecx, 0x18
ja 0x46d2db
mov ebx, 0x1010101
shr ebx, cl
and ebx, 1
je 0x46d2db
mov esi, dword [ebp - 0x18cd8]
test esi, esi
jne 0x46d2db
mov edx, dword [ebp - 0x18c98]
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._cvt_to_pcm_init
mov dword [ebp - 0x18cf8], eax
mov eax, dword [ebp - 0x18c60]
test eax, eax
js 0x46d4d4
mov edi, dword [ebp - 0x18ca8]
cmp edi, 1
je 0x46d4eb
cmp edi, 2
jne 0x46cba9
cmp eax, 3
jne 0x46cba9
mov dword [ebp - 0x18c60], 1
mov ecx, dword [ebp - 0x18ca0]
mov dword [ebp - 0x18c58], ecx
mov ebx, dword [0x4be3ac]
mov dword [esp + 0x10], ebx
mov esi, dword [0x4be3b0]
mov dword [esp + 0xc], esi
xor edx, edx
cmp dword [ebp - 0x18c9c], 3
sete dl
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x18ca4]
mov dword [esp + 4], eax
lea edi, [ebp - 0x18c60]
mov dword [esp], edi
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.MP3_audio_encode_init_E_CONTROL__int__int__int__int_
sub esp, 0x14
mov dword [ebp - 0x18ce0], eax
test eax, eax
je 0x46da69
mov dword [esp + 4], 0x4a8928
mov ecx, dword [ebp - 0x18cd0]
mov dword [esp], ecx
call sym._wcscmp
test eax, eax
je 0x46d4fa
mov dword [esp + 4], 0x4a82ae
mov ebx, dword [ebp - 0x18cd0]
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__wfopen]
mov dword [0x4be394], eax
test eax, eax
je 0x46dfe9
mov ecx, dword [0x4be38c]
mov edx, dword [ebp - 0x18ce0]
cmp ecx, edx
jge 0x46ccd3
mov eax, 0x120000
mov edi, eax
sub edi, ecx
xor edx, edx
div dword [ebp - 0x18cf8]
sub edi, edx
mov esi, dword [ebp - 0x18cb8]
lea ebx, [edi + ecx]
mov eax, ebx
cdq
mov dword [ebp - 0x18cd0], ebx
mov dword [ebp - 0x18ccc], edx
cmp esi, ebx
mov ebx, dword [ebp - 0x18cb4]
sbb ebx, dword [ebp - 0x18ccc]
jae 0x46cc99
mov edi, esi
sub edi, ecx
mov esi, dword [0x4be384]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], 1
add ecx, dword [0x4be390]
mov dword [esp], ecx
call sym._fread
mov ecx, eax
test eax, eax
js 0x46e00d
add ecx, dword [0x4be38c]
mov dword [0x4be38c], ecx
mov dword [esp + 4], ecx
mov eax, dword [0x4be390]
mov dword [esp], eax
call sym._cvt_to_pcm
mov dword [0x4be38c], eax
mov dword [ebp - 0x18cf0], eax
sar eax, 0x1f
mov dword [ebp - 0x18cec], eax
lea edx, [ebp - 0x18bac]
mov dword [esp], edx
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_info_string_char_
sub esp, 4
mov dword [esp], 2
mov ebx, dword [ebp - 0x18cc4]
call ebx
lea edi, [ebp - 0x18bac]
mov dword [esp + 8], edi
mov dword [esp + 4], str._n__s
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
lea esi, [ebp - 0x18c60]
mov dword [esp], esi
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_info_ec_E_CONTROL_
sub esp, 4
mov ecx, dword [0x4be3a0]
test ecx, ecx
jne 0x46df88
mov edx, dword [0x4be3a8]
mov dword [ebp - 0x18d10], edx
test edx, edx
je 0x46da8d
lea ebx, [ebp - 0x18c94]
mov dword [esp], ebx
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_info_head_MPEG_HEAD_
sub esp, 4
mov dword [ebp - 0x18d18], 0xffffffff
mov edi, dword [ebp - 0x18c34]
test edi, edi
je 0x46cda8
mov esi, dword [ebp - 0x18c30]
mov dword [ebp - 0x18d18], esi
mov ecx, dword [ebp - 0x18c5c]
imul ecx, dword [ebp - 0x18ca8]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov eax, dword [0x4be398]
add eax, dword [0x4be39c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], 0
mov edx, dword [ebp - 0x18d18]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov ebx, dword [ebp - 0x18ce8]
mov dword [esp + 0x10], ebx
mov edi, dword [ebp - 0x18c3c]
mov dword [esp + 0xc], edi
mov esi, dword [ebp - 0x18c40]
mov dword [esp + 8], esi
mov ecx, dword [ebp - 0x18c74]
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x18c58]
mov dword [esp], eax
call sym._XingHeader
mov dword [ebp - 0x18d10], eax
mov dword [ebp - 0x18d14], eax
add eax, dword [0x4be398]
mov dword [0x4be398], eax
mov edx, dword [0x4be394]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov ebx, dword [0x4be39c]
mov dword [esp], ebx
call sym._fwrite
cmp dword [0x4be398], eax
jne 0x46da23
mov dword [0x4be398], 0
mov dword [esp], 2
mov edi, dword [ebp - 0x18cc4]
call edi
mov dword [esp + 4], 0x4a82fc
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov dword [esp], 2
call edi
mov dword [esp + 4], str._n______________________________________________________________________________________
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov dword [esp], 2
call edi
mov dword [esp + 4], str._n______Frames______________Bytes_In_____Bytes_Out__Progress__Current_Average_Bitrate
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov dword [esp], 2
call edi
mov dword [esp + 4], str._n_______None_________________None_________None_______None____None
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov esi, dword [ebp - 0x18ce0]
add esi, esi
add esi, esi
mov dword [ebp - 0x18d0c], esi
mov ecx, dword [ebp - 0x18d14]
mov eax, dword [ebp - 0x18cc8]
test eax, eax
mov dword [ebp - 0x18cc8], ecx
jne 0x46daa6
mov byte [ebp - 0x18d08], 0
mov word [ebp - 0x18cf2], 0
mov dword [ebp - 0x18cd0], 0
mov dword [ebp - 0x18ccc], 0
mov edi, 1
jmp 0x46cf43
add edi, 1
lea eax, [edi - 1]
mov dword [ebp - 0x18ce8], eax
mov esi, dword [0x4be38c]
mov ebx, dword [0x4be390]
mov eax, dword [0x4be388]
cmp dword [ebp - 0x18ce0], esi
jle 0x46d096
mov dword [esp + 8], esi
add eax, ebx
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._memmove
mov edx, dword [0x4be38c]
mov dword [ebp - 0x18cd8], edx
mov eax, 0x120000
mov esi, eax
sub esi, edx
xor edx, edx
div dword [ebp - 0x18cf8]
sub esi, edx
mov ecx, dword [ebp - 0x18cb8]
mov eax, esi
cdq
add eax, dword [ebp - 0x18cf0]
adc edx, dword [ebp - 0x18cec]
mov dword [ebp - 0x18d00], eax
mov dword [ebp - 0x18cfc], edx
cmp ecx, eax
mov edx, dword [ebp - 0x18cb4]
sbb edx, dword [ebp - 0x18cfc]
jae 0x46cfd5
mov esi, ecx
mov ecx, dword [ebp - 0x18cf0]
sub esi, ecx
mov eax, dword [0x4be384]
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov edx, dword [ebp - 0x18cd8]
add ebx, edx
mov dword [esp], ebx
call sym._fread
mov ebx, eax
mov dword [ebp - 0x18cd8], eax
test eax, eax
jle 0x46d60e
add dword [ebp - 0x18cf0], eax
adc dword [ebp - 0x18cec], 0
mov esi, dword [0x4be384]
mov dword [esp], esi
call sym._feof
mov esi, dword [0x4be390]
test eax, eax
jne 0x46d54a
mov eax, dword [ebp - 0x18cf0]
mov edx, dword [ebp - 0x18cec]
xor eax, dword [ebp - 0x18cb8]
xor edx, dword [ebp - 0x18cb4]
or eax, edx
je 0x46d54a
mov ebx, dword [ebp - 0x18cd8]
mov dword [esp + 4], ebx
add esi, dword [0x4be38c]
mov dword [esp], esi
call sym._cvt_to_pcm
add eax, dword [0x4be38c]
mov dword [0x4be38c], eax
mov dword [0x4be388], 0
mov esi, dword [ebp - 0x18ce0]
cmp eax, esi
jl 0x46d614
xor eax, eax
mov ebx, dword [0x4be390]
mov edx, dword [0x4be398]
add edx, dword [0x4be39c]
mov dword [esp + 4], edx
add ebx, eax
mov dword [esp], ebx
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.MP3_audio_encode_unsigned_char__unsigned_char_
sub esp, 8
mov esi, eax
mov ebx, edx
sub dword [0x4be38c], eax
add dword [0x4be388], eax
mov ecx, dword [0x4be398]
add ecx, edx
mov dword [0x4be398], ecx
cmp ecx, 0x1f4c0
ja 0x46d5ac
add dword [ebp - 0x18cc8], ebx
mov ecx, dword [ebp - 0x18cb8]
mov ebx, dword [ebp - 0x18cb4]
mov eax, esi
cdq
add eax, dword [ebp - 0x18cd0]
adc edx, dword [ebp - 0x18ccc]
cmp ecx, eax
mov esi, ebx
sbb esi, edx
mov esi, ecx
cmovae esi, eax
mov dword [ebp - 0x18cd0], esi
cmovb edx, ebx
mov dword [ebp - 0x18ccc], edx
mov eax, edi
and eax, 0x7f
cmp eax, dword [0x4a2264]
jne 0x46cf40
mov dword [ebp - 0x18cb0], 0x412f4e20
mov dword [ebp - 0x18cac], 0
mov esi, dword [0x4be3a4]
test esi, esi
je 0x46d958
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_bitrate_float__
fstp dword [ebp - 0x18cd8]
pxor xmm6, xmm6
cvtss2sd xmm6, dword [ebp - 0x18cd8]
movsd qword [ebp - 0x18cd8], xmm6
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_bitrate2_float__
fstp dword [ebp - 0x18ce8]
pxor xmm0, xmm0
cvtss2sd xmm0, dword [ebp - 0x18ce8]
movsd qword [ebp - 0x18ce8], xmm0
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_frames__
lea ebx, [eax + 1]
mov dword [esp], 2
mov esi, dword [ebp - 0x18cc4]
call esi
movsd xmm7, qword [ebp - 0x18cd8]
movsd qword [esp + 0x24], xmm7
movsd xmm2, qword [ebp - 0x18ce8]
movsd qword [esp + 0x1c], xmm2
lea edx, [ebp - 0x18cb0]
mov dword [esp + 0x18], edx
mov ecx, dword [ebp - 0x18cc8]
mov dword [esp + 0x14], ecx
mov edx, dword [ebp - 0x18cd0]
mov ecx, dword [ebp - 0x18ccc]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], str._r___10u____20llu____10u_____s_____6.2f____6.2f_Kbps
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov dword [esp], 2
call esi
mov dword [esp], eax
call sym._fflush
jmp 0x46cf40
mov dword [esp], 2
mov esi, dword [ebp - 0x18cc4]
call esi
mov dword [esp + 4], str._n_UNRECOGNIZED_PCM_FILE_TYPE
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov edx, dword [0x4be39c]
test edx, edx
je 0x46d257
mov dword [esp], edx
call sym.operator_delete___void_
mov edi, dword [0x4be390]
test edi, edi
je 0x46d269
mov dword [esp], edi
call sym.operator_delete___void_
mov ecx, dword [0x4be384]
test ecx, ecx
je 0x46d27b
mov dword [esp], ecx
call sym._fclose
mov ebx, dword [0x4be394]
test ebx, ebx
je 0x46d28d
mov dword [esp], ebx
call sym._fclose
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_frames__
mov esi, eax
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.CMp3Enc__
lea eax, [esi + 1]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov ecx, dword [ebp - 0x18c9c]
mov ebx, dword [ebp - 0x18ca0]
lea edx, [ebx - 0x1f40]
cmp edx, 0x9c40
jbe 0x46d3ec
cmp ecx, 3
jne 0x46cb22
mov dword [esp], 2
mov ebx, dword [ebp - 0x18cc4]
call ebx
mov dword [esp + 4], str._n_UNSUPPORTED_PCM_FILE_TYPE_n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov edx, dword [ebp - 0x18ca8]
sub edx, 1
cmp edx, 1
ja 0x46d411
mov ecx, dword [ebp - 0x18ca0]
sub ecx, 0x1f40
cmp ecx, 0x9c40
ja 0x46d456
mov esi, dword [ebp - 0x18c9c]
cmp esi, 1
je 0x46d42f
cmp esi, 3
jne 0x46d345
cmp dword [ebp - 0x18ca4], 0x20
je 0x46d245
mov dword [esp], 2
mov eax, dword [ebp - 0x18cc4]
call eax
mov dword [esp + 4], str._Only_8__16__24_and_32_bit_linear_PCM_or_32_bit_floating_point_supported.
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d245
mov dword [esp + 4], 0x4a813c
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__wfopen]
mov edi, eax
mov dword [0x4be384], eax
test eax, eax
jne 0x46ca0f
mov dword [esp], 2
mov ebx, dword [ebp - 0x18cc4]
call ebx
mov dword [esp + 4], str._n_CANNOT_OPEN_INPUT_FILE
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d245
mov edx, dword [ebp - 0x18cb8]
mov edi, dword [ebp - 0x18cb4]
mov ecx, edx
or ecx, edi
je 0x46d47a
mov esi, eax
sar esi, 0x1f
cmp edx, eax
sbb edi, esi
jae 0x46cab0
mov dword [0x4be38c], edx
jmp 0x46cab0
mov dword [ebp - 0x18ce8], 0xb
jmp 0x46c951
mov edi, dword [ebp - 0x18ca4]
cmp ecx, 3
je 0x46d532
and ecx, 0xfffffffd
xor edx, edx
cmp ecx, 1
setne dl
mov dword [ebp - 0x18cd8], edx
jmp 0x46cb32
mov dword [esp], 2
call ebx
mov dword [esp + 4], str._Only_mono_and_stereo_inputs_supported.
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d30c
mov edi, dword [ebp - 0x18ca4]
lea ecx, [edi - 8]
cmp ecx, 0x18
ja 0x46d345
mov ebx, 0x1010101
shr ebx, cl
test bl, 1
jne 0x46d245
jmp 0x46d345
mov dword [esp], 2
mov eax, dword [ebp - 0x18cc4]
call eax
mov dword [esp + 4], str._Supported_sampling_rates_are_8000_Hz___48000_Hz.
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d324
mov dword [esp], 2
mov eax, dword [ebp - 0x18cc4]
call eax
mov dword [esp + 4], str._n_INPUT_FILE_CONTAINS_NO_AUDIO
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d245
mov eax, 0x800
sub eax, edi
mov edx, eax
lea esi, [ebp + edi - 0x18bac]
cmp eax, 4
jae 0x46da47
test dl, 2
je 0x46d4c2
mov edi, ebx
movsw word es:[edi], word [esi]
mov ebx, edi
and edx, 1
je 0x46d4ca
mov edi, ebx
movsb byte es:[edi], byte [esi]
mov dword [0x4be38c], eax
jmp 0x46ca8e
mov dword [ebp - 0x18c60], 0
cmp dword [ebp - 0x18ca8], 1
jne 0x46cba9
mov dword [ebp - 0x18c60], 3
jmp 0x46cba9
mov dword [esp], 1
mov esi, dword [ebp - 0x18cc4]
call esi
mov dword [0x4be394], eax
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__fileno]
mov dword [esp + 4], 0x8000
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__setmode]
mov eax, dword [0x4be394]
jmp 0x46cc42
cmp edi, 0x20
jne 0x46d2db
mov dword [ebp - 0x18cd8], 0
jmp 0x46cb5c
cmp byte [ebp - 0x18d08], 0
jne 0x46d053
mov ecx, dword [ebp - 0x18d0c]
lea ecx, [ecx + ebx]
mov eax, 0x240000
xor edx, edx
div dword [ebp - 0x18cf8]
and eax, 0xfffffffe
cmp ecx, eax
jae 0x46d053
mov dword [ebp - 0x18cd8], ecx
add ebx, dword [0x4be38c]
add ebx, esi
mov ecx, dword [ebp - 0x18d0c]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._memset
mov byte [ebp - 0x18d08], 1
jmp 0x46d053
mov eax, dword [0x4be394]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], 1
mov edx, dword [0x4be39c]
mov dword [esp], edx
call sym._fwrite
cmp eax, dword [0x4be398]
jne 0x46df9b
mov dword [esp + 8], eax
mov ecx, dword [0x4be39c]
mov dword [esp + 4], ecx
movzx eax, word [ebp - 0x18cf2]
mov dword [esp], eax
call sym._XingHeaderUpdateCRC
mov word [ebp - 0x18cf2], ax
mov dword [0x4be398], 0
jmp 0x46d0e3
je 0x46d017
mov eax, dword [0x4be398]
test eax, eax
je 0x46d673
mov ebx, dword [0x4be394]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov esi, dword [0x4be39c]
mov dword [esp], esi
call sym._fwrite
mov ecx, dword [0x4be398]
cmp ecx, eax
jne 0x46da23
mov dword [esp + 8], ecx
mov edi, dword [0x4be39c]
mov dword [esp + 4], edi
movzx eax, word [ebp - 0x18cf2]
mov dword [esp], eax
call sym._XingHeaderUpdateCRC
mov word [ebp - 0x18cf2], ax
mov ebx, dword [ebp - 0x18d0c]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov esi, dword [0x4be390]
mov dword [esp], esi
call sym._memset
cmp dword [ebp - 0x18ca0], 0x7cff
jg 0x46d73a
mov edx, dword [ebp - 0x18ce8]
mov ecx, edx
add ecx, edx
mov dword [ebp - 0x18ce8], ecx
jmp 0x46d73a
mov esi, dword [0x4be39c]
mov dword [esp + 4], esi
mov edi, dword [0x4be390]
mov dword [esp], edi
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.MP3_audio_encode_unsigned_char__unsigned_char_
sub esp, 8
mov dword [0x4be398], edx
add dword [ebp - 0x18cc8], edx
mov eax, dword [0x4be394]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov edx, dword [0x4be39c]
mov dword [esp], edx
call sym._fwrite
mov ecx, dword [0x4be398]
cmp ecx, eax
jne 0x46da23
mov dword [esp + 8], ecx
mov esi, dword [0x4be39c]
mov dword [esp + 4], esi
movzx edi, word [ebp - 0x18cf2]
mov dword [esp], edi
call sym._XingHeaderUpdateCRC
mov word [ebp - 0x18cf2], ax
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_frames__
mov edi, dword [ebp - 0x18ce8]
cmp eax, edi
jb 0x46d6b8
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_bitrate_float__
fstp dword [ebp - 0x18cd8]
pxor xmm3, xmm3
cvtss2sd xmm3, dword [ebp - 0x18cd8]
movsd qword [ebp - 0x18cd8], xmm3
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_bitrate2_float__
fstp dword [ebp - 0x18ce0]
pxor xmm4, xmm4
cvtss2sd xmm4, dword [ebp - 0x18ce0]
movsd qword [ebp - 0x18ce0], xmm4
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_frames__
lea ebx, [eax + 1]
mov dword [esp], 2
mov eax, dword [ebp - 0x18cc4]
call eax
movsd xmm1, qword [ebp - 0x18cd8]
movsd qword [esp + 0x24], xmm1
movsd xmm5, qword [ebp - 0x18ce0]
movsd qword [esp + 0x1c], xmm5
mov dword [esp + 0x18], 0x64
mov esi, dword [ebp - 0x18cc8]
mov dword [esp + 0x14], esi
mov edx, dword [ebp - 0x18cd0]
mov ecx, dword [ebp - 0x18ccc]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], str._r___10u____20llu____10u_____3u_______6.2f____6.2f_Kbps
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov dword [esp], 2
mov edi, dword [ebp - 0x18cc4]
call edi
mov dword [esp + 4], str._n______________________________________________________________________________________
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov dword [esp], 2
call edi
mov dword [esp + 4], str._n_Compress_Ratio
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov ebx, dword [0x4be3a4]
test ebx, ebx
jne 0x46dfc5
mov esi, dword [ebp - 0x18cc8]
lea edx, [esi - 0x80000000]
pxor xmm6, xmm6
cvtsi2sd xmm6, edx
addsd xmm6, qword [0x4a8980]
mulsd xmm6, qword [0x4a8970]
fild qword [ebp - 0x18cb8]
mov ecx, dword [ebp - 0x18cb4]
test ecx, ecx
jns 0x46d890
fadd dword [0x4a896c]
fstp qword [ebp - 0x18cd0]
movsd xmm0, qword [ebp - 0x18cd0]
divsd xmm6, xmm0
movsd qword [ebp - 0x18cd0], xmm6
mov dword [esp], 2
mov edi, dword [ebp - 0x18cc4]
call edi
movsd xmm7, qword [ebp - 0x18cd0]
movsd qword [esp + 8], xmm7
mov dword [esp + 4], str._3.6f__
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov ebx, dword [0x4be3a8]
test ebx, ebx
je 0x46d245
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [0x4be394]
mov dword [esp], eax
call sym._fseek
mov esi, dword [0x4be394]
mov dword [esp + 0xc], esi
mov edi, dword [ebp - 0x18d14]
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov edx, dword [0x4be39c]
mov dword [esp], edx
call sym._fread
cmp edi, eax
je 0x46e058
mov dword [esp], 2
mov ebx, dword [ebp - 0x18cc4]
call ebx
mov dword [esp + 4], str._n_READ_UNEXPECTED_NUMBER_OF_BYTES_WRITING_XING_HEADER
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d245
mov eax, dword [ebp - 0x18cd0]
mov edx, dword [ebp - 0x18ccc]
movd xmm4, eax
movd xmm5, edx
punpckldq xmm4, xmm5
movq qword [ebp - 0x18cc0], xmm4
fild qword [ebp - 0x18cc0]
test edx, edx
jns 0x46d988
fadd dword [0x4a896c]
fstp qword [ebp - 0x18cd8]
movsd xmm6, qword [ebp - 0x18cd8]
mulsd xmm6, qword [0x4a8970]
movd xmm0, ecx
movd xmm7, ebx
punpckldq xmm0, xmm7
movq qword [ebp - 0x18cc0], xmm0
fild qword [ebp - 0x18cc0]
test ebx, ebx
jns 0x46d9c2
fadd dword [0x4a896c]
fstp qword [ebp - 0x18cd8]
movsd xmm2, qword [ebp - 0x18cd8]
divsd xmm6, xmm2
pxor xmm3, xmm3
movsd xmm3, xmm6
movupd xmm4, xmmword [0x4a8980]
movapd xmm1, xmm4
cmplepd xmm4, xmm3
andpd xmm1, xmm4
subpd xmm3, xmm1
pslld xmm4, 0x1f
cvttpd2dq xmm5, xmm3
pxor xmm5, xmm4
movd dword [esp + 8], xmm5
mov dword [esp + 4], str._3u__
lea ecx, [ebp - 0x18cb0]
mov dword [esp], ecx
call sym.sprintf_char__char_const__..._
jmp 0x46d151
mov dword [esp], 2
mov eax, dword [ebp - 0x18cc4]
call eax
mov dword [esp + 4], str._n_FILE_WRITE_ERROR
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d245
test bl, 1
jne 0x46e045
test bl, 2
jne 0x46e031
mov ecx, edx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ebx, edi
jmp 0x46d4b7
mov dword [esp], 2
mov edi, dword [ebp - 0x18cc4]
call edi
mov dword [esp + 4], str._n_ENCODER_INIT_FAIL
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d245
mov dword [ebp - 0x18d18], 0xffffffff
mov dword [ebp - 0x18d14], 0
jmp 0x46ce81
mov byte [ebp - 0x18cf3], 0
mov word [ebp - 0x18cf2], 0
mov dword [ebp - 0x18cd0], 0
mov dword [ebp - 0x18ccc], 0
mov edi, 1
jmp 0x46dad4
add edi, 1
lea edx, [edi - 1]
mov dword [ebp - 0x18ce8], edx
mov ecx, dword [0x4be38c]
mov ebx, dword [0x4be390]
mov eax, dword [0x4be388]
mov esi, dword [ebp - 0x18ce0]
cmp ecx, esi
jge 0x46dc29
mov dword [esp + 8], ecx
add eax, ebx
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._memmove
mov edx, dword [0x4be38c]
mov dword [ebp - 0x18d00], edx
mov eax, 0x120000
mov esi, eax
sub esi, edx
xor edx, edx
div dword [ebp - 0x18cf8]
sub esi, edx
mov ecx, dword [ebp - 0x18cb8]
mov eax, esi
cdq
add eax, dword [ebp - 0x18cf0]
adc edx, dword [ebp - 0x18cec]
mov dword [ebp - 0x18d08], eax
mov dword [ebp - 0x18d04], edx
cmp ecx, eax
mov edx, dword [ebp - 0x18cb4]
sbb edx, dword [ebp - 0x18d04]
jae 0x46db68
mov esi, ecx
mov ecx, dword [ebp - 0x18cf0]
sub esi, ecx
mov eax, dword [0x4be384]
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov edx, dword [ebp - 0x18d00]
add edx, ebx
mov dword [esp], edx
call sym._fread
mov ebx, eax
mov dword [ebp - 0x18d00], eax
test eax, eax
jle 0x46de93
add dword [ebp - 0x18cf0], eax
adc dword [ebp - 0x18cec], 0
mov esi, dword [0x4be384]
mov dword [esp], esi
call sym._feof
mov esi, dword [0x4be390]
test eax, eax
jne 0x46ddcc
mov eax, dword [ebp - 0x18cf0]
mov edx, dword [ebp - 0x18cec]
xor eax, dword [ebp - 0x18cb8]
xor edx, dword [ebp - 0x18cb4]
or eax, edx
je 0x46ddcc
mov ebx, dword [ebp - 0x18d00]
mov dword [esp + 4], ebx
add esi, dword [0x4be38c]
mov dword [esp], esi
call sym._cvt_to_pcm
add eax, dword [0x4be38c]
mov dword [0x4be38c], eax
mov dword [0x4be388], 0
mov esi, dword [ebp - 0x18ce0]
cmp eax, esi
jl 0x46d614
xor eax, eax
mov ebx, dword [0x4be390]
mov edx, dword [0x4be398]
add edx, dword [0x4be39c]
mov dword [esp + 4], edx
add ebx, eax
mov dword [esp], ebx
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.MP3_audio_encode_unsigned_char__unsigned_char_
sub esp, 8
mov ebx, eax
mov esi, edx
sub dword [0x4be38c], eax
add dword [0x4be388], eax
mov ecx, dword [0x4be398]
add ecx, edx
mov dword [0x4be398], ecx
cmp ecx, 0x1f4c0
ja 0x46de2e
add dword [ebp - 0x18cc8], esi
mov eax, ebx
cdq
add eax, dword [ebp - 0x18cd0]
adc edx, dword [ebp - 0x18ccc]
mov ebx, dword [ebp - 0x18cb8]
mov ecx, dword [ebp - 0x18cb4]
cmp ebx, eax
mov esi, ecx
sbb esi, edx
cmovae ebx, eax
mov dword [ebp - 0x18cd0], ebx
cmovae ecx, edx
mov dword [ebp - 0x18ccc], ecx
sub dword [ebp - 0x18cd8], 1
mov eax, dword [ebp - 0x18cd8]
test eax, eax
jle 0x46de9e
mov edx, edi
and edx, 0x7f
cmp edx, dword [0x4a2264]
jne 0x46dad1
mov dword [ebp - 0x18cb0], 0x412f4e20
mov dword [ebp - 0x18cac], 0
mov ecx, dword [0x4be3a4]
test ecx, ecx
je 0x46decb
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_bitrate_float__
fstp dword [ebp - 0x18ce8]
pxor xmm0, xmm0
cvtss2sd xmm0, dword [ebp - 0x18ce8]
movsd qword [ebp - 0x18ce8], xmm0
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_bitrate2_float__
fstp dword [ebp - 0x18d00]
pxor xmm2, xmm2
cvtss2sd xmm2, dword [ebp - 0x18d00]
movsd qword [ebp - 0x18d00], xmm2
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_frames__
lea ebx, [eax + 1]
mov dword [esp], 2
mov esi, dword [ebp - 0x18cc4]
call esi
movsd xmm3, qword [ebp - 0x18ce8]
movsd qword [esp + 0x24], xmm3
movsd xmm1, qword [ebp - 0x18d00]
movsd qword [esp + 0x1c], xmm1
lea ecx, [ebp - 0x18cb0]
mov dword [esp + 0x18], ecx
mov edx, dword [ebp - 0x18cc8]
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0x18cd0]
mov ecx, dword [ebp - 0x18ccc]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], str._r___10u____20llu____10u_____s_____6.2f____6.2f_Kbps
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov dword [esp], 2
call esi
mov dword [esp], eax
call sym._fflush
jmp 0x46dad1
cmp byte [ebp - 0x18cf3], 0
jne 0x46dbe6
mov ecx, dword [ebp - 0x18d0c]
lea ecx, [ecx + ebx]
mov eax, 0x240000
xor edx, edx
div dword [ebp - 0x18cf8]
and eax, 0xfffffffe
cmp ecx, eax
jae 0x46dbe6
mov dword [ebp - 0x18d00], ecx
add ebx, dword [0x4be38c]
add ebx, esi
mov ecx, dword [ebp - 0x18d0c]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._memset
mov byte [ebp - 0x18cf3], 1
jmp 0x46dbe6
mov eax, dword [0x4be394]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], 1
mov edx, dword [0x4be39c]
mov dword [esp], edx
call sym._fwrite
mov ecx, eax
mov eax, dword [0x4be398]
cmp eax, ecx
jne 0x46df9b
mov dword [esp + 8], eax
mov edx, dword [0x4be39c]
mov dword [esp + 4], edx
movzx ecx, word [ebp - 0x18cf2]
mov dword [esp], ecx
call sym._XingHeaderUpdateCRC
mov word [ebp - 0x18cf2], ax
mov dword [0x4be398], 0
jmp 0x46dc76
je 0x46dbaa
jmp 0x46d614
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_frames_bytes__
mov ebx, dword [ebp - 0x18d10]
add edx, ebx
mov dword [esp + 4], edx
add eax, 1
mov dword [esp], eax
call sym._XingHeaderTOC
mov dword [ebp - 0x18cd8], eax
jmp 0x46dcc4
mov esi, dword [ebp - 0x18cd0]
mov eax, dword [ebp - 0x18ccc]
movd xmm0, esi
movd xmm2, eax
punpckldq xmm0, xmm2
movq qword [ebp - 0x18cc0], xmm0
fild qword [ebp - 0x18cc0]
test eax, eax
jns 0x46defb
fadd dword [0x4a896c]
fstp qword [ebp - 0x18ce8]
movsd xmm3, qword [ebp - 0x18ce8]
mulsd xmm3, qword [0x4a8970]
fild qword [ebp - 0x18cb8]
mov ebx, dword [ebp - 0x18cb4]
test ebx, ebx
jns 0x46df27
fadd dword [0x4a896c]
fstp qword [ebp - 0x18ce8]
movsd xmm1, qword [ebp - 0x18ce8]
divsd xmm3, xmm1
pxor xmm4, xmm4
movsd xmm4, xmm3
movupd xmm5, xmmword [0x4a8980]
movapd xmm6, xmm5
cmplepd xmm5, xmm4
andpd xmm6, xmm5
subpd xmm4, xmm6
pslld xmm5, 0x1f
cvttpd2dq xmm7, xmm4
pxor xmm7, xmm5
movd dword [esp + 8], xmm7
mov dword [esp + 4], str._3u__
lea edx, [ebp - 0x18cb0]
mov dword [esp], edx
call sym.sprintf_char__char_const__..._
jmp 0x46dcf7
lea eax, [ebp - 0x18c60]
mov dword [esp], eax
call sym.print_ec_E_CONTROL_
jmp 0x46cd5d
mov dword [ebp - 0x18ce8], edi
mov dword [esp], 2
mov edi, dword [ebp - 0x18cc4]
call edi
mov dword [esp + 4], str._n_FILE_WRITE_ERROR
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d614
mov dword [esp], 2
mov eax, dword [ebp - 0x18cc4]
call eax
mov dword [esp + 4], 0x4a848c
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d8d7
mov dword [esp], 2
mov esi, dword [ebp - 0x18cc4]
call esi
mov dword [esp + 4], str._n_CANNOT_CREATE_OUTPUT_FILE
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d245
mov dword [esp], 2
mov ebx, dword [ebp - 0x18cc4]
call ebx
mov dword [esp + 4], str._n_FILE_READ_ERROR
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x46d245
movzx edi, word [esi]
mov word [ebx], di
add ebx, 2
add esi, 2
sub edx, 2
jmp 0x46da59
movzx edx, byte [esi]
mov byte [ebx], dl
add ebx, 1
add esi, 1
lea edx, [eax - 1]
jmp 0x46da50
mov ecx, dword [ebp - 0x18ca4]
lea eax, [ecx + 7]
test ecx, ecx
cmovns eax, ecx
sar eax, 3
imul eax, dword [ebp - 0x18ca8]
mov dword [esp + 8], eax
sar eax, 0x1f
mov dword [esp + 0xc], eax
mov esi, dword [ebp - 0x18cf0]
mov edi, dword [ebp - 0x18cec]
mov dword [esp], esi
mov dword [esp + 4], edi
call sym.___udivdi3
mov esi, eax
mov edi, edx
lea ecx, [ebp - 0x183ac]
call method.CMp3Enc.L3_audio_encode_get_frames__
mov edx, eax
movzx ebx, word [ebp - 0x18cf2]
mov dword [esp + 0x34], ebx
mov ecx, dword [ebp - 0x18c58]
mov dword [esp + 0x30], ecx
mov eax, dword [ebp - 0x18ca0]
mov dword [esp + 0x2c], eax
mov ebx, dword [ebp - 0x18c4c]
mov dword [esp + 0x28], ebx
mov ecx, dword [ebp - 0x18cc8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov esi, dword [0x4be39c]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov edi, dword [ebp - 0x18d18]
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], edx
call sym._XingHeaderUpdateInfo
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov edx, dword [0x4be394]
mov dword [esp], edx
call sym._fseek
mov eax, dword [0x4be394]
mov dword [esp + 0xc], eax
mov ebx, dword [ebp - 0x18d14]
mov dword [esp + 8], ebx
mov dword [esp + 4], 1
mov ecx, dword [0x4be39c]
mov dword [esp], ecx
call sym._fwrite
jmp 0x46d245