Function at 0x100dbaee
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
jmp 0x1014dac0
mov eax, dword [esp + 4]
sub esp, 0x20
cmp word [eax + 0xa], 2
je 0x1014dad7
mov eax, 1
add esp, 0x20
ret
push ebx
mov bx, word [esp + 0x34]
push esi
cmp word [esp + 0x3c], bx
jb 0x1014dee8
mov esi, dword [esp + 0x40]
test esi, esi
je 0x1014dee8
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 0x1014db1b
add ecx, 3
and ecx, 0xfffc
mov dword [esp + 0x18], ecx
jmp 0x1014db22
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.100da02c
movzx eax, ax
add esp, 8
test ax, ax
jne 0x1014db6e
mov edx, dword [esp + 0x20]
push edi
push 0x10000
push edx
call fcn.100de77b
mov edi, eax
add esp, 8
mov dword [esp + 0x14], edi
test edi, edi
jne 0x1014db74
mov eax, dword [esp + 0x24]
push eax
call fcn.100d90e6
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 0x1014dced
xor eax, eax
xor ecx, ecx
lea edx, [ebp + 4]
movzx ebx, word [edx]
cmp eax, ebx
jae 0x1014db9b
nop
mov byte [eax + edi], cl
movzx ebx, word [edx]
inc eax
cmp eax, ebx
jb 0x1014db90
inc ecx
add edx, 2
cmp ecx, 0x100
jb 0x1014db88
lea ecx, [eax - 1]
cmp ecx, 0xfffe
ja 0x1014dc11
mov cl, byte [eax + edi - 1]
mov byte [esp + 0x10], cl
cmp cl, 0xff
jae 0x1014dbc5
inc cl
mov byte [esp + 0x10], cl
cmp eax, 0x10000
jae 0x1014dbe5
mov edx, 0x10000
sub edx, eax
lea ecx, [eax + edi]
mov eax, dword [esp + 0x10]
push edx
push eax
push ecx
call fcn.100dc309
add esp, 0xc
xor ebx, ebx
cmp dword [ebp + 0x554], ebx
je 0x1014dbf4
mov ebx, 0x8000
test byte [ebp + 0x55c], 8
mov dword [ebp + 0x454], ebx
je 0x1014dc18
fld qword [ebp + 0x560]
fld qword [ebp + 0x568]
jmp 0x1014dc1c
mov byte [esp + 0x10], 0xff
jmp 0x1014dbc5
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.100dcc82
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.100dcc82
mov ebx, dword [esp + 0x4c]
cmp dword [ebx + 0x424], 0
mov ecx, eax
mov dword [esp + 0x10], ecx
jne 0x1014dd7c
fld qword [ebx + 0x414]
fmul qword [0x102cf208]
fld qword [ebx + 0x40c]
fsub st(1)
fild dword [esp + 0x10]
fcompp
fnstsw ax
test ah, 5
jnp 0x1014dcc0
fadd qword [ebx + 0x40c]
fild dword [esp + 0x2c]
fcompp
fnstsw ax
test ah, 0x41
je 0x1014dcc2
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 0x1014dd7c
jmp 0x1014dcc2
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 0x1014dd7c
movzx ebx, bx
xor ecx, ecx
mov dword [esp + 0x10], ebx
test ebx, ebx
jbe 0x1014dd07
push ebx
push ecx
push edi
call fcn.100dc309
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 0x1014dd3b
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 0x1014dd20
mov edi, edx
lea eax, [ecx - 1]
cmp eax, 0xfffe
ja 0x1014de3a
mov al, byte [ecx + edi - 1]
mov byte [esp + 0x10], al
cmp al, 0xff
jae 0x1014dd5b
inc al
mov byte [esp + 0x10], al
cmp ecx, 0x10000
jae 0x1014dd7c
mov edx, 0x10000
sub edx, ecx
lea eax, [ecx + edi]
mov ecx, dword [esp + 0x10]
push edx
push ecx
push eax
call fcn.100dc309
add esp, 0xc
mov edx, dword [esp + 0x34]
cmp word [edx + 0x2e], 0
jne 0x1014de44
mov eax, edx
movzx edx, word [eax + 0xc]
movzx eax, word [eax + 0x10]
xor ebp, ebp
cmp edx, eax
ja 0x1014dd9e
lea edx, [eax + 1]
xor ecx, ecx
cmp ecx, edx
jae 0x1014ddb3
mov eax, 1
shl eax, cl
inc ecx
or ebp, eax
cmp ecx, 0x10
jb 0x1014dda0
xor ecx, ecx
cmp cx, word [esp + 0x1c]
jae 0x1014deb9
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 0x1014de03
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 0x1014ddf0
mov eax, dword [esp + 0x20]
cmp dx, ax
jae 0x1014de23
sub eax, edx
movzx edi, ax
push edi
push 0
push esi
call fcn.100dc309
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 0x1014ddd0
jmp 0x1014deb9
mov byte [esp + 0x10], 0xff
jmp 0x1014dd5b
mov eax, dword [esp + 0x1c]
xor ecx, ecx
cmp cx, ax
jae 0x1014deb9
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 0x1014de89
movzx ecx, cx
movzx ebp, cx
jmp 0x1014de70
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 0x1014de70
mov eax, dword [esp + 0x20]
cmp bp, ax
jae 0x1014dea9
sub eax, ebp
movzx edi, ax
push edi
push 0
push esi
call fcn.100dc309
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 0x1014de52
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.100d90e6
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