Function at 0x1019da11
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x28
mov edi, dword [ebp + 8]
mov eax, dword [0x10305014]
xor eax, ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
xor ebx, ebx
test byte [edi + 0x238], 1
je 0x1019dd12
mov eax, dword [edi + 0xc]
test byte [eax + 0x11], 0x10
je 0x1019dd12
mov ecx, dword [edi + 0x234]
mov eax, dword [edi + 0x10]
test ecx, ecx
jne 0x1019da7a
cmp eax, 7
jne 0x1019da7a
test byte [edi + 0x3c], 2
jne 0x1019daf3
mov dword [edi + 0x234], 1
jmp 0x1019dd12
cmp eax, 0x43
je 0x1019da84
cmp eax, 0x19
jne 0x1019daef
xor eax, eax
dec eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
test byte [edi + 0x3d], 2
jne 0x1019dadf
lea esi, [esp + 0x10]
push esi
push 0
push 0x102db61c
push dword [edi + 0x18]
call fcn.10195710
add esp, 0x10
test eax, eax
js 0x1019dae9
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x10], 1
sbb eax, 0
jl 0x1019dae9
push esi
push 0
push str.non_deterministic
push dword [edi + 0x18]
call fcn.10195710
add esp, 0x10
test eax, eax
js 0x1019dadf
mov eax, dword [esp + 0x14]
or eax, dword [esp + 0x10]
jne 0x1019dae9
mov dword [edi + 0x234], 1
mov ecx, dword [edi + 0x234]
test ecx, ecx
jne 0x1019db09
call fcn.1018f560
cmp eax, 0x40
mov ecx, 0x40
cmovl ecx, eax
mov dword [edi + 0x234], ecx
cmp ecx, 2
jl 0x1019dd12
mov ebx, 0xffffffea
cmp ecx, 0x40
ja 0x1019dd12
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x30], 0
jne 0x1019dd27
push 0x958
call fcn.100602f0
add esp, 4
mov esi, eax
mov eax, dword [edi + 0x1c]
mov dword [eax + 0x30], esi
test esi, esi
je 0x1019dcc7
mov dword [esi], edi
push 0x102db638
push esi
call fcn.10168b01
add esp, 8
test eax, eax
js 0x1019dcd9
mov dword [esi + 0x954], 0
mov eax, dword [edi + 0x234]
add eax, 2
mov dword [esp + 8], esi
mov dword [esi + 0x14], eax
je 0x1019dbbb
mov eax, dword [esp + 8]
lea esi, [eax + 0x1c]
mov dword [esp + 4], 0
xor ebx, ebx
call sym.ffmpeg.dll_av_frame_alloc
mov dword [esi - 4], eax
test eax, eax
je 0x1019dcce
call sym.ffmpeg.dll_av_packet_alloc
mov dword [esi], eax
test eax, eax
je 0x1019dcce
inc ebx
add esi, 0x14
mov eax, dword [esp + 8]
cmp ebx, dword [eax + 0x14]
jb 0x1019db8f
cmp dword [edi + 0x234], 0
jle 0x1019dcb9
mov esi, dword [esp + 8]
add esi, 0x554
xor eax, eax
mov dword [esp + 4], eax
push dword [edi + 0xc]
call sym.ffmpeg.dll_avcodec_alloc_context3
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
je 0x1019dcce
mov ebx, eax
mov eax, dword [eax + 0x18]
mov dword [esp + 0xc], eax
push 0x328
push edi
push ebx
call fcn.10132610
add esp, 0xc
mov eax, dword [esp + 0xc]
mov dword [ebx + 0x18], eax
xor eax, eax
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x2d4], eax
push edi
push ebx
call fcn.10195c50
add esp, 8
test eax, eax
js 0x1019dcd5
mov eax, dword [edi + 0xc]
cmp dword [eax + 0x2c], 0
je 0x1019dc4a
push dword [edi + 0x18]
push dword [ebx + 0x18]
call fcn.10195c50
add esp, 8
test eax, eax
js 0x1019dcd5
mov dword [ebx + 0x234], 1
and byte [ebx + 0x23c], 0xfe
push 0
push dword [edi + 0xc]
push ebx
call sym.ffmpeg.dll_avcodec_open2
add esp, 0xc
test eax, eax
js 0x1019dcd5
mov eax, dword [ebx + 0x1c]
cmp dword [eax + 0x30], 0
jne 0x1019dd27
mov ecx, dword [esp + 8]
mov dword [eax + 0x30], ecx
mov dword [esi + 4], 0x10078700
mov dword [esi + 8], ebx
xor eax, eax
push eax
push eax
push esi
push 0x100789c0
push eax
push eax
call fcn.1013b08a
add esp, 0x18
mov dword [esi], eax
test eax, eax
je 0x1019dce5
mov eax, dword [esp + 4]
inc eax
add esi, 0x10
cmp eax, dword [edi + 0x234]
jl 0x1019dbd4
mov dword [edi + 0x23c], 1
xor ebx, ebx
jmp 0x1019dd12
mov ebx, 0xfffffff4
jmp 0x1019dd12
mov ebx, 0xfffffff4
jmp 0x1019dce8
mov ebx, eax
jmp 0x1019dce8
mov ebx, eax
mov dword [esp + 4], 0
jmp 0x1019dce8
xor ebx, ebx
dec ebx
lea esi, [esp + 0x1c]
push dword [esi]
call fcn.1015d2f2
add esp, 4
push esi
call fcn.10127460
add esp, 4
mov eax, dword [esp + 4]
mov dword [edi + 0x234], eax
push edi
call fcn.1019dd2c
add esp, 4
mov ecx, dword [esp + 0x20]
xor ecx, ebp
call fcn.10130483
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.1014029d