Function at 0x10002559
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push dword [ebp + 0x14]
call fcn.1000517e
xor edx, edx
mov esi, eax
mov dword [ebp - 0x10], edx
mov byte [ebp - 1], dl
test esi, esi
jne 0x1000257e
push 2
pop eax
jmp 0x1000280f
mov eax, dword [esi + 0x30]
test eax, eax
je 0x10002599
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.10009586
jmp 0x1000280f
cmp dword [esi + 0x6c], edx
je 0x100025a9
push 4
pop eax
mov dword [esi + 0x34], eax
jmp 0x1000280f
cmp dword [esi + 0x54], edx
jne 0x100025b3
mov eax, dword [esi + 0x64]
jmp 0x100025b6
mov eax, dword [esi + 0x40]
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [esi + 0x98]
test ecx, ecx
jle 0x10002670
cmp dword [esi + 0xf8], edx
jne 0x1000263d
cmp dword [esi + 0xa4], edx
je 0x10002638
mov eax, dword [esi + 0xa0]
sub eax, ecx
imul eax, dword [esi + 0x64]
add eax, dword [esi + 0x80]
cmp dword [esi + 0x54], edx
jne 0x1000262b
push 1
push dword [esi + 0x3c]
push dword [esi + 0x40]
push eax
push edi
call fcn.10005519
cmp dword [esi + 0xf0], 0
je 0x10002638
mov ecx, dword [esi + 0x40]
mov edx, edi
add ecx, 7
sar ecx, 3
test ecx, ecx
jle 0x10002638
or al, 0xff
sub al, byte [edx]
mov byte [edx], al
inc edx
sub ecx, 1
jne 0x1000261d
jmp 0x10002638
push dword [esi + 0x40]
push eax
push edi
call 0x10021f76
add esp, 0xc
add edi, dword [ebp - 0xc]
jmp 0x1000265f
push dword [esi + 0x40]
push dword [esi + 0x84]
push edi
call 0x10021f76
push dword [esi + 0x40]
push 0
push dword [esi + 0x84]
call fcn.10021f7c
add esp, 0x18
dec dword [esi + 0x98]
inc dword [esi + 0x58]
dec ebx
xor edx, edx
jmp 0x100027f6
cmp dword [esi + 0x8c], edx
jne 0x100026fc
push dword [esi + 0x70]
push dword [esi + 0x7c]
push dword [esi + 0x78]
call 0x10021f76
mov eax, dword [esi + 0x78]
add esp, 0xc
add eax, dword [esi + 0x70]
mov dword [esi + 0x7c], eax
jmp 0x100026e0
push 1
lea eax, [ebp - 1]
push eax
push dword [esi]
call dword [esi + 0x20]
xor ecx, ecx
add esp, 0xc
inc ecx
cmp eax, ecx
jne 0x10002802
mov al, byte [ebp - 1]
test al, al
je 0x100026f0
movzx eax, al
push eax
push dword [esi + 0x7c]
push dword [esi]
call dword [esi + 0x20]
movzx ecx, byte [ebp - 1]
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, ecx
jne 0x10002802
add dword [esi + 0x70], eax
movzx eax, byte [ebp - 1]
add dword [esi + 0x7c], eax
movzx eax, word [esi + 0x74]
sub eax, 0x100
cmp dword [esi + 0x70], eax
jb 0x10002698
jmp 0x100026f6
mov dword [esi + 0x8c], ecx
mov eax, dword [esi + 0x78]
mov dword [esi + 0x7c], eax
push dword [esi + 0x94]
push dword [esi + 0x84]
push dword [esi + 0x80]
call 0x10021f76
mov eax, dword [esi + 0x94]
add esp, 0xc
add eax, dword [esi + 0x80]
mov dword [esi + 0x84], eax
movzx eax, word [esi + 0x76]
mov dword [ebp - 8], eax
cmp dword [esi + 0xf8], 0
jne 0x1000275f
lea eax, [ebp - 8]
push eax
push dword [esi + 0x70]
movzx eax, word [esi + 0x76]
push eax
push dword [esi + 0x7c]
push dword [esi + 0x84]
push dword [esi + 0xba]
call fcn.1000636c
mov edx, eax
mov dword [ebp - 0x10], edx
jmp 0x10002762
mov edx, dword [ebp - 0x10]
test edx, edx
jg 0x10002770
mov dword [esi + 0xf8], 1
mov ecx, dword [esi + 0x70]
movzx eax, dx
cmp eax, ecx
jg 0x1000280a
xor edx, edx
cmp dword [esi + 0xf8], edx
jne 0x100027ce
add dword [esi + 0x7c], eax
sub ecx, eax
mov dword [esi + 0x70], ecx
mov eax, dword [ebp - 8]
mov ecx, dword [esi + 0x94]
add eax, ecx
cdq
idiv dword [esi + 0x64]
mov dword [esi + 0x98], eax
mov eax, dword [ebp - 8]
add eax, ecx
cdq
idiv dword [esi + 0x64]
mov eax, dword [esi + 0x98]
mov dword [esi + 0xa0], eax
imul eax, dword [esi + 0x64]
mov dword [esi + 0x94], edx
add eax, dword [esi + 0x80]
xor edx, edx
jmp 0x100027f0
mov eax, dword [esi + 0x94]
add eax, dword [esi + 0x80]
add dword [esi + 0x7c], ecx
mov dword [esi + 0x94], edx
mov dword [esi + 0x70], edx
mov dword [esi + 0x98], 1
mov dword [esi + 0x84], eax
test ebx, ebx
jne 0x100025c1
xor eax, eax
jmp 0x1000280d
push 0xa
pop eax
mov dword [esi + 0x34], eax
jmp 0x1000280d
push 6
pop eax
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret