Function at 0x1000a7a0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
sub esp, 0x18
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov eax, dword [ecx]
cmp eax, 0x3fffffff
ja 0x1000a7fc
lea ebx, [eax + 1]
cmp edx, eax
jae 0x1000a7d5
add edx, edx
cmp eax, edx
jae 0x1000a7d5
cmp edx, 0x3fffffff
jbe 0x1000a7e8
mov dword [ecx], 0x3fffffff
mov ebx, 0x40000000
mov dword [esp], ebx
call fcn.10010910
add esp, 0x18
pop ebx
ret 8
lea ebx, [edx + 1]
mov dword [ecx], edx
mov dword [esp], ebx
call fcn.10010910
add esp, 0x18
pop ebx
ret 8
mov dword [esp], 0x1003a1e0
call fcn.1001bde4
nop
nop
nop
nop
nop
nop
nop
nop
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov edx, dword [esp + 0x60]
mov eax, dword [edx + 0x10]
mov dword [esp + 0x30], eax
cmp eax, 2
jbe 0x1000aa80
mov edi, dword [edx]
mov esi, dword [edx + 4]
movzx eax, byte [edi]
movzx ecx, byte [edi + 2]
mov dword [esp + 0x18], esi
shl eax, 8
or eax, ecx
movzx ecx, byte [edi + 1]
xor eax, dword [edx + ecx*4 + 0x60]
mov ecx, dword [edx + 0x24]
movzx eax, ax
lea eax, [ecx + eax*4]
mov ecx, dword [edx + 0x28]
mov ebp, dword [eax]
mov dword [eax], esi
mov eax, dword [edx + 0x30]
mov ebx, dword [edx + 0x18]
mov dword [esp + 0x24], ecx
mov dword [esp + 4], ebp
mov dword [esp], eax
mov eax, dword [edx + 0x14]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], eax
shl eax, 3
lea ebp, [ecx + eax + 4]
add eax, ecx
mov ecx, esi
sub ecx, ebx
mov dword [esp + 0x10], eax
xor eax, eax
cmp ebx, esi
mov dword [esp + 0xc], ebp
cmovb eax, ecx
mov ebp, dword [esp + 4]
mov dword [esp + 0x28], eax
cmp eax, ebp
jae 0x1000a953
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp + 0x34], 2
mov dword [esp + 0x60], edx
jmp 0x1000a8e4
mov edx, dword [esp + 0x10]
add esi, 4
sub dword [esp], 1
mov dword [esp + 8], eax
mov eax, dword [esp]
mov dword [edx], ebp
mov ebp, dword [esi]
mov dword [esp + 0x10], esi
cmp dword [esp + 0x28], ebp
jae 0x1000a94f
test eax, eax
je 0x1000a94f
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov edx, ebp
mov ecx, dword [esp + 0x1c]
sub edx, eax
mov ebx, eax
sub ebx, ebp
lea eax, [esi + edx]
add ecx, eax
cmp esi, ebx
mov esi, dword [esp + 0x24]
mov dword [esp + 0x14], ebx
cmovb eax, ecx
mov ecx, dword [esp + 4]
add edx, edi
lea esi, [esi + eax*8]
mov eax, dword [esp + 8]
mov ebx, dword [esi]
cmp ecx, eax
cmovbe eax, ecx
mov dword [esp + 0x2c], ebx
movzx ecx, byte [edx + eax]
movzx ebx, byte [edi + eax]
cmp cl, bl
je 0x1000a990
cmp cl, bl
jb 0x1000a8c0
mov ebx, dword [esp + 0xc]
sub dword [esp], 1
mov dword [esp + 4], eax
mov eax, dword [esp]
mov dword [ebx], ebp
mov ebp, dword [esi]
mov dword [esp + 0xc], esi
cmp dword [esp + 0x28], ebp
jb 0x1000a8e0
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x10]
mov dword [eax], 0
mov eax, dword [esp + 0xc]
mov dword [eax], 0
lea eax, [edi + 1]
add dword [edx + 0x14], 1
mov dword [edx], eax
mov eax, dword [edx + 4]
add eax, 1
mov dword [edx + 4], eax
cmp dword [edx + 8], eax
je 0x1000aa98
mov eax, dword [esp + 0x64]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
add eax, 1
cmp dword [esp + 0x30], eax
je 0x1000a9f8
lea ebx, [edx + eax]
mov dword [esp + 0x38], ebx
movzx ecx, byte [ebx]
lea ebx, [edi + eax]
mov dword [esp + 0x3c], ebx
movzx ebx, byte [ebx]
cmp cl, bl
je 0x1000aa40
cmp dword [esp + 0x34], eax
jae 0x1000a92e
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x34], eax
mov dword [edx], eax
mov edx, dword [esp + 0x14]
sub edx, 1
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x38]
movzx ecx, byte [edx]
mov edx, dword [esp + 0x3c]
movzx ebx, byte [edx]
mov edx, dword [esp + 0x64]
add edx, 8
mov dword [esp + 0x64], edx
jmp 0x1000a92e
mov ebx, dword [esp + 0x30]
cmp dword [esp + 0x34], ebx
jae 0x1000aa71
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
mov dword [eax], ebx
lea ecx, [eax + 8]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x64]
sub eax, 1
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x64], ecx
mov dword [eax], ebx
mov eax, dword [esi + 4]
mov esi, dword [esp + 0xc]
mov dword [esi], eax
jmp 0x1000a967
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x30]
jmp 0x1000aa5c
movzx ecx, byte [edx + eax]
movzx ebx, byte [edi + eax]
cmp cl, bl
jne 0x1000aab0
add eax, 1
cmp esi, eax
jne 0x1000aa50
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
cmp dword [esp + 0x34], ebx
jb 0x1000aac6
movzx ecx, byte [edx + ebx]
movzx ebx, byte [edi + ebx]
jmp 0x1000a92e
mov eax, edx
call fcn.10020b20
mov eax, dword [esp + 0x64]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, edx
call fcn.1001bc50
mov eax, dword [esp + 0x64]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
add edx, eax
mov esi, dword [esp + 0x38]
mov dword [esp + 0x38], edx
lea edx, [edi + eax]
mov dword [esp + 0x3c], edx
jmp 0x1000a9b5
mov eax, dword [esp + 0x64]
movd xmm0, ebx
mov edx, dword [esp + 0x60]
lea ecx, [eax + 8]
mov eax, dword [esp + 0x14]
sub eax, 1
movd xmm1, eax
mov eax, dword [esp + 0x64]
punpckldq xmm0, xmm1
movq qword [eax], xmm0
jmp 0x1000aa1d