Function at 0x1011a040
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov dword [ebp - 0x20], ecx
mov bh, byte [ebp + 0x10]
mov bl, byte [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x1011db60
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov eax, dword [edx + 4]
movzx edi, bh
cmp eax, edi
jne 0x1011a0c6
test eax, eax
mov eax, ebx
mov ebx, dword [ebp - 0x20]
je 0x1011a2bd
movzx esi, al
xor edi, edi
nop word cs:[eax + eax]
lea eax, [esi + edi]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
movzx eax, al
mov ecx, ebx
push 1
push eax
push dword [edx + edi*4]
call fcn.10115a60
inc edi
mov eax, dword [ebp + 8]
cmp edi, dword [eax + 4]
jb 0x1011a0a0
jmp 0x1011a2bd
jbe 0x1011a235
test bh, bh
je 0x1011a133
movzx eax, bl
mov dword [ebp - 0x28], eax
mov esi, edi
xor edi, edi
mov ebx, dword [ebp - 0x20]
nop dword [eax]
mov eax, dword [ebp - 0x28]
add eax, edi
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
movzx eax, al
mov ecx, ebx
push 1
push eax
push dword [edx + edi*4]
call fcn.10115a60
mov edx, dword [ebp + 8]
inc edi
cmp esi, edi
jne 0x1011a0e0
mov edi, esi
jmp 0x1011a133
mov eax, dword [ebp - 0x28]
cmp byte [eax + esi*4 + 5], 0
je 0x1011a1f0
nop word cs:[eax + eax]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0xdc], ecx
mov edi, dword [ebp - 0x30]
inc edi
mov edx, dword [ebp + 8]
cmp edi, dword [edx + 4]
mov eax, dword [ebp - 0x20]
jae 0x1011a2bd
mov eax, dword [eax + 0xdc]
mov dword [ebp - 0x2c], eax
mov eax, dword [edx]
mov dword [ebp - 0x30], edi
mov eax, dword [eax + edi*4]
mov ecx, dword [0x105dc2cc]
mov esi, dword [eax + 4]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x1011a167
mov edx, dword [ebp - 0x24]
cmp esi, ecx
je 0x1011a196
mov edi, dword [0x105dc2b8]
mov ebx, dword [0x105dc2f4]
mov edx, dword [ebp - 0x24]
nop word cs:[eax + eax]
cmp esi, edi
je 0x1011a188
cmp esi, ebx
jne 0x1011a1f0
mov edx, dword [edx + 0x18]
mov esi, dword [edx + 4]
test edx, edx
je 0x1011a180
cmp esi, ecx
jne 0x1011a180
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x3c], 0
je 0x1011a1f0
mov ecx, dword [edx + 0x18]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x40]
mov dword [ebp - 0x34], eax
cmp ecx, eax
je 0x1011a1f0
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 0x34]
mov dword [ebp - 0x28], edx
mov edi, dword [eax + 0x38]
dec edi
mov eax, ecx
shr eax, 4
mov ebx, ecx
shr ebx, 9
xor ebx, eax
xor eax, eax
nop word [eax + eax]
and ebx, edi
lea esi, [ebx + ebx*2]
mov edx, dword [ebp - 0x28]
mov edx, dword [edx + esi*4]
cmp edx, ecx
je 0x1011a106
cmp edx, dword [ebp - 0x34]
je 0x1011a1f0
add ebx, eax
inc ebx
inc eax
cmp eax, edi
jbe 0x1011a1d0
mov ebx, dword [ebp - 0x2c]
lea eax, [ebx + 1]
mov dword [ebp - 0x10], 0
cmp eax, 0x100
jae 0x1011a2d0
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0xdc], eax
mov edx, dword [ecx + 0xe0]
cmp edx, eax
cmova eax, edx
mov dword [ecx + 0xe0], eax
movzx eax, bl
push 1
push eax
push dword [ebp - 0x24]
call fcn.10115a60
jmp 0x1011a120
test eax, eax
je 0x1011a244
cmp eax, 1
jne 0x1011a268
xor eax, eax
mov cl, 1
jmp 0x1011a29d
test bh, bh
mov esi, dword [ebp - 0x20]
je 0x1011a2bd
nop dword [eax + eax]
mov ecx, dword [esi]
movzx eax, bl
push 0
push 0
push eax
push 2
call fcn.10108a70
inc bl
dec edi
jne 0x1011a250
jmp 0x1011a2bd
movzx esi, bl
xor edi, edi
mov ebx, dword [ebp - 0x20]
lea eax, [esi + edi]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
movzx eax, al
mov ecx, ebx
push 1
push eax
push dword [edx + edi*4]
call fcn.10115a60
mov edx, dword [ebp + 8]
inc edi
mov ecx, dword [edx + 4]
lea eax, [ecx - 1]
cmp edi, eax
jb 0x1011a270
movzx ebx, byte [ebp + 0xc]
mov bh, byte [ebp + 0x10]
sub bh, al
add bl, cl
dec bl
mov edx, dword [edx]
movzx esi, byte [ebp + 0x14]
movzx edi, bh
movzx ebx, bl
mov ecx, dword [ebp - 0x20]
push esi
push edi
push ebx
push dword [edx + eax*4]
call fcn.1011a310
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
mov eax, dword [ebp - 0x24]
add eax, 8
push 0xff
push 1
push 0x105353e4
push eax
call fcn.1010d850
add esp, 0x10
nop dword [eax + eax]
push ebp
sub esp, 0x10
add ebp, 0xc
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0xdc], ecx
add esp, 0x10
pop ebp
ret