Function at 0x402ed0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0xffffffffffffffff
push 0x420538
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x24]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], edi
mov ebx, dword [edi + 0x20]
inc ebx
call fcn.004163af
push 0xffffffffffffffff
push 1
lea ecx, [esp + 0x2c]
mov dword [esp + 0x5c], 0
call fcn.0041640f
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push ecx
mov byte [eax], 0xfa
mov ecx, dword [ebp + 0x14]
call fcn.004014f0
push 0xffffffffffffffff
push 3
lea ecx, [esp + 0x2c]
call fcn.0041640f
mov edx, dword [esp + 0x28]
mov eax, ebx
sar eax, 8
mov byte [edx], bl
mov ecx, dword [esp + 0x28]
mov byte [ecx + 1], al
mov edx, dword [esp + 0x28]
mov ecx, dword [ebp + 0x10]
lea esi, [edx + 2]
call fcn.00406640
mov byte [esi], al
mov ecx, dword [ebp + 0x14]
lea eax, [esp + 0x24]
push eax
call fcn.004014f0
mov ecx, dword [0x42a448]
mov dword [esp + 0x14], ecx
push 0xe2aa
lea ecx, [esp + 0x18]
mov byte [esp + 0x58], 1
call fcn.00416e6b
mov edx, dword [esp + 0x14]
mov ecx, dword [ebp + 0x18]
push edx
call fcn.004068d0
mov ecx, dword [ebp + 0x18]
xor esi, esi
push 0x64
push esi
call fcn.00406900
mov ecx, dword [ebp + 0x18]
push 1
call fcn.00406980
mov ecx, dword [ebp + 0x18]
push esi
call fcn.00406940
push 0xffffffffffffffff
push 0x100
lea ecx, [esp + 0x2c]
call fcn.0041640f
mov eax, ebx
mov dword [esp + 0x10], esi
cdq
and edx, 0xff
add eax, edx
sar eax, 8
cmp eax, esi
jle 0x403037
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], eax
mov esi, dword [esp + 0x10]
mov eax, dword [edi + 4]
mov edi, dword [esp + 0x28]
mov ecx, 0x40
add esi, eax
lea eax, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x14]
push eax
call fcn.004014f0
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
add eax, 0x6400
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x18], eax
add esi, 0x100
cdq
idiv ebx
mov dword [esp + 0x10], esi
push eax
call fcn.00406940
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
dec eax
mov dword [esp + 0x1c], eax
jne 0x402fe0
mov esi, ebx
and esi, 0x800000ff
jns 0x403049
dec esi
or esi, 0xffffff00
inc esi
mov dword [esp + 0x20], esi
je 0x4030a4
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x2c]
call fcn.0041640f
mov edx, dword [esp + 0x10]
mov ecx, esi
mov esi, dword [edi + 4]
mov edi, dword [esp + 0x28]
add esi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x24]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x14]
call fcn.004014f0
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
add eax, esi
mov ecx, dword [ebp + 0x18]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv ebx
push eax
call fcn.00406940
mov ecx, dword [ebp + 0x18]
push 0x64
call fcn.00406940
lea ecx, [esp + 0x38]
call fcn.004163af
mov ecx, dword [ebp + 0xc]
push 1
lea eax, [esp + 0x3c]
mov byte [esp + 0x58], 2
mov edx, dword [ecx + 0x6d0]
mov ecx, dword [ebp + 0x14]
push edx
push 1
push eax
call fcn.004013a0
test eax, eax
je 0x4030f9
mov ecx, dword [esp + 0x3c]
mov al, byte [ecx]
cmp al, 6
je 0x40313b
cmp al, 0x15
je 0x4030f2
mov dword [ebp + 4], 8
jmp 0x4030f9
mov dword [ebp + 4], 9
lea ecx, [esp + 0x38]
mov byte [esp + 0x54], 1
call fcn.004163e2
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 0
call fcn.00416b1c
lea ecx, [esp + 0x24]
mov dword [esp + 0x54], 0xffffffff
call fcn.004163e2
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret
lea ecx, [esp + 0x38]
mov dword [ebp + 4], 0
mov byte [esp + 0x54], 1
call fcn.004163e2
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 0
call fcn.00416b1c
lea ecx, [esp + 0x24]
mov dword [esp + 0x54], 0xffffffff
call fcn.004163e2
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x48
ret