Function at 0x100931b0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, edx
mov dword [ebp - 0xc], ecx
push edi
mov eax, dword [ebx]
mov edi, ecx
mov dword [ebp - 8], esi
test eax, eax
jne 0x1009331d
mov ecx, dword [ebx + 4]
cmp ecx, 8
jne 0x1009322c
xor ecx, ecx
test esi, esi
je 0x100931f8
mov edx, dword [ebp + 8]
mov al, byte [ecx + edx]
inc ecx
mov byte [edi + 2], al
mov byte [edi + 1], al
mov byte [edi], al
mov byte [edi + 3], 0xff
add edi, 4
cmp ecx, esi
jne 0x100931e1
cmp dword [ebx + 0x10], 0
je 0x100935a8
mov eax, esi
neg eax
lea ecx, [edi + eax*4]
test esi, esi
je 0x100935a8
movzx eax, byte [ecx]
cmp eax, dword [ebx + 0x14]
jne 0x1009321d
mov byte [ecx + 3], 0
add ecx, 4
sub esi, 1
jne 0x10093211
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edx, edx
cmp ecx, 0x10
jne 0x1009327e
test esi, esi
je 0x100935a8
inc edi
nop dword [eax]
mov ecx, dword [ebp + 8]
mov al, byte [ecx + edx*2]
mov byte [edi + 1], al
mov byte [edi], al
mov byte [edi - 1], al
cmp dword [ebx + 0x10], 0
je 0x1009326a
movzx ecx, byte [ecx + edx*2 + 1]
movzx eax, al
shl eax, 8
add ecx, eax
cmp ecx, dword [ebx + 0x14]
jne 0x1009326a
xor al, al
jmp 0x1009326c
or al, 0xff
mov byte [edi + 2], al
inc edx
add edi, 4
cmp edx, esi
jne 0x10093240
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 1
mov dword [ebp - 0x10], edx
shl eax, cl
dec eax
mov dword [ebp - 0x18], eax
test esi, esi
je 0x100935a8
lea ecx, [edi + 1]
mov dword [ebp - 0xc], ecx
nop word [eax + eax]
mov eax, dword [ebx + 4]
xor edi, edi
mov dword [ebp - 0x14], eax
test eax, eax
je 0x100932de
mov esi, dword [ebp + 8]
mov ebx, eax
mov al, dl
mov cl, 7
and al, 7
add edi, edi
sub cl, al
mov eax, edx
shr eax, 3
inc edx
mov al, byte [eax + esi]
shr al, cl
and al, 1
movzx eax, al
or edi, eax
sub ebx, 1
jne 0x100932b1
mov esi, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x10], edx
imul eax, edi, 0xff
xor edx, edx
div dword [ebp - 0x18]
mov byte [ecx + 1], al
mov byte [ecx], al
mov byte [ecx - 1], al
cmp dword [ebx + 0x10], 0
je 0x10093300
cmp edi, dword [ebx + 0x14]
jne 0x10093300
xor al, al
jmp 0x10093302
or al, 0xff
mov edx, dword [ebp - 0x10]
mov byte [ecx + 2], al
add ecx, 4
sub esi, 1
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], esi
jne 0x100932a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x1009341c
cmp dword [ebx + 4], 8
jne 0x1009339e
test esi, esi
je 0x10093358
mov ebx, dword [ebp + 8]
mov esi, edx
push 3
mov edx, ebx
mov ecx, edi
call fcn.10090a80
mov byte [edi + 3], 0xff
add esp, 4
add ebx, 3
add edi, 4
sub esi, 1
jne 0x10093335
mov esi, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
cmp dword [ebx + 0x10], 0
je 0x100935a8
mov eax, esi
neg eax
lea ecx, [edi + eax*4]
test esi, esi
je 0x100935a8
movzx eax, byte [ecx]
cmp eax, dword [ebx + 0x14]
jne 0x1009338f
movzx eax, byte [ecx + 1]
cmp eax, dword [ebx + 0x18]
jne 0x1009338f
movzx eax, byte [ecx + 2]
cmp eax, dword [ebx + 0x1c]
jne 0x1009338f
mov byte [ecx + 3], 0
add ecx, 4
sub esi, 1
jne 0x10093371
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x100935a8
mov edx, dword [ebp + 8]
add edi, 2
add edx, 4
nop
mov cl, byte [edx - 2]
mov al, byte [edx - 4]
mov byte [edi - 1], cl
mov byte [ebp + 0xf], cl
mov cl, byte [edx]
mov byte [edi - 2], al
mov byte [edi], cl
cmp dword [ebx + 0x10], 0
mov byte [ebp - 1], cl
je 0x10093405
movzx ecx, al
movzx eax, byte [edx - 3]
shl ecx, 8
add ecx, eax
cmp ecx, dword [ebx + 0x14]
jne 0x10093405
movzx ecx, byte [ebp + 0xf]
movzx eax, byte [edx - 1]
shl ecx, 8
add ecx, eax
cmp ecx, dword [ebx + 0x18]
jne 0x10093405
movzx ecx, byte [ebp - 1]
movzx eax, byte [edx + 1]
shl ecx, 8
add ecx, eax
cmp ecx, dword [ebx + 0x1c]
jne 0x10093405
xor al, al
jmp 0x10093407
or al, 0xff
mov byte [edi + 1], al
add edx, 6
add edi, 4
sub esi, 1
jne 0x100933b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 3
jne 0x100934e8
cmp dword [ebx + 4], 8
jne 0x1009346e
xor eax, eax
mov dword [ebp + 0xc], eax
test esi, esi
je 0x100935a8
nop dword [eax + eax]
mov ecx, dword [ebp + 8]
push 4
movzx ecx, byte [eax + ecx]
mov eax, dword [ebx + 8]
lea edx, [eax + ecx*4]
mov ecx, edi
call fcn.10090a80
mov eax, dword [ebp + 0xc]
add esp, 4
inc eax
add edi, 4
mov dword [ebp + 0xc], eax
cmp eax, esi
jne 0x10093440
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x10], 0
test esi, esi
je 0x100935a8
nop dword [eax]
mov eax, dword [ebx + 4]
xor edx, edx
mov dword [ebp - 0x18], eax
test eax, eax
je 0x100934c1
mov ebx, dword [ebp - 0x10]
mov esi, eax
mov edi, dword [ebp + 8]
mov al, bl
mov cl, 7
and al, 7
add edx, edx
sub cl, al
mov eax, ebx
shr eax, 3
inc ebx
mov al, byte [eax + edi]
shr al, cl
and al, 1
movzx eax, al
or edx, eax
sub esi, 1
jne 0x10093494
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx + 8]
mov ecx, edi
push 4
lea edx, [eax + edx*4]
call fcn.10090a80
add edi, 4
add esp, 4
sub esi, 1
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], esi
jne 0x10093480
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 4
jne 0x10093553
xor ecx, ecx
cmp dword [ebx + 4], 8
jne 0x10093524
test esi, esi
je 0x100935a8
mov edx, dword [ebp + 8]
inc edi
mov al, byte [edx + ecx*2]
lea edi, [edi + 4]
mov byte [edi - 3], al
mov byte [edi - 4], al
mov byte [edi - 5], al
movzx eax, byte [edx + ecx*2 + 1]
inc ecx
mov byte [edi - 2], al
cmp ecx, esi
jne 0x10093501
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x100935a8
mov edx, dword [ebp + 8]
inc edi
mov al, byte [edx + ecx*4]
lea edi, [edi + 4]
mov byte [edi - 3], al
mov byte [edi - 4], al
mov byte [edi - 5], al
movzx eax, byte [edx + ecx*4 + 2]
inc ecx
mov byte [edi - 2], al
cmp ecx, esi
jne 0x10093530
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 6
jne 0x100935a8
cmp dword [ebx + 4], 8
jne 0x10093574
mov edx, dword [ebp + 8]
shl esi, 2
push esi
call fcn.10090a80
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x100935a8
mov ecx, dword [ebp + 8]
add edi, 2
add ecx, 4
movzx eax, byte [ecx - 4]
lea ecx, [ecx + 8]
mov byte [edi - 2], al
lea edi, [edi + 4]
movzx eax, byte [ecx - 0xa]
mov byte [edi - 5], al
movzx eax, byte [ecx - 8]
mov byte [edi - 4], al
movzx eax, byte [ecx - 6]
mov byte [edi - 3], al
sub esi, 1
jne 0x10093581
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret