Function at 0x4c0300
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x38
mov edx, dword [ebx + 0xc]
push esi
mov esi, dword [ebx + 8]
mov dword [ebp - 0x18], ecx
mov ecx, esi
push edi
call fcn.0052f100
mov ecx, dword [ebx + 0xc]
test esi, esi
je 0x4c037e
test ecx, ecx
je 0x4c0349
mov dl, byte [ecx + 0x19]
mov edi, dword [ecx]
mov eax, dword [ecx + 4]
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], eax
mov byte [ebp - 1], dl
jmp 0x4c03a0
test esi, esi
je 0x4c037e
xor edi, edi
mov dword [ebp - 0xc], edi
test ecx, ecx
je 0x4c0364
mov dl, byte [ecx + 0x19]
mov eax, dword [ecx + 4]
mov dword [ebp - 8], eax
mov byte [ebp - 1], dl
jmp 0x4c03a0
test esi, esi
je 0x4c037e
xor eax, eax
xor edi, edi
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edi
test ecx, ecx
je 0x4c037e
mov dl, byte [ecx + 0x19]
mov byte [ebp - 1], dl
jmp 0x4c03a0
xor dl, dl
mov byte [ebp - 1], dl
test esi, esi
je 0x4c0438
xor eax, eax
mov byte [ebp - 1], dl
xor edi, edi
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edi
test ecx, ecx
je 0x4c0438
mov cl, byte [ecx + 0x18]
mov byte [ebp - 3], cl
mov ecx, dword [ebp - 0x18]
push eax
add ecx, 4
push edi
mov dword [ebp - 0x14], ecx
call fcn.004f8bf0
mov al, byte [ebp - 1]
cmp al, 3
jne 0x4c042e
test esi, esi
je 0x4c048a
mov eax, dword [esi + 0x78]
test al, 0x40
je 0x4c041d
test eax, 0x400000
je 0x4c07dc
mov eax, dword [esi + 0x50]
push str.invalid_after_png_start_read_image_or_png_read_update_info
test eax, eax
je 0x4c03eb
push esi
call eax
add esp, 8
jmp 0x4c0461
push str.libpng_warning:__s
push 2
call fcn.0058014f
add esp, 4
push eax
call fcn.0052ec80
add esp, 0xc
push 0x5fad50
push 2
call fcn.0058014f
add esp, 4
push eax
call fcn.0052ec80
add esp, 8
jmp 0x4c0461
or eax, 0x4000
or dword [esi + 0x7c], 0x2001000
mov dword [esi + 0x78], eax
jmp 0x4c0461
test al, al
je 0x4c0456
cmp al, 4
jne 0x4c045d
jmp 0x4c0456
mov ecx, dword [ebp - 0x18]
xor eax, eax
xor edi, edi
mov byte [ebp - 3], 0
push eax
add ecx, 4
mov dword [ebp - 8], eax
push edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], ecx
call fcn.004f8bf0
mov ecx, esi
call fcn.0052fdc0
test esi, esi
je 0x4c048a
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4c048a
test dword [eax + 8], 0x10
setne cl
test dword [eax + 8], 0x10
mov byte [ebp - 2], cl
je 0x4c048c
mov ecx, esi
call fcn.0052fd50
mov cl, byte [ebp - 2]
jmp 0x4c048c
xor cl, cl
mov al, byte [ebp - 1]
shr al, 2
and al, 1
or cl, al
mov eax, dword [ebp - 0x14]
mov byte [ebp - 2], cl
mov eax, dword [eax]
test eax, eax
je 0x4c04a5
mov byte [eax + 0x24], cl
cmp byte [ebp - 3], 0x10
jne 0x4c04b2
mov ecx, esi
call fcn.0052fce0
test esi, esi
je 0x4c04c3
cmp byte [esi + 0x14c], 0
je 0x4c04c3
or dword [esi + 0x7c], 2
mov edx, dword [ebx + 0xc]
mov ecx, esi
call fcn.0052f520
mov eax, dword [ebp - 8]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00577ad5
add esp, 4
mov edx, eax
mov dword [ebp - 0x10], edx
test esi, esi
je 0x4c04fe
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4c04fe
mov ecx, dword [eax + 0xc]
jmp 0x4c0500
xor ecx, ecx
cmp byte [ebp - 2], 0
movd xmm0, ecx
pshufd xmm0, xmm0, 0
mov dword [ebp - 0x18], ecx
movaps xmmword [ebp - 0x30], xmm0
je 0x4c05c9
lea eax, [edi*4]
cmp ecx, eax
jne 0x4c05c9
mov edi, dword [ebp - 8]
xor ecx, ecx
test edi, edi
jle 0x4c05bd
mov esi, dword [ebp - 0x14]
nop dword [eax]
mov edx, dword [esi]
test edx, edx
je 0x4c0556
cmp ecx, dword [edx + 0x18]
jae 0x4c0556
mov eax, dword [edx + 0x20]
imul eax, ecx
add eax, dword [edx + 0x1c]
jmp 0x4c0558
xor eax, eax
mov edx, dword [ebp - 0x10]
mov dword [edx + ecx*4], eax
inc ecx
cmp ecx, edi
jl 0x4c0540
mov ecx, dword [ebx + 8]
call fcn.0052f970
mov eax, dword [ebp - 0xc]
xor edx, edx
mov dword [ebp - 0x18], edx
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx]
test ecx, ecx
je 0x4c058c
cmp edx, dword [ecx + 0x18]
jae 0x4c058c
mov edi, dword [ecx + 0x20]
imul edi, edx
add edi, dword [ecx + 0x1c]
jmp 0x4c058e
xor edi, edi
xor esi, esi
test eax, eax
jle 0x4c05af
mov dl, byte [edi + esi*4 + 2]
lea ecx, [edi + esi*4]
mov al, byte [ecx]
mov byte [edi + esi*4 + 2], al
inc esi
mov byte [ecx], dl
cmp esi, dword [ebp - 0xc]
jl 0x4c0594
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
inc edx
mov dword [ebp - 0x18], edx
cmp edx, dword [ebp - 8]
jl 0x4c0573
jmp 0x4c07c6
mov ecx, esi
call fcn.0052f970
jmp 0x4c07c6
mov eax, dword [ebp - 8]
imul eax, ecx
push eax
call fcn.00577ad5
mov edx, dword [ebp - 8]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x1c], eax
movd xmm0, eax
pshufd xmm2, xmm0, 0
test edx, edx
jle 0x4c06e2
cmp edx, 0x10
jb 0x4c06c8
cmp dword [0x65c24c], 2
jl 0x4c06c8
movaps xmm1, xmmword [0x6052e0]
mov eax, edx
and eax, 0x8000000f
jns 0x4c061c
dec eax
or eax, 0xfffffff0
inc eax
movaps xmm3, xmmword [ebp - 0x30]
mov esi, edx
sub esi, eax
mov edi, 8
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0x10]
mov edx, dword [ebp - 0x20]
add esi, 0x20
nop word [eax + eax]
movd xmm0, ecx
lea eax, [edi - 4]
pshufd xmm0, xmm0, 0
lea esi, [esi + 0x40]
paddd xmm0, xmm1
add ecx, 0x10
pmulld xmm0, xmm3
paddd xmm0, xmm2
movups xmmword [esi - 0x60], xmm0
movd xmm0, eax
lea eax, [edi + 4]
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
pmulld xmm0, xmm3
paddd xmm0, xmm2
movups xmmword [esi - 0x50], xmm0
movd xmm0, edi
add edi, 0x10
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
pmulld xmm0, xmm3
paddd xmm0, xmm2
movups xmmword [esi - 0x40], xmm0
movd xmm0, eax
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
pmulld xmm0, xmm3
paddd xmm0, xmm2
movups xmmword [esi - 0x30], xmm0
cmp ecx, edx
jl 0x4c0640
mov edx, dword [ebp - 8]
mov esi, dword [ebx + 8]
mov edi, dword [ebp - 0xc]
cmp ecx, edx
jge 0x4c06e2
mov edi, dword [ebp - 0x10]
mov eax, ecx
imul eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x1c]
mov dword [edi + ecx*4], eax
inc ecx
add eax, dword [ebp - 0x18]
cmp ecx, edx
jl 0x4c06d4
mov edi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, esi
call fcn.0052f970
mov eax, dword [ebp - 0x18]
xor edx, edx
div edi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
test edx, edx
je 0x4c070a
cmp dword [edx + 0x18], 0
jbe 0x4c070a
mov edx, dword [edx + 0x1c]
jmp 0x4c070c
xor edx, edx
xor eax, eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], eax
jle 0x4c07bb
lea esi, [edi*4]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x14], esi
nop word [eax + eax]
cmp byte [ebp - 2], 0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + eax*4]
lea ecx, [esi + edx]
mov dword [ebp - 0x18], ecx
je 0x4c0777
cmp edx, ecx
jae 0x4c07a9
dec esi
inc edx
shr esi, 2
inc esi
nop dword [eax]
movzx ecx, byte [eax]
lea edx, [edx + 4]
mov byte [edx - 3], cl
movzx ecx, byte [eax + 1]
mov byte [edx - 4], cl
movzx ecx, byte [eax + 2]
mov byte [edx - 5], cl
movzx ecx, byte [eax + 3]
add eax, edi
mov byte [edx - 2], cl
sub esi, 1
jne 0x4c0750
jmp 0x4c07a3
cmp edx, ecx
jae 0x4c07a9
dec esi
inc edx
shr esi, 2
inc esi
movzx ecx, byte [eax]
lea edx, [edx + 4]
mov byte [edx - 3], cl
movzx ecx, byte [eax + 1]
mov byte [edx - 4], cl
movzx ecx, byte [eax + 2]
add eax, edi
mov byte [edx - 5], cl
mov byte [edx - 2], 0xff
sub esi, 1
jne 0x4c0781
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov edx, ecx
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 8]
jl 0x4c0730
push dword [ebp - 0x1c]
call fcn.005772e5
add esp, 4
push dword [ebp - 0x10]
call fcn.005772e5
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
mov edx, str.invalid_after_png_start_read_image_or_png_read_update_info
mov ecx, esi
call fcn.0052eca0
int3