Function at 0x4641d0
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x54
mov ecx, dword [esp + 0x68]
mov eax, 0x10
sub eax, ecx
shl eax, 4
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x58]
cmp eax, 3
jl 0x464723
mov eax, dword [esp + 0x5c]
cmp eax, 3
jl 0x464723
test ecx, ecx
je 0x464723
mov edx, dword [esp + 0x60]
push ebx
push ebp
mov ebp, dword [esp + 0x6c]
lea ecx, [eax + eax*2]
push esi
mov esi, ecx
mov ecx, edx
sub ecx, esi
mov esi, ebp
lea ebx, [eax + eax - 4]
push edi
add ebp, edx
push ebx
mov dword [esp + 0x34], ecx
mov edi, ebp
call fcn.004dc5c3
push ebx
mov dword [esp + 0x54], eax
call fcn.004dc5c3
push ebx
mov dword [esp + 0x5c], eax
call fcn.004dc5c3
push ebx
mov dword [esp + 0x64], eax
call fcn.004dc5c3
push ebx
mov dword [esp + 0x6c], eax
call fcn.004dc5c3
push ebx
mov dword [esp + 0x74], eax
call fcn.004dc5c3
push ebx
mov dword [esp + 0x7c], eax
call fcn.004dc5c3
push ebx
mov dword [esp + 0x60], eax
call fcn.004dc5c3
push ebx
mov dword [esp + 0x68], eax
call fcn.004dc5c3
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x6c], eax
add esp, 0x24
or eax, 0xffffffff
test ecx, ecx
mov dword [esp + 0x34], 0
jle 0x4646c2
jmp 0x4642a7
mov eax, dword [esp + 0x74]
inc eax
mov ecx, 3
cdq
idiv ecx
movzx cx, byte [esi]
mov dword [esp + 0x74], edx
mov eax, dword [esp + edx*4 + 0x4c]
mov edx, dword [esp + edx*4 + 0x58]
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], eax
movzx ax, byte [esi + 3]
add ecx, eax
inc esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x2c], ecx
movzx dx, byte [esi + 3]
movzx cx, byte [esi]
movzx bx, byte [esi + 1]
add ecx, edx
inc esi
mov dword [esp + 0x10], edx
movzx dx, byte [esi + 3]
add ebx, edx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x6c]
add esi, 4
cmp edx, 2
mov dword [esp + 0x28], ebx
jle 0x4643c4
mov edx, dword [esp + 0x74]
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + edx*4 + 0x40]
mov dword [esp + 0x18], edx
mov edx, ebx
sub edx, dword [esp + 0x38]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x6c]
add edx, 0xfffffffe
mov dword [esp + 0x24], edx
movzx dx, byte [esi]
mov ebx, dword [esp + 0x18]
add eax, edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x2c], eax
add edx, eax
inc esi
mov word [ebx], dx
mov edx, dword [esp + 0x10]
movzx ax, byte [esi - 1]
movzx bx, byte [esi]
add edx, ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x10], edx
add edx, ecx
mov ecx, dword [esp + 0x38]
mov word [ecx + ebx], dx
mov ebx, dword [esp + 0x18]
movzx dx, byte [esi]
mov ecx, dword [esp + 0x10]
add ebx, 2
inc esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x14]
movzx bx, byte [esi]
add edx, ebx
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x14], edx
add ebx, edx
mov edx, dword [esp + 0x1c]
mov word [edx], bx
add edx, 2
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x28], edx
movzx dx, byte [esi]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x24]
inc esi
dec edx
mov dword [esp + 0x24], edx
jne 0x464331
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
add esi, ecx
cmp eax, 1
jle 0x4646ad
mov ebx, dword [esp + 0x74]
mov ecx, 3
add edi, 3
add ebp, 3
lea eax, [ebx + 1]
cdq
idiv ecx
lea eax, [ebx + 2]
mov ebx, 3
shl edx, 2
mov dword [esp + 0x14], edx
mov ecx, dword [esp + edx + 0x4c]
cdq
idiv ebx
mov ebx, dword [esp + 0x78]
shl edx, 2
cmp ebx, 0x10
mov ebx, dword [esp + 0x6c]
mov eax, dword [esp + edx + 0x58]
je 0x464580
cmp ebx, 2
jle 0x4646a2
mov ebx, dword [esp + 0x20]
sub eax, ecx
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x24], eax
mov ebx, dword [esp + ebx + 0x58]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x14]
mov ebx, dword [esp + ebx + 0x40]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x74]
mov ebx, dword [esp + ebx*4 + 0x40]
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + edx + 0x40]
mov edx, dword [esp + edx + 0x4c]
mov dword [esp + 0x1c], ebx
sub edx, ecx
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x74]
mov eax, dword [esp + edx*4 + 0x4c]
sub eax, ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x6c]
add eax, 0xfffffffe
mov dword [esp + 0x38], eax
mov edx, dword [esp + 0x1c]
add ecx, 2
movsx eax, word [edx]
mov edx, dword [esp + 0x14]
movsx edx, word [edx]
lea eax, [edx + eax*2]
mov edx, dword [esp + 0x18]
movsx edx, word [edx]
add eax, edx
xor edx, edx
mov dl, byte [ebp]
imul eax, dword [esp + 0x78]
imul edx, ebx
add eax, edx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x24]
inc edi
inc ebp
movsx edx, word [eax + ecx - 2]
mov eax, dword [esp + 0x20]
movsx eax, word [eax]
lea eax, [eax + edx*2]
mov edx, dword [esp + 0x10]
movsx edx, word [edx]
add eax, edx
xor edx, edx
mov dl, byte [ebp]
imul eax, dword [esp + 0x78]
imul edx, ebx
add eax, edx
cdq
and edx, 0xff
add eax, edx
mov edx, dword [esp + 0x1c]
sar eax, 8
mov byte [edi], al
mov eax, 2
add edx, eax
inc edi
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x18]
add edx, eax
inc ebp
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x14]
add edx, eax
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x10]
add edx, eax
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x20]
add edx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], edx
movsx edx, word [eax + ecx - 2]
mov eax, dword [esp + 0x2c]
movsx eax, word [eax + ecx - 2]
lea eax, [eax + edx*2]
movsx edx, word [ecx - 2]
add eax, edx
xor edx, edx
mov dl, byte [ebp]
imul eax, dword [esp + 0x78]
imul edx, ebx
add eax, edx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x38]
inc edi
inc ebp
dec eax
mov dword [esp + 0x38], eax
jne 0x464484
jmp 0x4646a2
cmp ebx, 2
jle 0x464694
mov ebx, dword [esp + 0x20]
sub eax, ecx
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x74]
mov ebx, dword [esp + ebx + 0x58]
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + eax*4 + 0x4c]
mov ebx, dword [esp + ebx + 0x40]
sub eax, ecx
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x74]
mov dword [esp + 0x2c], eax
mov ebx, dword [esp + ebx*4 + 0x40]
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + edx + 0x40]
mov edx, dword [esp + edx + 0x4c]
sub edx, ecx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x6c]
add edx, 0xfffffffe
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x1c]
add ecx, 2
movsx eax, word [ebx]
movsx edx, word [edx]
lea eax, [edx + eax*2]
mov edx, dword [esp + 0x20]
movsx edx, word [edx]
add eax, edx
cdq
and edx, 0xf
add eax, edx
sar eax, 4
mov byte [edi], al
mov eax, dword [esp + 0x24]
inc edi
movsx edx, word [eax + ecx - 2]
mov eax, dword [esp + 0x10]
movsx eax, word [eax]
lea eax, [eax + edx*2]
mov edx, dword [esp + 0x18]
movsx edx, word [edx]
add eax, edx
cdq
and edx, 0xf
add eax, edx
mov edx, dword [esp + 0x20]
sar eax, 4
mov byte [edi], al
mov eax, 2
add edx, eax
add ebx, eax
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x1c]
add edx, eax
inc edi
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x18]
add edx, eax
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
add edx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], edx
movsx edx, word [eax + ecx - 2]
mov eax, dword [esp + 0x2c]
movsx eax, word [eax + ecx - 2]
lea eax, [eax + edx*2]
movsx edx, word [ecx - 2]
add eax, edx
cdq
and edx, 0xf
add eax, edx
sar eax, 4
mov byte [edi], al
mov eax, dword [esp + 0x38]
inc edi
dec eax
mov dword [esp + 0x38], eax
jne 0x4645e2
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x30]
sub eax, ecx
lea ebp, [eax + ebp - 6]
mov ecx, dword [esp + 0x30]
lea eax, [ecx + 3]
add ebp, eax
add edi, eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x68]
inc eax
cmp eax, ecx
mov dword [esp + 0x34], eax
jl 0x4642a3
mov edx, dword [esp + 0x4c]
push edx
call fcn.004dc5ec
mov eax, dword [esp + 0x54]
push eax
call fcn.004dc5ec
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.004dc5ec
mov edx, dword [esp + 0x64]
push edx
call fcn.004dc5ec
mov eax, dword [esp + 0x6c]
push eax
call fcn.004dc5ec
mov ecx, dword [esp + 0x74]
push ecx
call fcn.004dc5ec
mov edx, dword [esp + 0x58]
push edx
call fcn.004dc5ec
mov eax, dword [esp + 0x60]
push eax
call fcn.004dc5ec
mov ecx, dword [esp + 0x68]
push ecx
call fcn.004dc5ec
add esp, 0x24
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret