Function at 0x402010
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov dword [0x79c0c0], 0
mov ecx, dword [esp + 0x98]
mov ebx, dword [esp + 0x80]
mov dword [0x79c0c4], 0
mov eax, dword [esp + 0x94]
test ecx, ecx
je 0x402218
mov edx, dword [esp + 0x90]
lea ecx, [eax*4 + 1]
test edx, edx
jne 0x40222b
mov edx, dword [0x79c0ac]
mov eax, dword [0x79c0a8]
mov dword [esp + 0x34], edx
mov edi, edx
or edx, eax
mov dword [esp + 0x30], eax
je 0x402370
mov esi, ecx
mov eax, dword [esp + 0x30]
mov ebp, dword [0x79c0e4]
mov dword [esp + 0x28], ecx
sar esi, 0x1f
mov dword [esp + 0x2c], esi
mov esi, dword [0x79c0e0]
mul ecx
mov dword [esp + 0x38], esi
mov esi, edi
mov edi, dword [esp + 0x2c]
imul esi, ecx
imul edi, dword [esp + 0x30]
add esi, edi
add edx, esi
cmp eax, dword [esp + 0x38]
mov edi, edx
sbb edi, ebp
jae 0x402635
mov eax, dword [esp + 0x30]
mov dword [esp], ebx
mov dword [esp + 8], 0
imul eax, ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 4], eax
call sym._lseek
mov ecx, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
mov esi, eax
mov eax, dword [0x79c0ac]
imul ebp, dword [0x79c0a8]
mov dword [esp + 0x30], esi
imul eax, ecx
add ebp, eax
mov eax, ecx
mul dword [0x79c0a8]
mov ecx, eax
mov eax, esi
mov ebx, edx
cdq
add ebx, ebp
xor esi, ecx
mov eax, edx
mov dword [esp + 0x34], edx
xor eax, ebx
or eax, esi
jne 0x402698
mov eax, dword [esp + 0x98]
test eax, eax
jne 0x4023d8
mov eax, dword [esp + 0x94]
xor edx, edx
shl eax, 0x10
lea ebp, [eax + 0x1b]
mov eax, ebp
mov dword [esp + 8], eax
mov eax, dword [0x79c0d8]
xor ebx, ebx
xor esi, esi
mov dword [esp + 0xc], edx
mov edx, dword [0x79c0dc]
mov dword [esp], eax
mov dword [esp + 4], edx
call sym.___udivdi3
mov edi, dword [esp + 0x84]
mov dword [esp + 0x28], eax
test eax, eax
jne 0x4021c9
jmp 0x4024c7
lea eax, [esp + 0x57]
mov dword [esp + 8], 8
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._read
cmp eax, 8
jne 0x402580
mov eax, dword [esp + 0x57]
cmp dword [0x79c0a8], eax
mov eax, dword [0x79c0ac]
sbb eax, dword [esp + 0x5b]
jb 0x4025b8
add esi, 1
add ebx, ebp
cmp dword [esp + 0x28], esi
je 0x4024c0
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], edi
call sym._lseek
cmp ebx, eax
je 0x402180
imul ebp, dword [esp + 0x28]
mov dword [esp], 2
call dword [0x4b307c]
mov dword [esp + 4], str.Could_not_set_LUT_stream_file_read_position_to_first_sample_read_postion__u._n
mov dword [esp], eax
mov dword [esp + 8], ebp
call sym.fprintf__iobuf__char_const__..._
add esp, 0x6c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x90]
lea ecx, [eax + eax + 1]
test edx, edx
je 0x40205e
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [esp + 0x28], ecx
call sym._lseek
mov ecx, dword [esp + 0x28]
test eax, eax
jne 0x402390
mov eax, dword [esp + 0x94]
lea esi, [esp + 0x57]
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x40], ecx
sar ecx, 0x1f
shl eax, 0x10
mov dword [esp + 0x80], ebx
xor ebx, ebx
add eax, 0x14
mov dword [esp + 0x28], esi
xor esi, esi
mov dword [esp + 0x48], eax
sar eax, 0x1f
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x44], ecx
jmp 0x40230d
cmp edx, 0xfd
je 0x4023c0
add edi, 1
adc ebp, 0
add ebx, dword [esp + 0x40]
adc esi, dword [esp + 0x44]
mov eax, dword [0x79c0a8]
mov edx, dword [0x79c0ac]
xor eax, edi
xor edx, ebp
or edx, eax
je 0x4023f0
mov eax, dword [esp + 0x80]
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._lseek
cdq
mov ecx, eax
mov eax, edx
xor ecx, ebx
xor eax, esi
or eax, ecx
jne 0x4025d8
mov eax, dword [esp + 0x28]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x80]
mov dword [esp], eax
call sym._read
test eax, eax
jle 0x4023f0
movsx eax, byte [esp + 0x57]
movzx edx, al
and eax, 0xfe
cmp eax, 0xfe
jne 0x4022b0
cmp edx, 0xff
jne 0x4023c0
mov dword [esp + 0x38], ebx
add ebx, 0x3000f
mov dword [esp + 0x3c], esi
adc esi, 0
jmp 0x4022ca
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._lseek
test eax, eax
je 0x40211f
mov dword [esp], 2
call dword [0x4b307c]
mov dword [esp + 4], str.Could_not_set_read_position_to_start_of_file._n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x4024b5
mov dword [esp + 0x38], ebx
add ebx, dword [esp + 0x48]
mov dword [esp + 0x3c], esi
adc esi, dword [esp + 0x4c]
jmp 0x4022ca
mov eax, 0x21
xor edx, edx
mov ebp, 0x21
jmp 0x40213f
mov edi, dword [esp + 0x38]
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x80]
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [esp + 0x34], esi
call sym._lseek
cdq
mov ecx, eax
mov eax, dword [esp + 0x3c]
xor ecx, edi
xor eax, edx
or eax, ecx
jne 0x4026d7
mov eax, dword [esp + 0x98]
mov dword [esp], ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 4], eax
call sym.read_lut_int__int__unsigned_char__int__int__int_
test eax, eax
js 0x40270e
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], esi
call sym._lseek
mov ebx, eax
xor eax, esi
sar ebx, 0x1f
mov edx, ebx
xor edx, edi
or edx, eax
jne 0x402745
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov dword [0x79c0d4], edx
mov dword [0x79c0d0], eax
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x84], edi
mov esi, dword [esp + 0x28]
sub esi, 1
imul esi, ebp
mov eax, dword [esp + 0x84]
mov dword [esp + 8], 0
mov dword [esp], eax
mov dword [esp + 4], esi
call sym._lseek
cmp esi, eax
jne 0x40260a
mov eax, dword [esp + 0x98]
mov dword [esp + 0xc], 0
mov dword [0x79c0c8], esi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x94]
mov dword [0x79c0cc], 0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x84]
mov dword [esp], eax
call sym.read_lut_int__int__unsigned_char__int__int__int_
test eax, eax
jns 0x4024a0
mov dword [esp], 2
call dword [0x4b307c]
mov dword [esp + 8], esi
mov dword [esp + 4], str.Error_reading_first_LUT_at_position__u_n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x4024b5
imul ebp, dword [esp + 0x28]
mov dword [esp], 2
call dword [0x4b307c]
mov dword [esp + 4], str.Could_not_read_8_bytes_from_lut_streamfile_at_position__u._n
mov dword [esp], eax
mov dword [esp + 8], ebp
call sym.fprintf__iobuf__char_const__..._
add esp, 0x6c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x84], edi
sub esi, 1
cmp dword [esp + 0x28], esi
ja 0x4024ce
jmp 0x4024c7
mov dword [esp], 2
call dword [0x4b307c]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 4], str.Could_not_set_read_position_to__llu._n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
add esp, 0x6c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 2
call dword [0x4b307c]
mov dword [esp + 8], esi
mov dword [esp + 4], str.Could_not_set_LUT_stream_file_read_position_to_first_sample_read_postion__u._n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x4024b5
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], edx
mov dword [esp], eax
call sym.___udivdi3
mov dword [esp], 2
mov edi, edx
mov esi, eax
call dword [0x4b307c]
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x34]
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov dword [esp + 4], str.Sample_index_for_the_start_of_conversion_above_overall_sample_count_of_file:__llu____llu__aborting._n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x4024b5
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
mov dword [esp], 2
call dword [0x4b307c]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov dword [esp + 4], str.Could_not_set_read_position_to_first_sample_read_postion__llu._n
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebx
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x4024b5
mov dword [esp], 2
call dword [0x4b307c]
mov ecx, dword [esp + 0x38]
mov dword [esp + 4], str.Could_not_set_last_LUT_read_position_to__llu._n
mov dword [esp], eax
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x4024b5
mov dword [esp], 2
call dword [0x4b307c]
mov ecx, dword [esp + 0x38]
mov dword [esp + 4], str.Error_reading_first_LUT_at_position__llu_n
mov dword [esp], eax
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x4024b5
mov dword [esp], 2
call dword [0x4b307c]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
mov dword [esp + 4], str.Could_not_set_read_position_to_first_sample_read_position__llu._n
mov dword [esp], eax
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x4024b5