Function at 0x405e50
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
mov eax, dword [0x4ac200]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, edx
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x54], ecx
xor ecx, ecx
mov dword [esp + 0x48], ebx
nop
mov eax, ecx
mov byte [esp + ecx + 0x60], cl
cdq
idiv esi
mov al, byte [edx + edi]
mov byte [esp + ecx + 0x160], al
inc ecx
cmp ecx, 0x100
jl 0x405e80
xor edi, edi
xor esi, esi
mov dl, byte [esp + esi + 0x60]
movzx eax, byte [esp + esi + 0x160]
add edi, eax
movzx ecx, dl
add edi, ecx
and edi, 0x800000ff
jns 0x405ec3
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [esp + edi + 0x60]
mov byte [esp + esi + 0x60], al
inc esi
mov byte [esp + edi + 0x60], dl
cmp esi, 0x100
jl 0x405ea0
xor edi, edi
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x20], edi
mov esi, 0x3e9
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
cmp eax, ecx
je 0x405f02
mov dword [eax], ebx
add eax, 4
mov dword [esp + 0x24], eax
jmp 0x405f19
lea ecx, [esp + 0x48]
push ecx
push eax
lea ecx, [esp + 0x28]
call fcn.00410cf0
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
sub esi, 1
jne 0x405ef3
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x10], edi
cmp dword [ebx + 4], edi
jle 0x40618c
inc edi
and edi, 0x800000ff
jns 0x405f44
dec edi
or edi, 0xffffff00
inc edi
mov cl, byte [esp + edi + 0x60]
mov esi, dword [esp + 0x38]
movzx edx, cl
add esi, edx
mov dword [esp + 0x40], edi
and esi, 0x800000ff
jns 0x405f65
dec esi
or esi, 0xffffff00
inc esi
mov al, byte [esp + esi + 0x60]
mov byte [esp + edi + 0x60], al
mov byte [esp + esi + 0x60], cl
movzx eax, byte [esp + edi + 0x60]
add eax, edx
mov dword [esp + 0x38], esi
movzx ecx, al
mov dword [esp + 0x3c], ecx
test al, al
je 0x40609e
xor eax, eax
mov dword [esp + 0x14], 0
xor esi, esi
mov dword [esp + 0x18], eax
mov ebx, ecx
mov dword [esp + 0x1c], esi
xor ebx, 5
mov dword [esp + 0x4c], ebx
lea edi, [eax + 0x64]
nop dword [eax + eax]
cmp eax, esi
je 0x405fbf
mov dword [eax], ebx
add eax, 4
mov dword [esp + 0x18], eax
jmp 0x405fd6
lea ecx, [esp + 0x4c]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00410b00
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
sub edi, 1
jne 0x405fb0
mov eax, dword [esp + 0x40]
shl eax, 2
push eax
push ecx
call fcn.0040d6b0
add esp, 4
mov ecx, eax
call fcn.00407f60
mov ebx, eax
mov ecx, dword [ebx]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + ebx + 0x30]
mov edi, dword [ecx + 4]
mov ecx, edi
mov dword [esp + 0x5c], edi
mov edx, dword [edi]
call dword [edx + 4]
lea eax, [esp + 0x58]
push eax
call fcn.0040d200
add esp, 4
mov ecx, eax
mov edx, dword [eax]
push 0xa
mov eax, dword [edx + 0x20]
call eax
mov byte [esp + 0x50], al
mov ecx, edi
mov eax, dword [edi]
call dword [eax + 8]
test eax, eax
je 0x40603b
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push dword [esp + 0x50]
mov ecx, ebx
call fcn.0040f9a0
mov ecx, ebx
call fcn.0040c4b0
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x40609a
sub esi, ecx
mov eax, ecx
and esi, 0xfffffffc
cmp esi, 0x1000
jb 0x406078
mov ecx, dword [eax - 4]
add esi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4061d3
push esi
push ecx
call fcn.0043d19a
add esp, 8
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov ebx, dword [esp + 0x20]
mov ecx, dword [ebx]
mov eax, dword [ebx + 4]
mov dword [ebx], eax
push 8
mov dword [ebx + 4], ecx
call fcn.0043cdde
add esp, 4
mov edi, eax
xorps xmm0, xmm0
push edi
push str.__:__P
movq qword [edi], xmm0
call fcn.004012b0
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x68]
add esp, 8
mov dword [esp + 0x2c], 0
add eax, ecx
mov dword [esp + 0x30], 0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x34], 0
push eax
push 0
call fcn.00410930
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
sub eax, esi
je 0x406116
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x54]
mov al, byte [esp + eax + 0x60]
xor byte [edx + ecx], al
cmp dword [edi + 4], 0
jne 0x4061ce
push 8
push edi
call fcn.0043d19a
add esp, 8
test esi, esi
je 0x406175
mov ecx, dword [esp + 0x34]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x406153
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4061d3
push ecx
push esi
call fcn.0043d19a
add esp, 8
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov esi, dword [esp + 0x10]
inc esi
mov dword [esp + 0x10], esi
cmp esi, dword [ebx + 4]
jge 0x40618c
mov edi, dword [esp + 0x40]
jmp 0x405f33
mov ecx, dword [esp + 0x44]
mov eax, ebx
sub ecx, ebx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x4061af
mov ebx, dword [eax - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4061d3
push ecx
push ebx
call fcn.0043d19a
mov ecx, dword [esp + 0x26c]
add esp, 8
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043ccc7
mov esp, ebp
pop ebp
ret
call fcn.004663fa
call fcn.004677df
int3