Function at 0x49bfa0
Capabilities:
Encrypt data using rc4 prga
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [edx], 0
shl eax, 3
mov dword [ebp - 0x24], esi
mov ecx, dword [edi + 0x38]
cmp ecx, eax
jbe 0x49bfe4
push ecx
push eax
push 0x21f
push str.VBI:_d:_buffer_size__u____u_bits_of_payload.
call dword [0x601ad0]
add esp, 0x10
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x34]
mov ecx, dword [ebp + 0x1c]
cmp eax, ecx
jbe 0x49c00b
push eax
push ecx
push 0x226
push str.VBI:_d:_max_points__u____u_CRI__FRC_and_payload_bits.
call dword [0x601ad0]
add esp, 0x10
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
cmp eax, 0x49b450
jne 0x49c028
push dword [ebp + 0x20]
push edx
push esi
push dword [ebp + 0xc]
push edi
call eax
add esp, 0x14
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp eax, 0x49a850
je 0x49c05a
push dword [edi + 4]
push 0x22f
push str.VBI:_d:_Function_not_implemented_for_pixfmt__u.
call dword [0x601ad0]
push dword [ebp + 0x20]
mov eax, dword [edi]
push 0
push 0
push dword [ebp + 0xc]
push edi
call eax
add esp, 0x20
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x10]
mov ecx, dword [ebp + 0x20]
mov edx, ecx
add ecx, dword [edi + 0x44]
mov dword [ebp - 0x30], eax
mov eax, dword [edi + 0x18]
mov dword [ebp - 8], edx
mov dword [ebp + 0x10], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
mov byte [ebp + 0x17], 0
mov dword [ebp - 0x20], eax
push ebx
test eax, eax
je 0x49c16e
mov eax, ecx
sub eax, edx
shl eax, 8
mov dword [ebp - 0x10], eax
nop dword [eax]
mov edi, dword [edi + 0x10]
mov eax, edi
movzx ebx, byte [ecx]
shr eax, 9
mov dword [ebp - 4], eax
lea eax, [ecx + 1]
mov dword [ebp - 0x2c], eax
mov ecx, ebx
movzx eax, byte [eax]
sub eax, ebx
mov dword [ebp - 0x1c], 4
mov dword [ebp - 0x28], eax
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 4]
sub ecx, edx
imul eax, ecx
add eax, edi
mov edi, dword [ebp + 8]
mov dword [edi + 0x10], eax
lea eax, [ebx*4 + 2]
mov dword [ebp - 0x18], eax
shr eax, 2
cmp eax, edx
setae bl
cmp bl, byte [ebp + 0x17]
je 0x49c0fb
mov ecx, dword [edi + 0x20]
shr ecx, 1
mov dword [ebp - 0xc], ecx
jmp 0x49c145
mov ecx, dword [ebp - 0xc]
add ecx, dword [edi + 0x1c]
mov dword [ebp - 0xc], ecx
cmp ecx, dword [edi + 0x20]
jb 0x49c145
mov edx, dword [ebp - 0x10]
shl eax, 8
mov dword [esi + 8], eax
mov dword [esi + 4], edx
mov edx, dword [ebp - 4]
mov eax, edx
shl eax, 8
mov dword [esi + 0xc], eax
mov dword [esi], 1
add esi, 0x10
sub ecx, dword [edi + 0x20]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x14]
movzx eax, bl
lea ecx, [eax + ecx*2]
mov eax, dword [edi + 0xc]
and eax, ecx
mov dword [ebp - 0x14], ecx
cmp eax, dword [edi + 8]
je 0x49c188
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x28]
sub dword [ebp - 0x1c], 1
mov byte [ebp + 0x17], bl
mov dword [ebp - 0x18], eax
jne 0x49c0e4
add dword [ebp - 0x10], 0x100
sub dword [ebp - 0x20], 1
mov ecx, dword [ebp - 0x2c]
mov dword [ebp + 0x10], ecx
jne 0x49c0a0
mov eax, dword [ebp - 0x30]
sub esi, dword [ebp - 0x24]
mov dword [edi + 0x10], eax
mov eax, dword [ebp + 0x18]
sar esi, 4
mov dword [eax], esi
pop ebx
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x30]
mov ebx, dword [edi + 0x24]
shl edx, 8
mov dword [ebp - 4], edx
xor edx, edx
mov dword [ebp + 0x14], ebx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x20], eax
test eax, eax
je 0x49c203
mov ecx, dword [ebp + 0x10]
mov eax, ecx
sub eax, dword [ebp - 8]
shl eax, 8
mov dword [ebp + 0x14], eax
mov eax, ebx
shr eax, 8
add eax, ecx
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
sub edx, ecx
movzx eax, bl
imul edx, eax
mov eax, dword [ebp + 0x14]
add eax, ebx
shl ecx, 8
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
add edx, ecx
mov dword [esi + 0xc], eax
mov ecx, dword [ebp + 0x10]
mov dword [esi + 8], edx
mov dword [esi], 2
add esi, 0x10
cmp edx, eax
mov edx, dword [ebp - 0xc]
sbb eax, eax
add ebx, dword [edi + 0x28]
inc eax
sub dword [ebp - 0x20], 1
lea edx, [eax + edx*2]
mov dword [ebp - 0xc], edx
jne 0x49c1b1
mov dword [ebp + 0x14], ebx
cmp edx, dword [edi + 0x2c]
jne 0x49c17f
mov eax, dword [edi + 0x3c]
sub eax, 1
je 0x49c61e
sub eax, 1
je 0x49c572
sub eax, 1
je 0x49c4ba
mov eax, dword [edi + 0x38]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x49c8ad
mov edx, dword [ebp + 0x10]
mov edi, edx
sub edi, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
shl edi, 8
mov dword [ebp - 8], edi
mov dword [ebp - 0x20], eax
mov eax, ecx
shr eax, 8
movzx ecx, byte [eax + edx]
movzx edx, byte [eax + edx + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
shl ecx, 8
mov dword [esi], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
mov dword [esi + 8], edx
lea eax, [edi + ecx]
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0xc], eax
sbb eax, eax
mov edx, dword [ebp - 0xc]
add ecx, dword [ebx + 0x28]
inc eax
mov dword [ebp + 0x14], ecx
lea edi, [eax + edx*2]
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp - 8]
shl ecx, 8
mov dword [esi + 0x10], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x18], edx
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x1c], eax
sbb eax, eax
add ecx, dword [ebx + 0x28]
inc eax
mov dword [ebp + 0x14], ecx
lea edi, [eax + edi*2]
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp - 8]
shl ecx, 8
mov dword [esi + 0x20], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x28], edx
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x2c], eax
sbb eax, eax
add ecx, dword [ebx + 0x28]
inc eax
mov dword [ebp + 0x14], ecx
lea edi, [eax + edi*2]
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp - 8]
shl ecx, 8
mov dword [esi + 0x30], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x38], edx
mov dword [esi + 0x34], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x3c], eax
sbb eax, eax
add ecx, dword [ebx + 0x28]
inc eax
mov dword [ebp + 0x14], ecx
lea edi, [eax + edi*2]
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp - 8]
shl ecx, 8
mov dword [esi + 0x40], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x4c], eax
sbb eax, eax
add ecx, dword [ebx + 0x28]
inc eax
mov dword [ebp + 0x14], ecx
lea edi, [eax + edi*2]
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp - 8]
shl ecx, 8
mov dword [esi + 0x50], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x58], edx
mov dword [esi + 0x54], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x5c], eax
sbb eax, eax
add ecx, dword [ebx + 0x28]
inc eax
mov dword [ebp + 0x14], ecx
lea edi, [eax + edi*2]
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
shl ecx, 8
mov dword [esi + 0x60], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
add eax, ecx
mov dword [esi + 0x68], edx
mov dword [esi + 0x64], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x6c], eax
sbb eax, eax
add ecx, dword [ebx + 0x28]
inc eax
mov dword [ebp + 0x14], ecx
lea edi, [eax + edi*2]
mov eax, ecx
shr eax, 8
lea edi, [edi*2 + 1]
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp - 8]
shl ecx, 8
mov dword [esi + 0x70], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x78], edx
mov dword [esi + 0x74], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov edx, dword [ebp - 0x20]
mov dword [esi + 0x7c], eax
sbb eax, eax
add ecx, dword [ebx + 0x28]
add eax, edi
mov edi, dword [ebp - 8]
sub esi, 0xffffff80
mov byte [edx], al
inc edx
sub dword [ebp - 0x1c], 1
mov dword [ebp - 0x20], edx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
mov dword [ebp + 0x14], ecx
jne 0x49c252
jmp 0x49c8ad
cmp dword [edi + 0x38], 0
mov dword [ebp + 0x14], 0
jbe 0x49c55e
mov ecx, dword [ebp + 0x10]
mov eax, ecx
sub eax, dword [ebp - 8]
shl eax, 8
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], eax
nop
mov eax, ebx
shr eax, 8
add eax, ecx
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
sub edx, ecx
movzx eax, bl
imul edx, eax
mov eax, dword [ebp - 0x2c]
add eax, ebx
shl ecx, 8
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
add edx, ecx
mov dword [esi + 0xc], eax
mov ecx, dword [ebp + 0x14]
mov dword [esi + 8], edx
mov dword [esi], 3
add esi, 0x10
cmp edx, eax
mov edx, dword [ebp - 0xc]
sbb eax, eax
add ebx, dword [edi + 0x28]
and eax, 0xffffff80
shr edx, 1
sub eax, 0xffffff80
add edx, eax
mov eax, ecx
and eax, 7
mov dword [ebp - 0xc], edx
cmp al, 7
mov eax, dword [ebp + 8]
jne 0x49c541
mov byte [eax], dl
inc eax
mov dword [ebp + 8], eax
inc ecx
cmp ecx, dword [edi + 0x38]
mov dword [ebp + 0x14], ecx
mov ecx, dword [ebp + 0x10]
jb 0x49c4e0
mov ecx, dword [edi + 0x38]
neg ecx
and ecx, 7
shr edx, cl
mov byte [eax], dl
jmp 0x49c8ad
mov ecx, dword [edi + 0x38]
mov eax, dword [ebp + 0xc]
neg ecx
and ecx, 7
shr edx, cl
mov byte [eax], dl
jmp 0x49c8ad
cmp dword [edi + 0x38], 0
mov dword [ebp + 0x14], 0
jbe 0x49c600
mov ecx, dword [ebp + 0x10]
mov eax, ecx
sub eax, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
shl eax, 8
mov dword [ebp - 0x2c], eax
mov dword [ebp + 8], edx
mov eax, ebx
shr eax, 8
add eax, ecx
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
sub edx, ecx
movzx eax, bl
imul edx, eax
mov eax, dword [ebp - 0x2c]
add eax, ebx
shl ecx, 8
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
add edx, ecx
mov dword [esi + 0xc], eax
mov ecx, dword [ebp + 0x14]
mov dword [esi + 8], edx
mov dword [esi], 3
add esi, 0x10
cmp edx, eax
mov edx, dword [ebp - 0xc]
sbb eax, eax
add ebx, dword [edi + 0x28]
inc eax
lea edx, [eax + edx*2]
mov eax, ecx
and eax, 7
mov dword [ebp - 0xc], edx
cmp al, 7
jne 0x49c5f2
mov eax, dword [ebp + 8]
mov byte [eax], dl
inc eax
mov dword [ebp + 8], eax
inc ecx
cmp ecx, dword [edi + 0x38]
mov dword [ebp + 0x14], ecx
mov ecx, dword [ebp + 0x10]
jb 0x49c597
jmp 0x49c606
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], eax
mov ecx, dword [edi + 0x38]
mov al, 1
and ecx, 7
shl al, cl
dec al
and al, dl
mov edx, dword [ebp + 8]
mov byte [edx], al
jmp 0x49c8ad
mov eax, dword [edi + 0x38]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x49c8ad
mov ecx, dword [ebp + 0x10]
mov eax, ecx
sub eax, dword [ebp - 8]
shl eax, 8
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov eax, ebx
shr eax, 8
add eax, ecx
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
sub edx, ecx
movzx eax, bl
imul edx, eax
mov eax, dword [ebp + 8]
add eax, ebx
shl ecx, 8
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
mov dword [esi + 0xc], eax
add edx, ecx
cmp edx, eax
mov dword [esi + 8], edx
mov eax, dword [ebp + 0x14]
sbb ebx, ebx
mov dword [esi], 3
add eax, dword [edi + 0x28]
inc ebx
mov dword [ebp + 0x14], eax
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp + 8]
shl ecx, 8
mov dword [esi + 0x10], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x18], edx
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x1c], eax
sbb eax, eax
add ecx, dword [edi + 0x28]
and eax, 0xfffffffe
mov dword [ebp + 0x14], ecx
add eax, 2
add ebx, eax
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp + 8]
shl ecx, 8
mov dword [esi + 0x20], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x28], edx
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x2c], eax
sbb eax, eax
add ecx, dword [edi + 0x28]
and eax, 0xfffffffc
mov dword [ebp + 0x14], ecx
add eax, 4
add ebx, eax
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp + 8]
shl ecx, 8
mov dword [esi + 0x30], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x38], edx
mov dword [esi + 0x34], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x3c], eax
sbb eax, eax
add ecx, dword [edi + 0x28]
and eax, 0xfffffff8
mov dword [ebp + 0x14], ecx
add eax, 8
add ebx, eax
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp + 8]
shl ecx, 8
mov dword [esi + 0x40], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x4c], eax
sbb eax, eax
add ecx, dword [edi + 0x28]
and eax, 0xfffffff0
mov dword [ebp + 0x14], ecx
add eax, 0x10
add ebx, eax
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp + 8]
shl ecx, 8
mov dword [esi + 0x50], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x58], edx
mov dword [esi + 0x54], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x5c], eax
sbb eax, eax
add ecx, dword [edi + 0x28]
and eax, 0xffffffe0
mov dword [ebp + 0x14], ecx
add eax, 0x20
add ebx, eax
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
shl ecx, 8
mov eax, dword [ebp + 8]
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x64], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x6c], eax
sbb eax, eax
mov dword [esi + 0x68], edx
and eax, 0xffffffc0
mov dword [esi + 0x60], 3
add ecx, dword [edi + 0x28]
add eax, 0x40
add ebx, eax
mov dword [ebp + 0x14], ecx
mov eax, ecx
shr eax, 8
add eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
mov eax, dword [ebp + 0x14]
sub edx, ecx
movzx eax, al
imul edx, eax
mov eax, dword [ebp + 8]
shl ecx, 8
mov dword [esi + 0x70], 3
add edx, ecx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [esi + 0x78], edx
mov dword [esi + 0x74], eax
mov eax, dword [ebp - 4]
cmp edx, eax
mov dword [esi + 0x7c], eax
sbb eax, eax
add ecx, dword [edi + 0x28]
and eax, 0xffffff80
mov dword [ebp + 0x14], ecx
sub eax, 0xffffff80
sub esi, 0xffffff80
add ebx, eax
mov eax, dword [ebp - 0x20]
mov byte [eax], bl
inc eax
sub dword [ebp - 0x1c], 1
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
jne 0x49c640
mov eax, dword [ebp + 0x18]
sub esi, dword [ebp - 0x24]
pop ebx
sar esi, 4
mov dword [eax], esi
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret