Function at 0x4b5820
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], edx
mov ebp, dword [ecx + 0x1c]
test ebp, ebp
je 0x4b5a60
lea ebx, [ebp + ebp]
cmp ebx, dword [edx + 8]
jg 0x4b5a80
mov eax, dword [ecx + 0x24]
mov edx, dword [esp + 0x38]
xor dword [edx + 0xc], eax
mov eax, dword [ecx + 0x18]
mov dword [esp + 0x30], eax
mov esi, dword [edx]
mov eax, dword [edx + 4]
cmp ebx, eax
jle 0x4b587e
lea edx, [esi + eax*4]
lea esi, [esi]
lea edi, [edi]
mov dword [edx], 0
inc eax
add edx, 4
cmp ebx, eax
jg 0x4b5870
mov edx, dword [esp + 0x38]
mov dword [edx + 4], ebx
mov ecx, dword [ecx + 0x40]
mov dword [esp + 0x34], ecx
test ebp, ebp
jle 0x4b5acf
lea edi, [esi + ebp*4]
mov dword [esp + 0x2c], 0
xor ebx, ebx
jmp 0x4b58b0
mov eax, dword [esp + 0x34]
imul eax, dword [esi]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebp
mov ecx, dword [esp + 0x30]
mov dword [esp + 4], ecx
mov dword [esp], esi
call fcn.0043ee20
add eax, ebx
mov edx, dword [edi]
add eax, edx
cmp edx, eax
setne cl
and ecx, 0xff
or ebx, ecx
cmp edx, eax
setae dl
and ebx, edx
mov dword [edi], eax
inc dword [esp + 0x2c]
add esi, 4
add edi, 4
cmp ebp, dword [esp + 0x2c]
jg 0x4b58b0
mov eax, dword [esp + 0x3c]
cmp ebp, dword [eax + 8]
jg 0x4b5ab0
mov edx, dword [esp + 0x3c]
mov dword [edx + 4], ebp
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 0xc]
mov dword [edx + 0xc], eax
mov edi, dword [edx]
lea esi, [ebp*4]
add esi, dword [ecx]
mov dword [esp + 0xc], ebp
mov eax, dword [esp + 0x30]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0043f330
sub ebx, eax
mov edx, ebx
not edx
and edx, edi
and ebx, esi
or edx, ebx
lea ecx, [ebp - 4]
mov dword [esp + 0x30], ecx
test ecx, ecx
jle 0x4b5ac8
xor eax, eax
mov dword [esp + 0x34], ebp
lea esi, [esi]
mov ebp, dword [edx + eax*4]
mov ebx, dword [edx + eax*4 + 4]
mov ecx, dword [edx + eax*4 + 8]
mov dword [esp + 0x1c], ecx
mov dword [esi + eax*4], 0
mov ecx, dword [edx + eax*4 + 0xc]
mov dword [esp + 0x2c], ecx
mov dword [esi + eax*4 + 4], 0
mov dword [edi + eax*4], ebp
mov dword [esi + eax*4 + 8], 0
mov dword [edi + eax*4 + 4], ebx
mov dword [esi + eax*4 + 0xc], 0
mov ecx, dword [esp + 0x1c]
mov dword [edi + eax*4 + 8], ecx
mov ecx, dword [esp + 0x2c]
mov dword [edi + eax*4 + 0xc], ecx
add eax, 4
cmp dword [esp + 0x30], eax
jg 0x4b5960
mov ebp, dword [esp + 0x34]
lea eax, [ebp - 5]
shr eax, 2
lea eax, [eax*4 + 4]
cmp ebp, eax
jle 0x4b59f8
lea ecx, [eax*4]
lea edx, [ecx + edx]
add edi, ecx
add esi, ecx
lea esi, [esi]
mov ecx, dword [edx]
mov dword [edi], ecx
mov dword [esi], 0
inc eax
add edx, 4
add edi, 4
add esi, 4
cmp ebp, eax
jg 0x4b59e0
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 4]
test eax, eax
jle 0x4b5a23
mov ecx, edx
lea edx, [eax*4 - 4]
add edx, dword [ecx]
nop
mov ecx, dword [edx]
sub edx, 4
test ecx, ecx
jne 0x4b5a1c
dec eax
jne 0x4b5a10
mov edx, dword [esp + 0x38]
mov dword [edx + 4], eax
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx + 4]
test eax, eax
jle 0x4b5a53
lea edx, [eax*4 - 4]
add edx, dword [ecx]
mov esi, esi
lea edi, [edi]
mov ecx, dword [edx]
sub edx, 4
test ecx, ecx
jne 0x4b5a4c
dec eax
jne 0x4b5a40
mov edx, dword [esp + 0x3c]
mov dword [edx + 4], eax
mov eax, 1
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [eax + 4], 0
mov eax, 1
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebx
mov dword [esp], edx
mov dword [esp + 0x28], ecx
call fcn.0043c1d0
test eax, eax
mov ecx, dword [esp + 0x28]
jne 0x4b5847
xor eax, eax
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebp
mov dword [esp], eax
call fcn.0043c1d0
test eax, eax
jne 0x4b5908
xor eax, eax
jmp 0x4b5a9e
xor eax, eax
jmp 0x4b59c7
xor ebx, ebx
jmp 0x4b58fb