Function at 0x10099890
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x674
push ebx
push ebp
push esi
mov ebx, ecx
push edi
push 1
push 0
mov ecx, dword [ebx + 0x10]
mov dword [esp + 0x24], ebx
call fcn.1009aa30
mov ebp, dword [esp + 0x68c]
mov esi, dword [esp + 0x688]
mov edx, esi
mov ecx, dword [ebx + 0xc]
push ebp
call fcn.100b9bb0
mov ecx, dword [ebx + 0xc]
push 0x18
push eax
mov dword [ecx + eax*4], ebp
mov ecx, dword [ebx + 0x10]
call fcn.1009aa30
xor eax, eax
lea edi, [esp + 0x17c]
mov ecx, 0x40
xor ebx, ebx
rep stosd dword es:[edi], eax
xorps xmm0, xmm0
xor ecx, ecx
movups xmmword [esp + 0x6c], xmm0
test ebp, ebp
je 0x10099911
nop word [eax + eax]
movzx eax, byte [ecx + esi]
inc ecx
mov byte [esp + eax + 0x17c], 1
cmp ecx, ebp
jb 0x10099900
xor ecx, ecx
cmp byte [esp + ecx + 0x17c], 0
je 0x1009992c
mov eax, ecx
mov byte [esp + ebx + 0x7c], cl
shr eax, 4
inc ebx
mov byte [esp + eax + 0x6c], 1
inc ecx
cmp ecx, 0x100
jb 0x10099913
mov ebp, dword [esp + 0x1c]
xor esi, esi
nop dword [eax + eax]
movzx eax, byte [esp + esi + 0x6c]
mov ecx, dword [ebp + 0x10]
push 1
push eax
call fcn.1009aa30
inc esi
cmp esi, 0x10
jb 0x10099940
xor esi, esi
nop dword [eax + eax]
mov eax, esi
shr eax, 4
cmp byte [esp + eax + 0x6c], 0
je 0x1009997f
movzx eax, byte [esp + esi + 0x17c]
mov ecx, dword [ebp + 0x10]
push 1
push eax
call fcn.1009aa30
inc esi
cmp esi, 0x100
jb 0x10099960
lea eax, [ebx + 2]
mov ecx, 0x102
mov bh, byte [esp + 0x7c]
lea edi, [esp + 0x27c]
mov dword [esp + 0x34], eax
xor esi, esi
mov eax, dword [ebp + 4]
xor edx, edx
mov dword [esp + 0x20], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x1c]
xor ebp, ebp
mov eax, dword [eax + 0xc]
mov dword [esp + 0x3c], eax
nop dword [eax + eax]
mov ecx, dword [esp + 0x688]
mov eax, dword [eax + ebp*4]
mov bl, byte [eax + ecx - 1]
xor ecx, ecx
cmp bh, bl
je 0x100999db
inc ecx
cmp byte [esp + ecx + 0x7c], bl
jne 0x100999d4
mov dword [esp + 0x40], ecx
cmp ecx, 8
jb 0x10099a3f
lea edi, [esp + 0x7c]
nop dword [eax + eax]
movzx eax, byte [edi + ecx - 1]
mov byte [edi + ecx], al
movzx eax, byte [edi + ecx - 2]
mov byte [edi + ecx - 1], al
movzx eax, byte [edi + ecx - 3]
mov byte [edi + ecx - 2], al
movzx eax, byte [edi + ecx - 4]
mov byte [edi + ecx - 3], al
movzx eax, byte [edi + ecx - 5]
mov byte [edi + ecx - 4], al
movzx eax, byte [edi + ecx - 6]
mov byte [edi + ecx - 5], al
movzx eax, byte [edi + ecx - 7]
mov byte [edi + ecx - 6], al
movzx eax, byte [edi + ecx - 8]
mov byte [edi + ecx - 7], al
sub ecx, 8
cmp ecx, 8
jae 0x100999f0
test ecx, ecx
je 0x10099a50
mov al, byte [esp + ecx + 0x7b]
mov byte [esp + ecx + 0x7c], al
sub ecx, 1
jne 0x10099a43
mov ecx, dword [esp + 0x40]
mov bh, bl
mov byte [esp + 0x7c], bh
test ecx, ecx
jne 0x10099a61
inc edx
jmp 0x10099ab4
test edx, edx
je 0x10099a89
mov edi, dword [esp + 0x20]
nop dword [eax]
dec edx
mov al, dl
and al, 1
mov byte [esi + edi], al
mov eax, edx
and eax, 1
inc esi
inc dword [esp + eax*4 + 0x27c]
shr edx, 1
jne 0x10099a70
mov edi, dword [esp + 0x20]
add edi, esi
inc esi
cmp ecx, 0xfe
jb 0x10099aa8
mov byte [edi], 0xff
lea eax, [ecx + 2]
mov edi, dword [esp + 0x20]
mov byte [esi + edi], al
inc esi
jmp 0x10099aad
lea eax, [ecx + 1]
mov byte [edi], al
inc dword [esp + ecx*4 + 0x280]
mov eax, dword [esp + 0x3c]
inc ebp
cmp ebp, dword [esp + 0x68c]
jb 0x100999c0
mov ecx, dword [esp + 0x20]
test edx, edx
je 0x10099ae9
nop
dec edx
mov al, dl
and al, 1
mov byte [esi + ecx], al
mov eax, edx
and eax, 1
inc esi
inc dword [esp + eax*4 + 0x27c]
shr edx, 1
jne 0x10099ad0
mov edx, dword [esp + 0x34]
lea eax, [esi + 1]
mov dword [esp + 0x38], eax
cmp edx, 0x100
jae 0x10099b04
lea eax, [edx - 1]
mov byte [esi + ecx], al
jmp 0x10099b10
mov byte [esi + ecx], 0xff
mov byte [eax + ecx], dl
inc eax
mov dword [esp + 0x38], eax
inc dword [esp + edx*4 + 0x278]
xorps xmm1, xmm1
xor eax, eax
xorps xmm2, xmm2
nop
movups xmm0, xmmword [esp + eax*4 + 0x27c]
paddd xmm1, xmm0
movups xmm0, xmmword [esp + eax*4 + 0x28c]
add eax, 8
paddd xmm2, xmm0
cmp eax, 0x100
jb 0x10099b20
paddd xmm1, xmm2
xor ecx, ecx
movaps xmm0, xmm1
xor edx, edx
psrldq xmm0, 8
paddd xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 4
paddd xmm1, xmm0
movd edi, xmm1
mov dword [esp + 0x40], edi
cmp eax, 0x102
jae 0x10099baf
mov esi, 0x102
sub esi, eax
cmp esi, 2
jb 0x10099b98
nop dword [eax]
add ecx, dword [esp + eax*4 + 0x27c]
add edx, dword [esp + eax*4 + 0x280]
add eax, 2
cmp eax, 0x101
jb 0x10099b80
cmp eax, 0x102
jae 0x10099ba6
add edi, dword [esp + eax*4 + 0x27c]
lea eax, [edx + ecx]
add edi, eax
mov dword [esp + 0x40], edi
mov ebp, dword [esp + 0x1c]
lea ecx, [edi + 0x31]
mov dword [esp + 0x3c], 2
mov dword [esp + 0x5c], 0xffffffff
mov dword [esp + 0x44], 2
mov esi, dword [ebp + 0x10]
mov bl, byte [ebp + 0x8cdc]
mov eax, dword [esi]
mov bh, byte [esi + 8]
mov byte [esp + 0x2f], bh
lea eax, [eax*8 + 8]
sub eax, dword [esi + 4]
mov dword [esp + 0x58], eax
mov eax, 0x51eb851f
mul ecx
mov ecx, dword [esp + 0x58]
mov eax, edx
mov edx, 2
shr eax, 4
mov dword [esp + 0x50], eax
lea eax, [ebp + 0x620]
mov dword [esp + 0x60], eax
lea eax, [ebp + 0x14]
mov dword [esp + 0x64], eax
lea eax, [ebp + 0x3680]
mov dword [esp + 0x54], eax
test bl, bl
je 0x10099c54
mov eax, ecx
shr eax, 3
mov dword [esi], eax
mov eax, ecx
and eax, 7
mov ecx, 8
sub ecx, eax
cmp edx, 6
mov dword [esi + 4], ecx
mov eax, dword [ebp + 0x10]
mov byte [eax + 8], bh
mov ebx, edx
cmova ebx, dword [esp + 0x3c]
mov dword [eax + 4], ecx
mov esi, dword [ebp + 0x10]
jmp 0x10099c93
cmp edi, 0xc8
jae 0x10099c63
mov ebx, 2
jmp 0x10099c93
cmp edi, 0x258
jae 0x10099c72
mov ebx, 3
jmp 0x10099c93
cmp edi, 0x4b0
jae 0x10099c81
mov ebx, 4
jmp 0x10099c93
mov ebx, 5
cmp edi, 0x960
jb 0x10099c93
mov ebx, 6
push 3
push ebx
mov ecx, esi
mov dword [esp + 0x20], ebx
call fcn.1009aa30
mov ecx, dword [ebp + 0x10]
push 0xf
push dword [esp + 0x54]
call fcn.1009aa30
imul eax, ebx, 0x102
mov ecx, edi
add ebp, 0xffffff12
mov dword [esp + 0x14], ecx
xor esi, esi
mov edi, ebx
add ebp, eax
xor edx, edx
mov eax, ecx
div edi
xor edx, edx
mov ecx, esi
test eax, eax
je 0x10099ce1
add edx, dword [esp + ecx*4 + 0x27c]
inc ecx
cmp edx, eax
jb 0x10099cd5
lea eax, [esi + 1]
cmp ecx, eax
jbe 0x10099d01
cmp edi, ebx
je 0x10099d01
cmp edi, 1
je 0x10099d01
mov eax, ebx
sub eax, edi
test al, 1
je 0x10099d01
dec ecx
sub edx, dword [esp + ecx*4 + 0x27c]
xor eax, eax
cmp eax, esi
jb 0x10099d0f
cmp eax, ecx
jae 0x10099d0f
xor bl, bl
jmp 0x10099d11
mov bl, 1
mov byte [eax + ebp], bl
inc eax
cmp eax, dword [esp + 0x34]
jb 0x10099d03
mov ebx, dword [esp + 0x18]
mov esi, ecx
mov ecx, dword [esp + 0x14]
sub ebp, 0x102
sub ecx, edx
mov dword [esp + 0x14], ecx
sub edi, 1
jne 0x10099cc7
mov dword [esp + 0x28], 4
nop
mov edi, dword [esp + 0x60]
xor esi, esi
push 0x408
push 0
push edi
call fcn.100d9dc0
inc esi
add esp, 0xc
add edi, 0x408
cmp esi, dword [esp + 0x18]
jb 0x10099d46
mov eax, dword [esp + 0x54]
xor edi, edi
mov dword [esp + 0x14], eax
nop dword [eax]
mov eax, dword [esp + 0x20]
xor esi, esi
mov edx, dword [esp + 0x38]
nop word [eax + eax]
movzx ecx, byte [edi + eax]
inc edi
cmp ecx, 0xff
jb 0x10099d98
movzx eax, byte [edi + eax]
add ecx, eax
mov eax, dword [esp + 0x20]
inc edi
mov dword [esp + esi*4 + 0x7c], ecx
inc esi
cmp esi, 0x32
jae 0x10099da6
cmp edi, edx
jb 0x10099d80
mov ebx, dword [esp + 0x64]
or ebp, 0xffffffff
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0x14]
mov dword [esp + 0x30], 0
nop dword [eax]
xor edx, edx
xor eax, eax
mov ecx, dword [esp + eax*4 + 0x7c]
inc eax
movzx ecx, byte [ecx + ebx]
add edx, ecx
cmp eax, esi
jb 0x10099dc4
mov ecx, dword [esp + 0x30]
cmp edx, ebp
jae 0x10099de3
mov byte [edi], cl
mov ebp, edx
mov al, cl
jmp 0x10099de5
mov al, byte [edi]
inc ecx
add ebx, 0x102
mov dword [esp + 0x30], ecx
cmp ecx, dword [esp + 0x18]
jb 0x10099dc0
mov ebp, dword [esp + 0x1c]
inc dword [esp + 0x14]
mov edi, dword [esp + 0x24]
movzx eax, al
imul edx, eax, 0x408
add edx, ebp
xor ecx, ecx
nop
mov eax, dword [esp + ecx*4 + 0x7c]
inc ecx
inc dword [edx + eax*4 + 0x620]
cmp ecx, esi
jb 0x10099e10
cmp edi, dword [esp + 0x38]
jb 0x10099d70
xor edi, edi
lea ebx, [ebp + 0x14]
lea esi, [ebp + 0x620]
mov ecx, dword [esp + 0x34]
xor eax, eax
nop dword [eax + eax]
cmp dword [esi + eax*4], 0
jne 0x10099e4d
mov dword [esi + eax*4], 1
inc eax
cmp eax, ecx
jb 0x10099e40
push 0x10
push 0x102
push ebx
lea edx, [esi + 0x1830]
mov ecx, esi
call fcn.100ba950
mov ecx, dword [esp + 0x18]
inc edi
add esi, 0x408
add ebx, 0x102
cmp edi, ecx
jb 0x10099e35
sub dword [esp + 0x28], 1
jne 0x10099d40
xor eax, eax
nop dword [eax]
mov byte [esp + eax + 0x48], al
inc eax
cmp eax, ecx
jb 0x10099e90
mov al, byte [esp + 0x48]
xor edi, edi
nop
mov bl, byte [edi + ebp + 0x3680]
xor esi, esi
cmp al, bl
je 0x10099ec3
nop dword [eax]
mov ecx, dword [ebp + 0x10]
push 1
push 1
call fcn.1009aa30
inc esi
cmp byte [esp + esi + 0x48], bl
jne 0x10099eb0
mov ecx, dword [ebp + 0x10]
push 1
push 0
call fcn.1009aa30
test esi, esi
je 0x10099ee0
mov al, byte [esp + esi + 0x47]
mov byte [esp + esi + 0x48], al
sub esi, 1
jne 0x10099ed3
inc edi
mov al, bl
mov byte [esp + 0x48], al
cmp edi, dword [esp + 0x50]
jb 0x10099ea0
lea edi, [ebp + 0x14]
mov dword [esp + 0x24], 0
mov dword [esp + 0x14], edi
jmp 0x10099f04
mov ebp, dword [esp + 0x1c]
movzx esi, byte [edi]
mov ecx, dword [ebp + 0x10]
push 5
push esi
call fcn.1009aa30
xor ebp, ebp
mov dword [esp + 0x28], ebp
movzx ebx, byte [edi + ebp]
cmp esi, ebx
je 0x10099f57
mov ebp, dword [esp + 0x1c]
mov ecx, dword [ebp + 0x10]
push 1
push 1
call fcn.1009aa30
mov ecx, dword [ebp + 0x10]
lea eax, [esi - 1]
cmp esi, ebx
lea edi, [esi + 1]
push 1
cmovae edi, eax
sbb eax, eax
inc eax
push eax
call fcn.1009aa30
mov esi, edi
cmp edi, ebx
jne 0x10099f24
mov ebp, dword [esp + 0x28]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
push 1
push 0
mov ecx, dword [eax + 0x10]
call fcn.1009aa30
inc ebp
mov dword [esp + 0x28], ebp
cmp ebp, dword [esp + 0x34]
jb 0x10099f18
mov ebx, dword [esp + 0x24]
add edi, 0x102
inc ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x24], ebx
cmp ebx, dword [esp + 0x18]
jb 0x10099f00
mov eax, dword [esp + 0x54]
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x24], esi
xor ebx, ebx
mov dword [esp + 0x30], ecx
xor ebp, ebp
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0x20]
movzx edx, byte [edi + ebp]
inc ebp
mov dword [esp + 0x28], ebp
cmp edx, 0xff
jb 0x10099fcb
movzx eax, byte [edi + ebp]
add edx, eax
mov eax, dword [esp + 0x14]
inc ebp
mov dword [esp + 0x28], ebp
mov edi, dword [esp + 0x1c]
test ebx, ebx
jne 0x1009a001
movzx ecx, byte [eax]
lea esi, [edi + 0x14]
inc eax
mov ebx, 0x32
mov dword [esp + 0x14], eax
imul eax, ecx, 0x102
add esi, eax
imul eax, ecx, 0x408
lea ecx, [edi + 0x1e50]
mov dword [esp + 0x24], esi
add ecx, eax
mov dword [esp + 0x30], ecx
mov eax, dword [ecx + edx*4]
dec ebx
mov edi, dword [edi + 0x10]
mov dword [esp + 0x68], ebx
movzx ebx, byte [edx + esi]
mov dword [esp + 0x18], eax
test ebx, ebx
je 0x1009a074
mov ebp, eax
nop word [eax + eax]
mov esi, dword [edi + 4]
mov eax, ebp
cmp ebx, esi
mov edx, esi
cmovb edx, ebx
sub ebx, edx
mov ecx, ebx
shr eax, cl
mov ecx, edx
mov ch, byte [edi + 8]
shl ch, cl
or ch, al
mov byte [esp + 0x13], ch
mov byte [edi + 8], ch
mov ecx, ebx
shl eax, cl
sub ebp, eax
sub esi, edx
mov dword [edi + 4], esi
jne 0x1009a064
mov eax, dword [edi]
mov ecx, dword [edi + 0xc]
mov dl, byte [esp + 0x13]
mov byte [ecx + eax], dl
inc dword [edi]
mov dword [edi + 4], 8
test ebx, ebx
jne 0x1009a020
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x68]
mov eax, dword [esp + 0x14]
cmp ebp, dword [esp + 0x38]
jb 0x10099fa7
mov ebp, dword [esp + 0x1c]
mov bl, byte [ebp + 0x8cdc]
test bl, bl
je 0x1009a0d6
mov esi, dword [ebp + 0x10]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x44]
mov eax, dword [esi]
lea eax, [eax*8 + 8]
sub eax, dword [esi + 4]
sub eax, ecx
cmp eax, dword [esp + 0x5c]
ja 0x1009a0c0
cmp edx, 6
je 0x1009a0d6
mov dword [esp + 0x5c], eax
mov dword [esp + 0x3c], edx
mov edi, dword [esp + 0x40]
inc edx
mov bh, byte [esp + 0x2f]
mov dword [esp + 0x44], edx
cmp edx, 7
jbe 0x10099c22
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x674
ret 8