Function at 0x410710
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov byte [ebp - 1], 3
xor eax, eax
mov cl, byte [eax + 0x46407c]
mov byte [ebp - 8], cl
mov cl, byte [ebp - 1]
ror byte [ebp - 8], cl
mov dl, byte [ebp - 8]
mov byte [eax + 0x46407c], dl
inc eax
cmp eax, 0xc0
jl 0x41071c
push ebx
push esi
push edi
mov ecx, 0x46427c
mov eax, 0x46403c
mov edx, ecx
mov esi, eax
add eax, 8
add ecx, 8
mov edi, dword [edx]
cmp eax, 0x46407c
mov dword [esi], edi
mov edx, dword [edx + 4]
mov dword [esi + 4], edx
jl 0x410749
mov esi, 0x46dd54
mov eax, dword [esi]
test eax, eax
je 0x41077e
push eax
call fcn.00435865
add esp, 4
mov dword [esi], 0
push 0x404
call fcn.0043583c
mov edi, eax
mov ecx, 0x101
xor eax, eax
mov dword [esi], edi
rep stosd dword es:[edi], eax
mov dword [esi + 4], 0x101
add esi, 0x1c
add esp, 4
cmp esi, 0x46de34
jl 0x410769
mov byte [ebp - 1], 1
mov cl, byte [eax + 0x46433c]
mov byte [ebp - 8], cl
mov cl, byte [ebp - 1]
ror byte [ebp - 8], cl
mov dl, byte [ebp - 8]
mov byte [eax + 0x46433c], dl
inc eax
cmp eax, 0x500
jl 0x4107ae
mov byte [ebp - 1], 2
mov edx, 0x46413c
xor eax, eax
mov cl, byte [edx + eax]
mov byte [ebp - 8], cl
mov cl, byte [ebp - 1]
ror byte [ebp - 8], cl
mov cl, byte [ebp - 8]
mov byte [edx + eax], cl
inc eax
cmp eax, 0x40
jl 0x4107d9
add edx, 0x40
cmp edx, 0x46433c
jl 0x4107d7
mov dword [ebp - 0x10], 0x46413c
mov esi, 0x46dd54
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ebx, dword [esi + 4]
mov edi, dword [esi]
mov cl, byte [edx + eax]
xor edx, edx
mov byte [ebp - 0x14], cl
mov eax, dword [ebp - 0x14]
and eax, 0xff
div ebx
test edi, edi
mov dword [ebp - 0x18], edx
je 0x41084f
mov eax, dword [edi + edx*4]
test eax, eax
je 0x41084b
cmp byte [eax + 8], cl
je 0x410847
mov eax, dword [eax]
test eax, eax
jne 0x41083a
jmp 0x41084b
test eax, eax
jne 0x41089a
test edi, edi
jne 0x41087a
lea edi, [ebx*4]
push edi
call fcn.0043583c
mov edx, eax
mov ecx, edi
mov dword [esi], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [esi + 4], ebx
lea ecx, [esi - 4]
call fcn.00413ca0
mov ecx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x14]
mov dword [eax + 4], ecx
mov byte [eax + 8], dl
mov edx, dword [esi]
mov edx, dword [edx + ecx*4]
mov dword [eax], edx
mov edx, dword [esi]
mov dword [edx + ecx*4], eax
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0xc], ecx
inc ecx
cmp ecx, 0x40
mov dword [ebp - 0xc], ecx
jl 0x41080f
mov ecx, dword [ebp - 0x10]
add esi, 0x1c
add ecx, 0x40
cmp esi, 0x46de34
mov dword [ebp - 0x10], ecx
jl 0x410808
mov esi, 0x46dc74
mov eax, dword [esi]
test eax, eax
je 0x4108df
push eax
call fcn.00435865
add esp, 4
mov dword [esi], 0
push 0x404
call fcn.0043583c
mov edi, eax
mov ecx, 0x101
xor eax, eax
mov dword [esi], edi
rep stosd dword es:[edi], eax
mov dword [esi + 4], 0x101
add esi, 0x1c
add esp, 4
cmp esi, 0x46dd54
jl 0x4108ca
mov byte [ebp - 1], 3
mov edx, 0x46483c
xor eax, eax
mov cl, byte [edx + eax]
mov byte [ebp - 8], cl
mov cl, byte [ebp - 1]
ror byte [ebp - 8], cl
mov cl, byte [ebp - 8]
mov byte [edx + eax], cl
inc eax
cmp eax, 0x100
jl 0x410916
add edx, 0x100
cmp edx, 0x464c3c
jl 0x410914
mov byte [ebp - 1], 2
xor eax, eax
mov dl, byte [eax + 0x46503c]
mov byte [ebp - 8], dl
mov cl, byte [ebp - 1]
ror byte [ebp - 8], cl
mov cl, byte [ebp - 8]
mov byte [eax + 0x46503c], cl
inc eax
cmp eax, 0x300
jl 0x410944
mov dl, 0x65
mov esi, 0x464d3b
mov al, dl
add dl, 0x17
xor ecx, ecx
test al, 2
mov byte [ebp - 8], 0
je 0x41097e
mov byte [ebp - 8], 1
test al, 4
je 0x410985
inc byte [ebp - 8]
test al, 8
je 0x41098c
inc byte [ebp - 8]
test al, 0x80
je 0x410993
inc byte [ebp - 8]
mov edi, dword [ebp - 8]
and edi, 0xff
shl al, 1
and edi, 0x80000001
jns 0x4109ab
dec edi
or edi, 0xfffffffe
inc edi
je 0x4109af
or al, 1
mov byte [esi + ecx - 0xff], al
inc ecx
cmp ecx, 0xff
jl 0x410972
mov byte [esi], 0
add esi, 0x100
cmp esi, 0x46513b
jl 0x41096b
mov dword [ebp - 0xc], 0x46483c
mov esi, 0x46dc74
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0xc]
mov ebx, dword [esi + 4]
mov edi, dword [esi]
mov cl, byte [edx + ecx]
xor edx, edx
mov byte [ebp - 8], cl
mov eax, dword [ebp - 8]
and eax, 0xff
div ebx
test edi, edi
mov dword [ebp - 0x14], edx
je 0x410a22
mov eax, dword [edi + edx*4]
test eax, eax
je 0x410a1e
cmp byte [eax + 8], cl
je 0x410a16
mov eax, dword [eax]
test eax, eax
jne 0x410a09
jmp 0x410a1e
test eax, eax
jne 0x410abb
test edi, edi
jne 0x410a50
lea edi, [ebx*4]
push edi
call fcn.0043583c
mov edx, eax
mov ecx, edi
mov dword [esi], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [ebp - 0x14]
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [esi + 4], ebx
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x410a8c
mov eax, dword [esi + 0x14]
push 0x10
lea ecx, [esi + 0x10]
push eax
push ecx
call fcn.004346c5
mov ecx, dword [esi + 0x14]
add eax, 4
mov edx, ecx
shl edx, 4
dec ecx
test ecx, ecx
lea eax, [eax + edx - 0x10]
jl 0x410a89
inc ecx
mov edx, dword [esi + 0xc]
mov dword [eax], edx
mov dword [esi + 0xc], eax
sub eax, 0x10
dec ecx
jne 0x410a7b
mov edx, dword [ebp - 0x14]
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
mov dword [esi + 0xc], ecx
mov ecx, dword [esi + 8]
inc ecx
mov dword [esi + 8], ecx
mov cl, byte [ebp - 8]
mov byte [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 4], edx
mov byte [eax + 8], cl
mov ecx, dword [esi]
mov ecx, dword [ecx + edx*4]
mov dword [eax], ecx
mov ecx, dword [esi]
mov dword [ecx + edx*4], eax
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0xc], ecx
inc ecx
cmp ecx, 0x100
mov dword [ebp - 0x10], ecx
jl 0x4109e1
mov ecx, dword [ebp - 0xc]
add esi, 0x1c
add ecx, 0x100
cmp esi, 0x46dd54
mov dword [ebp - 0xc], ecx
jl 0x4109dc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret