Function at 0x402650
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esi + 0xccd24]
sub esp, 0x54
push edi
push eax
call sub.SDL.dll_SDL_mutexP
mov edi, 3
add esp, 4
cmp dword [esi + 0xccd18], edi
jl 0x402697
cmp dword [esi + 0xccc88], 0
jne 0x402697
mov ecx, dword [esi + 0xccd24]
mov edx, dword [esi + 0xccd28]
push ecx
push edx
call sub.SDL.dll_SDL_CondWait
add esp, 8
cmp dword [esi + 0xccd18], edi
jge 0x402670
mov eax, dword [esi + 0xccd24]
push eax
call sub.SDL.dll_SDL_mutexV
add esp, 4
cmp dword [esi + 0xccc88], 0
je 0x4026b7
or eax, 0xffffffff
pop edi
add esp, 0x54
ret
mov ecx, dword [esi + 0xccd20]
shl ecx, 5
cmp dword [ecx + esi + 0xcccc0], 0
lea edi, [ecx + esi + 0xcccb8]
je 0x4026e7
mov edx, dword [edi + 0xc]
cmp edx, dword [esi + 0xcd13c]
jne 0x4026e7
mov eax, dword [edi + 0x10]
cmp eax, dword [esi + 0xcd140]
je 0x402757
lea ecx, [esp + 4]
push ecx
mov dword [edi + 0x14], 0
mov byte [esp + 8], 0x18
mov dword [esp + 0x10], esi
call sub.SDL.dll_SDL_PushEvent
mov edx, dword [esi + 0xccd24]
push edx
call sub.SDL.dll_SDL_mutexP
add esp, 8
cmp dword [edi + 0x14], 0
jne 0x40273b
cmp dword [esi + 0xccc88], 0
jne 0x40273b
mov eax, dword [esi + 0xccd24]
mov ecx, dword [esi + 0xccd28]
push eax
push ecx
call sub.SDL.dll_SDL_CondWait
add esp, 8
cmp dword [edi + 0x14], 0
je 0x402716
mov edx, dword [esi + 0xccd24]
push edx
call sub.SDL.dll_SDL_mutexV
add esp, 4
cmp dword [esi + 0xccc88], 0
jne 0x4026af
mov eax, dword [edi + 8]
test eax, eax
je 0x40295f
push eax
call sub.SDL.dll_SDL_LockYUVOverlay
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx]
mov dword [esp + 0x1c], edx
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx + 8]
mov dword [esp + 0x20], edx
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx + 4]
mov dword [esp + 0x24], edx
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x10]
movzx edx, word [ecx]
mov dword [esp + 0x2c], edx
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x10]
movzx edx, word [ecx + 4]
mov dword [esp + 0x30], edx
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x10]
movzx edx, word [ecx + 2]
add esp, 4
cmp dword [esi + 0xcd148], 0
mov dword [esp + 0x30], edx
je 0x4027d9
mov eax, dword [esi + 0xccc74]
lea ecx, [eax + 8]
mov eax, dword [ecx]
mov edx, dword [eax + 0x34]
cmp edx, dword [0x4110c0]
je 0x40284b
mov edx, dword [0x411094]
mov eax, dword [esi + 0xcd140]
mov ecx, dword [esi + 0xcd13c]
push 0
push 0
push 0
push edx
mov edx, dword [esi + 0xccc74]
mov edx, dword [edx + 8]
mov edx, dword [edx + 0x34]
push 0
push eax
push ecx
push edx
push eax
push ecx
call sub.avswscale.dll_sws_getContext
mov ecx, dword [esi + 0xccc74]
add ecx, 8
mov dword [esi + 0xcd148], eax
mov edx, dword [ecx]
mov edx, dword [edx + 0x34]
add esp, 0x28
mov dword [0x4110c0], edx
test eax, eax
jne 0x40284b
push 0x40cf60
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 8
push 1
call dword [sym.imp.MSVCR90.dll_exit]
cmp dword [ebx + 0xa4], 1
jne 0x4028e6
mov ecx, dword [ecx]
mov eax, dword [esi + 0xcd140]
mov edx, dword [ecx + 0x28]
push eax
mov eax, dword [ecx + 0x34]
push edx
push eax
lea ecx, [esp + 0x44]
push ecx
call sub.avcodec.dll_avpicture_alloc
mov edx, dword [esi + 0xccc74]
mov eax, dword [edx + 8]
mov ecx, dword [esi + 0xcd140]
mov edx, dword [eax + 0x28]
mov eax, dword [eax + 0x34]
push ecx
push edx
push eax
lea ecx, [esp + 0x54]
push ebx
push ecx
call sub.avcodec.dll_avpicture_deinterlace
mov ecx, dword [esi + 0xcd140]
add esp, 0x24
lea edx, [esp + 0x28]
push edx
test eax, eax
lea eax, [esp + 0x1c]
push eax
push ecx
push 0
jne 0x4028c3
mov ecx, dword [esi + 0xcd148]
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x4c]
push eax
push ecx
jmp 0x4028cf
mov eax, dword [esi + 0xcd148]
lea edx, [ebx + 0x10]
push edx
push ebx
push eax
call sub.avswscale.dll_sws_scale
lea ecx, [esp + 0x54]
add esp, 0x1c
push ecx
call sub.avcodec.dll_avpicture_free
add esp, 4
jmp 0x40290d
mov ecx, dword [esi + 0xcd140]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi + 0xcd148]
push ecx
push 0
lea edx, [ebx + 0x10]
push edx
push ebx
push eax
call sub.avswscale.dll_sws_scale
add esp, 0x1c
mov ecx, dword [edi + 8]
push ecx
call sub.SDL.dll_SDL_UnlockYUVOverlay
fld qword [esp + 0x60]
mov edx, dword [ebx + 0x34]
fstp qword [edi]
mov dword [edi + 0x18], edx
inc dword [esi + 0xccd20]
add esp, 4
cmp dword [esi + 0xccd20], 3
jne 0x40293e
mov dword [esi + 0xccd20], 0
mov eax, dword [esi + 0xccd24]
push eax
call sub.SDL.dll_SDL_mutexP
mov ecx, dword [esi + 0xccd24]
inc dword [esi + 0xccd18]
push ecx
call sub.SDL.dll_SDL_mutexV
add esp, 8
xor eax, eax
pop edi
add esp, 0x54
ret