Function at 0x40f32f
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
lea ebp, [esp - 0x2b0]
sub esp, 0x330
mov eax, dword [0x4a4b60]
xor eax, ebp
mov dword [ebp + 0x2ac], eax
push esi
push 8
push dword [ebp + 0x2c0]
push dword [ebp + 0x2bc]
call fcn.00407058
mov esi, eax
add esp, 0xc
mov dword [ebp - 0x7c], esi
test esi, esi
je 0x40f6da
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
mov dword [ebp - 0x80], edi
test edi, edi
jne 0x40f38d
push esi
call fcn.004067e1
pop ecx
xor eax, eax
jmp 0x40f6d9
mov esi, dword [ebp + 0x2bc]
imul esi, esi, 3
xor ecx, ecx
push ebx
mov eax, ecx
and eax, 0xc0
imul eax, eax, 0xff
add eax, 0x60
cdq
mov ebx, 0xc0
idiv ebx
add ebx, 0x20
mov byte [ebp + ecx - 0x54], al
mov eax, ecx
and eax, 0x38
imul eax, eax, 0x3fc
add eax, 0x70
cdq
idiv ebx
mov ebx, 0xc0
mov byte [ebp + ecx + 0xac], al
mov eax, ecx
and eax, 6
imul eax, eax, 0x1fe0
add eax, 0x60
cdq
idiv ebx
inc ecx
lea edx, [ebx + 0x40]
cmp ecx, edx
mov byte [ebp + ecx + 0x1ab], al
jl 0x40f399
mov eax, dword [edi]
add eax, edi
xor ecx, ecx
inc eax
mov bl, byte [ebp + ecx - 0x54]
mov byte [eax + 1], bl
mov bl, byte [ebp + ecx + 0xac]
mov byte [eax], bl
mov bl, byte [ebp + ecx + 0x1ac]
mov byte [eax - 1], bl
inc ecx
add eax, 4
cmp ecx, edx
jl 0x40f3fc
call fcn.0040ae8e
mov ebx, esi
shl ebx, 2
push ebx
mov dword [ebp - 0x78], ebx
call fcn.00462114
push ebx
mov dword [ebp - 0x70], eax
call fcn.00462114
push ebx
mov dword [ebp - 0x6c], eax
call fcn.00462114
add esp, 0xc
cmp dword [ebp - 0x70], 0
mov dword [ebp - 0x74], eax
je 0x40f6d6
cmp dword [ebp - 0x6c], 0
je 0x40f6d6
mov eax, dword [ebp + 0x2b8]
mov edx, eax
movzx ecx, al
shr eax, 0x10
shr edx, 8
cmp dword [ebp + 0x2bc], 0
movzx esi, al
mov eax, dword [ebp - 0x74]
movzx edx, dl
jle 0x40f49b
mov ebx, dword [ebp + 0x2bc]
mov dword [eax], ecx
add eax, 4
mov dword [eax], edx
add eax, 4
mov dword [eax], esi
add eax, 4
dec ebx
jne 0x40f486
mov ebx, dword [ebp - 0x78]
push ebx
push dword [ebp - 0x74]
push dword [ebp - 0x6c]
call fcn.00461d60
and dword [ebp - 0x60], 0
add esp, 0xc
cmp dword [ebp + 0x2c0], 0
jle 0x40f6ad
mov eax, dword [ebp + 0x2c0]
mov ebx, dword [ebp - 0x70]
mov esi, dword [ebp - 0x6c]
dec eax
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], ebx
cmp dword [ebp - 0x60], eax
je 0x40f4e2
push dword [ebp - 0x78]
push dword [ebp - 0x74]
push ebx
call fcn.00461d60
add esp, 0xc
cmp dword [edi + 0x10], 3
jne 0x40f4f0
mov eax, dword [edi]
lea eax, [edi + eax + 0xc]
jmp 0x40f4f8
mov eax, dword [edi + 0x20]
lea eax, [edi + eax*4]
add eax, dword [edi]
movzx edx, word [edi + 0xe]
imul edx, dword [edi + 4]
and dword [ebp - 0x68], 0
add edx, 0x1f
shr edx, 3
and edx, 0x1ffffffc
imul edx, dword [ebp - 0x60]
add edx, eax
cmp dword [ebp + 0x2bc], 0
jle 0x40f69b
lea eax, [ebx + 8]
mov edi, dword [esi]
add esi, 4
mov ecx, dword [esi]
add esi, 4
mov dword [ebp - 0x64], ecx
mov ecx, dword [esi]
add esi, 4
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], ecx
test edi, edi
jge 0x40f546
and dword [ebp - 0x5c], 0
mov edi, 0xff
cmp dword [ebp - 0x5c], edi
jle 0x40f553
mov dword [ebp - 0x5c], edi
cmp dword [ebp - 0x64], 0
jge 0x40f55d
and dword [ebp - 0x64], 0
cmp dword [ebp - 0x64], edi
jle 0x40f565
mov dword [ebp - 0x64], edi
test ecx, ecx
jge 0x40f56e
xor ecx, ecx
mov dword [ebp - 0x58], ecx
cmp ecx, edi
jle 0x40f577
mov ecx, edi
mov dword [ebp - 0x58], ecx
mov edi, dword [ebp - 0x64]
sar ecx, 3
and edi, 0xe0
and ecx, 0x18
or ecx, edi
mov edi, dword [ebp - 0x5c]
and edi, 0xc0
sar ecx, 2
or ecx, edi
movzx edi, byte [ebp + ecx - 0x54]
mov ebx, 0x100
sub ebx, edi
add dword [ebp - 0x5c], ebx
movzx edi, byte [ebp + ecx + 0xac]
mov ebx, 0x100
sub ebx, edi
mov edi, dword [ebp - 0x64]
mov byte [edx], cl
movzx ecx, byte [ebp + ecx + 0x1ac]
add edi, ebx
mov ebx, 0x100
sub ebx, ecx
add dword [ebp - 0x58], ebx
mov ecx, dword [ebp + 0x2bc]
dec ecx
cmp dword [ebp - 0x68], ecx
je 0x40f5fc
mov ecx, dword [ebp - 0x5c]
mov ecx, dword [ecx*4 + 0x4a69f0]
add dword [esi], ecx
mov ecx, dword [edi*4 + 0x4a69f0]
add dword [esi + 4], ecx
mov ecx, dword [ebp - 0x58]
mov ecx, dword [ecx*4 + 0x4a69f0]
add dword [esi + 8], ecx
mov ecx, dword [ebp + 0x2c0]
dec ecx
cmp dword [ebp - 0x60], ecx
je 0x40f685
mov ecx, dword [ebp - 0x5c]
shl ecx, 2
mov ebx, dword [ecx + 0x4a71f0]
add dword [eax - 8], ebx
shl edi, 2
mov ebx, dword [edi + 0x4a71f0]
add dword [eax - 4], ebx
mov ebx, dword [ebp - 0x58]
shl ebx, 2
mov dword [ebp - 0x58], ebx
mov ebx, dword [ebx + 0x4a71f0]
add dword [eax], ebx
cmp dword [ebp - 0x68], 0
jle 0x40f658
mov ebx, dword [ecx + 0x4a79f0]
add dword [eax - 0x14], ebx
mov ebx, dword [edi + 0x4a79f0]
add dword [eax - 0x10], ebx
mov ebx, dword [ebp - 0x58]
mov ebx, dword [ebx + 0x4a79f0]
add dword [eax - 0xc], ebx
mov ebx, dword [ebp + 0x2bc]
dec ebx
cmp dword [ebp - 0x68], ebx
je 0x40f682
mov ecx, dword [ecx + 0x4a81f0]
add dword [eax + 4], ecx
mov ecx, dword [edi + 0x4a81f0]
add dword [eax + 8], ecx
mov ecx, dword [ebp - 0x58]
mov ecx, dword [ecx + 0x4a81f0]
add dword [eax + 0xc], ecx
add eax, 0xc
inc dword [ebp - 0x68]
mov ecx, dword [ebp - 0x68]
inc edx
cmp ecx, dword [ebp + 0x2bc]
jl 0x40f526
mov edi, dword [ebp - 0x80]
inc dword [ebp - 0x60]
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp + 0x2c0]
jl 0x40f4bb
push dword [ebp - 0x70]
call fcn.00461ccb
push dword [ebp - 0x6c]
call fcn.00461ccb
push dword [ebp - 0x74]
call fcn.00461ccb
add esp, 0xc
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x7c]
jmp 0x40f6d8
xor eax, eax
pop ebx
pop edi
mov ecx, dword [ebp + 0x2ac]
xor ecx, ebp
pop esi
call fcn.00461b8a
add ebp, 0x2b0
leave
ret