Function at 0x100a9350
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x30]
movzx ecx, word [ebx]
cmp cx, 1
jbe 0x100a9890
mov eax, dword [esp + 0x34]
movzx eax, word [eax]
cmp ax, 1
jbe 0x100a9890
push edi
mov edi, dword [esp + 0x30]
cmp word [edi + 0xa], 2
jne 0x100a9885
mov dx, word [esp + 0x40]
cmp dx, word [esp + 0x3c]
jb 0x100a9885
cmp dword [esp + 0x44], 0
je 0x100a9885
movzx eax, ax
movzx ecx, cx
add eax, ecx
lea eax, [eax + eax + 0x10000]
push eax
push 0x102
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esp + 0x28], eax
test eax, eax
jne 0x100a93cf
pop edi
mov eax, 0x66
pop ebx
add esp, 0x24
ret
push ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
movzx edx, word [ebx]
mov esi, eax
mov eax, dword [esp + 0x40]
movzx ecx, word [eax]
lea ebp, [esi + edx*2]
lea eax, [ebp + ecx*2]
xor ecx, ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x10], eax
test edx, edx
jbe 0x100a942e
lea ecx, [ecx]
movzx eax, word [edi + 0x1a]
imul eax, ecx
lea ebp, [edx - 1]
xor edx, edx
div ebp
mov word [esi + ecx*2], ax
cmp ax, word [edi + 0x1a]
jb 0x100a9422
mov dx, word [edi + 0x1a]
dec dx
mov word [esi + ecx*2], dx
movzx edx, word [ebx]
inc ecx
cmp ecx, edx
jb 0x100a9400
mov ebp, dword [esp + 0x24]
mov ecx, 1
mov eax, ecx
cmp ax, word [ebx]
jae 0x100a9455
mov eax, esi
lea esp, [esp]
mov dx, word [eax + 2]
sub dx, word [eax]
inc ecx
mov word [eax], dx
movzx edx, word [ebx]
add eax, 2
cmp ecx, edx
jb 0x100a9440
mov edx, dword [esp + 0x40]
xor eax, eax
mov word [esi + ecx*2 - 2], ax
movzx edx, word [edx]
xor ecx, ecx
test edx, edx
jbe 0x100a949c
mov esi, dword [esp + 0x40]
lea ecx, [ecx]
movzx eax, word [edi + 0x24]
imul eax, ecx
lea ebx, [edx - 1]
xor edx, edx
div ebx
mov word [ebp + ecx*2], ax
cmp ax, word [edi + 0x24]
jb 0x100a9494
mov ax, word [edi + 0x24]
dec ax
mov word [ebp + ecx*2], ax
movzx edx, word [esi]
inc ecx
cmp ecx, edx
jb 0x100a9470
mov edi, dword [esp + 0x50]
test edi, edi
je 0x100a9614
mov ebx, dword [edi + 0x454]
mov esi, dword [esp + 0x10]
xor eax, eax
xor ecx, ecx
lea edx, [edi + 4]
lea esp, [esp]
movzx ebp, word [edx]
cmp eax, ebp
jae 0x100a94d2
mov byte [eax + esi], cl
movzx ebp, word [edx]
inc eax
cmp eax, ebp
jb 0x100a94c7
inc ecx
add edx, 2
cmp ecx, 0x100
jb 0x100a94c0
lea ecx, [eax - 1]
cmp ecx, 0xfffe
ja 0x100a95f2
mov cl, byte [eax + esi - 1]
mov byte [esp + 0x14], cl
cmp cl, 0xff
jae 0x100a9500
inc cl
mov byte [esp + 0x14], cl
cmp eax, 0x10000
jae 0x100a9520
mov edx, 0x10000
sub edx, eax
lea ecx, [eax + esi]
mov eax, dword [esp + 0x14]
push edx
push eax
push ecx
call fcn.1002a420
add esp, 0xc
movzx ecx, word [esp + 0x44]
movzx edx, word [esp + 0x48]
sub ecx, ebx
mov dword [esp + 0x28], ecx
sub edx, ebx
test byte [edi + 0x55c], 8
fild dword [esp + 0x28]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
je 0x100a955f
fld qword [edi + 0x568]
fld qword [edi + 0x560]
fld st(1)
fmulp st(4)
fadd st(3), st(0)
fxch st(1)
fmulp st(2)
faddp st(1)
cmp dword [edi + 0x424], 0
fld st(0)
fsub st(2)
jne 0x100a96b9
fld st(0)
fld qword [0x10147038]
fmul st(1), st(0)
fld st(1)
fadd st(4)
fcomp qword [edi + 0x40c]
fnstsw ax
test ah, 5
jnp 0x100a95fc
fld st(4)
fsubrp st(2)
fxch st(1)
fcomp qword [edi + 0x40c]
fnstsw ax
test ah, 0x41
je 0x100a95fe
fld st(1)
fmul qword [0x10147090]
fcomp qword [edi + 0x414]
fnstsw ax
test ah, 5
jnp 0x100a95fe
fstp st(2)
fstp st(2)
fstp st(1)
fstp st(0)
mov ecx, dword [esp + 0x38]
cmp word [ecx + 0x46], 0
mov eax, dword [esp + 0x3c]
movzx edx, word [ecx + 0x24]
movzx eax, word [eax]
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], eax
je 0x100a96c0
add eax, 3
and eax, 0xfffc
mov dword [esp + 0x18], eax
jmp 0x100a96c7
mov byte [esp + 0x14], 0xff
jmp 0x100a9500
fstp st(1)
fxch st(2)
faddp st(3)
fxch st(2)
fmulp st(1)
fstp qword [edi + 0x40c]
fstp qword [edi + 0x414]
jmp 0x100a95bb
movzx ebx, word [esp + 0x44]
xor ecx, ecx
test ebx, ebx
jbe 0x100a9630
mov eax, dword [esp + 0x10]
push ebx
push ecx
push eax
call fcn.1002a420
add esp, 0xc
mov ecx, ebx
movzx esi, word [esp + 0x48]
mov ebp, esi
sub ebp, ebx
inc ebp
cmp ecx, esi
jae 0x100a9667
mov edi, ecx
sub edi, ebx
mov ebx, dword [esp + 0x10]
shl edi, 8
lea esp, [esp]
mov eax, edi
xor edx, edx
div ebp
inc ecx
add edi, 0x100
mov byte [ecx + ebx - 1], al
cmp ecx, esi
jb 0x100a9650
jmp 0x100a966b
mov ebx, dword [esp + 0x10]
lea edx, [ecx - 1]
cmp edx, 0xfffe
ja 0x100a96b2
mov al, byte [ecx + ebx - 1]
mov byte [esp + 0x14], al
cmp al, 0xff
jae 0x100a9688
inc al
mov byte [esp + 0x14], al
cmp ecx, 0x10000
jae 0x100a95bb
mov edx, 0x10000
sub edx, ecx
lea eax, [ecx + ebx]
mov ecx, dword [esp + 0x14]
push edx
push ecx
push eax
call fcn.1002a420
add esp, 0xc
jmp 0x100a95bb
mov byte [esp + 0x14], 0xff
jmp 0x100a9688
fstp st(1)
jmp 0x100a95b7
movzx ecx, ax
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x38]
mov edx, dword [eax + 0x36]
xor ebx, ebx
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x3c], ebx
cmp word [eax + 0x2e], bx
jne 0x100a97a1
xor eax, eax
cmp ax, word [esp + 0x20]
jae 0x100a9869
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x40]
movzx eax, word [ecx]
cmp ebx, eax
jae 0x100a977d
mov ecx, dword [esp + 0x24]
mov ax, word [esp + 0x3c]
cmp word [ecx + ebx*2], ax
jne 0x100a977d
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
mov edi, dword [esp + 0x28]
xor ecx, ecx
xor ebp, ebp
cmp cx, di
jae 0x100a974b
mov ecx, dword [esp + 0x2c]
movzx edi, di
movzx ebp, di
mov edi, edi
movzx ebx, word [eax]
mov bl, byte [ebx + edx]
mov byte [esi], bl
movzx ebx, word [ecx]
inc esi
add ecx, 2
sub edi, 1
lea eax, [eax + ebx*2]
jne 0x100a9730
mov ebx, dword [esp + 0x1c]
cmp bp, word [esp + 0x18]
jae 0x100a976d
mov edx, dword [esp + 0x18]
sub edx, ebp
movzx edi, dx
push edi
push 0
push esi
call fcn.1002a420
mov edx, dword [esp + 0x1c]
add esp, 0xc
add esi, edi
mov eax, dword [esp + 0x40]
movzx ecx, word [eax]
inc ebx
mov dword [esp + 0x1c], ebx
cmp ebx, ecx
jb 0x100a9702
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 8]
mov eax, dword [esp + 0x3c]
inc eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x3c], eax
cmp ax, word [esp + 0x20]
jb 0x100a96f7
jmp 0x100a9869
xor edx, edx
cmp dx, word [esp + 0x20]
jae 0x100a9869
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x40]
movzx ecx, word [eax]
cmp ebx, ecx
jae 0x100a984a
mov eax, dword [esp + 0x24]
mov cx, word [esp + 0x3c]
cmp word [eax + ebx*2], cx
jne 0x100a984a
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
xor ecx, ecx
xor ebp, ebp
cmp cx, di
jae 0x100a9814
mov ecx, dword [esp + 0x2c]
movzx edi, di
movzx ebp, di
lea ecx, [ecx]
mov ebx, 0x8000
add bx, word [eax]
inc esi
movzx ebx, bx
mov bl, byte [ebx + edx]
mov byte [esi - 1], bl
movzx ebx, word [ecx]
add ecx, 2
sub edi, 1
lea eax, [eax + ebx*2]
jne 0x100a97f0
mov ebx, dword [esp + 0x1c]
cmp bp, word [esp + 0x18]
jae 0x100a9836
mov edx, dword [esp + 0x18]
sub edx, ebp
movzx edi, dx
push edi
push 0
push esi
call fcn.1002a420
mov edx, dword [esp + 0x1c]
add esp, 0xc
add esi, edi
mov eax, dword [esp + 0x40]
movzx ecx, word [eax]
inc ebx
mov dword [esp + 0x1c], ebx
cmp ebx, ecx
jb 0x100a97c1
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 8]
mov eax, dword [esp + 0x3c]
inc eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x3c], eax
cmp ax, word [esp + 0x20]
jb 0x100a97b2
mov esi, dword [esp + 0x30]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
add esp, 0x24
ret
pop edi
mov eax, 1
pop ebx
add esp, 0x24
ret
mov eax, 1
pop ebx
add esp, 0x24
ret