Function at 0x5b8430
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x10
push ebp
push edi
mov edi, dword [esp + 0x1c]
xor ebp, ebp
cmp edi, ebp
jne 0x5b8456
push ebp
push ebp
push str.tContrastControl:_Data_pointer_is_NULL
call fcn.0062dd90
pop edi
mov eax, 0xfffffff4
pop ebp
add esp, 0x10
ret
mov eax, dword [esp + 0x20]
cmp eax, ebp
jle 0x5b864d
mov ecx, dword [esp + 0x24]
cmp ecx, ebp
jle 0x5b864d
cmp dword [esp + 0x28], ebp
jl 0x5b864d
imul eax, ecx
fld qword [0x69e340]
fld qword [0x6902f8]
push ebx
push esi
mov esi, eax
mov dword [esp + 0x28], ebp
mov dword [esp + 0x1c], esi
call fcn.005e2020
call fcn.005e1f50
mov ebx, eax
cmp ebx, ebp
mov dword [esp + 0x18], ebx
jl 0x5b84c5
lea eax, [ebx*4]
push eax
call fcn.00619f42
add esp, 4
cmp eax, ebp
mov dword [esp + 0x28], eax
je 0x5b84c5
inc dword [0x6f3014]
test ebx, ebx
mov dword [esp + 0x2c], ebp
jl 0x5b850e
lea ecx, [ebx*4]
push ecx
call fcn.00619f42
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
je 0x5b850a
mov ecx, dword [0x6f3014]
inc ecx
test ebx, ebx
mov dword [0x6f3014], ecx
jle 0x5b850a
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x2c]
mov ecx, ebx
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x24]
jmp 0x5b850e
mov ebp, dword [esp + 0x2c]
xor eax, eax
test esi, esi
jle 0x5b8529
xor edx, edx
mov dl, byte [eax + edi]
lea ecx, [ebp + edx*4]
mov edx, dword [ebp + edx*4]
inc edx
inc eax
cmp eax, esi
mov dword [ecx], edx
jl 0x5b8514
mov ecx, dword [ebp]
xor dl, dl
or al, 0xff
mov byte [esp + 0x10], dl
test ecx, ecx
mov byte [esp + 0x14], al
jne 0x5b8557
inc dl
mov byte [esp + 0x10], dl
mov esi, dword [esp + 0x10]
mov ecx, esi
and ecx, 0xff
cmp dword [ebp + ecx*4], 0
je 0x5b853c
jmp 0x5b855b
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 0x3fc]
test ecx, ecx
jne 0x5b8580
dec al
mov byte [esp + 0x14], al
mov ecx, dword [esp + 0x14]
mov edi, ecx
and edi, 0xff
cmp dword [ebp + edi*4], 0
je 0x5b8565
jmp 0x5b8584
mov ecx, dword [esp + 0x14]
cmp dl, al
jne 0x5b859f
test ebx, ebx
jle 0x5b85e9
mov eax, esi
mov esi, dword [esp + 0x28]
mov ecx, ebx
and eax, 0xff
mov edi, esi
rep stosd dword es:[edi], eax
jmp 0x5b85ed
test ebx, ebx
jle 0x5b85e9
mov eax, esi
and ecx, 0xff
and eax, 0xff
xor esi, esi
sub ecx, eax
imul eax, dword [esp + 0x30]
mov edi, dword [esp + 0x28]
mov ebp, eax
mov eax, esi
sub eax, ebp
cdq
idiv ecx
test eax, eax
jge 0x5b85cc
xor eax, eax
cmp eax, dword [esp + 0x18]
jl 0x5b85d7
mov eax, 0xff
mov dword [edi], eax
mov eax, dword [esp + 0x30]
add esi, eax
add edi, 4
dec ebx
jne 0x5b85bf
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x1c]
xor eax, eax
test edi, edi
jle 0x5b860c
mov ecx, dword [esp + 0x24]
xor edx, edx
mov dl, byte [eax + ecx]
inc eax
cmp eax, edi
mov dl, byte [esi + edx*4]
mov byte [eax + ecx - 1], dl
jl 0x5b85f7
test esi, esi
je 0x5b8628
push esi
call fcn.00619f6b
mov eax, dword [0x6f3014]
mov ebp, dword [esp + 0x30]
add esp, 4
dec eax
mov dword [0x6f3014], eax
pop esi
pop ebx
test ebp, ebp
je 0x5b8642
push ebp
call fcn.00619f6b
mov eax, dword [0x6f3014]
add esp, 4
dec eax
mov dword [0x6f3014], eax
pop edi
mov eax, 1
pop ebp
add esp, 0x10
ret
push ebp
push ebp
push str.tContrastControl:_Width_Height_parameter_is_less_than_or__0
call fcn.0062dd90
pop edi
mov eax, 0xfffffffb
pop ebp
add esp, 0x10
ret