Function at 0x100d57a0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x44
push ebx
push ebp
mov ebp, ecx
mov ebx, edx
push esi
mov esi, dword [ebp + 0x10]
cmp esi, 3
jae 0x100d57c0
call fcn.100d7ab0
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x44
ret
mov ecx, dword [ebp]
push edi
mov dword [esp + 0x30], 2
mov dword [esp + 0x28], 0
movzx edx, byte [ecx]
movzx eax, byte [ecx + 2]
shl edx, 8
or edx, eax
mov dword [esp + 0x24], 0
movzx eax, byte [ecx + 1]
movzx eax, word [ebp + eax*4 + 0x60]
xor edx, eax
mov eax, dword [ebp + 0x24]
lea ecx, [eax + edx*4]
mov eax, dword [ebp + 4]
mov edx, dword [ecx]
mov dword [ecx], eax
mov eax, dword [ebp + 0x30]
mov edi, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [ebp]
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 4]
mov dword [esp + 0x2c], eax
sub eax, edx
cmp edx, dword [esp + 0x2c]
mov dword [esp + 0x44], edx
sbb edx, edx
mov dword [esp + 0x40], ecx
and edx, eax
mov dword [esp + 0x48], edi
lea ecx, [edi + ecx*8]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x10]
lea edi, [ecx + 4]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], edi
cmp dword [esp + 0x3c], edx
jae 0x100d596c
nop dword [eax + eax]
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x48]
sub edi, edx
cmp dword [esp + 0x40], edi
mov edx, dword [esp + 0x14]
sbb eax, eax
mov dword [esp + 0x4c], edi
and eax, dword [esp + 0x44]
sub eax, edi
neg edi
add eax, dword [esp + 0x40]
add edx, edi
mov dword [esp + 0x34], edx
lea ecx, [ecx + eax*8]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], ecx
mov ecx, eax
cmp dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x1c]
cmovb eax, dword [esp + 0x28]
mov ecx, dword [ecx]
mov dword [esp + 0x50], ecx
mov cl, byte [eax + edx]
mov edx, dword [esp + 0x14]
cmp cl, byte [eax + edx]
mov edx, dword [esp + 0x10]
jne 0x100d5910
inc eax
cmp eax, esi
je 0x100d58f1
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + edx]
mov edx, dword [esp + 0x10]
jne 0x100d58f1
inc eax
cmp eax, esi
je 0x100d58f1
mov edx, dword [esp + 0x14]
add edx, eax
nop
mov cl, byte [edx + edi]
cmp cl, byte [edx]
jne 0x100d58ed
inc eax
inc edx
cmp eax, esi
jne 0x100d58e0
mov edx, dword [esp + 0x10]
cmp dword [esp + 0x30], eax
jae 0x100d5910
mov ecx, dword [esp + 0x4c]
dec ecx
mov dword [ebx], eax
mov dword [ebx + 4], ecx
add ebx, 8
mov dword [esp + 0x30], eax
cmp eax, esi
je 0x100d599b
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x14]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + edi]
jae 0x100d593d
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x24], eax
mov dword [ecx], edx
mov ecx, dword [esp + 0x1c]
add ecx, 4
mov dword [esp + 0x18], ecx
mov edx, dword [ecx]
jmp 0x100d5957
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x28], eax
mov dword [ecx], edx
mov ecx, dword [esp + 0x1c]
mov edi, ecx
mov dword [esp + 0x20], edi
mov edx, dword [ecx]
mov ecx, dword [esp + 0x18]
sub dword [esp + 0x38], 1
mov dword [esp + 0x10], edx
je 0x100d596c
cmp dword [esp + 0x3c], edx
jb 0x100d5860
mov dword [ecx], 0
mov dword [edi], 0
mov ecx, dword [ebp + 4]
inc dword [ebp + 0x14]
inc ecx
inc dword [ebp]
mov dword [ebp + 4], ecx
pop edi
cmp ecx, dword [ebp + 8]
jne 0x100d5992
mov ecx, ebp
call fcn.100d7320
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x44
ret
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x50]
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 4]
mov ecx, dword [esp + 0x20]
mov dword [ecx], eax
jmp 0x100d5978