Function at 0x435e40
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x54]
mov ebp, dword [esp + 0x58]
cmp eax, 4
ja case.default.0x435e5c
jmp dword [eax*4 + 0x504278]
movzx eax, byte [edx + 0xb]
mov esi, dword [edx + 4]
add eax, 7
mov dword [esp + 0x20], esi
sar eax, 3
mov dword [esp + 0x1c], eax
mov edi, eax
lea ebx, [ebp + eax]
cmp esi, eax
jbe case.0x435e5c.60
lea eax, [esi - 1]
sub eax, edi
cmp eax, 2
lea eax, [ebp + 4]
seta dl
cmp ebx, eax
setae al
test dl, al
je 0x436238
mov eax, ebp
or eax, ebx
test al, 3
jne 0x436238
sub esi, edi
xor edx, edx
lea eax, [esi - 4]
mov dword [esp + 0x24], esi
shr eax, 2
lea esi, [eax + 1]
lea esi, [esi]
nop
mov ecx, dword [ebp + edx*4]
mov eax, dword [ebx + edx*4]
mov edi, ecx
and eax, 0x7f7f7f7f
xor ecx, dword [ebx + edx*4]
and edi, 0x7f7f7f7f
add eax, edi
mov edi, ecx
and edi, 0x80808080
xor eax, edi
mov dword [ebx + edx*4], eax
add edx, 1
cmp esi, edx
ja 0x435ec8
mov eax, dword [esp + 0x1c]
lea edx, [esi*4]
add ebx, edx
lea ecx, [ebp + edx]
add eax, edx
cmp dword [esp + 0x24], edx
je case.0x435e5c.60
mov edi, dword [esp + 0x20]
movzx edx, byte [ecx]
add byte [ebx], dl
lea edx, [eax + 1]
cmp edi, edx
jbe case.0x435e5c.60
add eax, 2
movzx edx, byte [ecx + 1]
add byte [ebx + 1], dl
cmp edi, eax
jbe case.0x435e5c.60
movzx eax, byte [ecx + 2]
add byte [ebx + 2], al
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edi, byte [edx + 0xb]
mov esi, dword [edx + 4]
add edi, 7
sar edi, 3
sub esi, edi
test edi, edi
je 0x436278
mov ebx, dword [esp + 0x5c]
lea ecx, [ebp + edi]
mov eax, ebp
lea esi, [esi]
movzx edx, byte [ebx]
add ebx, 1
shr dl, 1
add byte [eax], dl
add eax, 1
cmp eax, ecx
jne 0x435f68
add dword [esp + 0x5c], edi
test esi, esi
je case.0x435e5c.60
mov ebx, dword [esp + 0x5c]
xor eax, eax
lea esi, [esi]
nop
movzx edx, byte [ebx + eax]
movzx edi, byte [ebp + eax]
add edx, edi
sar edx, 1
add byte [ecx + eax], dl
add eax, 1
cmp esi, eax
jne 0x435f90
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, byte [edx + 0xb]
add eax, 7
sar eax, 3
mov esi, eax
mov eax, dword [edx + 4]
sub eax, esi
mov dword [esp + 0x24], eax
test esi, esi
je 0x436260
mov eax, dword [esp + 0x5c]
or eax, ebp
test al, 3
lea eax, [esi - 1]
sete dl
cmp eax, 2
seta al
test dl, al
je 0x4361f0
lea eax, [ebp + 3]
sub eax, dword [esp + 0x5c]
cmp eax, 6
jbe 0x4361f0
mov eax, esi
mov dword [esp + 0x1c], esi
mov ebx, dword [esp + 0x5c]
mov ecx, ebp
and eax, 0x3c
mov dword [esp + 0x58], ebp
add eax, ebp
mov ebp, eax
mov eax, dword [ecx]
mov esi, dword [ebx]
add ecx, 4
add ebx, 4
mov edi, eax
mov edx, esi
xor eax, esi
and edx, 0x7f7f7f7f
and edi, 0x7f7f7f7f
and eax, 0x80808080
add edx, edi
xor edx, eax
mov dword [ecx - 4], edx
cmp ecx, ebp
jne 0x436010
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov eax, esi
lea edi, [ebp + esi]
and eax, 0xfffffffc
lea edx, [ebp + eax]
add ecx, eax
cmp esi, eax
je 0x43607c
movzx ebx, byte [ecx]
add byte [edx], bl
lea ebx, [eax + 1]
cmp esi, ebx
jbe 0x43607c
add eax, 2
movzx ebx, byte [ecx + 1]
add byte [edx + 1], bl
cmp eax, esi
jae 0x43607c
movzx eax, byte [ecx + 2]
add byte [edx + 2], al
add esi, dword [esp + 0x5c]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], esi
mov eax, dword [esp + 0x24]
test eax, eax
je case.0x435e5c.60
mov dword [esp + 0x58], ebp
xor edi, edi
lea esi, [esi]
mov eax, dword [esp + 0x58]
mov esi, dword [esp + 0x5c]
movzx ebx, byte [eax + edi]
mov eax, dword [esp + 0x2c]
movzx ecx, byte [esi + edi]
movzx edx, byte [eax + edi]
movzx eax, bl
sub eax, ecx
mov byte [esp + 0x20], cl
mov esi, eax
mov byte [esp + 0x1c], dl
sub edx, ecx
sar esi, 0x1f
mov ecx, esi
xor ecx, eax
add eax, edx
sub ecx, esi
mov esi, eax
sar esi, 0x1f
xor eax, esi
sub eax, esi
mov ebp, eax
cmp eax, ecx
jle 0x4360e5
mov ebp, ecx
mov esi, edx
sar esi, 0x1f
xor edx, esi
sub edx, esi
cmp ebp, edx
jge 0x436100
movzx ebx, byte [esp + 0x1c]
cmp eax, ecx
jge 0x436100
movzx ebx, byte [esp + 0x20]
mov eax, dword [esp + 0x28]
add byte [eax + edi], bl
add edi, 1
cmp dword [esp + 0x24], edi
jne 0x4360a0
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [edx + 4]
test esi, esi
je case.0x435e5c.60
lea eax, [ebp + 3]
sub eax, dword [esp + 0x5c]
cmp eax, 6
lea eax, [esi - 1]
seta dl
cmp eax, 2
seta al
test dl, al
je 0x436218
mov eax, dword [esp + 0x5c]
or eax, ebp
test al, 3
jne 0x436218
mov eax, esi
mov dword [esp + 0x1c], esi
mov ebx, dword [esp + 0x5c]
mov ecx, ebp
and eax, 0xfffffffc
mov dword [esp + 0x58], ebp
add eax, ebp
mov ebp, eax
nop
mov esi, dword [ecx]
mov eax, dword [ebx]
add ecx, 4
add ebx, 4
mov edx, eax
mov edi, esi
xor eax, esi
and edx, 0x7f7f7f7f
and edi, 0x7f7f7f7f
and eax, 0x80808080
add edx, edi
xor edx, eax
mov dword [ecx - 4], edx
cmp ecx, ebp
jne 0x436170
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x58]
mov ebx, dword [esp + 0x5c]
mov eax, esi
and eax, 0xfffffffc
lea edx, [ebp + eax]
add ebx, eax
cmp esi, eax
je case.0x435e5c.60
movzx ecx, byte [ebx]
add byte [edx], cl
lea ecx, [eax + 1]
cmp esi, ecx
jbe case.0x435e5c.60
add eax, 2
movzx ecx, byte [ebx + 1]
add byte [edx + 1], cl
cmp eax, esi
jae case.0x435e5c.60
movzx eax, byte [ebx + 2]
add byte [edx + 2], al
jmp case.0x435e5c.60
mov edx, dword [esp + 0x5c]
lea edi, [ebp + esi]
mov eax, ebp
lea esi, [esi]
movzx ecx, byte [edx]
add byte [eax], cl
add eax, 1
add edx, 1
cmp eax, edi
jne 0x436200
jmp 0x43607c
mov eax, dword [esp + 0x5c]
lea edx, [ebp + esi]
movzx ecx, byte [eax]
add byte [ebp], cl
add ebp, 1
add eax, 1
cmp ebp, edx
jne 0x436220
jmp case.0x435e5c.60
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x1c]
add eax, ebp
lea esi, [esi]
add ebp, 1
movzx edx, byte [ebp - 1]
add byte [ebx], dl
add ebx, 1
cmp ebp, eax
jne 0x436248
jmp case.0x435e5c.60
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], eax
jmp 0x436088
mov ecx, ebp
jmp 0x435f7d
mov eax, dword [esp + 0x50]
mov dword [esp + 4], str.Ignoring_bad_adaptive_filter_type
mov dword [esp], eax
call sym._png_error
lea esi, [esi]
lea esi, [esi]