Function at 0x100a8c60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x20
cmp word [eax + 0xa], 2
je 0x100a8c77
mov eax, 1
add esp, 0x20
ret
push ebx
mov bx, word [esp + 0x34]
push esi
cmp word [esp + 0x3c], bx
jb 0x100a9088
mov esi, dword [esp + 0x40]
test esi, esi
je 0x100a9088
cmp word [eax + 0x46], 0
movzx ecx, word [eax + 0x24]
mov dword [esp + 0x14], ecx
movzx ecx, word [eax + 0x1a]
mov dword [esp + 0x1c], ecx
je 0x100a8cbb
add ecx, 3
and ecx, 0xfffc
mov dword [esp + 0x18], ecx
jmp 0x100a8cc2
movzx edx, cx
mov dword [esp + 0x18], edx
mov eax, dword [eax + 0x36]
lea ecx, [esp + 0x20]
push 0
push ecx
mov dword [esp + 0x14], eax
call fcn.1000a740
movzx eax, ax
add esp, 8
test ax, ax
jne 0x100a8d0e
mov edx, dword [esp + 0x20]
push edi
push 0x10000
push edx
call fcn.10009ed0
mov edi, eax
add esp, 8
mov dword [esp + 0x14], edi
test edi, edi
jne 0x100a8d14
mov eax, dword [esp + 0x24]
push eax
call fcn.1000a3f0
add esp, 4
lea eax, [edi + 0x66]
pop edi
pop esi
pop ebx
add esp, 0x20
ret
push ebp
mov ebp, dword [esp + 0x4c]
test ebp, ebp
je 0x100a8e8d
xor eax, eax
xor ecx, ecx
lea edx, [ebp + 4]
movzx ebx, word [edx]
cmp eax, ebx
jae 0x100a8d3b
nop
mov byte [eax + edi], cl
movzx ebx, word [edx]
inc eax
cmp eax, ebx
jb 0x100a8d30
inc ecx
add edx, 2
cmp ecx, 0x100
jb 0x100a8d28
lea ecx, [eax - 1]
cmp ecx, 0xfffe
ja 0x100a8db1
mov cl, byte [eax + edi - 1]
mov byte [esp + 0x10], cl
cmp cl, 0xff
jae 0x100a8d65
inc cl
mov byte [esp + 0x10], cl
cmp eax, 0x10000
jae 0x100a8d85
mov edx, 0x10000
sub edx, eax
lea ecx, [eax + edi]
mov eax, dword [esp + 0x10]
push edx
push eax
push ecx
call fcn.1002a420
add esp, 0xc
xor ebx, ebx
cmp dword [ebp + 0x554], ebx
je 0x100a8d94
mov ebx, 0x8000
test byte [ebp + 0x55c], 8
mov dword [ebp + 0x454], ebx
je 0x100a8db8
fld qword [ebp + 0x560]
fld qword [ebp + 0x568]
jmp 0x100a8dbc
mov byte [esp + 0x10], 0xff
jmp 0x100a8d65
fldz
fld1
movzx ecx, word [esp + 0x40]
sub ecx, ebx
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fmul st(1)
fadd st(2)
call fcn.1012b4f0
movzx edx, word [esp + 0x44]
sub edx, ebx
mov dword [esp + 0x10], edx
mov ebp, eax
mov dword [esp + 0x2c], ebp
fild dword [esp + 0x10]
fmulp st(1)
faddp st(1)
call fcn.1012b4f0
mov ebx, dword [esp + 0x4c]
cmp dword [ebx + 0x424], 0
mov ecx, eax
mov dword [esp + 0x10], ecx
jne 0x100a8f1c
fld qword [ebx + 0x414]
fmul qword [0x10147088]
fld qword [ebx + 0x40c]
fsub st(1)
fild dword [esp + 0x10]
fcompp
fnstsw ax
test ah, 5
jnp 0x100a8e60
fadd qword [ebx + 0x40c]
fild dword [esp + 0x2c]
fcompp
fnstsw ax
test ah, 0x41
je 0x100a8e62
mov eax, ecx
sub eax, ebp
add eax, eax
add eax, eax
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fcomp qword [ebx + 0x414]
fnstsw ax
test ah, 5
jp 0x100a8f1c
jmp 0x100a8e62
fstp st(0)
lea eax, [ecx + ebp]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x2c], eax
sub ecx, ebp
fild dword [esp + 0x2c]
mov dword [esp + 0x2c], ecx
fstp qword [ebx + 0x40c]
fild dword [esp + 0x2c]
fstp qword [ebx + 0x414]
jmp 0x100a8f1c
movzx ebx, bx
xor ecx, ecx
mov dword [esp + 0x10], ebx
test ebx, ebx
jbe 0x100a8ea7
push ebx
push ecx
push edi
call fcn.1002a420
add esp, 0xc
mov ecx, ebx
movzx ebp, word [esp + 0x44]
mov ebx, ebp
sub ebx, dword [esp + 0x10]
inc ebx
cmp ecx, ebp
jae 0x100a8edb
mov edi, ecx
sub edi, dword [esp + 0x10]
shl edi, 8
xor edx, edx
mov eax, edi
div ebx
mov edx, dword [esp + 0x18]
inc ecx
add edi, 0x100
mov byte [ecx + edx - 1], al
cmp ecx, ebp
jb 0x100a8ec0
mov edi, edx
lea eax, [ecx - 1]
cmp eax, 0xfffe
ja 0x100a8fda
mov al, byte [ecx + edi - 1]
mov byte [esp + 0x10], al
cmp al, 0xff
jae 0x100a8efb
inc al
mov byte [esp + 0x10], al
cmp ecx, 0x10000
jae 0x100a8f1c
mov edx, 0x10000
sub edx, ecx
lea eax, [ecx + edi]
mov ecx, dword [esp + 0x10]
push edx
push ecx
push eax
call fcn.1002a420
add esp, 0xc
mov edx, dword [esp + 0x34]
cmp word [edx + 0x2e], 0
jne 0x100a8fe4
mov eax, edx
movzx edx, word [eax + 0xc]
movzx eax, word [eax + 0x10]
xor ebp, ebp
cmp edx, eax
ja 0x100a8f3e
lea edx, [eax + 1]
xor ecx, ecx
cmp ecx, edx
jae 0x100a8f53
mov eax, 1
shl eax, cl
inc ecx
or ebp, eax
cmp ecx, 0x10
jb 0x100a8f40
xor ecx, ecx
cmp cx, word [esp + 0x1c]
jae 0x100a9059
movzx edx, word [esp + 0x1c]
mov dword [esp + 0x34], edx
lea esp, [esp]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
xor ebx, ebx
xor edx, edx
cmp bx, cx
jae 0x100a8fa3
movzx ecx, cx
movzx edx, cx
lea esp, [esp]
movzx ebx, word [eax]
and ebx, ebp
mov bl, byte [ebx + edi]
mov byte [esi], bl
add eax, 2
inc esi
sub ecx, 1
jne 0x100a8f90
mov eax, dword [esp + 0x20]
cmp dx, ax
jae 0x100a8fc3
sub eax, edx
movzx edi, ax
push edi
push 0
push esi
call fcn.1002a420
add esp, 0xc
add esi, edi
mov edi, dword [esp + 0x18]
sub dword [esp + 0x34], 1
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 8]
mov dword [esp + 0x14], edx
jne 0x100a8f70
jmp 0x100a9059
mov byte [esp + 0x10], 0xff
jmp 0x100a8efb
mov eax, dword [esp + 0x1c]
xor ecx, ecx
cmp cx, ax
jae 0x100a9059
movzx ebx, ax
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
mov ecx, dword [esp + 0x24]
xor edx, edx
xor ebp, ebp
cmp dx, cx
jae 0x100a9029
movzx ecx, cx
movzx ebp, cx
jmp 0x100a9010
mov edx, 0x8000
add dx, word [eax]
add eax, 2
movzx edx, dx
mov dl, byte [edx + edi]
mov byte [esi], dl
inc esi
sub ecx, 1
jne 0x100a9010
mov eax, dword [esp + 0x20]
cmp bp, ax
jae 0x100a9049
sub eax, ebp
movzx edi, ax
push edi
push 0
push esi
call fcn.1002a420
add esp, 0xc
add esi, edi
mov edi, dword [esp + 0x18]
sub ebx, 1
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 8]
mov dword [esp + 0x14], ecx
jne 0x100a8ff2
mov edx, dword [esp + 0x38]
mov ax, word [esp + 0x24]
mov ecx, dword [esp + 0x3c]
mov word [edx], ax
mov eax, dword [esp + 0x28]
mov dx, word [esp + 0x1c]
push eax
mov word [ecx], dx
call fcn.1000a3f0
add esp, 4
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret