Function at 0x645050a0
Capabilities:
Access peb ldr_data
Get ntdll base address
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x2ac
mov edx, dword [0x64538010]
mov eax, dword [0x6453800c]
mov esi, dword [eax + edx*4]
test byte [0x64524028], 8
jne 0x64505180
test esi, esi
je 0x64505140
mov ecx, dword [0x64538010]
mov eax, dword [0x64538008]
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x64505140
lea ecx, [ebp - 0x27c]
mov dword [esp + 8], 0xcc
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym.avifil32.dll_AVIStreamInfoW
sub esp, 0xc
test eax, eax
js 0x645051b0
mov eax, dword [ebp - 0x27c]
cmp eax, 0x73646976
je 0x645053d8
cmp eax, 0x73647561
je 0x64505200
test byte [0x64524028], 2
jne 0x645051d0
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x64524028], 2
je 0x6450512d
mov dword [esp + 0xc], str.:_bad_state__n
mov dword [esp + 8], str.AVISaveOptionsFmtChoose
mov dword [esp + 4], 0x64524028
mov dword [esp], 1
call fcn.64503a10
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x645263d4
mov dword [esp + 8], str.AVISaveOptionsFmtChoose
mov dword [esp + 4], 0x64524028
mov dword [esp], 3
call fcn.64503a10
jmp 0x645050c9
test byte [0x64524028], 2
je 0x6450512d
mov dword [esp + 0xc], str.:_AVIStreamInfoW_failed__n
jmp 0x64505151
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.:_unknown_streamtype_0x_08lX_n
mov dword [esp + 8], str.AVISaveOptionsFmtChoose
mov dword [esp + 4], 0x64524028
mov dword [esp], 1
call fcn.64503a10
jmp 0x6450512d
lea edi, [ebp - 0x1b0]
xor eax, eax
mov ecx, 0x66
mov dword [ebp - 0x28c], edi
rep stosd dword es:[edi], eax
mov dword [ebp - 0x1a8], ebx
lea ebx, [ebp - 0x280]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x32
mov dword [esp], 0
mov dword [ebp - 0x1b0], 0x198
call sub.msacm32.dll_acmMetrics
mov ecx, dword [esi + 0x1c]
sub esp, 0xc
test ecx, ecx
jne 0x64505378
mov edi, dword [ebp - 0x280]
test edi, edi
jne 0x64505520
mov eax, dword [esi + 0x18]
mov edi, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x260]
mov dword [ebp - 0x1a0], ecx
mov ecx, dword [0x64538010]
mov dword [esp + 4], eax
mov eax, dword [0x64538008]
mov dword [ebp - 0x280], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov eax, dword [eax + ecx*4]
mov dword [esp], eax
call sym.avifil32.dll_AVIStreamReadFormat
mov eax, dword [ebp - 0x280]
sub esp, 0x10
cmp eax, 0xf
jg 0x645052c7
mov dword [ebp - 0x280], 0x10
mov eax, 0x10
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov dword [ebp - 0x2c], eax
sub esp, 0xc
test eax, eax
je 0x64505321
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x260]
mov ecx, dword [0x64538010]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], eax
mov eax, dword [0x64538008]
mov eax, dword [eax + ecx*4]
mov dword [esp], eax
call sym.avifil32.dll_AVIStreamReadFormat
mov dword [ebp - 0x30], 0x100000
sub esp, 0x10
mov eax, dword [ebp - 0x28c]
mov dword [esp], eax
call sub.msacm32.dll_acmFormatChooseW
sub esp, 4
mov ebx, eax
test eax, eax
jne 0x6450533c
or dword [esi + 0x14], 8
mov edx, dword [ebp - 0x2c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
xor eax, eax
sub esp, 0xc
test ebx, ebx
sete al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi + 0x18]
mov edi, dword [ebp - 0x280]
test eax, eax
je 0x64505257
cmp ecx, edi
jae 0x645053ca
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
test eax, eax
je 0x6450512d
mov ecx, dword [ebp - 0x280]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov edi, dword [sym.imp.kernel32.dll_HeapAlloc]
jmp 0x64505268
lea edi, [ebp - 0x1b0]
xor eax, eax
mov ecx, 0x10
mov dword [ebp - 0x28c], edi
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x14]
and eax, 8
je 0x64505560
mov dword [ebp - 0x1b0], 0x40
mov dword [ebp - 0x1ac], 1
mov eax, dword [esi + 4]
mov dword [ebp - 0x1a0], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x180], eax
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x178], eax
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x174], eax
xor eax, eax
test byte [esi + 0x14], 4
je 0x6450543c
mov eax, dword [esi + 8]
mov dword [ebp - 0x188], eax
xor eax, eax
test byte [esi + 0x14], 2
je 0x64505450
mov eax, dword [esi + 0x10]
shr eax, 0xa
mov dword [ebp - 0x184], eax
mov eax, dword [ebp - 0x28c]
mov ecx, dword [0x64538010]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov eax, dword [0x64538008]
mov eax, dword [eax + ecx*4]
mov dword [esp + 8], 0
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov eax, dword [section..bss]
mov dword [esp + 4], eax
call sub.msvfw32.dll_ICCompressorChoose
sub esp, 0x18
test eax, eax
je 0x645054f8
mov ecx, dword [ebp - 0x1a0]
mov dword [esi + 4], ecx
mov ecx, dword [ebp - 0x178]
mov dword [esi + 0x20], ecx
mov ecx, dword [ebp - 0x174]
mov dword [esi + 0x24], ecx
mov ecx, dword [ebp - 0x180]
mov dword [esi + 0xc], ecx
mov ebx, dword [ebp - 0x188]
mov ecx, dword [esi + 0x14]
test ebx, ebx
je 0x645055a0
or ecx, 4
mov dword [esi + 8], ebx
mov dword [esi + 0x14], ecx
mov edi, dword [ebp - 0x184]
mov ebx, ecx
and ebx, 0xfffffffd
test edi, edi
je 0x645054f2
shl edi, 0xa
mov ebx, ecx
mov dword [esi + 0x10], edi
or ebx, 2
or ebx, 8
mov dword [esi + 0x14], ebx
mov dword [ebp - 0x290], eax
mov eax, dword [ebp - 0x28c]
mov dword [esp], eax
call sub.msvfw32.dll_ICCompressorFree
mov eax, dword [ebp - 0x290]
sub esp, 4
jmp 0x6450512f
mov dword [esp + 8], edi
mov edi, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov dword [esi + 0x18], eax
sub esp, 0xc
test eax, eax
je 0x6450512d
mov ecx, dword [ebp - 0x280]
mov dword [esi + 0x1c], ecx
jmp 0x64505268
lea edi, [esi + 0xc]
lea ecx, [esi + 8]
mov dword [esi + 8], 0
and edi, 0xfffffffc
mov dword [esi + 0x28], 0
sub ecx, edi
add ecx, 0x24
shr ecx, 2
rep stosd dword es:[edi], eax
mov dword [esi], 0x73646976
mov dword [esi + 4], 0x20424944
mov dword [esi + 0xc], 0xffffffff
jmp 0x645053f9
and ecx, 0xfffffffb
mov dword [esi + 0x14], ecx
jmp 0x645054d8