Function at 0x101f26b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov eax, 1
push edi
push esi
push ebx
sub esp, 0x34
movzx ecx, byte [esp + 0x54]
mov ebp, dword [esp + 0x54]
shl eax, cl
mov ecx, 8
mov edi, eax
sub eax, 1
mov dword [esp + 0xc], eax
mov eax, edi
shr eax, 1
test ebp, ebp
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x10], edi
lea ebx, [eax*4 + 4]
cmovne ecx, ebx
xor edx, edx
mov dword [esp + 0x1c], ecx
mov ecx, edi
xor edi, edi
shr ecx, 3
lea esi, [eax + ecx + 3]
movzx ecx, byte [esp + 0x54]
mov eax, 1
mov dword [esp + 4], esi
mov esi, dword [esp + 0x50]
shld edx, eax, cl
shl eax, cl
add esi, 2
lea ebx, [esi + esi]
add ebp, ebx
test cl, 0x20
cmovne edx, eax
cmovne eax, edi
xor edi, edi
add esi, eax
mov eax, 0xffffffd4
adc edi, edx
shrd esi, edi, 1
shr edi, 1
add esi, 2
adc edi, 0
xor edx, edx
shld edi, esi, 2
shl esi, 2
cmp dword [esp + 0x5c], esi
sbb edx, edi
jb 0x101f288c
mov esi, dword [esp + 0x48]
movzx edx, word [esp + 0x54]
xor edi, edi
mov word [esi], dx
movzx edx, word [esp + 0x50]
mov word [esi + 2], dx
mov esi, dword [esp + 0x58]
mov word [esi], di
mov edi, dword [esp + 0x10]
mov word [esp + 0x2a], di
add edi, 1
cmp dword [esp + 0x50], 0xffffffff
je 0x101f2a94
mov ecx, dword [esp + 0xc]
mov esi, dword [esp + 0x4c]
mov dword [esp], ebx
xor eax, eax
mov word [esp + 8], di
mov ebx, dword [esp + 0x58]
mov edi, dword [esp + 0x50]
jmp 0x101f27ba
add dx, word [ebx + eax*2]
mov word [ebx + eax*2 + 2], dx
lea edx, [eax + 1]
cmp edi, eax
je 0x101f27de
mov eax, edx
movzx edx, word [esi + eax*2]
cmp dx, 0xffff
jne 0x101f27a8
movzx edx, word [ebx + eax*2]
add edx, 1
mov word [ebx + eax*2 + 2], dx
lea edx, [eax + 1]
mov byte [ebp + ecx], al
sub ecx, 1
cmp edi, eax
jne 0x101f27b8
movzx edi, word [esp + 8]
mov eax, dword [esp + 0x58]
mov dword [esp + 8], 0
mov ebx, dword [esp]
mov word [eax + ebx - 2], di
mov edi, dword [esp + 0xc]
xor eax, eax
cmp ecx, edi
je 0x101f2894
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 4]
mov edx, edi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 8]
lea esi, [esi]
nop
mov edi, dword [esp + 0x4c]
movsx edi, word [edi + eax*2]
test edi, edi
jle 0x101f2871
mov dword [esp], edx
xor esi, esi
mov byte [esp + 4], al
mov eax, dword [esp + 0xc]
lea esi, [esi]
movzx edx, byte [esp + 4]
mov byte [ebp + eax], dl
mov edx, dword [esp]
add eax, ebx
and eax, edx
cmp ecx, eax
jae 0x101f2863
lea esi, [esi]
add eax, ebx
and eax, edx
cmp ecx, eax
jb 0x101f2858
mov dword [esp], edx
add esi, 1
cmp edi, esi
jne 0x101f2840
mov dword [esp + 0xc], eax
mov edx, dword [esp]
mov eax, dword [esp + 8]
lea esi, [eax + 1]
cmp dword [esp + 0x50], eax
je 0x101f2a66
mov dword [esp + 8], esi
mov eax, esi
jmp 0x101f2820
xor eax, eax
add esp, 0x34
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x4c]
lea esi, [ebx - 4]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x24], esi
xor ebx, ebx
add eax, ebp
mov edi, edx
mov ebp, edx
mov dword [esp], eax
add eax, 0x10
add edi, 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], edi
add edi, esi
xor esi, esi
mov dword [esp + 0x14], edi
xor edi, edi
movsx ecx, word [ebp]
mov eax, dword [esp]
mov dword [eax + ebx], esi
mov dword [eax + ebx + 4], edi
cmp cx, 8
jle 0x101f290c
lea eax, [ebx + eax + 8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x18]
lea edx, [eax + ebx]
lea eax, [ecx - 9]
and eax, 0xfffffff8
add edx, eax
mov eax, dword [esp + 8]
lea esi, [esi]
mov dword [eax], esi
add eax, 8
mov dword [eax - 4], edi
cmp edx, eax
jne 0x101f2900
add ebx, ecx
add esi, 0x1010101
adc edi, 0x1010101
add ebp, 2
cmp dword [esp + 0x14], ebp
jne 0x101f28ca
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 4]
mov ebx, dword [esp + 0x10]
xor ecx, ecx
lea edx, [eax + eax]
xor eax, eax
test ebx, ebx
je 0x101f29b0
mov esi, dword [esp + 0xc]
mov edi, dword [esp]
mov dword [esp + 8], edx
movzx edx, byte [edi + ecx]
mov ebx, esi
and ebx, eax
mov byte [ebp + ebx], dl
mov ebx, dword [esp + 4]
movzx edx, byte [edi + ecx + 1]
add ecx, 2
add ebx, eax
and ebx, esi
mov byte [ebp + ebx], dl
mov ebx, dword [esp + 8]
add eax, ebx
mov ebx, dword [esp + 0x10]
and eax, esi
cmp ecx, ebx
jb 0x101f2945
movzx esi, word [esp + 0x2a]
mov eax, ebp
mov edi, dword [esp + 0x48]
sub esi, ebp
mov ebp, dword [esp + 0x58]
lea esi, [esi]
lea esi, [esi]
movzx edx, byte [eax]
lea ecx, [ebp + edx*2]
movzx edx, word [ecx]
lea ebx, [edx + 1]
mov word [ecx], bx
lea ecx, [esi + eax]
add eax, 1
mov word [edi + edx*2 + 4], cx
cmp dword [esp], eax
jne 0x101f2990
mov eax, dword [esp + 0x54]
mov edi, dword [esp + 0x10]
xor esi, esi
mov ebp, dword [esp + 0x20]
mov edx, dword [esp + 0x4c]
add eax, 1
shl eax, 0x10
sub eax, edi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
shl eax, 0x10
sub eax, edi
mov edi, dword [esp + 0x1c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x48]
lea ebx, [eax + edi + 4]
mov eax, dword [esp + 0x24]
add ebp, eax
mov eax, dword [esp + 0x54]
sub eax, 0x1f
mov dword [esp + 0xc], eax
jmp 0x101f2a45
lea ecx, [eax + 1]
test cx, 0xfffd
je 0x101f2a55
lea ecx, [eax - 1]
mov edi, dword [esp + 0xc]
bsr ecx, ecx
xor ecx, 0x1f
add ecx, edi
mov edi, ecx
shl edi, 0x10
mov dword [esp], edi
mov edi, eax
shl edi, cl
mov ecx, edi
mov edi, dword [esp]
sub edi, ecx
mov ecx, esi
add esi, eax
sub ecx, eax
mov dword [ebx], edi
mov dword [ebx - 4], ecx
add edx, 2
add ebx, 8
cmp ebp, edx
je 0x101f288a
movsx eax, word [edx]
test ax, ax
jne 0x101f2a00
mov eax, dword [esp + 4]
mov dword [ebx], eax
jmp 0x101f2a37
mov eax, dword [esp + 8]
mov dword [ebx], eax
lea eax, [esi - 1]
add esi, 1
mov dword [ebx - 4], eax
jmp 0x101f2a37
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
lea edi, [ebp + eax]
mov dword [esp], edi
mov edi, dword [esp + 0x4c]
add edi, 2
mov dword [esp + 0x20], edi
lea edi, [ebx - 4]
mov dword [esp + 0x24], edi
test eax, eax
jne 0x101f2975
jmp 0x101f29b0
mov eax, dword [esp + 0x58]
mov word [eax], di
mov eax, dword [esp + 0x10]
add eax, ebp
mov dword [esp], eax
mov eax, dword [esp + 0x4c]
add eax, 2
mov dword [esp + 0x20], eax
lea eax, [ebx - 4]
mov dword [esp + 0x24], eax
jmp 0x101f2927