Function at 0x4096e4
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbe0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x420], 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.00404bd0
mov eax, dword [ebp - 8]
call fcn.00404bd0
xor eax, eax
push ebp
push 0x4099bb
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
test eax, eax
je 0x409731
sub eax, 4
mov eax, dword [eax]
test eax, eax
je 0x409979
mov edx, dword [ebp - 8]
mov eax, edx
test eax, eax
je 0x409747
sub eax, 4
mov eax, dword [eax]
test eax, eax
je 0x409979
mov eax, edx
test eax, eax
je 0x40975a
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x100
jle 0x409777
lea eax, [ebp - 8]
push eax
mov ecx, pe_nt_image_headers32
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00404c40
mov esi, dword [ebp - 8]
mov ebx, esi
test ebx, ebx
je 0x409785
sub ebx, 4
mov ebx, dword [ebx]
push ebx
lea eax, [ebp - 0xc]
mov ecx, 1
mov edx, dword [0x4096a4]
call fcn.00405424
add esp, 4
mov eax, esi
test eax, eax
je 0x4097a7
sub eax, 4
mov eax, dword [eax]
mov esi, eax
dec esi
test esi, esi
jl 0x4097c2
inc esi
xor edi, edi
mov eax, dword [ebp - 8]
movzx eax, byte [eax + edi]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi], al
inc edi
dec esi
jne 0x4097b1
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x41c]
mov edx, dword [ebp - 0x18]
mov dword [eax], edx
inc dword [ebp - 0x18]
add eax, 4
cmp dword [ebp - 0x18], 0x100
jne 0x4097cd
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x41c]
mov esi, dword [ebp - 8]
test esi, esi
je 0x4097fa
sub esi, 4
mov esi, dword [esi]
mov eax, dword [ebp - 0x18]
cdq
idiv esi
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + edx]
add ebx, dword [ecx]
add eax, ebx
and eax, 0x800000ff
jns 0x409819
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 dword [ebp - 0x18]
add ecx, 4
cmp dword [ebp - 0x18], 0x100
jne 0x4097ee
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp - 4]
mov esi, edi
test esi, esi
je 0x409855
sub esi, 4
mov esi, dword [esi]
push esi
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x4096c4]
call fcn.00405424
add esp, 4
mov eax, edi
test eax, eax
je 0x409877
sub eax, 4
mov eax, dword [eax]
mov esi, eax
dec esi
test esi, esi
jl 0x409892
inc esi
xor edi, edi
mov eax, dword [ebp - 4]
movzx eax, byte [eax + edi]
mov edx, dword [ebp - 0x10]
mov byte [edx + edi], al
inc edi
dec esi
jne 0x409881
mov eax, dword [ebp - 4]
test eax, eax
je 0x40989e
sub eax, 4
mov eax, dword [eax]
mov esi, eax
test esi, esi
jl 0x40993c
inc esi
mov dword [ebp - 0x18], 0
inc ebx
and ebx, 0x800000ff
jns 0x4098c1
dec ebx
or ebx, 0xffffff00
inc ebx
mov eax, dword [ebp + ebx*4 - 0x41c]
add eax, dword [ebp - 0x1c]
and eax, 0x800000ff
jns 0x4098d9
dec eax
or eax, 0xffffff00
inc eax
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebp + ebx*4 - 0x41c]
mov edx, dword [ebp - 0x1c]
mov edx, dword [ebp + edx*4 - 0x41c]
mov dword [ebp + ebx*4 - 0x41c], edx
movzx eax, al
mov edx, dword [ebp - 0x1c]
mov dword [ebp + edx*4 - 0x41c], eax
mov eax, dword [ebp + ebx*4 - 0x41c]
mov edx, dword [ebp - 0x1c]
add eax, dword [ebp + edx*4 - 0x41c]
and eax, 0x800000ff
jns 0x409921
dec eax
or eax, 0xffffff00
inc eax
movzx eax, byte [ebp + eax*4 - 0x41c]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
xor byte [edx + ecx], al
inc dword [ebp - 0x18]
dec esi
jne 0x4098b0
mov eax, dword [ebp - 4]
test eax, eax
je 0x409948
sub eax, 4
mov eax, dword [eax]
mov esi, eax
dec esi
test esi, esi
jl 0x409979
inc esi
xor edi, edi
lea eax, [ebp - 0x420]
mov edx, dword [ebp - 0x10]
movzx edx, byte [edx + edi]
call fcn.0040495c
mov edx, dword [ebp - 0x420]
mov eax, dword [ebp - 0x14]
call fcn.00404a1c
mov eax, dword [ebp - 0x14]
inc edi
dec esi
jne 0x409952
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4099c2
lea eax, [ebp - 0x420]
call fcn.00404790
lea eax, [ebp - 0x10]
mov edx, dword [0x4096c4]
call fcn.00405430
lea eax, [ebp - 0xc]
mov edx, dword [0x4096a4]
call fcn.00405430
lea eax, [ebp - 8]
mov edx, 2
call fcn.004047b4
ret