Function at 0x491a30
Capabilities:
Read file on windows
Set current directory

Disassembly:
mov eax, dword [esp + 4]
mov dword [0x2a767d8], edx
imul edx, eax
push esi
mov dword [0x2a767dc], eax
mov esi, ecx
push edi
mov dword [0x2a767d0], 1
mov dword [0x2a76734], 0
mov dword [0x2a7671c], 0
mov dword [0x2a767d4], 0x28
lea eax, [edx + edx*2]
mov dword [0x2a767e0], 0x180001
mov dword [0x2a767e4], 0
mov dword [0x2a767e8], eax
mov dword [0x2a767ec], 0
mov dword [0x2a767f0], 0
mov dword [0x2a767f4], 0
mov dword [0x2a767f8], 0
call dword [sym.imp.AVIFIL32.dll_AVIFileInit]
push 0
push 0x1001
push esi
push 0x2a7673c
call dword [sym.imp.AVIFIL32.dll_AVIFileOpenA]
push 0x8c
push 0
push 0x2a76800
call fcn.004c7d50
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [0x2a76800], 0x73646976
mov dword [0x2a76814], 1
mov dword [0x2a76818], eax
push 0x2a76800
push 0x2a767fc
push dword [0x2a7673c]
mov dword [0x2a76828], 0
call dword [sym.imp.AVIFIL32.dll_AVIFileCreateStreamA]
cmp dword [0x2a76718], 0
jne 0x491c16
cmp dword [0x54deb4], 0x10
mov eax, 0x54dea0
jb 0x491b3c
mov eax, dword [0x54dea0]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x53cf3c
push 0x53cf34
call fcn.004ce8d6
mov edi, eax
add esp, 8
test edi, edi
jne 0x491b60
lea eax, [edi + 1]
jmp 0x491bdd
push 2
push 0
push edi
call fcn.004ceda0
push edi
call fcn.004ce7e4
add esp, 0x10
test eax, eax
jne 0x491b87
push edi
call fcn.004cea42
add esp, 4
mov eax, 1
jmp 0x491bdd
push 0
push 0
push edi
call fcn.004ceda0
push 0x2c
call fcn.004cf109
push edi
push 1
push 0x2c
push eax
mov dword [0x2a76718], eax
call fcn.004cefce
mov eax, dword [0x2a76718]
push dword [eax + 0x24]
call fcn.004cf109
mov ecx, dword [0x2a76718]
mov esi, eax
push edi
push 1
push dword [ecx + 0x24]
push esi
call fcn.004cefce
mov ecx, dword [0x2a76718]
push edi
mov dword [ecx + 0x20], esi
call fcn.004cea42
add esp, 0x38
xor eax, eax
test eax, eax
je 0x491c16
push 0x2c
push 0
push 0x2a766ec
call fcn.004c7d50
add esp, 0xc
mov dword [0x2a76718], 0x2a766ec
push 0x2a76718
push 0x2a767fc
push 1
push 0
push dword [0xf54870]
call dword [sym.imp.AVIFIL32.dll_AVISaveOptions]
cmp dword [0x54deb4], 0x10
mov eax, 0x54dea0
jb 0x491c29
mov eax, dword [0x54dea0]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x53c488
push str.avi.cfg
call fcn.004ce8d6
mov esi, eax
push esi
push 1
push 0x2c
push dword [0x2a76718]
call fcn.004ce0c0
mov eax, dword [0x2a76718]
push esi
push 1
push dword [eax + 0x24]
push dword [eax + 0x20]
call fcn.004ce0c0
push esi
call fcn.004d44b4
push esi
call fcn.004cea42
add esp, 0x30
push 0
push dword [0x2a76718]
push dword [0x2a767fc]
push 0x2a7688c
call dword [sym.imp.AVIFIL32.dll_AVIMakeCompressedStream]
mov ecx, dword [0x2a767d4]
mov eax, dword [0x2a767f4]
mov esi, dword [sym.imp.AVIFIL32.dll_AVIStreamSetFormat]
lea eax, [ecx + eax*4]
push eax
push 0x2a767d4
push 0
push dword [0x2a7688c]
call esi
xor eax, eax
mov dword [0x2a76738], 0
push 0x8c
push eax
push 0x2a76740
mov dword [0x2a76720], 0x20001
mov dword [0x2a76724], 0xac44
mov dword [0x2a76728], 0x2b110
mov dword [0x2a7672c], 0x100004
mov word [0x2a76730], ax
call fcn.004c7d50
add esp, 0xc
mov dword [0x2a76740], 0x73647561
mov dword [0x2a7676c], 0xffffffff
mov dword [0x2a76754], 4
mov dword [0x2a76764], 1
push 0x2a76740
push 0x2a767cc
push dword [0x2a7673c]
mov dword [0x2a76758], 0x2b110
mov dword [0x2a76770], 4
call dword [sym.imp.AVIFIL32.dll_AVIFileCreateStreamA]
push 0x12
push 0x2a76720
push 0
push dword [0x2a767cc]
call esi
pop edi
pop esi
ret