Function at 0x4d0080
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.00539420
mov ecx, dword [ebx + 0xc]
test esi, esi
je 0x4d00fe
test ecx, ecx
je 0x4d00c9
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 0x4d0120
test esi, esi
je 0x4d00fe
xor edi, edi
mov dword [ebp - 0xc], edi
test ecx, ecx
je 0x4d00e4
mov dl, byte [ecx + 0x19]
mov eax, dword [ecx + 4]
mov dword [ebp - 8], eax
mov byte [ebp - 1], dl
jmp 0x4d0120
test esi, esi
je 0x4d00fe
xor eax, eax
xor edi, edi
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edi
test ecx, ecx
je 0x4d00fe
mov dl, byte [ecx + 0x19]
mov byte [ebp - 1], dl
jmp 0x4d0120
xor dl, dl
mov byte [ebp - 1], dl
test esi, esi
je 0x4d01b8
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 0x4d01b8
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.004fe930
mov al, byte [ebp - 1]
cmp al, 3
jne 0x4d01ae
test esi, esi
je 0x4d020a
mov eax, dword [esi + 0x78]
test al, 0x40
je 0x4d019d
test eax, 0x400000
je 0x4d055c
mov eax, dword [esi + 0x50]
push str.invalid_after_png_start_read_image_or_png_read_update_info
test eax, eax
je 0x4d016b
push esi
call eax
add esp, 8
jmp 0x4d01e1
push str.libpng_warning:__s
push 2
call fcn.0058c9c1
add esp, 4
push eax
call fcn.00538fa0
add esp, 0xc
push 0x614a98
push 2
call fcn.0058c9c1
add esp, 4
push eax
call fcn.00538fa0
add esp, 8
jmp 0x4d01e1
or eax, 0x4000
or dword [esi + 0x7c], 0x2001000
mov dword [esi + 0x78], eax
jmp 0x4d01e1
test al, al
je 0x4d01d6
cmp al, 4
jne 0x4d01dd
jmp 0x4d01d6
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.004fe930
mov ecx, esi
call fcn.0053a0e0
test esi, esi
je 0x4d020a
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4d020a
test dword [eax + 8], 0x10
setne cl
test dword [eax + 8], 0x10
mov byte [ebp - 2], cl
je 0x4d020c
mov ecx, esi
call fcn.0053a070
mov cl, byte [ebp - 2]
jmp 0x4d020c
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 0x4d0225
mov byte [eax + 0x24], cl
cmp byte [ebp - 3], 0x10
jne 0x4d0232
mov ecx, esi
call fcn.0053a000
test esi, esi
je 0x4d0243
cmp byte [esi + 0x14c], 0
je 0x4d0243
or dword [esi + 0x7c], 2
mov edx, dword [ebx + 0xc]
mov ecx, esi
call fcn.00539840
mov eax, dword [ebp - 8]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00581de5
add esp, 4
mov edx, eax
mov dword [ebp - 0x10], edx
test esi, esi
je 0x4d027e
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4d027e
mov ecx, dword [eax + 0xc]
jmp 0x4d0280
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 0x4d0349
lea eax, [edi*4]
cmp ecx, eax
jne 0x4d0349
mov edi, dword [ebp - 8]
xor ecx, ecx
test edi, edi
jle 0x4d033d
mov esi, dword [ebp - 0x14]
nop dword [eax]
mov edx, dword [esi]
test edx, edx
je 0x4d02d6
cmp ecx, dword [edx + 0x18]
jae 0x4d02d6
mov eax, dword [edx + 0x20]
imul eax, ecx
add eax, dword [edx + 0x1c]
jmp 0x4d02d8
xor eax, eax
mov edx, dword [ebp - 0x10]
mov dword [edx + ecx*4], eax
inc ecx
cmp ecx, edi
jl 0x4d02c0
mov ecx, dword [ebx + 8]
call fcn.00539c90
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 0x4d030c
cmp edx, dword [ecx + 0x18]
jae 0x4d030c
mov edi, dword [ecx + 0x20]
imul edi, edx
add edi, dword [ecx + 0x1c]
jmp 0x4d030e
xor edi, edi
xor esi, esi
test eax, eax
jle 0x4d032f
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 0x4d0314
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
inc edx
mov dword [ebp - 0x18], edx
cmp edx, dword [ebp - 8]
jl 0x4d02f3
jmp 0x4d0546
mov ecx, esi
call fcn.00539c90
jmp 0x4d0546
mov eax, dword [ebp - 8]
imul eax, ecx
push eax
call fcn.00581de5
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 0x4d0462
cmp edx, 0x10
jb 0x4d0448
cmp dword [0x67b8e4], 2
jl 0x4d0448
movaps xmm1, xmmword [0x61e880]
mov eax, edx
and eax, 0x8000000f
jns 0x4d039c
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 0x4d03c0
mov edx, dword [ebp - 8]
mov esi, dword [ebx + 8]
mov edi, dword [ebp - 0xc]
cmp ecx, edx
jge 0x4d0462
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 0x4d0454
mov edi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, esi
call fcn.00539c90
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 0x4d048a
cmp dword [edx + 0x18], 0
jbe 0x4d048a
mov edx, dword [edx + 0x1c]
jmp 0x4d048c
xor edx, edx
xor eax, eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], eax
jle 0x4d053b
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 0x4d04f7
cmp edx, ecx
jae 0x4d0529
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 0x4d04d0
jmp 0x4d0523
cmp edx, ecx
jae 0x4d0529
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 0x4d0501
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 0x4d04b0
push dword [ebp - 0x1c]
call fcn.005815f5
add esp, 4
push dword [ebp - 0x10]
call fcn.005815f5
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.00538fc0
int3