Function at 0x465e15
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xb8
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebp, ebp
mov dword [esp + 0x44], edi
mov eax, dword [edi]
mov dword [eax + 8], ebp
call fcn.004655d5
mov edx, dword [edi]
mov ebx, dword [edx + 8]
mov dword [esp + 0x14], ebx
test eax, eax
jne 0x465e4d
push ebp
mov edx, ebx
mov ecx, edi
call fcn.00464ea9
jmp 0x4662d7
xor eax, eax
push 3
pop edx
inc eax
cmp ebx, edx
jne 0x465e79
cmp dword [edi + 0x47ec], edx
je 0x465e6f
cmp dword [edi + 0x47e8], ebp
jne 0x465e79
cmp dword [edi + 0x47e4], ebp
jne 0x465e79
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ebx
jmp 0x465e81
mov dword [esp + 0x18], ebp
test ebx, ebx
jle 0x465e3e
mov dword [esp + 0x20], ebp
lea esi, [esp + 0x58]
xorps xmm0, xmm0
lea ebp, [edi + 0x46a0]
movups xmmword [esp + 0x30], xmm0
mov dword [esp + 0x1c], ebp
mov eax, dword [edi]
mov eax, dword [eax]
add eax, edx
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov dword [ebp + 0x34], eax
pop ecx
test eax, eax
je 0x4662b7
mov eax, dword [edi + 0x4684]
cdq
idiv dword [ebp]
and dword [esi + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esi - 4], eax
mov eax, dword [edi + 0x4688]
cdq
idiv dword [ebp + 4]
xor edx, edx
mov ebp, eax
mov eax, dword [esp + 0x10]
mov ecx, ebp
mov dword [esi], ebp
sar ecx, 1
dec eax
mov dword [esi + 8], ecx
mov ecx, dword [edi]
add eax, dword [ecx]
xor ecx, ecx
div dword [esp + 0x10]
inc ecx
mov dword [esi + 4], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x28]
mov dword [esi - 8], eax
mov dword [esi - 0xc], eax
mov eax, dword [esp + 0x10]
cmp eax, ecx
jne 0x465f1f
cmp ebp, ecx
jne 0x465f13
mov eax, 0x4656f0
jmp 0x465f41
cmp ebp, 2
jne 0x465f3c
mov eax, 0x465700
jmp 0x465f41
cmp eax, 2
jne 0x465f3c
cmp ebp, ecx
jne 0x465f2f
mov eax, 0x465740
jmp 0x465f41
cmp ebp, 2
jne 0x465f3c
mov eax, dword [edi + 0x4814]
jmp 0x465f41
mov eax, 0x465a40
mov ebp, dword [esp + 0x1c]
mov dword [esi - 0x10], eax
add ebp, 0x48
mov eax, dword [esp + 0x20]
add esi, 0x20
inc eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], eax
push 3
pop edx
cmp eax, ebx
jl 0x465e9b
mov edx, dword [edi]
push ecx
push dword [edx + 4]
mov edx, dword [edx]
push 4
pop ecx
call fcn.0046139b
mov edx, dword [edi]
mov esi, eax
mov dword [esp + 0x48], esi
pop ecx
pop ecx
test esi, esi
je 0x4662b9
xor ecx, ecx
mov dword [esp + 0x10], ecx
cmp dword [edx + 4], ecx
jbe 0x466280
mov eax, dword [edx]
and dword [esp + 0x24], 0
imul eax, ecx
lea ebp, [esi + eax*4]
mov dword [esp + 0x2c], ebp
test ebx, ebx
jle 0x466072
lea ebp, [edi + 0x46bc]
mov edi, dword [esp + 0x18]
lea esi, [esp + 0x60]
mov eax, dword [esi - 8]
lea ecx, [esi - 0x10]
sar eax, 1
lea edx, [esi - 0x14]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
cmp dword [esi], eax
jl 0x465fe7
mov eax, dword [edx]
mov edx, ecx
mov dword [esp + 0x20], ecx
jmp 0x465ff7
mov eax, ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], eax
mov eax, dword [ecx]
push dword [esi - 0xc]
mov ecx, dword [esi - 0x18]
push dword [esi - 4]
push eax
push dword [edx]
push dword [ebp + 0x18]
call dword [0x4725ac]
call dword [esi - 0x18]
mov ecx, dword [esp + 0x38]
add esp, 0x14
mov dword [esp + ecx*4 + 0x30], eax
mov eax, dword [esi]
inc eax
mov dword [esi], eax
cmp eax, dword [esi - 8]
jl 0x466049
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
and dword [esi], 0
inc dword [esi + 4]
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [esi + 4]
cmp eax, dword [ebp]
jge 0x466049
mov eax, dword [ebp + 4]
add eax, edx
mov edx, dword [esp + 0x18]
mov dword [edx], eax
inc ecx
add esi, 0x20
add ebp, 0x48
mov dword [esp + 0x24], ecx
cmp ecx, ebx
jl 0x465fbe
mov ebp, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x44]
mov dword [esp + 0x14], ebx
mov edx, dword [edi]
cmp dword [edx + 8], 3
jne 0x4660eb
cmp dword [esp + 0x18], 0
je 0x4660c2
xor esi, esi
cmp dword [edx], esi
jbe 0x46626c
mov ecx, dword [esp + 0x34]
lea edx, [ebp + 2]
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
sub ebp, ecx
sub eax, ecx
mov ebx, eax
mov al, byte [ecx + ebp]
inc esi
mov byte [edx - 2], al
mov al, byte [ecx]
mov byte [edx - 1], al
mov al, byte [ecx + ebx]
inc ecx
mov byte [edx], al
lea edx, [edx + 4]
mov byte [edx - 3], 0xff
mov eax, dword [edi]
cmp esi, dword [eax]
jb 0x46609e
jmp 0x466264
mov esi, dword [edi + 0x4810]
mov ecx, esi
push 4
push dword [edx]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push ebp
call dword [0x4725ac]
call esi
add esp, 0x18
jmp 0x466268
cmp dword [edx + 8], 4
jne 0x46623e
mov eax, dword [edi + 0x47e8]
test eax, eax
jne 0x46619c
and dword [esp + 0x24], eax
cmp dword [edx], eax
jbe 0x46626c
mov esi, dword [esp + 0x3c]
add ebp, 2
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x30]
sub eax, esi
mov dword [esp + 0x2c], eax
sub ebx, esi
mov eax, dword [esp + 0x38]
sub eax, esi
mov dword [esp + 0x28], eax
movzx edx, byte [esi]
movzx ecx, byte [esi + ebx]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebp - 2], al
mov eax, dword [esp + 0x2c]
movzx ecx, byte [esi + eax]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebp - 1], al
mov eax, dword [esp + 0x28]
movzx ecx, byte [esi + eax]
imul ecx, edx
mov byte [ebp + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [esp + 0x24]
shr eax, 8
inc ecx
mov byte [ebp], al
inc esi
mov eax, dword [edi]
lea ebp, [ebp + 4]
mov dword [esp + 0x24], ecx
cmp ecx, dword [eax]
jb 0x466130
jmp 0x466264
mov ecx, dword [edx]
mov esi, dword [edi + 0x4810]
push 4
push ecx
mov ecx, esi
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push ebp
cmp eax, 2
jne 0x4660db
call dword [0x4725ac]
call esi
mov eax, dword [edi]
xor esi, esi
add esp, 0x18
cmp dword [eax], esi
jbe 0x466268
mov ebx, dword [esp + 0x3c]
add ebp, 2
mov al, byte [ebp - 2]
movzx edx, byte [esi + ebx]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebp - 2], al
mov al, byte [ebp - 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebp - 1], al
mov al, byte [ebp]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
inc esi
mov byte [ebp], al
lea ebp, [ebp + 4]
mov eax, dword [edi]
cmp esi, dword [eax]
jb 0x4661dd
jmp 0x466264
xor esi, esi
cmp dword [edx], esi
jbe 0x46626c
mov ebx, dword [esp + 0x30]
lea ecx, [ebp + 1]
mov al, byte [esi + ebx]
inc esi
mov byte [ecx + 1], al
mov byte [ecx], al
lea ecx, [ecx + 4]
mov byte [ecx - 5], al
mov byte [ecx - 2], 0xff
mov eax, dword [edi]
cmp esi, dword [eax]
jb 0x46624b
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [edi]
inc ecx
mov esi, dword [esp + 0x40]
mov dword [esp + 0x10], ecx
cmp ecx, dword [edx + 4]
jb 0x465f97
mov edx, dword [edx + 8]
mov ecx, edi
push 0
call fcn.00464ea9
mov eax, dword [edi]
pop ecx
push 3
pop ecx
mov eax, dword [eax]
mov dword [0x5077bc], eax
mov eax, dword [edi]
push 1
mov eax, dword [eax + 4]
mov dword [0x5077b4], eax
mov eax, dword [edi]
cmp dword [eax + 8], ecx
pop eax
cmovge eax, ecx
mov dword [0x5077c0], eax
mov eax, esi
jmp 0x4662da
mov edx, dword [edi]
mov edx, dword [edx + 8]
mov ecx, edi
push 0
call fcn.00464ea9
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.outofmem
xor eax, eax
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb8
ret