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

Disassembly:
sub esp, 0x4c8
mov eax, dword [0x48ea40]
xor eax, esp
mov dword [esp + 0x4c4], eax
push ebp
push esi
mov esi, ecx
mov cx, word [0x485b10]
lea ebp, [esi + 0x82c]
mov word [ebp], cx
mov dl, byte [0x485b12]
lea eax, [esp + 0x14]
push edi
mov dword [esp + 0x10], eax
mov byte [ebp + 2], dl
call sub.MSVFW32.dll_Ordinal_2
shr eax, 0x10
cmp eax, 0x10a
jae 0x401207
mov edi, ebp
mov ecx, 0x11
mov esi, str.Version_of_Video_for_Windows_too_old._Come_on__join_the_21th_century_
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
pop edi
pop esi
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x4c4]
xor ecx, esp
call fcn.0045c20d
add esp, 0x4c8
ret
push ebx
call sub.AVIFIL32.dll_AVIFileInit
push 0
push 0x1001
push esi
lea edi, [esi + 0xc34]
push edi
call sub.AVIFIL32.dll_AVIFileOpenA
mov ebx, eax
test ebx, ebx
je 0x401346
push esi
lea eax, [esp + 0xd8]
push str.AVI_Engine_failed_to_initialize._Check_filename__s.
push eax
call fcn.0045df62
lea eax, [esp + 0xe0]
mov edx, ebp
mov ecx, eax
add esp, 0xc
sub edx, ecx
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x401250
cmp ebx, 0x80044067
jg 0x4012ee
je 0x4012c5
cmp ebx, 0x80040154
je 0x4012a0
cmp ebx, 0x80044066
jne 0x40133f
add ebp, 0xffffffff
mov edi, ebp
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x401283
mov ecx, 0x14
mov esi, str.The_file_couldnt_be_read__indicating_a_corrupt_file_or_an_unrecognized_format.
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
jmp 0x4016b5
add ebp, 0xffffffff
mov edi, ebp
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x4012a5
mov ecx, 0x1a
mov esi, str.According_to_the_registry__the_type_of_file_specified_in_AVIFileOpen_does_not_have_a_handler_to_process_it
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
jmp 0x4016b5
add ebp, 0xffffffff
mov edi, ebp
lea ebx, [ebx]
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x4012d0
mov ecx, 0xf
mov esi, str.The_file_could_not_be_opened_because_of_insufficient_memory.
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
jmp 0x4016b5
cmp ebx, 0x8004406d
je 0x401322
cmp ebx, 0x8004406f
jne 0x40133f
add ebp, 0xffffffff
mov edi, ebp
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x401303
mov esi, str.A_disk_error_occurred_while_opening_the_file.
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, ebx
jmp 0x4016b5
add ebp, 0xffffffff
mov edi, ebp
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x401327
mov esi, str.A_disk_error_occurred_while_reading_the_file.
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, ebx
jmp 0x4016b5
push 0x8c
lea edx, [esp + 0x4c]
push 0
push edx
call fcn.0045c220
mov eax, dword [esi + 0x800]
mov edx, dword [esi + 0x80c]
mov ecx, dword [esi + 0x818]
add esp, 0xc
push edx
mov dword [esp + 0x64], eax
mov eax, dword [esi + 0x808]
push eax
push 0
mov dword [esp + 0x7c], ecx
push 0
lea ecx, [esp + 0x8c]
push ecx
mov dword [esp + 0x5c], 0x73646976
mov dword [esp + 0x60], 0
mov dword [esp + 0x70], 1
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [edi]
lea edx, [esp + 0x48]
push edx
lea ebx, [esi + 0xc38]
push ebx
push eax
call sub.AVIFIL32.dll_AVIFileCreateStreamA
test eax, eax
je 0x40141c
cmp eax, 0x80044072
mov ecx, 0xb
mov esi, str.AVI_Stream_creation_failed._Check_Bitmap_info.
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jne 0x4016b5
add ebp, 0xffffffff
lea ecx, [ecx]
mov cl, byte [ebp + 1]
add ebp, 1
test cl, cl
jne 0x4013e0
mov ecx, dword [str._Read_only_file.]
mov dword [ebp], ecx
mov edx, dword [0x485d28]
mov dword [ebp + 4], edx
mov ecx, dword [0x485d2c]
mov dword [ebp + 8], ecx
mov edx, dword [0x485d30]
mov dword [ebp + 0xc], edx
mov cl, byte [0x485d34]
mov byte [ebp + 0x10], cl
jmp 0x4016b5
push 0x2c
lea edx, [esp + 0x20]
push 0
push edx
call fcn.0045c220
lea eax, [esi + 0x400]
push 0x485d38
push eax
mov dword [esp + 0x2c], eax
call fcn.00460e69
mov edi, eax
add esp, 0x14
test edi, edi
je 0x401531
push edi
push 1
lea eax, [esp + 0x24]
push 0x2c
push eax
call fcn.00460a57
push edi
push 1
lea ecx, [esp + 0x50]
push 4
push ecx
call fcn.00460a57
mov edx, dword [esp + 0x58]
push edx
call fcn.0045dbe5
mov ecx, dword [esp + 0x5c]
push edi
push 1
push ecx
push eax
mov dword [esp + 0x68], eax
call fcn.00460a57
push edi
push 1
lea edx, [esp + 0x7c]
push 4
push edx
call fcn.00460a57
mov eax, dword [esp + 0x84]
add esp, 0x44
push eax
call fcn.0045dbe5
mov ecx, dword [esp + 0x44]
push edi
push 1
push ecx
push eax
mov dword [esp + 0x50], eax
call fcn.00460a57
push edi
call fcn.004601a1
add esp, 0x18
mov byte [esp + 0x13], 0
mov edx, dword [ebx]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
lea edi, [esi + 0xc3c]
push edi
call sub.AVIFIL32.dll_AVIMakeCompressedStream
test eax, eax
je 0x4015af
cmp eax, 0x80044065
mov ecx, 9
mov esi, str.AVI_Compressed_Stream_creation_failed.
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
je 0x40158e
cmp eax, 0x80044067
je 0x401565
cmp eax, 0x80044071
jne 0x4016b5
add ebp, 0xffffffff
mov edi, ebp
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x401516
mov ecx, 0xa
mov esi, str._A_suitable_compressor_cannot_be_found.
rep movsd dword es:[edi], dword [esi]
jmp 0x4016b5
lea edx, [esp + 0x14]
push edx
push ebx
push 1
push 0
push 0
mov byte [esp + 0x27], 1
call sub.AVIFIL32.dll_AVISaveOptions
test eax, eax
jne 0x4014c5
lea eax, [esp + 0x14]
push eax
push 1
call sub.AVIFIL32.dll_AVISaveOptionsFree
mov eax, 1
jmp 0x4016b5
add ebp, 0xffffffff
mov edi, ebp
lea ebx, [ebx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x401570
mov ecx, 0xd
mov esi, str._There_is_not_enough_memory_to_complete_the_operation.
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x4016b5
add ebp, 0xffffffff
mov edi, ebp
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x401593
mov ecx, 0x22
mov esi, str.Compression_is_not_supported_for_this_type_of_data._This_error_might_be_returned_if_you_try_to_compress_data_that_is_not_audio_or_video.
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jmp 0x4016b5
mov edx, dword [esi + 0x804]
mov ecx, dword [esi + 0x824]
lea eax, [esi + 0x804]
lea ecx, [edx + ecx*4]
mov edx, dword [edi]
push ecx
push eax
push 0
push edx
call sub.AVIFIL32.dll_AVIStreamSetFormat
mov ebx, eax
xor edi, edi
cmp ebx, edi
je 0x401601
cmp byte [esp + 0x13], 0
mov ecx, 0xb
mov esi, str.AVI_Compressed_Stream_format_setting_failed.
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
je 0x4015fa
lea eax, [esp + 0x14]
push eax
push 1
call sub.AVIFIL32.dll_AVISaveOptionsFree
mov eax, ebx
jmp 0x4016b5
cmp byte [esp + 0x13], 0
mov dword [esi + 0xc30], edi
je 0x401698
mov ecx, dword [esp + 0x18]
push 0x485e84
push ecx
call fcn.00460e69
mov esi, eax
add esp, 8
cmp esi, edi
je 0x40168a
push esi
push 1
lea edx, [esp + 0x24]
push 0x2c
push edx
call fcn.00460bd1
push esi
push 1
lea eax, [esp + 0x50]
push 4
push eax
call fcn.00460bd1
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
push esi
push 1
push ecx
push edx
call fcn.00460bd1
push esi
push 1
lea eax, [esp + 0x78]
push 4
push eax
call fcn.00460bd1
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x7c]
add esp, 0x40
push esi
push 1
push ecx
push edx
call fcn.00460bd1
push esi
call fcn.004601a1
add esp, 0x14
lea eax, [esp + 0x14]
push eax
push 1
call sub.AVIFIL32.dll_AVISaveOptionsFree
jmp 0x4016b3
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0045dca8
mov edx, dword [esp + 0x40]
push edx
mov dword [esp + 0x3c], edi
call fcn.0045dca8
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x4d4]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0045c20d
add esp, 0x4c8
ret