Function at 0x404170
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x509f3d
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x56a040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], 0
cmp byte [edi + 0x34], 0
jne 0x4041e1
lea esi, [edi + 8]
lea eax, [ebp + 8]
cmp esi, eax
je 0x4041c7
cmp dword [ebp + 0x1c], 7
mov ecx, esi
push dword [ebp + 0x18]
cmova eax, dword [ebp + 8]
push eax
call fcn.004048f0
mov eax, dword [ebp + 0x28]
mov edx, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x24]
mov dword [esi + 0x20], eax
mov al, byte [ebp + 0x2c]
mov dword [esi + 0x18], edx
mov dword [esi + 0x1c], ecx
mov byte [esi + 0x24], al
jmp 0x4041e7
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x20]
mov dword [edi + 0x44], ecx
imul ecx, edx
mov byte [edi + 0x35], 1
mov dword [edi + 0x100], 0
mov dword [edi + 0x38], 0
mov dword [edi + 0x3c], 0x28
mov dword [edi + 0x40], edx
mov dword [edi + 0x48], 0x180001
mov dword [edi + 0x4c], 0
lea eax, [ecx + ecx*2]
mov dword [edi + 0x54], 0
mov dword [edi + 0x50], eax
mov dword [edi + 0x58], 0
mov dword [edi + 0x5c], 0
mov dword [edi + 0x60], 0
call dword [sym.imp.AVIFIL32.dll_AVIFileInit]
push ecx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp + 8]
call fcn.00404ee0
cmp dword [ebp - 0x18], 0xf
lea eax, [ebp - 0x2c]
push 0
cmova eax, dword [ebp - 0x2c]
lea ebx, [edi + 0x64]
push 0x1001
push eax
push ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.AVIFIL32.dll_AVIFileOpenA]
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xf
jbe 0x4042a3
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x404299
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4044df
push ecx
push edx
call fcn.004d7c38
add esp, 8
push 0x8c
lea esi, [edi + 0x68]
push 0
push esi
call fcn.004dbbb0
mov eax, dword [ebp + 0x28]
add esp, 0xc
mov dword [edi + 0x80], eax
lea eax, [edi + 0xf4]
mov dword [esi], 0x73646976
mov dword [edi + 0x7c], 1
push esi
push eax
push dword [ebx]
call dword [sym.imp.AVIFIL32.dll_AVIFileCreateStreamA]
cmp byte [ebp + 0x2c], 0
je 0x40430c
lea ebx, [edi + 4]
push ebx
lea eax, [edi + 0xf4]
push eax
push 1
push 0
push dword [0x67355c]
call dword [sym.imp.AVIFIL32.dll_AVISaveOptions]
test eax, eax
jne 0x4043b8
mov eax, str._AVIEncoder__Failed_to_save_options_n
jmp 0x40434a
push 0x546f68
push str.avi.cfg
call fcn.004dfafd
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x404345
push 2
push 0
push ebx
call fcn.004e014e
push ebx
call fcn.004dfa0b
add esp, 0x10
cmp eax, 0x2c
jae 0x404373
push ebx
call fcn.004dfdfb
add esp, 4
mov eax, str._AVIEncoder__Failed_to_load_options_n
push eax
call fcn.00403a40
add esp, 4
xor bl, bl
lea ecx, [ebp + 8]
call fcn.00404c70
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
push 0
push 0
push ebx
call fcn.004e014e
push ebx
push 1
push 0x2c
push dword [edi + 4]
call fcn.004e3264
mov eax, dword [edi + 4]
push dword [eax + 0x24]
call fcn.004e3625
mov ecx, dword [edi + 4]
mov esi, eax
push ebx
push 1
push dword [ecx + 0x24]
push esi
call fcn.004e3264
mov ecx, dword [edi + 4]
push ebx
mov dword [ecx + 0x20], esi
call fcn.004dfdfb
add esp, 0x34
lea ebx, [edi + 4]
push 0x546f5c
push 0x546f60
call fcn.004dfafd
mov esi, eax
push esi
push 1
push 0x2c
push dword [ebx]
call fcn.004e3051
mov ecx, dword [ebx]
push esi
push 1
push dword [ecx + 0x24]
push dword [ecx + 0x20]
call fcn.004e3051
push esi
call fcn.004dfdfb
add esp, 0x2c
lea esi, [edi + 0xf8]
push 0
push dword [ebx]
push dword [edi + 0xf4]
push esi
call dword [sym.imp.AVIFIL32.dll_AVIMakeCompressedStream]
mov ecx, dword [edi + 0x5c]
lea edx, [edi + 0x3c]
mov eax, dword [edx]
lea eax, [eax + ecx*4]
push eax
push edx
push 0
push dword [esi]
call dword [sym.imp.AVIFIL32.dll_AVIStreamSetFormat]
lea ebx, [edi + 0x104]
mov dword [edi + 0xfc], 0
mov eax, 1
mov dword [edi + 0x108], 0xac44
mov word [ebx], ax
mov eax, 2
mov word [edi + 0x106], ax
xor eax, eax
push 0x8c
mov dword [edi + 0x10c], 0x2b110
mov dword [edi + 0x110], 0x100004
mov word [edi + 0x114], ax
add edi, 0x118
push eax
push edi
call fcn.004dbbb0
mov esi, dword [ebp - 0x14]
add esp, 0xc
mov dword [edi], 0x73647561
movzx ecx, word [esi + 0x110]
mov eax, dword [esi + 0x10c]
mov dword [esi + 0x130], eax
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x144], 0xffffffff
mov dword [esi + 0x12c], ecx
mov dword [esi + 0x13c], 1
mov dword [esi + 0x148], ecx
add esi, 0x1a4
push edi
push esi
push dword [eax]
call dword [sym.imp.AVIFIL32.dll_AVIFileCreateStreamA]
push 0x12
push ebx
push 0
push dword [esi]
call dword [sym.imp.AVIFIL32.dll_AVIStreamSetFormat]
mov bl, 1
jmp 0x404355
call fcn.004e35d4
int3