Function at 0x4665e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x57d040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xc8], edx
xor edx, edx
push edi
mov dword [ebp - 0xc4], esi
mov eax, dword [esi]
mov dword [eax + 8], 0
mov dword [esi + 0x46cc], 0
mov dword [esi + 0x46d0], 0
mov dword [esi + 0x4714], 0
mov dword [esi + 0x4718], 0
mov dword [esi + 0x475c], 0
mov dword [esi + 0x4760], 0
mov dword [esi + 0x47a4], 0
mov dword [esi + 0x47a8], 0
mov dword [esi + 0x4804], 0
call fcn.004659c0
test eax, eax
je 0x4667e1
mov ecx, esi
call fcn.00463760
movzx ecx, al
cmp ecx, 0xd9
je 0x46674b
cmp ecx, 0xda
jne 0x4666e7
mov ecx, esi
call fcn.00464cc0
test eax, eax
je 0x4667e1
mov ecx, esi
call fcn.00463890
test eax, eax
je 0x4667e1
cmp byte [esi + 0x47c4], 0xff
jne 0x4666d0
mov ecx, esi
call fcn.00465ae0
mov byte [esi + 0x47c4], al
mov ecx, esi
call fcn.00463760
movzx ecx, al
lea eax, [ecx - 0xd0]
cmp eax, 7
ja 0x46673f
jmp 0x466735
cmp ecx, 0xdc
jne 0x466728
mov ecx, dword [esi]
call fcn.00460d40
mov ecx, dword [esi]
mov edi, eax
call fcn.00460d40
cmp edi, 4
jne 0x4667cf
mov ecx, dword [esi]
cmp eax, dword [ecx + 4]
je 0x466735
mov eax, dword fs:[0x2c]
mov edx, ecx
mov eax, dword [eax]
mov dword [eax + 0x10], str.bad_DNL_height
jmp 0x4667e3
mov edx, ecx
mov ecx, esi
call fcn.00464250
test eax, eax
je 0x46675b
mov ecx, esi
call fcn.00463760
movzx ecx, al
cmp ecx, 0xd9
jne 0x466694
cmp dword [esi + 0x47cc], 0
je 0x46675b
mov ecx, esi
call fcn.004640d0
mov edi, dword [esi]
mov edi, dword [edi + 8]
mov dword [ebp - 0x8c], edi
cmp edi, 3
jne 0x466804
cmp dword [esi + 0x47ec], edi
je 0x46678d
cmp dword [esi + 0x47e8], 0
jne 0x466804
cmp dword [esi + 0x47e4], 0
jne 0x466804
mov dword [ebp - 0xac], 1
mov dword [ebp - 0x8c], edi
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea edi, [esi + 0x46a0]
xorps xmm0, xmm0
mov dword [ebp - 0x98], 0
push ebx
movups xmmword [ebp - 0xa8], xmm0
lea ebx, [ebp - 0x74]
mov dword [ebp - 0x88], edi
mov dword [ebp - 0xb0], ecx
jmp 0x466838
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0x10], str.bad_DNL_len
mov edx, dword [esi]
mov edx, dword [edx + 8]
mov ecx, esi
push 0
call fcn.00465190
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00492c21
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0xac], 0
test edi, edi
jg 0x46679d
push 0
mov edx, edi
mov ecx, esi
call fcn.00465190
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00492c21
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x88]
mov eax, dword [esi]
mov eax, dword [eax]
add eax, 3
push eax
call ecx
add esp, 4
mov dword [edi + 0x34], eax
test eax, eax
je 0x466db3
mov eax, dword [esi + 0x4684]
cdq
idiv dword [edi]
mov dword [ebx + 0xc], 0
mov dword [ebp - 0x94], eax
mov dword [ebx - 4], eax
mov eax, dword [esi + 0x4688]
cdq
idiv dword [edi + 4]
xor edx, edx
mov edi, eax
mov eax, dword [ebp - 0x94]
mov ecx, edi
mov dword [ebx], edi
sar ecx, 1
dec eax
mov dword [ebx + 8], ecx
mov ecx, dword [esi]
add eax, dword [ecx]
div dword [ebp - 0x94]
mov ecx, dword [ebp - 0x88]
mov dword [ebx + 4], eax
mov eax, dword [ecx + 0x28]
mov dword [ebx - 8], eax
mov dword [ebx - 0xc], eax
mov eax, dword [ebp - 0x94]
cmp eax, 1
jne 0x4668c5
cmp edi, eax
jne 0x4668b9
mov eax, 0x465c80
jmp 0x4668e8
cmp edi, 2
jne 0x4668e3
mov eax, 0x465c90
jmp 0x4668e8
cmp eax, 2
jne 0x4668e3
cmp edi, 1
jne 0x4668d6
mov eax, 0x465eb0
jmp 0x4668e8
cmp edi, 2
jne 0x4668e3
mov eax, dword [esi + 0x4814]
jmp 0x4668e8
mov eax, 0x4661d0
mov edi, dword [ebp - 0x8c]
add ecx, 0x48
mov dword [ebx - 0x10], eax
add ebx, 0x20
mov eax, dword [ebp - 0x98]
inc eax
mov dword [ebp - 0x88], ecx
mov ecx, dword [ebp - 0xb0]
mov dword [ebp - 0x98], eax
cmp eax, edi
jl 0x466832
mov eax, dword [esi]
mov ecx, dword [eax]
mov ebx, dword [eax + 4]
test ecx, ecx
js 0x466db3
je 0x466949
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x466db3
lea eax, [ecx*4]
test eax, eax
js 0x466db3
test ebx, ebx
js 0x466db3
je 0x46696a
mov eax, 0x7fffffff
cdq
idiv ebx
lea edx, [ecx*4]
cmp edx, eax
jg 0x466db3
imul ecx, ebx
lea eax, [ecx*4 + 1]
push eax
call dword [ebp - 0xb0]
mov edx, dword [esi]
mov ecx, eax
add esp, 4
mov dword [ebp - 0x88], ecx
test ecx, ecx
je 0x466db5
cmp dword [edx + 4], 0
mov dword [ebp - 0x98], 0
jbe 0x466d74
mov ebx, dword [ebp - 0xa8]
mov dword [ebp - 0x88], ecx
jmp 0x4669c6
mov ecx, dword [ebp - 0x88]
mov eax, dword [edx]
imul eax, dword [ebp - 0x98]
mov dword [ebp - 0xb4], 0
lea edx, [ecx + eax*4]
mov dword [ebp - 0x94], edx
test edi, edi
jle 0x466b02
lea ebx, [esi + 0x46bc]
mov esi, dword [ebp - 0x8c]
lea edi, [ebp - 0x6c]
jmp 0x466a06
mov ecx, dword [ebp - 0x88]
mov eax, dword [ebp - 0xac]
lea edx, [edi - 0x14]
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xac], eax
mov eax, dword [edi - 8]
mov dword [ebp - 0xb8], ecx
mov dword [ebp - 0x88], ecx
lea ecx, [edi - 0x10]
sar eax, 1
mov dword [ebp - 0x90], esi
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0x8c], edx
cmp dword [edi], eax
jl 0x466a69
mov eax, dword [edx]
mov edx, ecx
mov dword [ebp - 0xb0], ecx
mov ecx, dword [ebp - 0xb8]
mov dword [ebp - 0x88], ecx
mov ecx, dword [ebp - 0xbc]
mov dword [ebp - 0xac], ecx
jmp 0x466a7f
mov eax, ecx
mov dword [ebp - 0x8c], edx
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xc0], eax
mov eax, dword [ecx]
push dword [edi - 0xc]
push dword [edi - 4]
push eax
push dword [edx]
push dword [ebx + 0x18]
call dword [edi - 0x18]
mov ecx, dword [ebp - 0xb4]
add esp, 0x14
mov dword [ebp + ecx*4 - 0xa8], eax
mov eax, dword [edi]
inc eax
mov dword [edi], eax
cmp eax, dword [edi - 8]
jl 0x466ad5
mov edx, dword [ebp - 0xb0]
mov eax, dword [ebp - 0x8c]
inc dword [edi + 4]
mov dword [edi], 0
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [edi + 4]
cmp eax, dword [ebx]
jge 0x466ad5
mov eax, dword [ebx + 4]
add eax, edx
mov edx, dword [ebp - 0xc0]
mov dword [edx], eax
inc ecx
add edi, 0x20
add ebx, 0x48
mov dword [ebp - 0xb4], ecx
cmp ecx, esi
jl 0x466a00
mov ebx, dword [ebp - 0xa8]
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0x8c], esi
mov esi, dword [ebp - 0xc4]
mov eax, dword [esi]
mov ecx, dword [eax + 8]
cmp ecx, 3
jne 0x466b93
cmp dword [ebp - 0xac], 0
je 0x466b71
xor edi, edi
cmp dword [eax], edi
jbe 0x466d56
mov eax, dword [ebp - 0xa0]
lea ecx, [edx + 2]
mov edx, dword [ebp - 0xa4]
mov dword [ebp - 0x90], ebx
sub ebx, edx
sub eax, edx
mov dword [ebp - 0x90], eax
mov al, byte [ebx + edx]
lea ecx, [ecx + 4]
mov byte [ecx - 6], al
lea edx, [edx + 1]
mov al, byte [edx - 1]
inc edi
mov byte [ecx - 5], al
mov eax, dword [ebp - 0x90]
mov al, byte [eax + edx - 1]
mov byte [ecx - 4], al
mov byte [ecx - 3], 0xff
mov eax, dword [esi]
cmp edi, dword [eax]
jb 0x466b42
jmp 0x466d50
push 4
push dword [eax]
mov eax, dword [esi + 0x4810]
push dword [ebp - 0xa0]
push dword [ebp - 0xa4]
push ebx
push edx
call eax
add esp, 0x18
jmp 0x466d56
cmp ecx, 4
jne 0x466d1e
mov ecx, dword [esi + 0x47e8]
test ecx, ecx
jne 0x466c6e
mov dword [ebp - 0xb4], ecx
cmp dword [eax], ecx
jbe 0x466d56
mov edi, dword [ebp - 0x9c]
lea ebx, [edx + 2]
mov ecx, dword [ebp - 0xa4]
mov eax, dword [ebp - 0xa8]
sub ecx, edi
mov dword [ebp - 0x90], ecx
sub eax, edi
mov ecx, dword [ebp - 0xa0]
sub ecx, edi
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xbc], ecx
nop dword [eax + eax]
movzx ecx, byte [eax + edi]
lea ebx, [ebx + 4]
movzx edx, byte [edi]
lea edi, [edi + 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebx - 6], al
mov eax, dword [ebp - 0x90]
movzx ecx, byte [eax + edi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebx - 5], al
mov eax, dword [ebp - 0xbc]
movzx ecx, byte [eax + edi - 1]
imul ecx, edx
mov byte [ebx - 3], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xb4]
shr eax, 8
inc ecx
mov byte [ebx - 4], al
mov eax, dword [esi]
mov dword [ebp - 0xb4], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xb8]
jb 0x466bf0
jmp 0x466d50
mov eax, dword [eax]
mov edi, dword [ebp - 0x94]
mov edx, dword [esi + 0x4810]
push 4
push eax
push dword [ebp - 0xa0]
push dword [ebp - 0xa4]
push dword [ebp - 0xa8]
push edi
cmp ecx, 2
jne 0x466d17
call edx
mov eax, dword [esi]
xor ebx, ebx
add esp, 0x18
cmp dword [eax], ebx
jbe 0x466d50
add edi, 2
nop
mov eax, dword [ebp - 0x9c]
lea edi, [edi + 4]
movzx edx, byte [ebx + eax]
inc ebx
mov al, byte [edi - 6]
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 [edi - 6], al
mov al, byte [edi - 5]
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 [edi - 5], al
mov al, byte [edi - 4]
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 [edi - 4], al
mov eax, dword [esi]
cmp ebx, dword [eax]
jb 0x466cb0
jmp 0x466d50
call edx
add esp, 0x18
jmp 0x466d50
xor edx, edx
cmp dword [eax], edx
jbe 0x466d56
mov ecx, dword [ebp - 0x94]
inc ecx
nop dword [eax + eax]
mov eax, dword [ebp - 0xa8]
lea ecx, [ecx + 4]
mov al, byte [edx + eax]
inc edx
mov byte [ecx - 3], al
mov byte [ecx - 4], al
mov byte [ecx - 5], al
mov byte [ecx - 2], 0xff
mov eax, dword [esi]
cmp edx, dword [eax]
jb 0x466d30
mov ebx, dword [ebp - 0xa8]
mov eax, dword [ebp - 0x98]
mov edx, dword [esi]
inc eax
mov edi, dword [ebp - 0x8c]
mov dword [ebp - 0x98], eax
cmp eax, dword [edx + 4]
jb 0x4669c0
mov edx, dword [edx + 8]
mov ecx, esi
push 0
call fcn.00465190
mov ecx, dword [esi]
add esp, 4
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ecx]
mov dword [eax], ecx
mov ecx, dword [esi]
mov eax, dword [ebp - 0xcc]
pop ebx
pop edi
mov ecx, dword [ecx + 4]
mov dword [eax], ecx
mov eax, dword [ebp - 0x88]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00492c21
mov esp, ebp
pop ebp
ret
mov edx, dword [esi]
mov edx, dword [edx + 8]
mov ecx, esi
push 0
call fcn.00465190
mov eax, dword fs:[0x2c]
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, dword [eax]
pop ebx
pop edi
pop esi
mov dword [eax + 0x10], str.outofmem
xor eax, eax
call fcn.00492c21
mov esp, ebp
pop ebp
ret