Function at 0x402050
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 ebp, dword [esp + 0x80]
mov dword [0x79c0c4], 0
mov eax, dword [esp + 0x94]
test ecx, ecx
je 0x402338
mov edx, dword [esp + 0x90]
lea eax, [eax*4 + 1]
mov dword [esp + 0x30], eax
test edx, edx
jne 0x40234f
mov edx, dword [0x79c0ac]
mov eax, dword [0x79c0a8]
mov dword [esp + 0x2c], edx
mov ebx, edx
or edx, eax
mov dword [esp + 0x28], eax
je 0x4022a8
mov esi, dword [esp + 0x30]
mov eax, dword [0x79c0e4]
mov ecx, ebx
mov edi, esi
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
imul ecx, esi
sar edi, 0x1f
mov dword [esp + 0x34], edi
mov ebx, dword [esp + 0x34]
mul esi
imul ebx, dword [esp + 0x28]
mov edi, dword [0x79c0e0]
add ecx, ebx
add edx, ecx
cmp eax, edi
mov ebx, edx
sbb ebx, dword [esp + 0x38]
jae 0x4026c3
mov eax, dword [esp + 0x28]
mov dword [esp + 8], 0
mov dword [esp], ebp
imul eax, esi
mov dword [esp + 4], eax
call sym._lseek
mov ebx, dword [esp + 0x34]
imul ebx, dword [0x79c0a8]
mov ecx, eax
mov eax, dword [0x79c0ac]
mov dword [esp + 0x28], ecx
imul eax, esi
add ebx, eax
mov eax, esi
mul dword [0x79c0a8]
mov esi, eax
mov eax, ecx
mov edi, edx
cdq
add edi, ebx
xor ecx, esi
mov eax, edx
mov dword [esp + 0x2c], edx
xor eax, edi
or eax, ecx
jne 0x402726
mov eax, dword [esp + 0x98]
test eax, eax
jne 0x4024a8
mov eax, dword [esp + 0x94]
xor edx, edx
shl eax, 0x10
lea esi, [eax + 0x1b]
add eax, 0x25
cmp eax, dword [0x79c0d8]
mov edi, edx
sbb edi, dword [0x79c0dc]
jae 0x40268a
mov dword [esp + 0x30], esi
mov ebp, esi
xor ebx, ebx
mov esi, eax
mov edi, edx
lea esi, [esi]
nop
mov eax, dword [esp + 0x84]
mov dword [esp + 8], 0
mov dword [esp + 4], ebp
mov dword [esp], eax
mov dword [esp + 0x38], ebx
add ebx, 1
call sym._lseek
cmp ebp, eax
jne 0x4025d0
lea eax, [esp + 0x57]
mov dword [esp + 8], 8
mov dword [esp + 4], eax
mov eax, dword [esp + 0x84]
mov dword [esp], eax
call sym._read
cmp eax, 8
jne 0x402610
mov eax, dword [esp + 0x5b]
or eax, dword [esp + 0x57]
je 0x4022f0
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x38]
imul esi, edi
mov dword [esp + 0x90], esi
mov eax, esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 8], 0
mov dword [esp], eax
call sym._lseek
cmp eax, dword [esp + 0x90]
jne 0x402698
mov eax, dword [esp + 0x98]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x94]
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
js 0x40278c
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
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 + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebp
call sym._lseek
test eax, eax
je 0x40215a
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 0x40229c
mov ecx, dword [0x79c0d8]
mov edx, dword [0x79c0dc]
mov eax, edi
cmp esi, ecx
sbb eax, edx
jae 0x402200
add ebp, dword [esp + 0x30]
xor edi, edi
lea eax, [ebp + 0xa]
cmp eax, ecx
mov esi, eax
mov eax, edi
sbb eax, edx
jb 0x4021a0
mov esi, dword [esp + 0x30]
imul esi, ebx
mov dword [esp + 0x90], esi
mov eax, esi
jmp 0x402214
mov edx, dword [esp + 0x90]
lea eax, [eax + eax + 1]
mov dword [esp + 0x30], eax
test edx, edx
je 0x4020a2
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebp
call sym._lseek
test eax, eax
jne 0x4022c8
mov eax, dword [esp + 0x94]
xor esi, esi
xor edi, edi
lea ebx, [esp + 0x57]
mov dword [esp + 0x28], 0
shl eax, 0x10
mov dword [esp + 0x2c], 0
add eax, 0x14
mov dword [esp + 0x38], 0
mov dword [esp + 0x48], eax
sar eax, 0x1f
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x3c], 0
cdq
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edi
jmp 0x402442
cmp edx, 0xfd
je 0x4024c0
add dword [esp + 0x30], 1
mov esi, dword [esp + 0x40]
adc dword [esp + 0x34], 0
mov edi, dword [esp + 0x44]
add dword [esp + 0x28], esi
adc dword [esp + 0x2c], edi
mov edx, dword [esp + 0x30]
mov eax, dword [0x79c0a8]
mov ecx, dword [esp + 0x34]
xor eax, edx
mov edx, dword [0x79c0ac]
xor edx, ecx
or edx, eax
je 0x4024f0
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov dword [esp + 8], 0
mov dword [esp], ebp
mov dword [esp + 4], esi
call sym._lseek
cdq
mov ecx, eax
mov eax, edx
xor ecx, esi
xor eax, edi
or eax, ecx
jne 0x402650
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov dword [esp], ebp
call sym._read
test eax, eax
jle 0x4024f0
movsx eax, byte [esp + 0x57]
movzx edx, al
and eax, 0xfe
cmp eax, 0xfe
jne 0x4023d0
cmp edx, 0xff
jne 0x4024c0
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x38], eax
add eax, 0x3000f
mov dword [esp + 0x3c], edx
adc edx, 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
jmp 0x4023f6
mov eax, 0x2b
xor edx, edx
mov esi, 0x21
jmp 0x40217b
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x48]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x4c]
mov dword [esp + 0x38], eax
add eax, esi
mov dword [esp + 0x3c], edx
adc edx, edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
jmp 0x4023f6
mov edi, dword [esp + 0x38]
mov dword [esp + 8], 0
mov dword [esp], ebp
mov dword [esp + 4], edi
call sym._lseek
cdq
mov ecx, eax
mov eax, dword [esp + 0x3c]
xor ecx, edi
xor eax, edx
or eax, ecx
jne 0x402755
mov eax, dword [esp + 0x98]
mov dword [esp], ebp
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 0x4027b7
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov dword [esp + 8], 0
mov dword [esp], ebp
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
je 0x402287
mov dword [esp], 2
call dword [0x4b307c]
mov edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
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], edi
mov dword [esp + 0xc], ebp
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x40229c
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
mov dword [esp], 2
call dword [0x4b307c]
mov dword [esp + 4], str.Could_not_set_read_position_to_first_sample_read_postion__u._n
imul esi, edi
mov dword [esp], eax
mov dword [esp + 8], esi
call sym.fprintf__iobuf__char_const__..._
add esp, 0x6c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
mov dword [esp], 2
call dword [0x4b307c]
mov dword [esp + 4], str.Could_not_read_8_bytes_from_lut_streamfile_at_position__u._n
imul esi, edi
mov dword [esp], eax
mov dword [esp + 8], esi
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 edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
mov dword [esp + 4], str.Could_not_set_read_position_to__llu._n
mov dword [esp], eax
mov dword [esp + 8], edi
mov dword [esp + 0xc], ebp
call sym.fprintf__iobuf__char_const__..._
add esp, 0x6c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x90]
xor esi, esi
jmp 0x402214
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 0x40229c
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
call sym.___udivdi3
mov dword [esp], 2
mov edi, edx
mov esi, eax
call dword [0x4b307c]
mov dword [esp + 0x14], edi
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 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 0x40229c
mov dword [esp], 2
call dword [0x4b307c]
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov dword [esp + 4], str.Could_not_set_read_position_to_first_sample_read_postion__llu._n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x40229c
mov dword [esp], 2
call dword [0x4b307c]
mov edi, 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], edi
mov edi, dword [esp + 0x3c]
mov dword [esp + 0xc], edi
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x40229c
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 0x40229c
mov dword [esp], 2
call dword [0x4b307c]
mov edi, dword [esp + 0x38]
mov dword [esp + 4], str.Error_reading_first_LUT_at_position__llu_n
mov dword [esp], eax
mov dword [esp + 8], edi
mov edi, dword [esp + 0x3c]
mov dword [esp + 0xc], edi
call sym.fprintf__iobuf__char_const__..._
mov eax, 0xffffffff
jmp 0x40229c