Function at 0x100aa1c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x14
cmp dword [ecx + 4], 0x71028338
je 0x100aa1d9
mov eax, 2
add esp, 0x14
ret
movzx edx, word [ecx + 0x24]
push ebx
xor ebx, ebx
cmp dx, bx
je 0x100aa548
movzx eax, word [ecx + 0x1a]
cmp ax, bx
je 0x100aa548
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov edi, dword [esp + 0x2c]
mov esi, 0xff00
cmp di, si
jae 0x100aa251
cmp bp, si
jae 0x100aa251
movzx ecx, dx
movzx esi, ax
movzx eax, bp
movzx edx, di
imul eax, esi
imul edx, ecx
cmp edx, eax
jbe 0x100aa22d
xor edx, edx
div ecx
movzx edi, ax
add edi, 3
and edi, 0xfffc
movzx eax, di
imul eax, ecx
xor edx, edx
div esi
mov ecx, dword [esp + 0x28]
movzx ebp, ax
cmp bp, bx
jne 0x100aa251
mov ebp, 1
mov eax, dword [esp + 0x48]
push eax
push ebp
push edi
lea edx, [esp + 0x24]
push edx
push ecx
call fcn.100a76f0
movzx eax, ax
add esp, 0x14
cmp ax, bx
jne 0x100aa2cd
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x44]
mov esi, dword [esp + 0x50]
lea edx, [eax + ecx + 0x428]
mov dword [esp + 0x1c], edx
cmp dword [esi], ebx
jne 0x100aa29a
push esi
call fcn.10009b30
movzx eax, ax
add esp, 4
cmp ax, bx
jne 0x100aa2cd
cmp dword [esp + 0x4c], ebx
je 0x100aa2b0
mov eax, dword [esp + 0x34]
cmp dword [eax], ebx
je 0x100aa2b0
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx]
jmp 0x100aa2d9
mov edx, dword [esp + 0x1c]
mov eax, dword [esi]
push edx
push eax
call fcn.10009ed0
add esp, 8
mov dword [esp + 0x1c], eax
cmp eax, ebx
jne 0x100aa2d5
mov eax, 0x66
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov esi, ecx
add ecx, 0x428
lea eax, [ecx + edx]
movzx edx, di
mov dword [esp + 0x20], eax
movzx eax, bp
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x14], eax
movzx eax, word [edx + 0x16]
mov dword [esp + 0x1c], ecx
cmp ax, 1
je 0x100aa39b
cmp ax, 2
je 0x100aa39b
cmp ax, 3
jne 0x100aa384
push ecx
lea ecx, [esp + 0x18]
push ecx
lea eax, [esp + 0x18]
push eax
push edx
call fcn.100a7820
movzx eax, ax
add esp, 0x10
cmp ax, bx
jne 0x100aa2cd
movzx ecx, word [esp + 0x10]
movzx edx, word [esp + 0x14]
mov eax, 1
mov dword [esi + 4], ecx
mov dword [esi + 8], edx
mov edx, dword [esp + 0x18]
mov word [esi + 0xc], ax
mov eax, 0x7d0
mov ecx, 0x18
mov dword [esi], 0x28
mov word [esi + 0xe], cx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], edx
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
jmp 0x100aa50d
cmp ax, 5
je 0x100aa38e
cmp ax, 4
pop edi
pop esi
pop ebp
mov eax, 0x12e
pop ebx
add esp, 0x14
ret
cmp dword [esp + 0x48], ebx
je 0x100aa451
cmp word [edx + 0xe], 8
jbe 0x100aa451
mov eax, dword [esp + 0x40]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
push ecx
push edx
call fcn.100a9eb0
movzx eax, ax
add esp, 0x14
cmp ax, bx
jne 0x100aa2cd
movzx ecx, word [esp + 0x10]
movzx edx, word [esp + 0x14]
mov eax, 1
mov dword [esi + 4], ecx
mov word [esi + 0xc], ax
mov eax, 0x7d0
mov ecx, 0x10
mov dword [esi + 8], edx
mov edx, dword [esp + 0x18]
mov word [esi + 0xe], cx
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi], 0x28
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], edx
mov dword [esi + 0x20], 0x100
mov dword [esi + 0x24], ebx
xor eax, eax
lea ecx, [esi + 0x29]
mov byte [ecx - 1], al
mov byte [ecx], al
mov byte [ecx + 1], al
mov byte [ecx + 2], bl
inc eax
mov edx, 0x100
add ecx, 4
cmp ax, dx
jl 0x100aa421
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x100aa51b
mov dword [eax], 6
jmp 0x100aa51b
mov edi, dword [esp + 0x40]
push edi
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
push ecx
push edx
call fcn.100a9fb0
movzx eax, ax
add esp, 0x14
cmp ax, bx
jne 0x100aa2cd
movzx ecx, word [esp + 0x10]
movzx edx, word [esp + 0x14]
mov eax, 1
mov dword [esi + 4], ecx
mov ecx, 8
mov dword [esi + 8], edx
mov edx, dword [esp + 0x18]
mov word [esi + 0xc], ax
mov eax, 0x7d0
mov word [esi + 0xe], cx
mov dword [esi], 0x28
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], edx
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], 0x100
mov dword [esi + 0x24], ebx
lea ecx, [esi + 0x29]
cmp edi, ebx
jne 0x100aa4e1
xor eax, eax
mov byte [ecx - 1], al
mov byte [ecx], al
mov byte [ecx + 1], al
mov byte [ecx + 2], bl
inc eax
mov edx, 0x100
add ecx, 4
cmp ax, dx
jl 0x100aa4c6
jmp 0x100aa50d
lea edx, [edi + 0x204]
mov edi, 0x100
lea esp, [esp]
mov ax, word [edx]
shr ax, 4
mov byte [ecx - 1], al
mov byte [ecx], al
mov byte [ecx + 1], al
mov byte [ecx + 2], bl
add edx, 2
add ecx, 4
sub edi, 1
jne 0x100aa4f0
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x100aa51b
mov dword [eax], 1
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [ecx], eax
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x20]
push eax
push ebx
push ecx
mov dword [edx], esi
call fcn.1002a420
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
mov eax, 2
pop ebx
add esp, 0x14
ret