Function at 0x4161a0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xdc
push ebx
push ebp
push esi
push edi
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0x65]
mov byte [esp + 0x64], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x100]
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
cmp ebx, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
je 0x41647d
mov esi, dword [esp + 0xfc]
cmp esi, eax
je 0x41647d
mov edi, dword [esp + 0x104]
cmp edi, eax
je 0x41647d
mov ebp, dword [esp + 0x110]
lea eax, [esp + 0x64]
push ebp
push eax
push ebx
call fcn.0040ce40
mov eax, ebp
mov ecx, edi
and eax, 0xffff
sub ecx, eax
test ecx, ecx
jle 0x41624b
mov edx, ecx
lea edi, [esp + eax + 0x64]
mov eax, 0xa5a5a5a5
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x104]
lea eax, [esp + 0x54]
push eax
push esi
call fcn.0041e2c0
lea ecx, [esp + 0x18]
lea edx, [esp + 0x9c]
mov esi, dword [esp + 0xf0]
push ecx
mov ecx, dword [esp + 0xfc]
push 0x50
lea eax, [esp + 0x5c]
push edx
push eax
push ecx
push esi
call fcn.00416490
cmp ax, 0x4a
je 0x416420
cmp ax, 0xa
je 0x416420
cmp ax, 4
je 0x416420
test ax, ax
jne 0x416481
cmp esi, 7
jne 0x4163ba
cmp edi, 4
lea eax, [esp + 0x1c]
mov ecx, edi
jb 0x4162f1
mov dl, byte [esp + ecx + 0x98]
sub ecx, 4
mov byte [eax], dl
inc eax
mov dl, byte [esp + ecx + 0x9d]
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x9e]
inc eax
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x9f]
inc eax
mov byte [eax], dl
inc eax
cmp ecx, 4
jae 0x4162ba
mov edi, dword [esp + 0x104]
mov eax, dword [esp + 0x1f]
mov ecx, dword [esp + 0x1e]
mov edx, dword [esp + 0x1d]
and eax, 0xff
shl eax, 8
and ecx, 0xff
and edx, 0xff
or eax, ecx
mov ecx, dword [esp + 0x1c]
shl eax, 8
or eax, edx
mov edx, dword [esp + 0x108]
shl eax, 8
and ecx, 0xff
or eax, ecx
lea ecx, [edx + edx]
mov dword [esp + 0x10], eax
xor ecx, eax
mov eax, dword [esp + 0x10c]
jne 0x416364
test eax, eax
je 0x41634c
push ebp
push eax
push ebx
call fcn.0040ce40
mov esi, dword [esp + 0x114]
test esi, esi
je 0x4163aa
lea edx, [esp + 0x10]
push 4
push edx
lea eax, [esp + edi + 0x68]
jmp 0x41638a
test eax, eax
je 0x416374
push ebp
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.0040ce40
mov esi, dword [esp + 0x114]
test esi, esi
je 0x4163aa
lea edx, [esp + 0x10]
push 4
push edx
lea eax, [esp + edi + 0x20]
push eax
call fcn.0040ce40
mov cx, word [esp + 0x12]
mov dx, word [esp + 0x10]
mov word [esp + 0x14], cx
mov word [esp + 0x16], dx
mov eax, dword [esp + 0x14]
mov dword [esi], eax
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0xdc
ret 0x28
cmp esi, 5
jne 0x41647d
cmp dword [esp + 0xf4], 0x12c0216
jne 0x41647d
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
shr edx, 2
cmp edx, 1
jb 0x4163f9
lea eax, [esp + edx*4 + 0x9c]
mov esi, dword [eax - 4]
sub eax, 4
mov dword [ecx], esi
add ecx, 4
dec edx
jne 0x4163eb
mov eax, dword [esp + 0x10c]
test eax, eax
je 0x416410
push ebp
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.0040ce40
mov esi, dword [esp + 0x114]
test esi, esi
je 0x4163aa
jmp 0x41637f
mov eax, dword [esp + 0x10c]
test eax, eax
je 0x416433
push ebp
push eax
push ebx
call fcn.0040ce40
mov esi, dword [esp + 0x114]
test esi, esi
je 0x4163aa
lea ecx, [esp + 0x10]
push 4
lea edx, [esp + edi + 0x64]
push ecx
push edx
call fcn.0040ce40
pop edi
mov ax, word [esp + 0xe]
mov cx, word [esp + 0xc]
mov word [esp + 0x10], ax
mov word [esp + 0x12], cx
mov edx, dword [esp + 0x10]
xor ax, ax
mov dword [esi], edx
pop esi
pop ebp
pop ebx
add esp, 0xdc
ret 0x28
mov ax, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdc
ret 0x28