Function at 0x643b00
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [esp + 0x60]
mov eax, dword [esi + 0x40]
mov eax, dword [eax + 0x14]
imul ebx, dword [eax + 0x20], 0xd0
mov edx, dword [eax + 0x24]
mov dword [esp + 0x2c], eax
add ebx, dword [eax]
mov eax, dword [esi + 0x5c]
mov dword [esp + 0x30], edx
mov edi, dword [ebx + 0x54]
mov dword [edi + 0x5c], eax
mov eax, dword [esi + 0x98]
mov dword [edi + 0x98], eax
mov eax, dword [esi + 0x1d8]
mov dword [edi + 0x1d8], eax
mov eax, dword [esi + 0x44]
mov dword [edi + 0x44], eax
mov eax, dword [esi + 0x2a8]
mov dword [edi + 0x2a8], eax
mov eax, dword [esi + 0x2ac]
mov dword [edi + 0x2ac], eax
mov eax, dword [esi + 0x124]
mov dword [edi + 0x124], eax
mov eax, dword [esi + 0x60]
mov dword [edi + 0x60], eax
mov ecx, dword [esi + 0x344]
mov dword [edi + 0x344], ecx
mov ecx, dword [esi + 0x348]
mov dword [edi + 0x348], ecx
mov edx, dword [esi + 0x34c]
mov dword [edi + 0x34c], edx
mov eax, dword [esi + 0x1b0]
mov edx, dword [esi + 0x2bc]
mov dword [edi + 0x1b0], eax
mov eax, dword [esi + 0x2b8]
mov dword [edi + 0x2bc], edx
mov dword [edi + 0x2b8], eax
mov eax, dword [esi + 0x32c]
mov dword [edi + 0x32c], eax
mov eax, dword [esi + 0xd8]
test eax, eax
je 0x643c33
mov edx, dword [esi + 0xe0]
test edx, edx
je 0x643c33
cmp eax, dword [edi + 0xd8]
jle 0x643c14
mov dword [esp + 4], eax
lea eax, [edi + 0xe0]
mov dword [esp + 8], 4
mov dword [esp], eax
call fcn.00893f80
test eax, eax
js 0x64412d
mov eax, dword [esi + 0xd8]
mov edx, dword [esi + 0xe0]
mov ecx, dword [edi + 0xe0]
shl eax, 2
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp], ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [esi + 0xd8]
mov dword [edi + 0xd8], eax
mov eax, dword [esp + 0x6c]
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x643c54
mov eax, dword [ebx + 0x54]
mov eax, dword [eax + 0xc]
test byte [eax + 0x10], 0x20
je 0x643e40
mov eax, dword [ebx]
mov ebp, dword [eax + 4]
mov dword [esp + 0x34], eax
lea eax, [ebx + 0x24]
mov dword [esp], eax
mov dword [esp + 0x28], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [ebx]
sub esp, 4
lea edi, [eax + 8]
mov eax, dword [ebx + 0xb4]
test eax, eax
jle 0x643cd3
nop
mov dword [esp], edi
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [ebx + 0x54]
sub esp, 4
cmp dword [eax + 8], 1
ja 0x6443fa
mov eax, dword [ebx + 0xb4]
sub eax, 1
mov dword [ebx + 0xb4], eax
lea eax, [eax + eax*2]
shl eax, 7
add eax, dword [ebx + 0xb0]
mov dword [eax + 0x40], eax
mov dword [esp], eax
call fcn.0088c270
mov dword [esp], edi
call sub.KERNEL32.dll_LeaveCriticalSection
mov ecx, dword [ebx + 0xb4]
sub esp, 4
test ecx, ecx
jg 0x643c80
test ebp, ebp
je 0x643cf9
cmp dword [ebp + 0xac], 1
je 0x644311
mov edx, dword [ebp + 0x54]
mov eax, dword [ebx + 0x54]
xor ecx, ecx
call fcn.00643100
test eax, eax
jne 0x6442a2
lea edi, [ebx + 0x58]
mov dword [esp], edi
call fcn.005d23b0
mov eax, dword [esp + 0x6c]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.005d2480
mov eax, dword [0xfa1308]
mov dword [ebx + 0xac], 1
lea edx, [ebx + 0x18]
test eax, eax
je 0x6442be
mov dword [esp], edx
call eax
sub esp, 4
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, dword [ebx + 0x54]
sub esp, 4
mov edx, dword [eax + 0x32c]
test edx, edx
jne 0x643e35
cmp dword [eax + 0x9c], 0x664480
je 0x64439e
test dword [ebx + 0xac], 0xfffffffb
lea eax, [ebx + 0x1c]
lea edi, [ebx + 0x3c]
mov dword [esp + 0x28], eax
je 0x643e35
mov dword [esp + 0x60], esi
mov dword [esp], edi
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [ebx + 0xac]
sub esp, 4
cmp eax, 1
jne 0x643dca
mov eax, dword [0xfa1304]
test eax, eax
je 0x644160
mov ecx, dword [esp + 0x28]
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], edi
mov dword [esp], ecx
call eax
mov eax, dword [ebx + 0xac]
sub esp, 0xc
cmp eax, 1
je 0x643d9a
cmp eax, 2
je 0x644220
cmp eax, 3
jne 0x643e16
mov eax, dword [ebx + 0xc4]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.006644b0
mov dword [ebx + 0xc8], eax
mov eax, dword [0xfa1308]
mov dword [ebx + 0xac], 1
test eax, eax
je 0x644250
mov edx, dword [esp + 0x28]
mov dword [esp], edx
call eax
sub esp, 4
mov dword [esp], edi
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
test dword [ebx + 0xac], 0xfffffffb
jne 0x643d84
mov esi, dword [esp + 0x60]
mov eax, dword [esp + 0x34]
add dword [eax + 0x20], 1
mov dword [eax + 4], ebx
mov eax, dword [esi + 0x320]
xor edx, edx
sub eax, 1
cmp dword [esi + 0x30], 0x22
sete dl
sub eax, edx
mov edx, dword [esp + 0x2c]
cmp dword [edx + 0x20], eax
jle 0x644135
mov dword [edx + 0x28], 0
mov dword [esp + 0x28], 0
mov edx, dword [esp + 0x30]
mov dword [esp + 0x60], esi
jmp 0x643efe
mov eax, dword [ebp + 0xa0]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call fcn.0088c300
mov eax, dword [ebp + 0xa4]
mov ecx, dword [esp + 0x68]
mov edx, dword [ebp + 0x6c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x68]
mov ecx, dword [esp + 0x64]
mov dword [ecx + 0x78], eax
mov eax, dword [ebp + 0xa8]
mov dword [ecx + 0x7c], edx
test eax, eax
js 0x644210
mov ecx, dword [esp + 0x60]
xor edx, edx
mov dword [ebp + 0xa4], 0
mov esi, dword [ecx + 0x320]
mov ecx, dword [esp + 0x6c]
cmp edi, esi
mov ebx, dword [ecx + 0x1c]
setge dl
sub edx, 1
and edx, edi
test ebx, ebx
jne 0x643f63
mov ecx, dword [esp + 0x68]
mov ecx, dword [ecx]
test ecx, ecx
jne 0x643f63
mov ecx, dword [esp + 0x2c]
cmp edx, dword [ecx + 0x24]
je 0x643f63
mov eax, dword [esp + 0x2c]
lea edi, [edx + 1]
imul edx, edx, 0xd0
add edx, dword [eax]
mov eax, dword [edx + 0xac]
mov ebp, edx
test eax, eax
je 0x643e80
lea ebx, [edx + 0x3c]
lea esi, [ebp + 0x20]
mov dword [esp], ebx
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [ebp + 0xac]
sub esp, 4
test eax, eax
je 0x643f53
nop
lea esi, [esi]
mov edx, ebx
mov eax, esi
call fcn.006432c0
mov eax, dword [ebp + 0xac]
test eax, eax
jne 0x643f40
mov dword [esp], ebx
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
jmp 0x643e80
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], esi
mov edx, dword [ebp + 0x54]
mov esi, dword [esp + 0x60]
cmp esi, edx
je 0x6440e2
mov edi, dword [edx + 0x6c]
mov ebp, dword [edx + 0x70]
mov ecx, dword [edx + 0x7c]
mov dword [esi + 0x6c], edi
mov dword [esi + 0x70], ebp
mov edi, dword [edx + 0x370]
mov ebp, dword [edx + 0x374]
mov dword [esi + 0x7c], ecx
mov ecx, dword [edx + 0x80]
mov dword [esi + 0x370], edi
mov dword [esi + 0x374], ebp
mov dword [esi + 0x80], ecx
mov ecx, dword [edx + 0x90]
mov edi, dword [edx + 0xe4]
mov ebp, dword [edx + 0xe8]
mov dword [esi + 0x90], ecx
mov ecx, dword [edx + 0x84]
mov dword [esi + 0x84], ecx
mov ecx, dword [edx + 0x88]
mov dword [esi + 0x88], ecx
mov ecx, dword [edx + 0xb4]
mov dword [esi + 0xb4], ecx
mov ecx, dword [edx + 0x30c]
mov dword [esi + 0x30c], ecx
mov ecx, dword [edx + 0x310]
mov dword [esi + 0xe4], edi
mov dword [esi + 0xe8], ebp
mov dword [esi + 0x310], ecx
mov ecx, dword [edx + 0x114]
mov dword [esi + 0x114], ecx
mov ecx, dword [edx + 0x33c]
mov dword [esi + 0x33c], ecx
mov ecx, dword [edx + 0x340]
mov ebp, dword [edx + 0x1c4]
mov edi, dword [edx + 0x1c0]
mov dword [esi + 0x340], ecx
mov ecx, dword [edx + 0x314]
mov dword [esi + 0x314], ecx
mov ecx, dword [edx + 0x74]
mov dword [esi + 0x74], ecx
mov ecx, dword [edx + 0x184]
mov dword [esi + 0x184], ecx
mov ecx, dword [edx + 0x188]
mov dword [esi + 0x188], ecx
mov ecx, dword [edx + 0x18c]
mov dword [esi + 0x18c], ecx
mov ecx, dword [edx + 0x190]
mov dword [esi + 0x190], ecx
mov ecx, dword [edx + 0x194]
mov dword [esi + 0x194], ecx
mov ecx, dword [edx + 0x2c0]
mov dword [esi + 0x2c0], ecx
mov ecx, dword [edx + 0x2c4]
mov dword [esi + 0x2c4], ecx
mov ecx, dword [edx + 0x1a4]
mov dword [esi + 0x1a4], ecx
mov ecx, dword [edx + 0x1a0]
mov dword [esi + 0x1a0], ecx
mov ecx, dword [edx + 0x1a8]
mov dword [esi + 0x1c4], ebp
mov dword [esi + 0x1c0], edi
mov dword [esi + 0x1a8], ecx
mov ecx, dword [edx + 0x40]
mov ebp, dword [ecx + 0x2c]
mov ecx, dword [esi + 0x40]
mov dword [ecx + 0x2c], ebp
mov ecx, dword [edx + 0x320]
mov edx, dword [edx + 0x31c]
mov dword [esi + 0x31c], edx
mov edx, dword [esp + 0x2c]
sub ecx, 1
mov dword [esi + 0x78], ecx
mov ecx, dword [esp + 0x34]
cmp ecx, dword [edx + 0x20]
jg 0x64410e
mov dword [edx + 0x20], 0
mov ecx, dword [esp + 0x30]
test ebx, ebx
mov dword [edx + 0x24], ecx
jne 0x644127
mov edx, dword [esp + 0x68]
mov edx, dword [edx]
test edx, edx
je 0x644308
test eax, eax
js 0x64412d
mov eax, ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edx + 0x28]
test eax, eax
je 0x643e68
mov eax, dword [esp + 0x68]
mov dword [eax], 0
mov eax, dword [esp + 0x6c]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x643e68
jmp 0x64412d
mov esi, dword [ebx + 0x1c]
lea ebp, [esi + 0x18]
mov dword [esp], esi
call sub.KERNEL32.dll_EnterCriticalSection
sub esp, 4
mov dword [esp], ebp
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [esi + 0x30]
sub esp, 4
add eax, 1
mov dword [esi + 0x30], eax
mov dword [esp], ebp
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
mov dword [esp], esi
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
mov dword [esp], edi
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
mov dword [esp + 4], 0xffffffff
mov eax, dword [esi + 0x34]
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
sub esp, 8
mov dword [esp], ebp
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [esi + 0x30]
sub esp, 4
sub eax, 1
mov dword [esi + 0x30], eax
mov eax, dword [esi + 0x30]
test eax, eax
je 0x6441f0
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x6441f0
mov dword [esp], ebp
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
jmp 0x643d84
mov dword [esp], ebp
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, dword [esi + 0x38]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_SetEvent
sub esp, 4
jmp 0x643d84
mov dword [esp + 0x28], eax
jmp 0x643ec0
mov eax, dword [ebx + 0xc0]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0xbc]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.00663dd0
mov dword [ebx + 0xa8], eax
jmp 0x643df3
mov esi, dword [ebx + 0x1c]
mov dword [esp], esi
call sub.KERNEL32.dll_EnterCriticalSection
lea eax, [esi + 0x18]
sub esp, 4
mov dword [esp], eax
mov dword [esp + 0x3c], eax
call sub.KERNEL32.dll_EnterCriticalSection
sub esp, 4
mov edx, dword [esi + 0x30]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x38], edx
mov dword [esp], eax
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
mov edx, dword [esp + 0x38]
test edx, edx
jne 0x644357
mov dword [esp], esi
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
jmp 0x643e16
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
mov eax, dword [esp + 0x2c]
jmp 0x64412d
mov edi, dword [ebx + 0x18]
lea ebp, [edi + 0x18]
mov dword [esp], edi
call sub.KERNEL32.dll_EnterCriticalSection
sub esp, 4
mov dword [esp], ebp
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [edi + 0x30]
sub esp, 4
mov dword [esp], ebp
mov dword [esp + 0x38], eax
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x6443b3
mov dword [esp], edi
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
jmp 0x643d36
mov eax, dword [esp + 0x28]
jmp 0x64412d
lea edi, [ebp + 0x3c]
mov dword [esp], edi
call sub.KERNEL32.dll_EnterCriticalSection
sub esp, 4
cmp dword [ebp + 0xac], 1
lea eax, [ebp + 0x1c]
jne 0x644347
mov dword [esp + 0x38], ebx
mov ebx, eax
mov edx, edi
mov eax, ebx
call fcn.006432c0
cmp dword [ebp + 0xac], 1
je 0x644331
mov ebx, dword [esp + 0x38]
mov dword [esp], edi
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
jmp 0x643ce4
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov eax, dword [esi + 0x34]
mov dword [esp], eax
call sub.KERNEL32.dll_ReleaseSemaphore
sub esp, 0xc
mov dword [esp + 4], 0xffffffff
mov eax, dword [esi + 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [esi + 0x38]
sub esp, 8
mov dword [esp], eax
call sub.KERNEL32.dll_ResetEvent
sub esp, 4
jmp 0x644292
cmp dword [eax + 0x1d8], fcn.00663170
jne 0x643d66
jmp 0x643e35
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov eax, dword [edi + 0x34]
mov dword [esp], eax
call sub.KERNEL32.dll_ReleaseSemaphore
sub esp, 0xc
mov dword [esp + 4], 0xffffffff
mov eax, dword [edi + 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [edi + 0x38]
sub esp, 8
mov dword [esp], eax
call sub.KERNEL32.dll_ResetEvent
sub esp, 4
jmp 0x6442f8
mov dword [esp + 0x14], 0x12d
mov dword [esp + 0x10], str.libavcodec_pthread_frame.c
mov dword [esp + 0xc], str.p__avctx__codec_type__AVMEDIA_TYPE_VIDEO__p__avctx__codec_type__AVMEDIA_TYPE_AUDIO
mov dword [esp + 8], 0xc9c7dd
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00891920
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]