Function at 0x495981
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
mov dword [esp], ecx
push ebx
push ebp
mov ebp, edx
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x18]
lea ebx, [edi + 0x98]
test eax, eax
je 0x495c3d
test esi, esi
je 0x495c3d
cmp eax, 0x21
jae 0x4959c7
mov dword [edi + 0x190], 0x1b
mov eax, 0x1b
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov ecx, ebx
call fcn.00495911
mov ecx, ebx
call fcn.00496a74
cmp byte [esi], 0x89
jne 0x495c28
cmp byte [esi + 1], 0x50
jne 0x495c28
cmp byte [esi + 2], 0x4e
jne 0x495c28
cmp byte [esi + 3], 0x47
jne 0x495c28
cmp byte [esi + 4], 0xd
jne 0x495c28
cmp byte [esi + 5], 0xa
jne 0x495c28
cmp byte [esi + 6], 0x1a
jne 0x495c28
cmp byte [esi + 7], 0xa
jne 0x495c28
movzx ecx, byte [esi + 8]
movzx eax, byte [esi + 9]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xb]
shl ecx, 8
or ecx, eax
cmp ecx, 0xd
je 0x495a5d
mov dword [edi + 0x190], 0x5e
mov eax, 0x5e
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov eax, str.IHDR
inc eax
cmp byte [eax], 0
jne 0x495a62
sub eax, str.IHDR
cmp eax, 4
jne 0x495c13
cmp byte [esi + 0xc], 0x49
jne 0x495c13
cmp byte [esi + 0xd], 0x48
jne 0x495c13
cmp byte [esi + 0xe], 0x44
jne 0x495c13
cmp byte [esi + 0xf], 0x52
jne 0x495c13
movzx eax, byte [esi + 0x10]
movzx edx, byte [esi + 0x11]
movzx ecx, byte [esi + 0x14]
shl eax, 8
or edx, eax
shl ecx, 8
movzx eax, byte [esi + 0x12]
shl edx, 8
or edx, eax
movzx eax, byte [esi + 0x13]
shl edx, 8
or edx, eax
movzx eax, byte [esi + 0x15]
or ecx, eax
movzx eax, byte [esi + 0x16]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0x17]
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x495ae6
mov dword [eax], edx
test ebp, ebp
je 0x495aed
mov dword [ebp], ecx
movzx ebp, byte [esi + 0x18]
mov dword [ebx + 0x10], ebp
movzx eax, byte [esi + 0x19]
mov dword [esp + 0x18], eax
mov dword [ebx + 0xc], eax
movzx eax, byte [esi + 0x1a]
mov dword [esp + 0x20], eax
mov dword [ebx], eax
movzx eax, byte [esi + 0x1b]
mov dword [ebx + 4], eax
movzx eax, byte [esi + 0x1c]
mov dword [ebx + 8], eax
test edx, edx
je 0x495bfe
test ecx, ecx
je 0x495bfe
mov ecx, dword [esp + 0x18]
mov edx, ebp
call fcn.00495678
mov ebp, eax
mov dword [edi + 0x190], ebp
test ebp, ebp
jne 0x495c4c
cmp dword [esp + 0x20], eax
je 0x495b5b
mov dword [edi + 0x190], 0x20
lea eax, [ebp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp dword [ebx + 4], 0
je 0x495b76
mov dword [edi + 0x190], 0x21
mov eax, 0x21
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp dword [ebx + 8], 1
jbe 0x495b91
mov dword [edi + 0x190], 0x22
mov eax, 0x22
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp dword [edi + 0x18], 0
jne 0x495bf6
movzx ebx, byte [esi + 0x1d]
or ecx, 0xffffffff
movzx eax, byte [esi + 0x1e]
shl ebx, 8
or ebx, eax
movzx eax, byte [esi + 0x1f]
shl ebx, 8
or ebx, eax
movzx eax, byte [esi + 0x20]
shl ebx, 8
or ebx, eax
xor edx, edx
lea ebx, [ebx]
movzx eax, byte [esi + edx + 0xc]
inc edx
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x51c244]
cmp edx, 0x11
jb 0x495bc1
not ecx
cmp ebx, ecx
je 0x495bf6
mov dword [edi + 0x190], 0x39
mov eax, 0x39
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret
mov dword [edi + 0x190], 0x5d
mov eax, 0x5d
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [edi + 0x190], 0x1d
mov eax, 0x1d
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [edi + 0x190], 0x1c
mov eax, 0x1c
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [edi + 0x190], 0x30
mov eax, 0x30
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret