Function at 0x42c403
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
mov esi, ecx
je 0x42c437
cmp dword [esi + 4], 0
je 0x42c437
push 8
pop ebx
cmp word [esi + 0x16], bx
jae 0x42c440
add esi, 0x40
push str.Bit_depth_must_be_8_or_24
push esi
call fcn.004366e0
pop ecx
pop ecx
xor al, al
pop edi
pop esi
pop ebx
leave
ret 4
and byte [ebp - 0x1c], 0
mov ecx, esi
call fcn.00429d70
test eax, eax
setne al
mov byte [ebp - 0x1b], al
mov ax, word [esi + 0x16]
cmp ax, bx
setne cl
inc ecx
mov byte [ebp - 0x1a], cl
xor ecx, ecx
cmp ax, bx
mov word [ebp - 0x19], cx
setne dl
dec edx
mov word [ebp - 0x14], cx
and edx, 0xff
cmp ax, bx
movzx dx, dl
mov word [ebp - 0x17], dx
mov word [ebp - 0x12], cx
setne dl
dec edx
and byte [ebp - 0xb], cl
and edx, 0x18
cmp dword [esi + 0x188], ecx
mov byte [ebp - 0x15], dl
mov dx, word [esi + 0xc]
mov word [ebp - 0x10], dx
mov dx, word [esi + 0x10]
mov word [ebp - 0xe], dx
mov dl, al
mov byte [ebp - 0xc], dl
je 0x42c4bb
cmp ax, 0x18
jne 0x42c4bb
mov byte [ebp - 0xc], 0x20
mov eax, dword [edi]
push 1
lea ecx, [ebp - 0x1c]
push 0x12
push ecx
mov ecx, edi
call dword [eax + 0xc]
cmp word [esi + 0x16], bx
jne 0x42c517
mov ecx, esi
call fcn.00429d70
lea ecx, [ebp - 0x33b]
add eax, 2
mov dword [ebp - 4], 0x100
mov dl, byte [eax - 2]
mov byte [ecx - 1], dl
mov dl, byte [eax - 1]
mov byte [ecx], dl
mov dl, byte [eax]
mov byte [ecx + 1], dl
add eax, 4
add ecx, 3
dec dword [ebp - 4]
jne 0x42c4e7
mov eax, dword [edi]
push 1
lea ecx, [ebp - 0x33c]
push 0x300
push ecx
mov ecx, edi
call dword [eax + 0xc]
push esi
lea ecx, [ebp - 0x3c]
call fcn.0042c8ee
cmp dword [esi + 0x188], 0
je 0x42c5df
cmp word [esi + 0x16], bx
je 0x42c5df
movzx eax, word [ebp - 0x10]
shl eax, 2
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
and dword [ebp - 8], 0
cmp word [ebp - 0xe], 0
pop ecx
mov dword [ebp - 4], eax
jbe 0x42c5d3
xor ebx, ebx
cmp word [ebp - 0x10], bx
jbe 0x42c5b3
mov eax, dword [ebp - 4]
lea edi, [eax + 1]
push dword [ebp - 8]
lea eax, [ebp - 0x24]
mov ecx, esi
push ebx
push eax
call fcn.00429e95
mov eax, dword [eax]
push dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov byte [edi - 1], al
mov al, byte [ebp - 0x1e]
mov byte [edi], ah
push ebx
mov ecx, esi
mov byte [edi + 1], al
call fcn.0042a256
movzx ecx, byte [esi + 0x178]
movzx eax, al
imul eax, ecx
cdq
mov ecx, 0xff
add edi, 4
idiv ecx
inc ebx
mov byte [edi - 2], al
movzx eax, word [ebp - 0x10]
cmp ebx, eax
jl 0x42c562
mov edi, dword [ebp + 8]
movzx ecx, word [ebp - 0x10]
mov eax, dword [edi]
push 1
shl ecx, 2
push ecx
mov ecx, edi
push dword [ebp - 4]
call dword [eax + 0xc]
movzx eax, word [ebp - 0xe]
inc dword [ebp - 8]
cmp dword [ebp - 8], eax
jl 0x42c554
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
jmp 0x42c614
xor ebx, ebx
cmp word [ebp - 0xe], bx
jbe 0x42c614
push ebx
lea ecx, [ebp - 0x3c]
call fcn.0042c919
movzx ecx, word [esi + 0x16]
movzx edx, word [ebp - 0x10]
shr ecx, 3
imul ecx, edx
mov eax, dword [edi]
push 1
push ecx
mov ecx, edi
push dword [ebp - 0x2c]
call dword [eax + 0xc]
movzx eax, word [ebp - 0xe]
inc ebx
cmp ebx, eax
jl 0x42c5e7
mov al, 1
jmp 0x42c439