Function at 0x419b70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ax, word [edi + 0x24]
mov cl, al
and cl, 0x3e
cmp cl, 0xa
jae 0x419bd2
lea edx, [esp + 0x2c]
and eax, 0xffff
push edx
mov ecx, eax
mov edx, eax
and eax, 1
shr ecx, 6
shr edx, 1
and ecx, 0xff
and edx, 0x1f
add ecx, edx
push ecx
push eax
call fcn.0056dd30
mov eax, dword [esp + 0x3a]
add esp, 0xc
and eax, 0xffff
mov ecx, eax
shr ecx, 8
and eax, 0xff
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
jmp 0x419dac
mov eax, dword [edi + 0x10]
xor ebp, ebp
push eax
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
call fcn.004022e0
and eax, 0xffff
add esp, 4
cmp eax, 0x48a
jg 0x419d65
je 0x419c55
cmp eax, 0x479
jl 0x419dac
cmp eax, 0x47a
jg 0x419dac
xor eax, eax
mov ax, word [edi + 0x24]
mov ecx, eax
mov edx, eax
shr ecx, 6
shr edx, 1
and ecx, 0xff
and edx, 0x1f
add ecx, edx
and eax, 1
lea edx, [ecx + ecx*8]
lea ecx, [eax + eax*2]
shl edx, 4
lea ecx, [ecx + ecx*8]
shl ecx, 1
sub ecx, eax
shl ecx, 4
add ecx, eax
xor eax, eax
mov ax, word [edx + ecx*4 + 0xa55d7c]
mov dword [esp + 0x14], eax
jmp 0x419dac
xor eax, eax
mov ax, word [edi + 0x24]
mov ecx, eax
mov esi, eax
and ecx, 1
shr esi, 6
shr eax, 1
and esi, 0xff
and eax, 0x1f
and ecx, 1
add esi, eax
lea eax, [ecx + ecx*2]
lea edx, [eax + eax*8]
lea eax, [esi + esi*8]
shl edx, 1
sub edx, ecx
shl edx, 4
add edx, ecx
shl eax, 4
lea edx, [eax + edx*4]
xor eax, eax
mov ax, word [edx + 0xa55d7e]
cmp eax, ebp
jle 0x419dac
lea edx, [edx + 0xa55dc0]
mov bl, byte [edx]
and bl, 0xf
cmp bl, 9
je 0x419cbb
inc ebp
add edx, 2
cmp ebp, eax
jl 0x419ca4
jmp 0x419dac
mov eax, dword [0x5f3004]
mov edx, dword [0x5f3008]
mov dword [esp + 0x24], eax
mov ebx, edx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x24], eax
mov eax, ebx
cdq
sub eax, edx
mov ebx, dword [0x5f2ff4]
sar eax, 1
mov dword [esp + 0x28], eax
lea eax, [ecx + ecx*2]
lea edx, [eax + eax*8]
lea eax, [esi + esi*8]
shl edx, 1
sub edx, ecx
shl edx, 4
add edx, ecx
lea ecx, [ebp + eax*8]
xor eax, eax
lea edx, [ecx + edx*2]
mov ecx, dword [ebx + 0x50]
mov ax, word [edx*2 + 0xa55d80]
mov dword [esp + 0x10], eax
mov edx, dword [ecx]
lea eax, [esp + 0x10]
push eax
call dword [edx]
mov eax, dword [esp + 0x10]
mov edx, dword [ebx]
push 0xffffffffffffffff
push eax
mov ecx, ebx
call dword [edx + 8]
mov ecx, dword [ebx + 0x28]
mov edx, dword [esp + 0x10]
push 0
mov dword [ecx + edx*4], 0
lea edx, [esp + 0x28]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x50]
push edx
mov edx, dword [edi + 0x34]
push 0
mov eax, dword [ecx]
push edx
mov edx, dword [edi + 0x30]
push edx
mov edx, dword [ebx + 0x60]
mov edx, dword [edx + esi*8 + 4]
push edx
call dword [eax + 0xc]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4
cmp eax, 0x5a8
jne 0x419dac
xor eax, eax
mov ax, word [edi + 0x24]
mov ecx, eax
mov edx, eax
shr ecx, 6
shr edx, 1
and ecx, 0xff
and edx, 0x1f
add ecx, edx
and eax, 1
lea edx, [ecx + ecx*8]
lea ecx, [eax + eax*2]
shl edx, 4
lea ecx, [ecx + ecx*8]
shl ecx, 1
sub ecx, eax
shl ecx, 4
add ecx, eax
xor eax, eax
mov ax, word [edx + ecx*4 + 0xa55d7c]
mov dword [esp + 0x18], eax
mov edx, dword [0x5f3004]
mov cl, byte [0xa54e5c]
mov dword [esp + 0x2c], edx
mov dx, word [edi + 0x24]
mov eax, dword [0x5f3008]
mov ebx, 1
not cl
not edx
and ecx, 1
and edx, 1
xor ecx, edx
mov ebp, dword [edi + 0x34]
shl ecx, 1
sub ebx, ecx
mov esi, dword [esp + 0x14]
imul eax, ebx
cdq
sub eax, edx
mov dword [esp + 0x24], ebx
sar eax, 1
sub ebp, eax
test esi, esi
je 0x419f2f
cmp esi, 0x15
jge 0x419f2f
mov eax, dword [edi + 0x10]
push eax
call fcn.004025d0
and eax, 0xffff
add esp, 4
cmp esi, eax
je 0x419f2f
mov esi, dword [0x5f2fd8]
mov dword [esp + 0x10], 5
lea edx, [esp + 0x10]
mov ecx, dword [esi + 0x50]
push edx
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [esp + 0x10]
mov eax, dword [esi]
push 0xffffffffffffffff
push ecx
mov ecx, esi
call dword [eax + 8]
mov edx, dword [esi + 0x28]
mov eax, dword [esp + 0x10]
mov dword [edx + eax*4], 0
mov ecx, dword [esi + 0x60]
mov edx, dword [esp + 0x10]
mov ecx, dword [ecx + edx*8 + 4]
lea edx, [esp + 0x20]
push edx
lea edx, [esp + 0x20]
mov eax, dword [ecx]
push edx
call dword [eax + 0x38]
mov ecx, dword [0x5f2fd8]
mov eax, dword [esp + 0x1c]
cdq
mov esi, dword [ecx + 8]
idiv dword [esi + 0x2c]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x3c], 0
dec edx
mov dword [esp + 0x14], 5
mov esi, edx
imul esi, eax
inc edx
mov dword [esp + 0x1c], eax
imul edx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x2c]
imul eax, ebx
cdq
sub eax, edx
mov ebx, ecx
mov dword [esp + 0x38], esi
mov esi, dword [edi + 0x30]
mov ecx, dword [ebx + 0x50]
sar eax, 1
mov edx, dword [ecx]
sub esi, eax
lea eax, [esp + 0x14]
push eax
call dword [edx]
mov eax, dword [esp + 0x14]
mov edx, dword [ebx]
push 0xffffffffffffffff
push eax
mov ecx, ebx
call dword [edx + 8]
mov ecx, dword [ebx + 0x28]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x4c]
push 0
mov dword [ecx + edx*4], 0
lea edx, [esp + 0x3c]
mov ecx, dword [eax]
mov eax, dword [esp + 0x24]
push 0
push edx
cdq
sub eax, edx
mov edx, ebp
sar eax, 1
sub edx, eax
mov eax, dword [esp + 0x28]
push edx
cdq
sub eax, edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x20], ecx
sar eax, 1
mov ecx, dword [esp + 0x5c]
sub esi, eax
mov eax, dword [ebx + 0x60]
push esi
mov eax, dword [eax + edx*8 + 4]
mov edx, dword [esp + 0x24]
push eax
call dword [edx + 0x4c]
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
test esi, esi
je 0x41a063
cmp esi, 7
jge 0x41a063
mov eax, dword [edi + 0x10]
push eax
call fcn.00402650
and eax, 0xffff
add esp, 4
cmp esi, eax
je 0x41a063
mov esi, dword [0x5f2fd8]
mov dword [esp + 0x14], 4
lea edx, [esp + 0x14]
mov ecx, dword [esi + 0x50]
push edx
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [esp + 0x14]
mov eax, dword [esi]
push 0xffffffffffffffff
push ecx
mov ecx, esi
call dword [eax + 8]
mov edx, dword [esi + 0x28]
mov eax, dword [esp + 0x14]
mov dword [edx + eax*4], 0
mov ecx, dword [esi + 0x60]
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx + edx*8 + 4]
lea edx, [esp + 0x20]
push edx
lea edx, [esp + 0x20]
mov eax, dword [ecx]
push edx
call dword [eax + 0x38]
mov ecx, dword [0x5f2fd8]
mov eax, dword [esp + 0x1c]
cdq
mov esi, dword [ecx + 8]
idiv dword [esi + 0x24]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x3c], 0
dec edx
mov dword [esp + 0x18], 4
mov esi, edx
imul esi, eax
inc edx
mov dword [esp + 0x1c], eax
imul edx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x2c]
imul eax, ebx
cdq
sub eax, edx
mov dword [esp + 0x38], esi
mov esi, eax
mov eax, dword [edi + 0x30]
mov edi, ecx
sar esi, 1
mov ecx, dword [edi + 0x50]
add esi, eax
lea eax, [esp + 0x18]
mov edx, dword [ecx]
push eax
call dword [edx]
mov eax, dword [esp + 0x18]
mov edx, dword [edi]
push 0xffffffffffffffff
push eax
mov ecx, edi
call dword [edx + 8]
mov ecx, dword [edi + 0x28]
mov edx, dword [esp + 0x18]
push 0
lea eax, [esp + 0x3c]
push 0
mov dword [ecx + edx*4], 0
push eax
mov eax, dword [esp + 0x2c]
cdq
mov ecx, dword [esp + 0x58]
sub eax, edx
sar eax, 1
mov ebx, dword [ecx]
sub ebp, eax
mov eax, dword [esp + 0x28]
push ebp
cdq
sub eax, edx
mov edx, dword [edi + 0x60]
sar eax, 1
sub esi, eax
mov eax, dword [esp + 0x28]
push esi
mov edx, dword [edx + eax*8 + 4]
push edx
call dword [ebx + 0x4c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4