Function at 0x4a5350
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd0
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x48], edx
push edi
xor edx, edx
mov dword [ebp - 0x44], 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.004a4740
test eax, eax
je 0x4a55c0
mov ecx, esi
call fcn.004a25e0
movzx ecx, al
cmp ecx, 0xd9
je 0x4a54ba
nop dword [eax]
cmp ecx, 0xda
jne 0x4a5443
mov ecx, esi
call fcn.004a3a60
test eax, eax
je 0x4a55c0
mov ecx, esi
call fcn.004a2710
test eax, eax
je 0x4a55c0
cmp byte [esi + 0x47c4], 0xff
jne 0x4a542c
mov ecx, esi
call fcn.004a4860
mov byte [esi + 0x47c4], al
mov ecx, esi
call fcn.004a25e0
movzx ecx, al
lea eax, [ecx - 0xd0]
cmp eax, 7
ja 0x4a54ae
jmp 0x4a54a4
cmp ecx, 0xdc
jne 0x4a5497
mov ecx, dword [esi]
call fcn.0049f950
mov ecx, dword [esi]
mov edi, eax
call fcn.0049f950
cmp edi, 4
jne 0x4a55ae
mov ecx, dword [esi]
cmp eax, dword [ecx + 4]
je 0x4a54a4
mov eax, dword fs:[0x2c]
mov edx, ecx
push 0
mov ecx, esi
mov eax, dword [eax]
mov edx, dword [edx + 8]
mov dword [eax + 0xc], str.bad_DNL_height
call fcn.004a3f30
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, ecx
mov ecx, esi
call fcn.004a3090
test eax, eax
je 0x4a54ca
mov ecx, esi
call fcn.004a25e0
movzx ecx, al
cmp ecx, 0xd9
jne 0x4a53f0
cmp dword [esi + 0x47cc], 0
je 0x4a54ca
mov ecx, esi
call fcn.004a2f10
mov ebx, dword [esi]
mov ebx, dword [ebx + 8]
mov dword [ebp - 0xc], ebx
cmp ebx, 3
jne 0x4a55da
cmp dword [esi + 0x47ec], ebx
je 0x4a54fd
cmp dword [esi + 0x47e8], 0
jne 0x4a55da
cmp dword [esi + 0x47e4], 0
jne 0x4a55da
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0xc], ebx
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea edi, [ebp - 0xc0]
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
lea edx, [esi + 0x46a0]
mov dword [ebp - 8], edi
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x24], ecx
mov eax, dword [esi]
mov eax, dword [eax]
add eax, 3
push eax
call ecx
mov ecx, dword [ebp - 0x10]
add esp, 4
mov dword [ecx + 0x34], eax
test eax, eax
je 0x4a59f5
mov eax, dword [esi + 0x4684]
cdq
idiv dword [ecx]
mov dword [edi], eax
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x4688]
cdq
idiv dword [ecx + 4]
mov edx, dword [ebp - 8]
mov edi, eax
mov eax, dword [ebp - 0x18]
mov ecx, edi
dec eax
sar ecx, 1
mov dword [edx + 0xc], ecx
mov ecx, dword [esi]
mov dword [edx + 4], edi
xor edx, edx
add eax, dword [ecx]
div dword [ebp - 0x18]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov dword [ecx + 8], eax
mov eax, dword [edx + 0x28]
mov dword [ecx - 4], eax
mov dword [ecx - 8], eax
mov eax, dword [ebp - 0x18]
mov dword [ecx + 0x10], 0
cmp eax, 1
jne 0x4a560c
cmp edi, eax
jne 0x4a5600
mov eax, 0x4a4a00
jmp 0x4a562f
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.bad_DNL_len
mov edx, dword [esi]
mov ecx, esi
push 0
mov edx, dword [edx + 8]
call fcn.004a3f30
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x1c], 0
test ebx, ebx
jg 0x4a5507
push 0
mov edx, ebx
mov ecx, esi
call fcn.004a3f30
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, 2
jne 0x4a562a
mov eax, 0x4a4a10
jmp 0x4a562f
cmp eax, 2
jne 0x4a562a
cmp edi, 1
jne 0x4a561d
mov eax, 0x4a4c20
jmp 0x4a562f
cmp edi, 2
jne 0x4a562a
mov eax, dword [esi + 0x4814]
jmp 0x4a562f
mov eax, 0x4a4f40
mov dword [ecx - 0xc], eax
add edx, 0x48
mov eax, dword [ebp - 0x20]
add ecx, 0x20
inc eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0x20], eax
mov edi, ecx
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x10], edx
cmp eax, ebx
jl 0x4a5530
mov eax, dword [esi]
mov ecx, dword [eax]
mov edi, dword [eax + 4]
test ecx, ecx
js 0x4a59f5
je 0x4a5683
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x4a59f5
lea eax, [ecx*4]
test eax, eax
js 0x4a59f5
test edi, edi
js 0x4a59f5
jne 0x4a5694
mov eax, edi
imul eax, ecx
jmp 0x4a56b0
mov eax, 0x7fffffff
cdq
idiv edi
lea edx, [ecx*4]
cmp edx, eax
jg 0x4a59f5
mov eax, ecx
imul eax, edi
lea eax, [eax*4 + 1]
push eax
call dword [ebp - 0x24]
mov edx, dword [esi]
mov edi, eax
add esp, 4
test edi, edi
je 0x4a59f7
cmp dword [edx + 4], 0
mov dword [ebp - 0x10], 0
jbe 0x4a59cc
mov ecx, edx
mov dword [ebp - 8], edi
mov eax, dword [ecx]
imul eax, dword [ebp - 0x10]
mov dword [ebp - 0x28], 0
lea edi, [edi + eax*4]
mov dword [ebp - 0x30], edi
test ebx, ebx
jle 0x4a57c2
lea ebx, [esi + 0x46bc]
mov esi, dword [ebp - 0xc]
lea edi, [ebp - 0xb4]
nop word [eax + eax]
mov eax, dword [ebp - 8]
lea edx, [edi - 0x14]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov eax, dword [edi - 8]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x1c], ecx
lea ecx, [edi - 0x10]
sar eax, 1
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], edx
cmp dword [edi], eax
jl 0x4a574f
mov eax, dword [edx]
mov edx, ecx
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], ecx
jmp 0x4a575c
mov eax, ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], 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 - 0x28]
add esp, 0x14
mov dword [ebp + ecx*4 - 0x40], eax
mov eax, dword [edi]
inc eax
mov dword [edi], eax
cmp eax, dword [edi - 8]
jl 0x4a57a3
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
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 0x4a57a3
mov eax, dword [ebx + 4]
add eax, edx
mov edx, dword [ebp - 0x18]
mov dword [edx], eax
inc ecx
add edi, 0x20
add ebx, 0x48
mov dword [ebp - 0x28], ecx
cmp ecx, esi
jl 0x4a5710
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0xc], esi
mov esi, dword [ebp - 0x44]
mov edx, dword [esi]
mov ecx, edx
mov eax, dword [ecx + 8]
cmp eax, 3
jne 0x4a5841
cmp dword [ebp - 0x1c], 0
je 0x4a5821
xor ebx, ebx
cmp dword [ecx], ebx
jbe 0x4a59b4
mov eax, dword [ebp - 0x40]
lea ecx, [edi + 2]
mov edi, dword [ebp - 0x3c]
sub eax, edi
mov edx, dword [ebp - 0x38]
sub edx, edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x14], edx
jmp 0x4a57f5
mov edx, dword [ebp - 0x14]
mov al, byte [eax + edi]
lea ecx, [ecx + 4]
mov byte [ecx - 6], al
lea edi, [edi + 1]
mov al, byte [edi - 1]
inc ebx
mov byte [ecx - 5], al
mov al, byte [edx + edi - 1]
mov byte [ecx - 4], al
mov eax, dword [ebp - 0x2c]
mov byte [ecx - 3], 0xff
mov edx, dword [esi]
cmp ebx, dword [edx]
jb 0x4a57f2
jmp 0x4a59b4
mov eax, dword [esi + 0x4810]
push 4
push dword [ecx]
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
push edi
call eax
mov edx, dword [esi]
add esp, 0x18
jmp 0x4a59b4
cmp eax, 4
jne 0x4a598d
mov eax, dword [esi + 0x47e8]
test eax, eax
jne 0x4a58f0
mov dword [ebp - 0x28], eax
cmp dword [ecx], eax
jbe 0x4a59b4
mov ecx, dword [ebp - 0x3c]
lea ebx, [edi + 2]
mov edi, dword [ebp - 0x34]
sub ecx, edi
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x14], ecx
sub eax, edi
mov ecx, dword [ebp - 0x38]
sub ecx, edi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ecx
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 - 0x14]
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 - 0x2c]
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
shr eax, 8
mov byte [ebx - 4], al
mov eax, dword [ebp - 0x28]
mov edx, dword [esi]
inc eax
mov dword [ebp - 0x28], eax
cmp eax, dword [edx]
mov eax, dword [ebp - 0x30]
jb 0x4a5881
jmp 0x4a59b4
mov ecx, dword [ecx]
mov edx, dword [esi + 0x4810]
push 4
push ecx
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
push edi
cmp eax, 2
jne 0x4a5984
call edx
mov edx, dword [esi]
xor ebx, ebx
add esp, 0x18
cmp dword [edx], ebx
jbe 0x4a59b4
add edi, 2
nop
mov eax, dword [ebp - 0x34]
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 edx, dword [esi]
cmp ebx, dword [edx]
jb 0x4a5920
jmp 0x4a59b4
call edx
mov edx, dword [esi]
add esp, 0x18
jmp 0x4a59b4
xor edi, edi
cmp dword [ecx], edi
jbe 0x4a59b4
mov ecx, dword [ebp - 0x30]
inc ecx
mov eax, dword [ebp - 0x40]
lea ecx, [ecx + 4]
mov al, byte [edi + eax]
inc edi
mov byte [ecx - 3], al
mov byte [ecx - 4], al
mov byte [ecx - 5], al
mov byte [ecx - 2], 0xff
mov edx, dword [esi]
cmp edi, dword [edx]
jb 0x4a5997
mov eax, dword [ebp - 0x10]
mov ecx, edx
mov ebx, dword [ebp - 0xc]
inc eax
mov edi, dword [ebp - 8]
mov dword [ebp - 0x10], eax
cmp eax, dword [edx + 4]
jb 0x4a56e0
mov edx, dword [edx + 8]
mov ecx, esi
push 0
call fcn.004a3f30
mov edx, dword [esi]
add esp, 4
mov eax, dword [ebp - 0x48]
mov ecx, dword [edx]
mov edx, dword [edx + 4]
mov dword [eax], ecx
mov eax, edi
mov ecx, dword [ebp + 8]
mov dword [ecx], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi]
mov edx, dword [edx + 8]
mov ecx, esi
push 0
call fcn.004a3f30
mov eax, dword fs:[0x2c]
add esp, 4
mov eax, dword [eax]
pop edi
pop esi
pop ebx
mov dword [eax + 0xc], str.outofmem
xor eax, eax
mov esp, ebp
pop ebp
ret