Function at 0x58d805
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov dword [ebp - 0x4c], edx
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x50], esi
mov edi, eax
mov eax, 0xbc
sub eax, edi
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x20]
xor edx, edx
neg eax
sbb edx, dword [ebp - 0x1c]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x54]
add eax, edi
cmp dword [ebp - 0x4c], eax
jb 0x58db83
cmp byte [edi], 0x47
je 0x58d88c
cmp dword [0x5af048], 0
je 0x58db83
mov dword [0x611418], 1
mov dword [0x611414], 2
movzx eax, byte [edi]
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], str._M2TS_Restamp__Invalid_sync_byte__X_n
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004268ea
mov al, byte [edi + 1]
mov byte [ebp - 0x30], al
mov eax, dword [ebp - 0x30]
shl eax, 8
and ax, 0x1f00
movzx edx, byte [edi + 2]
add eax, edx
mov word [ebp - 0x32], ax
mov al, byte [edi + 3]
shr al, 4
and eax, 3
sub eax, 2
xor edx, edx
cmp al, 1
ja 0x58d9ef
mov al, byte [edi + 4]
mov byte [ebp - 0x38], al
test byte [edi + 5], 0x10
je 0x58d9eb
mov al, byte [edi + 0xa]
mov byte [ebp - 0x28], al
movzx eax, byte [edi + 6]
xor edx, edx
shld edx, eax, 0x19
shl eax, 0x19
mov cl, byte [ebp - 0x28]
shr cl, 7
movzx esi, cl
add eax, esi
adc edx, 0
movzx ecx, byte [edi + 7]
shl ecx, 0x11
add eax, ecx
adc edx, 0
movzx ecx, byte [edi + 8]
shl ecx, 9
add eax, ecx
adc edx, 0
movzx esi, byte [edi + 9]
add esi, esi
add eax, esi
adc edx, 0
mov ecx, eax
mov ebx, edx
mov eax, dword [ebp - 0x28]
shl eax, 8
and eax, 0x100
movzx edx, byte [edi + 0xb]
lea esi, [eax + edx]
mov dword [ebp - 0x48], esi
mov eax, esi
sar eax, 0x1f
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
cmp ecx, eax
mov eax, ebx
sbb eax, dword [ebp - 0x3c]
jae 0x58d94c
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
add edx, 2
add eax, ecx
adc edx, ebx
jmp 0x58d956
mov eax, ecx
mov edx, ebx
add eax, dword [ebp - 0x20]
adc edx, dword [ebp - 0x1c]
mov ecx, 2
xor ebx, ebx
cmp ebx, eax
mov ebx, ecx
sbb ebx, edx
jae 0x58d96a
sub edx, 2
jmp 0x58d95b
mov ecx, eax
mov ebx, edx
shrd ecx, ebx, 0x19
shr ebx, 0x19
mov byte [edi + 6], cl
mov ecx, eax
mov ebx, edx
shrd ecx, ebx, 0x11
shr ebx, 0x11
mov byte [edi + 7], cl
mov ecx, eax
mov ebx, edx
shrd ecx, ebx, 9
shr ebx, 9
mov byte [edi + 8], cl
mov ecx, eax
shrd ecx, edx, 1
mov byte [edi + 9], cl
shl eax, 7
mov ebx, dword [ebp - 0x48]
or al, bh
or eax, 0x7e
mov byte [edi + 0xa], al
xor eax, dword [ebp - 0x28]
test al, 1
je 0x58d9e6
cmp dword [0x5af048], 0
je 0x58db83
mov dword [0x611418], 1
mov dword [0x611414], 2
mov dword [ebp + 8], str._M2TS_Restamp__Sanity_check_failed_for_PCR_restamping_n
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004268ea
mov eax, esi
mov byte [edi + 0xb], al
mov dl, byte [ebp - 0x38]
inc edx
movzx eax, word [ebp - 0x32]
mov esi, dword [ebp - 0x50]
cmp byte [esi + eax], 0
je 0x58db78
test byte [ebp - 0x30], 0x40
je 0x58db78
movzx edx, dl
lea ebx, [edi + edx + 4]
cmp byte [ebx], 0
jne 0x58db47
cmp byte [ebx + 1], 0
jne 0x58db47
cmp byte [ebx + 2], 1
jne 0x58db47
mov dl, byte [ebx + 6]
and edx, 0xffffffc0
cmp dl, 0x80
jne 0x58db78
mov dl, byte [ebx + 7]
mov byte [ebp - 0x32], dl
test dl, dl
jns 0x58db78
mov dl, byte [ebx + 9]
and edx, 0xffffffe0
cmp dl, 0x20
je 0x58da87
cmp dword [0x5af048], 1
jbe 0x58db78
mov dword [0x611418], 2
mov dword [0x611414], 2
mov dword [esp + 4], eax
mov dword [esp], str._M2TS_Restamp__PID__4d:_Wrong_PES_header__PTS_decoding:_0010_expected_n
jmp 0x58db73
lea eax, [ebx + 9]
mov dword [ebp - 0x38], eax
call fcn.004f3120
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x20]
xor edx, edx
neg eax
sbb edx, dword [ebp - 0x1c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
sbb eax, dword [ebp - 0x2c]
jae 0x58dac7
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
add edx, 2
add eax, dword [ebp - 0x28]
adc edx, dword [ebp - 0x24]
jmp 0x58dad3
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
add eax, dword [ebp - 0x20]
adc edx, dword [ebp - 0x1c]
mov ecx, 2
xor esi, esi
cmp esi, eax
mov esi, ecx
sbb esi, edx
jae 0x58dae7
sub edx, 2
jmp 0x58dad8
mov ecx, edx
mov edx, eax
mov eax, dword [ebp - 0x38]
call fcn.004f62e3
test byte [ebp - 0x32], 0x40
je 0x58db78
lea eax, [ebx + 0xe]
mov dword [ebp - 0x28], eax
call fcn.004f3120
mov esi, dword [ebp - 0x30]
cmp eax, esi
mov esi, edx
sbb esi, dword [ebp - 0x2c]
jae 0x58db1f
mov ecx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
add ebx, 2
add eax, ecx
adc edx, ebx
jmp 0x58db25
add eax, dword [ebp - 0x20]
adc edx, dword [ebp - 0x1c]
xor ebx, ebx
mov ecx, 2
cmp ebx, eax
mov esi, ecx
sbb esi, edx
jae 0x58db39
sub edx, 2
jmp 0x58db2c
mov ecx, edx
mov edx, eax
mov eax, dword [ebp - 0x28]
call fcn.004f62e3
jmp 0x58db78
cmp dword [0x5af048], 1
jbe 0x58db78
mov dword [0x611418], 2
mov dword [0x611414], 2
movzx eax, word [ebp - 0x32]
mov dword [esp + 4], eax
mov dword [esp], str._M2TS_Restamp__PID__4d:_Wrong_PES_not_beginning_with_start_code_n
call fcn.004268ea
add edi, 0xbc
jmp 0x58d83f
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret