Function at 0x42d018
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
mov eax, dword [0x4d3040]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xd4], eax
push edi
mov eax, dword [esi]
xor edi, edi
mov dword [ebp - 0xcc], edx
mov dword [ebp - 0xc8], esi
mov dword [eax + 8], edi
call fcn.0042c7a0
mov edx, dword [esi]
mov ecx, dword [edx + 8]
mov dword [ebp - 0xbc], ecx
test eax, eax
jne 0x42d07b
mov edx, ecx
mov ecx, esi
push edi
call fcn.0042c1a6
pop ecx
xor eax, eax
jmp 0x42d562
xor ebx, ebx
push 3
pop edx
inc ebx
cmp ecx, edx
jne 0x42d0a5
cmp dword [esi + 0x47ec], edx
je 0x42d09d
cmp dword [esi + 0x47e8], edi
jne 0x42d0a5
cmp dword [esi + 0x47e4], edi
jne 0x42d0a5
mov dword [ebp - 0xc0], ebx
jmp 0x42d0ab
mov dword [ebp - 0xc0], edi
mov dword [ebp - 0xac], edi
xorps xmm0, xmm0
movups xmmword [ebp - 0x18], xmm0
test ecx, ecx
jle 0x42d1b0
lea ebx, [esi + 0x46a0]
lea edi, [ebp - 0x8c]
mov dword [ebp - 0xa0], ebx
mov eax, dword [esi]
mov eax, dword [eax]
add eax, edx
push eax
call fcn.0048d550
mov dword [ebx + 0x34], eax
pop ecx
test eax, eax
je 0x42d245
mov eax, dword [esi + 0x4684]
cdq
idiv dword [ebx]
and dword [edi + 0xc], 0
mov dword [ebp - 0xa8], eax
mov dword [edi - 4], eax
mov eax, dword [esi + 0x4688]
cdq
idiv dword [ebx + 4]
xor edx, edx
mov ebx, eax
mov eax, dword [ebp - 0xa8]
mov ecx, ebx
mov dword [edi], ebx
sar ecx, 1
dec eax
mov dword [edi + 8], ecx
mov ecx, dword [esi]
add eax, dword [ecx]
mov ecx, dword [ebp - 0xa8]
div ecx
mov dword [edi + 4], eax
mov eax, dword [ebp - 0xa0]
mov eax, dword [eax + 0x28]
mov dword [edi - 8], eax
mov dword [edi - 0xc], eax
xor eax, eax
inc eax
cmp ecx, eax
jne 0x42d15a
cmp ebx, eax
jne 0x42d14e
mov eax, 0x42c924
jmp 0x42d17c
cmp ebx, 2
jne 0x42d177
mov eax, 0x42c92c
jmp 0x42d17c
cmp ecx, 2
jne 0x42d177
cmp ebx, eax
jne 0x42d16a
mov eax, 0x42c96f
jmp 0x42d17c
cmp ebx, 2
jne 0x42d177
mov eax, dword [esi + 0x4814]
jmp 0x42d17c
mov eax, 0x42cc58
mov ebx, dword [ebp - 0xa0]
mov dword [edi - 0x10], eax
add ebx, 0x48
mov eax, dword [ebp - 0xac]
add edi, 0x20
inc eax
mov dword [ebp - 0xa0], ebx
push 3
mov dword [ebp - 0xac], eax
pop edx
cmp eax, dword [ebp - 0xbc]
jl 0x42d0d2
xor ebx, ebx
inc ebx
mov edx, dword [esi]
push ebx
push dword [edx + 4]
mov edx, dword [edx]
push 4
pop ecx
call fcn.0042864c
mov edx, dword [esi]
mov edi, eax
mov dword [ebp - 0xc4], edi
pop ecx
pop ecx
test edi, edi
je 0x42d247
xor ecx, ecx
mov dword [ebp - 0xa0], ecx
cmp dword [edx + 4], ecx
jbe 0x42d523
mov edi, dword [ebp - 0x18]
mov eax, dword [edx]
mov edx, dword [ebp - 0xc4]
imul eax, ecx
lea ebx, [edx + eax*4]
xor edx, edx
mov dword [ebp - 0xa4], ebx
mov dword [ebp - 0xb0], edx
cmp dword [ebp - 0xbc], edx
jle 0x42d2fc
lea ebx, [esi + 0x46bc]
mov esi, dword [ebp - 0xbc]
lea edi, [ebp - 0x84]
mov eax, dword [edi - 8]
lea ecx, [edi - 0x10]
sar eax, 1
lea edx, [edi - 0x14]
mov dword [ebp - 0xb8], ecx
mov dword [ebp - 0xa8], edx
cmp dword [edi], eax
jl 0x42d26a
mov eax, dword [edx]
mov edx, ecx
mov dword [ebp - 0xac], ecx
jmp 0x42d280
mov edx, dword [esi]
mov edx, dword [edx + 8]
mov ecx, esi
push 0
call fcn.0042c1a6
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0x10], str.outofmem
jmp 0x42d073
mov eax, ecx
mov dword [ebp - 0xa8], edx
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xb8], 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 - 0xb0]
add esp, 0x14
mov dword [ebp + ecx*4 - 0x18], eax
mov eax, dword [edi]
inc eax
mov dword [edi], eax
cmp eax, dword [edi - 8]
jl 0x42d2d0
mov edx, dword [ebp - 0xac]
mov eax, dword [ebp - 0xa8]
and dword [edi], 0
inc dword [edi + 4]
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [edi + 4]
cmp eax, dword [ebx]
jge 0x42d2d0
mov eax, dword [ebx + 4]
add eax, edx
mov edx, dword [ebp - 0xb8]
mov dword [edx], eax
inc ecx
add edi, 0x20
add ebx, 0x48
mov dword [ebp - 0xb0], ecx
cmp ecx, esi
jl 0x42d21e
mov esi, dword [ebp - 0xc8]
xor edx, edx
mov ebx, dword [ebp - 0xa4]
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xa0]
mov eax, dword [esi]
cmp dword [eax + 8], 3
jne 0x42d37e
cmp dword [ebp - 0xc0], 0
je 0x42d364
mov dword [ebp - 0xb4], edx
cmp dword [eax], edx
jbe 0x42d508
mov ecx, dword [ebp - 0x14]
lea edx, [ebx + 2]
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0xb4]
mov dword [ebp - 0xa4], edi
sub edi, ecx
sub eax, ecx
mov dword [ebp - 0xa4], eax
mov al, byte [ecx + edi]
inc ebx
mov byte [edx - 2], al
mov al, byte [ecx]
mov byte [edx - 1], al
mov eax, dword [ebp - 0xa4]
mov al, byte [ecx + eax]
inc ecx
mov byte [edx], al
lea edx, [edx + 4]
mov byte [edx - 3], 0xff
mov eax, dword [esi]
cmp ebx, dword [eax]
jb 0x42d33a
jmp 0x42d4ff
push 4
push dword [eax]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push edi
push ebx
call dword [esi + 0x4810]
add esp, 0x18
jmp 0x42d502
cmp dword [eax + 8], 4
jne 0x42d4db
mov ecx, dword [esi + 0x47e8]
test ecx, ecx
jne 0x42d444
mov dword [ebp - 0xb0], edx
cmp dword [eax], edx
jbe 0x42d502
mov edi, dword [ebp - 0xc]
add ebx, 2
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
sub ecx, edi
mov dword [ebp - 0xa4], ecx
sub eax, edi
mov ecx, dword [ebp - 0x10]
sub ecx, edi
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb4], ecx
movzx ecx, byte [edi + eax]
movzx edx, byte [edi]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebx - 2], al
mov eax, dword [ebp - 0xa4]
movzx ecx, byte [edi + eax]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebx - 1], al
mov eax, dword [ebp - 0xb4]
movzx ecx, byte [edi + eax]
imul ecx, edx
mov byte [ebx + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xb0]
shr eax, 8
inc ecx
mov byte [ebx], al
inc edi
mov eax, dword [esi]
lea ebx, [ebx + 4]
mov dword [ebp - 0xb0], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xb8]
jb 0x42d3cb
jmp 0x42d4ff
mov eax, dword [eax]
mov edx, dword [esi + 0x4810]
push 4
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push ebx
cmp ecx, 2
jne 0x42d4d4
call edx
mov eax, dword [esi]
xor edi, edi
add esp, 0x18
cmp dword [eax], edi
jbe 0x42d4ff
add ebx, 2
mov eax, dword [ebp - 0xc]
movzx edx, byte [edi + eax]
mov al, byte [ebx - 2]
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 [ebx - 2], al
mov al, byte [ebx - 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 [ebx - 1], al
mov al, byte [ebx]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
inc edi
mov byte [ebx], al
lea ebx, [ebx + 4]
mov eax, dword [esi]
cmp edi, dword [eax]
jb 0x42d472
jmp 0x42d4ff
call edx
add esp, 0x18
jmp 0x42d4ff
cmp dword [eax], 0
jbe 0x42d508
lea ecx, [ebx + 1]
mov eax, dword [ebp - 0x18]
mov al, byte [edx + eax]
inc edx
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 [esi]
cmp edx, dword [eax]
jb 0x42d4e3
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xa0]
mov edx, dword [esi]
inc ecx
mov dword [ebp - 0xa0], ecx
cmp ecx, dword [edx + 4]
jb 0x42d1e4
mov edi, dword [ebp - 0xc4]
xor ebx, ebx
inc ebx
mov edx, dword [edx + 8]
mov ecx, esi
push 0
call fcn.0042c1a6
mov eax, dword [esi]
pop ecx
mov ecx, dword [ebp - 0xcc]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [esi]
mov ecx, dword [ebp - 0xd0]
mov eax, dword [eax + 4]
mov dword [ecx], eax
mov ecx, dword [ebp - 0xd4]
test ecx, ecx
je 0x42d560
mov eax, dword [esi]
push 3
pop edx
cmp dword [eax + 8], edx
cmovge ebx, edx
mov dword [ecx], ebx
mov eax, edi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004820f4
leave
ret