Function at 0x10024aa0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov ecx, dword [esp + 0x1c]
sub esp, 0xc
mov eax, 1
push ebx
mov edx, dword [esp + 0x14]
push esi
shl eax, cl
mov dword [esp + 0xc], eax
push edi
push ebp
mov ebp, dword [0x1004a4ac]
mov edi, dword [esp + 0x2c]
mov ebx, dword [ebp + edx*4]
sub edx, edx
mov eax, dword [ebx + 0x18]
shl eax, 0x10
mov ebp, dword [ebx + 0x34]
div dword [edi + 4]
mov esi, ebp
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x1c]
imul eax, dword [esp + 0x34]
cdq
idiv dword [edi + 8]
sub esi, eax
sub esi, dword [ebx + 0x14]
dec esi
jns 0x10024af4
xor esi, esi
jmp 0x10024afd
lea eax, [ebp - 1]
cmp eax, esi
jge 0x10024afd
mov esi, eax
cmp ecx, 0x18
je 0x10024b18
mov eax, 8
cdq
idiv ecx
mov ecx, eax
mov eax, dword [ebx + 0x10]
cdq
idiv ecx
mov dword [esp + 0x18], eax
jmp 0x10024b22
mov eax, dword [ebx + 0x10]
lea ecx, [eax + eax*2]
mov dword [esp + 0x18], ecx
cmp dword [ebx + 0x50], 0
jne 0x10024b41
mov eax, dword [ebx + 0x38]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x3c]
push eax
push esi
push ecx
push edx
call fcn.10030400
add esp, 0x10
jmp 0x10024b63
mov eax, dword [esp + 0x28]
sub ebp, esi
push eax
mov eax, dword [ebx + 0x54]
mov ecx, dword [eax + ebp*4 - 4]
mov eax, dword [ebx + 0x30]
add ecx, dword [esp + 0x40]
add ecx, 2
push ecx
push eax
call fcn.10034e6d
add esp, 0xc
mov eax, dword [esp + 0x18]
add dword [esp + 0x28], eax
cmp dword [esp + 0x14], 0x100
jne 0x10024c2e
mov eax, dword [0x1004a4ac]
mov edx, dword [esp + 0x20]
mov ecx, dword [eax + edx*4]
xor ebp, ebp
mov edi, dword [esp + 0x2c]
mov eax, dword [ecx + 0x2c]
xor ecx, ecx
add eax, 0x28
cmp dword [edi + 4], ecx
mov dword [esp + 0x18], eax
je 0x10024d8b
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
mov edx, ebp
mov eax, dword [esp + 0x28]
shr edx, 0x10
add ebp, dword [esp + 0x10]
movzx edi, byte [edx + eax]
mov edx, dword [esp + 0x18]
add esi, 4
inc ecx
lea eax, [edx + edi*4]
xor edx, edx
movzx edi, byte [eax + 2]
mov dword [esp + 0x14], eax
mov dl, byte [edi + ebx]
add edx, edx
mov edi, dword [esp + 0x14]
lea eax, [edx + edx*2]
lea edx, [eax + eax*4]
xor eax, eax
mov al, byte [edi + 1]
movzx edi, byte [eax + ebx]
mov eax, edi
shl edi, 3
sub edi, eax
lea edi, [eax + edi*4]
lea eax, [eax + edi*2]
mov edi, dword [esp + 0x14]
add edx, eax
xor eax, eax
mov al, byte [edi]
mov al, byte [eax + ebx]
and eax, 0xff
mov edi, eax
lea eax, [eax + eax*4]
lea eax, [edi + eax*2]
mov edi, 0x64
add eax, edx
sub edx, edx
div edi
mov edi, dword [esp + 0x2c]
mov dword [esi - 4], eax
cmp dword [edi + 4], ecx
jne 0x10024ba8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret
cmp dword [esp + 0x14], 0x10
jne 0x10024d11
mov eax, dword [0x1004a4ac]
mov edx, dword [esp + 0x20]
mov ecx, dword [eax + edx*4]
mov edi, dword [esp + 0x2c]
xor ebp, ebp
xor esi, esi
mov eax, dword [ecx + 0x2c]
add eax, 0x28
cmp dword [edi + 4], ebp
mov dword [esp + 0x18], eax
je 0x10024d8b
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
test esi, 0x10000
mov edx, esi
je 0x10024c81
shr edx, 0x11
mov eax, dword [esp + 0x28]
mov al, byte [edx + eax]
and eax, 0xf
jmp 0x10024c93
shr edx, 0x11
mov eax, dword [esp + 0x28]
mov al, byte [edx + eax]
shr al, 4
and eax, 0xff
add ecx, 4
inc ebp
mov edx, dword [esp + 0x18]
add esi, dword [esp + 0x10]
movzx edi, byte [edx + eax*4 + 2]
lea eax, [edx + eax*4]
xor edx, edx
mov dl, byte [edi + ebx]
mov dword [esp + 0x14], eax
add edx, edx
mov edi, dword [esp + 0x14]
lea eax, [edx + edx*2]
lea edx, [eax + eax*4]
xor eax, eax
mov al, byte [edi + 1]
mov al, byte [eax + ebx]
and eax, 0xff
mov edi, eax
shl eax, 3
sub eax, edi
lea eax, [edi + eax*4]
lea edi, [edi + eax*2]
mov eax, dword [esp + 0x14]
add edx, edi
movzx edi, byte [eax]
xor eax, eax
mov al, byte [edi + ebx]
mov edi, eax
lea eax, [eax + eax*4]
lea eax, [edi + eax*2]
mov edi, 0x64
add eax, edx
sub edx, edx
div edi
mov edi, dword [esp + 0x2c]
mov dword [ecx - 4], eax
cmp dword [edi + 4], ebp
jne 0x10024c68
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret
xor ecx, ecx
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x18], ecx
cmp dword [edi + 4], ecx
je 0x10024d8b
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x28]
shr edx, 0x10
add esi, 4
inc ecx
lea ebp, [edx + edx*2]
add edi, ebp
xor edx, edx
mov dl, byte [edi + 2]
lea ebp, [edx + edx*4]
lea edx, [edx + ebp*2]
movzx ebp, byte [edi + 1]
mov eax, ebp
shl ebp, 3
sub ebp, eax
lea ebp, [eax + ebp*4]
lea eax, [eax + ebp*2]
add edx, eax
xor eax, eax
mov al, byte [edi]
mov edi, 0x64
add eax, eax
lea ebp, [eax + eax*2]
lea eax, [ebp + ebp*4]
add eax, edx
sub edx, edx
div edi
xor edx, edx
mov edi, dword [esp + 0x2c]
mov dl, byte [ebx + eax]
mov eax, dword [esp + 0x10]
mov dword [esi - 4], edx
add dword [esp + 0x18], eax
cmp dword [edi + 4], ecx
jne 0x10024d28
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret