Function at 0x10013780
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebp, dword [esp + 0x70]
mov eax, dword [esp + 0x74]
test ebp, ebp
je 0x1001389d
cmp eax, 3
jbe 0x1001389d
mov edx, dword [ebp]
sub eax, 4
add ebp, 4
mov dword [esp + 0x44], 0
bswap edx
test edx, edx
mov dword [esp + 0x40], edx
je 0x1001389d
cmp eax, 0xf
jbe 0x1001389d
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x4c], 0
mov edx, dword [ebp + 4]
mov ecx, dword [ebp]
sub eax, 0x10
mov ebx, dword [ebp + 8]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 0
bswap edx
bswap ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov esi, ecx
mov edx, dword [ebp + 0xc]
bswap ebx
mov edi, edx
bswap edi
mov edx, edi
mov dword [esp + 0x34], edi
xor edi, edi
mov eax, edx
xor edx, edx
add esi, eax
mov eax, dword [esp + 0x1c]
adc edi, edx
mul ebx
add esi, eax
adc edi, edx
cmp dword [esp + 0x3c], edi
ja 0x100138b6
jae 0x100138b0
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x1001389d
mov ecx, dword [eax + 0xc]
xor ebx, ebx
test ecx, ecx
je 0x10013866
mov esi, eax
mov eax, dword [esi + 8]
mov eax, dword [eax + ebx*4]
add ebx, 1
mov dword [esp], eax
call sym.avutil_56.dll_av_free
cmp ebx, dword [esi + 0xc]
jb 0x10013850
mov edi, dword [esp + 0x4c]
mov eax, dword [edi + 0x1c]
mov dword [esp], eax
call sym.avutil_56.dll_av_encryption_init_info_free
mov eax, dword [edi]
mov dword [esp], eax
call sym.avutil_56.dll_av_free
mov eax, dword [edi + 8]
mov dword [esp], eax
call sym.avutil_56.dll_av_free
mov eax, dword [edi + 0x14]
mov dword [esp], eax
call sym.avutil_56.dll_av_free
mov dword [esp], edi
call sym.avutil_56.dll_av_free
add esp, 0x5c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [esp + 0x30], esi
jb 0x1001383d
mov eax, dword [esp + 0x34]
mov dword [esp], ecx
add ebp, 0x10
mov dword [esp + 8], ebx
mov dword [esp + 0x38], ecx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], eax
call sym.avutil_56.dll_av_encryption_init_info_alloc
test eax, eax
mov edx, eax
mov ecx, dword [esp + 0x38]
je 0x10013a10
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov eax, edi
or eax, esi
je 0x10013a97
mov eax, dword [esp + 0x48]
mov dword [eax + 0x1c], edx
mov eax, dword [edx]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebp
mov dword [esp + 0x48], edx
mov dword [esp + 0x38], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x48]
lea eax, [ebp + ecx]
mov ebp, eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x30]
sub eax, ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x100139ab
mov dword [esp + 0x1c], ebx
xor esi, esi
xor edi, edi
mov ebx, edx
nop
lea esi, [esi]
mov eax, dword [ebx + 8]
mov edx, dword [esp + 0x1c]
mov eax, dword [eax + esi*4]
mov dword [esp + 8], edx
mov dword [esp + 4], ebp
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
add ebp, dword [esp + 0x1c]
add esi, 1
adc edi, 0
mov ecx, edx
xor eax, esi
xor ecx, edi
or ecx, eax
jne 0x10013950
mov eax, dword [esp + 0x20]
mov edx, ebx
mov ebx, dword [esp + 0x1c]
mov ecx, eax
sub eax, 1
imul ecx, ebx
add dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x30]
sub ecx, ebx
imul ebx, eax
sub ecx, ebx
mov dword [esp + 0x30], ecx
mov eax, dword [edx + 0x14]
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x1c], edx
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], ebx
mov ebp, ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x30]
add ebp, edi
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
sub eax, edi
add dword [esp + 0x28], 1
adc dword [esp + 0x2c], 0
mov esi, dword [esp + 0x28]
mov ebx, ecx
mov edi, dword [esp + 0x2c]
mov ecx, edx
mov edx, dword [esp + 0x1c]
xor ecx, esi
xor ebx, edi
or ebx, ecx
je 0x10013a8b
cmp eax, 0xf
jbe 0x10013a4b
mov dword [esp + 0x48], edx
jmp 0x100137e0
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x1001389d
mov edx, dword [eax + 0xc]
xor ebx, ebx
test edx, edx
je 0x10013866
mov esi, eax
nop
lea esi, [esi]
mov eax, dword [esi + 8]
mov eax, dword [eax + ebx*4]
add ebx, 1
mov dword [esp], eax
call sym.avutil_56.dll_av_free
cmp ebx, dword [esi + 0xc]
jb 0x10013a30
jmp 0x10013866
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x1001389d
mov esi, dword [eax + 0xc]
xor ebx, ebx
test esi, esi
je 0x10013866
mov esi, eax
lea esi, [esi]
lea edi, [edi]
mov eax, dword [esi + 8]
mov eax, dword [eax + ebx*4]
add ebx, 1
mov dword [esp], eax
call sym.avutil_56.dll_av_free
cmp ebx, dword [esi + 0xc]
jb 0x10013a70
jmp 0x10013866
mov eax, dword [esp + 0x4c]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x4c], edx
jmp 0x10013900