Function at 0x466825
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.00465fe5
mov edx, dword [edi]
mov ebx, dword [edx + 8]
mov dword [esp + 0x14], ebx
test eax, eax
jne 0x46685d
push ebp
mov edx, ebx
mov ecx, edi
call fcn.004658b9
jmp 0x466ce7
xor eax, eax
push 3
pop edx
inc eax
cmp ebx, edx
jne 0x466889
cmp dword [edi + 0x47ec], edx
je 0x46687f
cmp dword [edi + 0x47e8], ebp
jne 0x466889
cmp dword [edi + 0x47e4], ebp
jne 0x466889
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ebx
jmp 0x466891
mov dword [esp + 0x18], ebp
test ebx, ebx
jle 0x46684e
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 0x466cc7
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 0x46692f
cmp ebp, ecx
jne 0x466923
mov eax, 0x466100
jmp 0x466951
cmp ebp, 2
jne 0x46694c
mov eax, 0x466110
jmp 0x466951
cmp eax, 2
jne 0x46694c
cmp ebp, ecx
jne 0x46693f
mov eax, 0x466150
jmp 0x466951
cmp ebp, 2
jne 0x46694c
mov eax, dword [edi + 0x4814]
jmp 0x466951
mov eax, 0x466450
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 0x4668ab
mov edx, dword [edi]
push ecx
push dword [edx + 4]
mov edx, dword [edx]
push 4
pop ecx
call fcn.00461dab
mov edx, dword [edi]
mov esi, eax
mov dword [esp + 0x48], esi
pop ecx
pop ecx
test esi, esi
je 0x466cc9
xor ecx, ecx
mov dword [esp + 0x10], ecx
cmp dword [edx + 4], ecx
jbe 0x466c90
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 0x466a82
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 0x4669f7
mov eax, dword [edx]
mov edx, ecx
mov dword [esp + 0x20], ecx
jmp 0x466a07
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 [0x4735d8]
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 0x466a59
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 0x466a59
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 0x4669ce
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 0x466afb
cmp dword [esp + 0x18], 0
je 0x466ad2
xor esi, esi
cmp dword [edx], esi
jbe 0x466c7c
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 0x466aae
jmp 0x466c74
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 [0x4735d8]
call esi
add esp, 0x18
jmp 0x466c78
cmp dword [edx + 8], 4
jne 0x466c4e
mov eax, dword [edi + 0x47e8]
test eax, eax
jne 0x466bac
and dword [esp + 0x24], eax
cmp dword [edx], eax
jbe 0x466c7c
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 0x466b40
jmp 0x466c74
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 0x466aeb
call dword [0x4735d8]
call esi
mov eax, dword [edi]
xor esi, esi
add esp, 0x18
cmp dword [eax], esi
jbe 0x466c78
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 0x466bed
jmp 0x466c74
xor esi, esi
cmp dword [edx], esi
jbe 0x466c7c
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 0x466c5b
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 0x4669a7
mov edx, dword [edx + 8]
mov ecx, edi
push 0
call fcn.004658b9
mov eax, dword [edi]
pop ecx
push 3
pop ecx
mov eax, dword [eax]
mov dword [0x5657bc], eax
mov eax, dword [edi]
push 1
mov eax, dword [eax + 4]
mov dword [0x5657b4], eax
mov eax, dword [edi]
cmp dword [eax + 8], ecx
pop eax
cmovge eax, ecx
mov dword [0x5657c0], eax
mov eax, esi
jmp 0x466cea
mov edx, dword [edi]
mov edx, dword [edx + 8]
mov ecx, edi
push 0
call fcn.004658b9
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