Function at 0x440a70
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x5c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test eax, eax
jne 0x440a90
mov ebx, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], eax
jmp 0x440aea
movdqu xmm0, xmmword [eax]
xor ecx, ecx
movd eax, xmm0
movdqu xmmword [ebp - 0x34], xmm0
mov edx, dword [ebp - 0x30]
test eax, eax
cmovs eax, ecx
test edx, edx
mov dword [ebp - 4], eax
cmovs edx, ecx
mov ecx, dword [esi]
mov dword [ebp - 0xc], edx
cmp eax, ecx
jl 0x440abe
lea eax, [ecx - 1]
mov dword [ebp - 4], eax
mov edi, dword [esi + 4]
cmp edx, edi
jl 0x440acb
lea edx, [edi - 1]
mov dword [ebp - 0xc], edx
mov ebx, dword [ebp - 0x2c]
add eax, ebx
cmp eax, ecx
jl 0x440ad9
mov ebx, ecx
sub ebx, dword [ebp - 4]
mov ecx, dword [ebp - 0x28]
mov dword [ebp + 0xc], ecx
lea eax, [ecx + edx]
cmp eax, edi
jl 0x440aed
mov ecx, edi
sub ecx, edx
mov dword [ebp + 0xc], ecx
movzx edx, word [esi + 0xc]
cmp edx, 1
jne 0x440afb
lea edi, [edx + 1]
jmp 0x440b13
mov edi, edx
and edi, 0x7f0
neg edi
sbb edi, edi
and edi, 0xffffff00
add edi, 0x100
mov eax, 1
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x5c], 0x28
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ecx
mov word [ebp - 0x50], ax
cmp edx, eax
je 0x440b47
test edx, 0x7f0
je 0x440b42
mov ax, word [esi + 0x12]
shl ax, 3
jmp 0x440b47
mov eax, 8
mov word [ebp - 0x4e], ax
movzx eax, ax
imul eax, ebx
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [ebp - 8], eax
imul eax, ecx
mov dword [ebp - 0x14], eax
lea ecx, [eax + 0x28]
lea ecx, [ecx + edi*4]
push ecx
push 0x2002
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x440b89
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
movdqu xmm0, xmmword [ebp - 0x5c]
mov ecx, eax
mov dword [ebp - 0x20], ecx
movdqu xmmword [ecx], xmm0
lea eax, [ecx + 0x28]
movdqu xmm0, xmmword [ebp - 0x4c]
lea eax, [eax + edi*4]
mov dword [ebp - 0x10], eax
lea edx, [ecx + 0x28]
mov eax, dword [ebp - 0x14]
movdqu xmmword [ecx + 0x10], xmm0
mov dword [ebp - 0x1c], edx
movq xmm0, qword [ebp - 0x3c]
movq qword [ecx + 0x20], xmm0
mov dword [ecx + 0x14], eax
movzx eax, word [ecx + 0xe]
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x18], 0
mov dword [ecx + 0x1c], 0
mov dword [ecx + 0x20], edi
mov dword [ecx + 0x24], 0
cmp eax, 1
jne 0x440cb4
mov eax, dword [esi + 8]
imul eax, dword [ebp - 0xc]
add eax, dword [esi + 0x28]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
lea ecx, [eax - 1]
imul ecx, dword [ebp - 8]
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0x14], ecx
test eax, eax
jle 0x440c8e
mov eax, dword [ebp - 4]
add eax, ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
nop
push eax
xor ebx, ebx
mov edi, ecx
push ebx
push ecx
call fcn.00595760
mov eax, dword [ebp - 4]
add esp, 0xc
mov edx, eax
cmp eax, dword [ebp - 0x10]
jge 0x440c72
mov esi, dword [ebp - 0xc]
lea esp, [esp]
mov al, dl
mov cl, 7
and al, 7
sub cl, al
mov eax, edx
sar eax, 3
mov al, byte [eax + esi]
shr al, cl
mov ecx, 7
sub ecx, ebx
and al, 1
shl al, cl
inc ebx
or byte [edi], al
cmp bx, 8
jne 0x440c69
xor ebx, ebx
inc edi
inc edx
cmp edx, dword [ebp - 0x10]
jl 0x440c40
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
add eax, dword [esi + 8]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
sub ecx, eax
dec dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
jne 0x440c20
mov edx, dword [ebp - 0x1c]
push dword [ebp - 0x20]
mov word [edx], 0
mov byte [edx + 2], 0
mov word [edx + 4], 0xffff
mov byte [edx + 6], 0xff
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 8
mov eax, dword [ebp + 0xc]
ja 0x440ddc
mov ecx, dword [esi + 8]
lea edx, [eax - 1]
imul ecx, dword [ebp - 0xc]
imul edx, dword [ebp - 8]
add ecx, dword [esi + 0x28]
add edx, dword [ebp - 0x10]
mov dword [ebp + 8], ecx
mov dword [ebp - 0x14], edx
test eax, eax
jle 0x440d0d
mov edi, eax
movzx eax, word [esi + 0xe]
imul eax, dword [ebp - 4]
push ebx
add eax, ecx
push eax
push edx
call fcn.00592150
mov ecx, dword [ebp + 8]
add esp, 0xc
mov edx, dword [ebp - 0x14]
add ecx, dword [esi + 8]
sub edx, dword [ebp - 8]
mov dword [ebp + 8], ecx
mov dword [ebp - 0x14], edx
dec edi
jne 0x440ce0
mov edi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
lea eax, [edi*4]
push eax
push 0
push ebx
call fcn.00595760
add esp, 0xc
cmp dword [esi + 0x24], 0
je 0x440d81
xor ecx, ecx
test edi, edi
jle 0x440e97
lea edx, [ebx + 2]
jmp 0x440d40
mov eax, dword [esi + 0x24]
lea edx, [edx + 4]
movzx eax, byte [eax + ecx + 0x200]
mov byte [edx - 6], al
mov eax, dword [esi + 0x24]
movzx eax, byte [eax + ecx + 0x100]
mov byte [edx - 5], al
mov eax, dword [esi + 0x24]
movzx eax, byte [ecx + eax]
inc ecx
mov byte [edx - 4], al
cmp ecx, edi
jl 0x440d40
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsx eax, word [esi + 0x20]
xor ebx, ebx
test eax, eax
jle 0x440e97
mov edi, dword [ebp - 0x20]
xor edx, edx
mov dword [ebp + 8], edx
add edi, 0x29
lea ebx, [ebx]
lea ecx, [eax - 1]
inc ebx
mov eax, edx
lea edi, [edi + 4]
cdq
idiv ecx
mov edx, dword [ebp + 8]
mov byte [edi - 3], al
add edx, 0xff
mov byte [edi - 4], al
mov byte [edi - 5], al
movsx eax, word [esi + 0x20]
mov dword [ebp + 8], edx
cmp ebx, eax
jl 0x440da0
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 8]
lea ecx, [eax - 1]
imul edx, dword [ebp - 0xc]
imul ecx, dword [ebp - 8]
add edx, dword [esi + 0x28]
inc ecx
mov dword [ebp + 8], edx
test eax, eax
jle 0x440e97
add ecx, dword [ebp - 0x10]
mov edi, dword [ebp - 4]
mov dword [ebp - 0x10], ecx
movzx eax, word [esi + 0xe]
imul eax, edi
add eax, edx
cmp word [esi + 0x12], 3
jne 0x440e3f
test ebx, ebx
jle 0x440e82
mov edx, ecx
mov edi, ebx
lea ebx, [ebx]
movzx ecx, byte [eax]
lea eax, [eax + 3]
mov byte [edx + 1], cl
lea edx, [edx + 3]
movzx ecx, byte [eax - 2]
mov byte [edx - 3], cl
movzx ecx, byte [eax - 1]
mov byte [edx - 4], cl
dec edi
jne 0x440e20
jmp 0x440e79
test ebx, ebx
jle 0x440e82
mov edx, ecx
mov edi, ebx
jmp 0x440e50
movzx ecx, byte [eax]
mov byte [edx + 1], cl
movzx ecx, byte [eax + 1]
mov byte [edx], cl
movzx ecx, byte [eax + 2]
add eax, 3
mov byte [edx - 1], cl
cmp word [esi + 0xe], 4
jne 0x440e73
mov cl, byte [eax]
inc eax
mov byte [edx + 2], cl
add edx, 4
dec edi
jne 0x440e50
mov edi, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
add edx, dword [esi + 8]
sub ecx, dword [ebp - 8]
dec dword [ebp + 0xc]
mov dword [ebp + 8], edx
mov dword [ebp - 0x10], ecx
jne 0x440e02
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret