Function at 0x411d74
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbe4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040544c
mov eax, dword [ebp - 8]
call fcn.0040544c
xor eax, eax
push ebp
push 0x411fda
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x14]
call fcn.00404fcc
xor edx, edx
push ebp
push 0x411fa2
push dword fs:[edx]
mov dword fs:[edx], esp
mov esi, dword [ebp - 8]
test esi, esi
je 0x411dd1
sub esi, 4
mov esi, dword [esi]
push esi
lea eax, [ebp - 0xc]
mov ecx, 1
mov edx, dword [0x411d50]
call fcn.0040620c
add esp, 4
mov esi, dword [ebp - 8]
test esi, esi
je 0x411df4
sub esi, 4
mov esi, dword [esi]
lea eax, [ebp - 8]
call fcn.004054bc
mov edx, eax
mov eax, dword [ebp - 0xc]
mov ecx, esi
call fcn.00407d08
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x41c]
mov dword [eax], esi
inc esi
add eax, 4
cmp esi, 0x100
jne 0x411e12
xor esi, esi
lea ecx, [ebp - 0x41c]
mov edi, dword [ebp - 8]
test edi, edi
je 0x411e34
sub edi, 4
mov edi, dword [edi]
mov eax, esi
cdq
idiv edi
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + edx]
add ebx, dword [ecx]
add eax, ebx
and eax, 0x800000ff
jns 0x411e52
dec eax
or eax, 0xffffff00
inc eax
mov ebx, eax
movzx eax, byte [ecx]
mov edx, dword [ebp + ebx*4 - 0x41c]
mov dword [ecx], edx
movzx eax, al
mov dword [ebp + ebx*4 - 0x41c], eax
inc esi
add ecx, 4
cmp esi, 0x100
jne 0x411e28
xor ebx, ebx
mov eax, dword [ebp - 0x18]
xor dword [ebp - 0x18], eax
mov esi, dword [ebp - 4]
test esi, esi
je 0x411e8a
sub esi, 4
mov esi, dword [esi]
push esi
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x411d50]
call fcn.0040620c
add esp, 4
mov esi, dword [ebp - 4]
test esi, esi
je 0x411ead
sub esi, 4
mov esi, dword [esi]
lea eax, [ebp - 4]
call fcn.004054bc
mov edx, eax
mov eax, dword [ebp - 0x10]
mov ecx, esi
call fcn.00407d08
mov eax, dword [ebp - 4]
test eax, eax
je 0x411ecd
sub eax, 4
mov eax, dword [eax]
dec eax
test eax, eax
jl 0x411f65
inc eax
mov dword [ebp - 0x1c], eax
xor esi, esi
inc ebx
and ebx, 0x800000ff
jns 0x411eed
dec ebx
or ebx, 0xffffff00
inc ebx
mov eax, dword [ebp + ebx*4 - 0x41c]
add eax, dword [ebp - 0x18]
and eax, 0x800000ff
jns 0x411f05
dec eax
or eax, 0xffffff00
inc eax
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp + ebx*4 - 0x41c]
mov edx, dword [ebp - 0x18]
mov edx, dword [ebp + edx*4 - 0x41c]
mov dword [ebp + ebx*4 - 0x41c], edx
movzx eax, al
mov edx, dword [ebp - 0x18]
mov dword [ebp + edx*4 - 0x41c], eax
mov eax, dword [ebp + ebx*4 - 0x41c]
mov edx, dword [ebp - 0x18]
add eax, dword [ebp + edx*4 - 0x41c]
and eax, 0x800000ff
jns 0x411f4d
dec eax
or eax, 0xffffff00
inc eax
movzx eax, byte [ebp + eax*4 - 0x41c]
mov edx, dword [ebp - 0x10]
xor byte [edx + esi], al
inc esi
dec dword [ebp - 0x1c]
jne 0x411edc
mov eax, dword [ebp - 4]
test eax, eax
je 0x411f71
sub eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
xchg edx, eax
call fcn.004056ec
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x411f86
sub ebx, 4
mov ebx, dword [ebx]
mov eax, dword [ebp - 0x14]
call fcn.004054bc
mov edx, dword [ebp - 0x10]
mov ecx, ebx
call fcn.00407d08
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x411fac
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x411fe1
lea eax, [ebp - 0x10]
mov edx, dword [0x411d50]
mov ecx, 2
call fcn.00405c5c
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404ff0
ret