Function at 0x100f3610
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x18]
mov ecx, dword [esi + 0x124]
test ecx, ecx
je 0x100f3f3e
mov eax, dword [esi + 0x78]
and eax, 0x4040
cmp eax, 0x4000
je 0x100f3f49
mov eax, dword [esi + 0x7c]
push ebx
push ebp
lea ebp, [esi + 0x7c]
test eax, 0x1000
je 0x100f381b
mov bl, byte [edi + 8]
movzx edx, word [esi + 0x148]
cmp bl, 3
jne 0x100f3680
push edx
push dword [esi + 0x1b0]
lea eax, [ecx + 1]
push dword [esi + 0x13c]
push eax
push edi
push esi
call fcn.100f2830
add esp, 0x18
jmp 0x100f3818
lea ebp, [esi + 0x7c]
test dx, dx
je 0x100f36ab
test eax, 0x2000000
je 0x100f36a8
lea eax, [esi + 0x1b4]
push eax
lea eax, [ecx + 1]
push eax
push edi
call fcn.100f23a0
add esp, 0xc
jmp 0x100f3818
lea ebp, [esi + 0x7c]
mov edx, dword [edi]
inc ecx
mov dword [esp + 0x10], edx
test bl, bl
jne 0x100f381b
mov al, byte [edi + 9]
cmp al, 8
jae 0x100f381b
movzx eax, al
sub eax, 1
je 0x100f37be
sub eax, 1
je 0x100f3754
sub eax, 2
jne 0x100f380d
lea eax, [edx - 1]
mov ebx, eax
lea ebp, [ecx - 1]
shr ebx, 1
and eax, 1
add ebx, ecx
shl eax, 2
mov ecx, 4
add ebp, edx
sub ecx, eax
mov dword [esp + 0x14], ecx
test edx, edx
je 0x100f380d
mov esi, edx
mov edi, 4
nop dword [eax]
mov dl, byte [ebx]
lea ebp, [ebp - 1]
shr dl, cl
mov al, dl
shl dl, 4
and al, 0xf
xor al, dl
cmp dword [esp + 0x14], edi
mov byte [ebp + 1], al
lea eax, [ebx - 1]
cmovne eax, ebx
mov ebx, eax
xor eax, eax
cmp dword [esp + 0x14], edi
cmovne eax, edi
mov ecx, eax
mov dword [esp + 0x14], ecx
sub esi, 1
jne 0x100f3710
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
jmp 0x100f380d
lea eax, [edx - 1]
mov ebx, 3
mov ebp, eax
and eax, 3
shr ebp, 2
sub ebx, eax
add ebp, ecx
add ebx, ebx
dec ecx
add ecx, edx
test edx, edx
je 0x100f380d
mov edi, edx
mov esi, ecx
nop dword [eax]
mov dl, byte [ebp]
mov cl, bl
shr dl, cl
and dl, 3
mov al, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
mov byte [esi], al
cmp ebx, 6
jne 0x100f37a7
xor ebx, ebx
dec ebp
jmp 0x100f37aa
add ebx, 2
dec esi
sub edi, 1
jne 0x100f3780
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
jmp 0x100f380d
lea eax, [edx - 1]
mov ebx, eax
lea ebp, [edx - 1]
and eax, 7
shr ebx, 3
mov edx, 7
add ebx, ecx
sub edx, eax
add ebp, ecx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x100f380b
mov edi, eax
mov al, byte [ebx]
mov cl, dl
shr al, cl
and al, 1
neg al
sbb al, al
mov byte [ebp], al
cmp edx, 7
jne 0x100f37fa
xor edx, edx
dec ebx
jmp 0x100f37fb
inc edx
dec ebp
sub edi, 1
jne 0x100f37e1
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
jmp 0x100f380d
mov edx, eax
mov byte [edi + 9], 8
mov byte [edi + 0xb], 8
mov dword [edi + 4], edx
lea ebp, [esi + 0x7c]
mov eax, dword [esi + 0x7c]
mov ebx, ebp
and eax, 0x40080
cmp eax, 0x40000
jne 0x100f384d
mov al, byte [edi + 8]
cmp al, 6
je 0x100f383a
cmp al, 4
jne 0x100f384d
lea ebx, [esi + 0x7c]
mov eax, dword [esi + 0x124]
push 0
inc eax
push eax
push edi
call fcn.100f5a30
add esp, 0xc
test dword [ebp], 0x600000
mov ecx, ebx
mov dword [esp + 0x10], ecx
je 0x100f38bf
mov eax, dword [esi + 0x124]
inc eax
mov dword [esp + 0x10], ebx
push eax
push edi
push esi
call fcn.100f3f70
add esp, 0xc
test eax, eax
je 0x100f38bb
mov eax, dword [ebp]
mov ecx, ebx
and eax, 0x600000
mov byte [esi + 0x248], 1
mov dword [esp + 0x10], ebx
cmp eax, 0x400000
jne 0x100f38a7
push str.png_do_rgb_to_gray_found_nongray_pixel
push esi
call fcn.100edc70
lea ecx, [esi + 0x7c]
add esp, 8
mov dword [esp + 0x10], ecx
mov eax, dword [ebx]
and eax, 0x600000
cmp eax, 0x200000
je 0x100f3f54
jmp 0x100f38bf
mov ecx, dword [esp + 0x10]
test dword [ebx], 0x4000
je 0x100f38e7
test dword [esi + 0x74], 0x800
mov ebx, ecx
jne 0x100f38e7
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
call fcn.100f2f20
mov ebx, dword [esp + 0x18]
add esp, 8
test byte [ebx], 0x80
je 0x100f38fe
mov eax, dword [esi + 0x124]
push esi
inc eax
push eax
push edi
call fcn.100f1170
add esp, 0xc
mov ecx, dword [ebx]
mov ebp, ebx
mov eax, ecx
and eax, 0x602000
cmp eax, 0x2000
jne 0x100f3945
test cl, cl
jns 0x100f392a
cmp word [esi + 0x148], 0
jne 0x100f3945
test byte [esi + 0x14f], 4
jne 0x100f3945
lea ebp, [esi + 0x7c]
cmp byte [esi + 0x14f], 3
je 0x100f3945
mov eax, dword [esi + 0x124]
push esi
inc eax
push eax
push edi
call fcn.100f2b00
add esp, 0xc
mov eax, dword [ebp]
and eax, 0x40080
cmp eax, 0x40080
jne 0x100f3972
mov al, byte [edi + 8]
cmp al, 6
je 0x100f395f
cmp al, 4
jne 0x100f3972
mov eax, dword [esi + 0x124]
push 0
inc eax
push eax
push edi
call fcn.100f5a30
add esp, 0xc
test dword [ebp], 0x800000
je 0x100f3a59
mov bl, byte [edi + 8]
test bl, 4
je 0x100f3a59
mov ecx, dword [esi + 0x124]
mov al, byte [edi + 9]
inc ecx
mov edx, dword [edi]
cmp al, 8
jne 0x100f39da
mov ebp, dword [esi + 0x194]
test ebp, ebp
je 0x100f3a4b
test bl, 2
mov ebx, 0
setne bl
dec ecx
lea ebx, [ebx*2 + 2]
add ecx, ebx
test edx, edx
je 0x100f3a59
movzx eax, byte [ecx]
mov al, byte [eax + ebp]
mov byte [ecx], al
add ecx, ebx
sub edx, 1
jne 0x100f39c6
jmp 0x100f3a59
cmp al, 0x10
jne 0x100f3a4b
cmp dword [esi + 0x19c], 0
je 0x100f3a4b
test bl, 2
mov eax, 0
setne al
lea eax, [eax*4 + 4]
lea ebx, [eax - 2]
mov dword [esp + 0x14], eax
add ebx, ecx
test edx, edx
je 0x100f3a59
mov eax, dword [esi + 0x184]
mov ebp, dword [esp + 0x14]
mov edi, dword [esi + 0x19c]
movzx ecx, al
mov dword [esp + 0x10], ecx
nop dword [eax]
movzx eax, byte [ebx + 1]
shr eax, cl
movzx ecx, byte [ebx]
mov eax, dword [edi + eax*4]
movzx ecx, word [eax + ecx*2]
mov eax, ecx
mov byte [ebx + 1], cl
mov ecx, dword [esp + 0x10]
shr eax, 8
mov byte [ebx], al
add ebx, ebp
sub edx, 1
jne 0x100f3a20
mov edi, dword [esp + 0x20]
jmp 0x100f3a59
push str.png_do_encode_alpha:_unexpected_call
push esi
call fcn.100edc70
add esp, 8
mov eax, dword [esi + 0x7c]
mov ebp, eax
test eax, 0x4000000
je 0x100f3ac4
cmp byte [edi + 9], 0x10
jne 0x100f3ac4
mov ecx, dword [esi + 0x124]
mov eax, dword [edi + 4]
inc eax
add eax, ecx
lea edx, [ecx + 1]
mov dword [esp + 0x14], eax
mov ebx, edx
cmp edx, eax
jae 0x100f3aad
mov ebp, eax
movzx ecx, byte [edx]
lea ebx, [ebx + 1]
movzx eax, byte [edx + 1]
add edx, 2
sub eax, ecx
sub eax, 0xffffff80
imul eax, eax, 0xffff
sar eax, 0x18
add ecx, eax
mov byte [ebx - 1], cl
cmp edx, ebp
jb 0x100f3a86
mov ebp, dword [esi + 0x7c]
mov al, byte [edi + 0xa]
shl al, 3
mov byte [edi + 0xb], al
movzx eax, byte [edi + 0xa]
imul eax, dword [edi]
mov byte [edi + 9], 8
mov dword [edi + 4], eax
mov edx, ebp
test ebp, 0x400
je 0x100f3b1f
cmp byte [edi + 9], 0x10
jne 0x100f3b1f
mov ecx, dword [esi + 0x124]
mov dword [esp + 0x14], ebp
lea edx, [ecx + 1]
inc ecx
add ecx, dword [edi + 4]
mov ebx, edx
cmp edx, ecx
jae 0x100f3b04
nop dword [eax + eax]
mov al, byte [edx]
lea ebx, [ebx + 1]
add edx, 2
mov byte [ebx - 1], al
cmp edx, ecx
jb 0x100f3af0
mov edx, dword [esi + 0x7c]
jmp 0x100f3b08
mov edx, dword [esp + 0x14]
mov al, byte [edi + 0xa]
shl al, 3
mov byte [edi + 0xb], al
movzx eax, byte [edi + 0xa]
imul eax, dword [edi]
mov byte [edi + 9], 8
mov dword [edi + 4], eax
test dl, 0x40
je 0x100f3b4b
push dword [esi + 0x208]
mov eax, dword [esi + 0x124]
push dword [esi + 0x204]
inc eax
push eax
push edi
call fcn.100f30d0
add esp, 0x10
cmp dword [edi + 4], 0
je 0x100f3f5f
mov ebp, dword [esi + 0x7c]
mov ebx, ebp
test ebp, 0x200
je 0x100f3b9d
cmp byte [edi + 9], 8
jne 0x100f3b9d
cmp byte [edi + 8], 3
je 0x100f3b9d
mov ecx, dword [edi + 4]
lea edx, [ecx + 1]
add edx, dword [esi + 0x124]
add ecx, edx
cmp ecx, edx
jbe 0x100f3b88
mov al, byte [edx - 1]
dec edx
mov byte [ecx - 1], al
add ecx, 0xfffffffe
mov byte [ecx], al
cmp ecx, edx
ja 0x100f3b76
mov ebx, ebp
mov eax, dword [edi + 4]
add eax, eax
mov byte [edi + 9], 0x10
mov dword [edi + 4], eax
mov al, byte [edi + 0xa]
shl al, 4
mov byte [edi + 0xb], al
test ebx, 0x4000
je 0x100f3bbf
test dword [esi + 0x74], 0x800
je 0x100f3bbf
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
call fcn.100f2f20
add esp, 8
test byte [esi + 0x7c], 0x20
je 0x100f3bd6
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
call fcn.100f5910
add esp, 8
test dword [esi + 0x7c], 0x80000
je 0x100f3c9f
mov eax, dword [esi + 0x124]
mov cl, byte [edi + 8]
inc eax
mov edx, dword [edi]
cmp cl, 6
jne 0x100f3c4e
mov ecx, dword [edi + 4]
add ecx, eax
cmp byte [edi + 9], 8
mov ebx, ecx
jne 0x100f3c24
test edx, edx
je 0x100f3c9f
nop dword [eax]
mov al, byte [ecx - 1]
sub ecx, 4
not al
mov byte [ebx - 1], al
mov ebx, ecx
sub edx, 1
jne 0x100f3c10
jmp 0x100f3c9f
test edx, edx
je 0x100f3c9f
nop dword [eax + eax]
movzx eax, byte [ecx - 1]
not al
mov byte [ebx - 1], al
movzx eax, byte [ecx - 2]
sub ecx, 8
not al
mov byte [ebx - 2], al
mov ebx, ecx
sub edx, 1
jne 0x100f3c30
jmp 0x100f3c9f
cmp cl, 4
jne 0x100f3c9f
mov ecx, dword [edi + 4]
add ecx, eax
cmp byte [edi + 9], 8
mov ebx, ecx
jne 0x100f3c7f
test edx, edx
je 0x100f3c9f
movzx eax, byte [ecx - 1]
lea ecx, [ecx - 2]
lea ebx, [ebx - 2]
not al
mov byte [ebx + 1], al
movzx eax, byte [ecx]
mov byte [ebx], al
sub edx, 1
jne 0x100f3c64
jmp 0x100f3c9f
test edx, edx
je 0x100f3c9f
movzx eax, byte [ecx - 1]
not al
mov byte [ebx - 1], al
movzx eax, byte [ecx - 2]
sub ecx, 4
not al
mov byte [ebx - 2], al
mov ebx, ecx
sub edx, 1
jne 0x100f3c83
test byte [esi + 0x7c], 8
je 0x100f3cbd
lea eax, [esi + 0x1a9]
push eax
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
call fcn.100f44a0
add esp, 0xc
test byte [esi + 0x7c], 4
je 0x100f3e2e
mov ecx, dword [esi + 0x124]
mov al, byte [edi + 9]
inc ecx
cmp al, 8
jae 0x100f3e2e
mov ebp, dword [edi]
movzx eax, al
mov dword [esp + 0x10], ebp
sub eax, 1
je 0x100f3db6
sub eax, 1
je 0x100f3d56
sub eax, 2
jne 0x100f3e17
lea eax, [ebp - 1]
mov ebx, 1
mov edx, eax
and eax, 1
shr edx, 1
sub ebx, eax
add edx, ecx
shl ebx, 2
dec ecx
add ecx, ebp
mov dword [esp + 0x14], ecx
test ebp, ebp
je 0x100f3e17
mov edi, ebp
mov esi, ecx
mov ebp, 4
mov al, byte [edx]
lea esi, [esi - 1]
mov cl, bl
shr al, cl
and al, 0xf
cmp ebx, ebp
mov byte [esi + 1], al
lea eax, [edx - 1]
cmovne eax, edx
mov edx, eax
xor eax, eax
cmp ebx, ebp
cmovne eax, ebp
mov ebx, eax
sub edi, 1
jne 0x100f3d27
mov ebp, dword [esp + 0x10]
jmp 0x100f3e0f
lea eax, [ebp - 1]
mov ebx, eax
and eax, 3
shr ebx, 2
add ebx, ecx
dec ecx
add ecx, ebp
mov dword [esp + 0x10], ecx
mov ecx, 3
sub ecx, eax
add ecx, ecx
mov dword [esp + 0x14], ecx
test ebp, ebp
je 0x100f3e17
mov edi, dword [esp + 0x10]
mov esi, ebp
mov al, byte [ebx]
lea edi, [edi - 1]
shr al, cl
mov edx, ecx
and al, 3
cmp dword [esp + 0x14], 6
mov byte [edi + 1], al
lea eax, [ebx - 1]
cmovne eax, ebx
xor ecx, ecx
cmp edx, 6
mov ebx, eax
lea eax, [edx + 2]
cmovne ecx, eax
mov dword [esp + 0x14], ecx
sub esi, 1
jne 0x100f3d85
jmp 0x100f3e0f
lea eax, [ebp - 1]
mov ebx, eax
and eax, 7
shr ebx, 3
add ebx, ecx
dec ecx
add ecx, ebp
mov dword [esp + 0x10], ecx
mov ecx, 7
sub ecx, eax
mov dword [esp + 0x14], ecx
test ebp, ebp
je 0x100f3e17
mov esi, dword [esp + 0x10]
mov edi, ebp
nop
mov al, byte [ebx]
lea esi, [esi - 1]
shr al, cl
mov edx, ecx
and al, 1
cmp dword [esp + 0x14], 7
mov byte [esi + 1], al
lea eax, [ebx - 1]
cmovne eax, ebx
xor ecx, ecx
cmp edx, 7
mov ebx, eax
lea eax, [edx + 1]
cmovne ecx, eax
mov dword [esp + 0x14], ecx
sub edi, 1
jne 0x100f3de0
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov al, byte [edi + 0xa]
shl al, 3
mov byte [edi + 0xb], al
movzx eax, byte [edi + 0xa]
imul eax, ebp
mov byte [edi + 9], 8
mov dword [edi + 4], eax
cmp byte [edi + 8], 3
jne 0x100f3e47
cmp dword [esi + 0x144], 0
jl 0x100f3e47
push edi
push esi
call fcn.100f57a0
add esp, 8
test byte [esi + 0x7c], 1
je 0x100f3e5e
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
call fcn.100f56c0
add esp, 8
test dword [esi + 0x7c], 0x10000
je 0x100f3e78
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
call fcn.100f59e0
add esp, 8
test dword [esi + 0x7c], 0x8000
je 0x100f3e9d
push dword [esi + 0x78]
movzx eax, word [esi + 0x15a]
push eax
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
call fcn.100f3250
add esp, 0x10
test dword [esi + 0x7c], 0x20000
je 0x100f3eb7
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
call fcn.100f3500
add esp, 8
test byte [esi + 0x7c], 0x10
je 0x100f3ece
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
call fcn.100f5bb0
add esp, 8
test dword [esi + 0x7c], 0x100000
je 0x100f3f36
mov ecx, dword [esi + 0x64]
test ecx, ecx
je 0x100f3eed
mov eax, dword [esi + 0x124]
inc eax
push eax
push edi
push esi
call ecx
add esp, 0xc
mov al, byte [esi + 0x70]
test al, al
je 0x100f3ef7
mov byte [edi + 9], al
mov al, byte [esi + 0x71]
test al, al
je 0x100f3f01
mov byte [edi + 0xa], al
movzx eax, byte [edi + 9]
movzx ecx, byte [edi + 0xa]
imul ecx, eax
mov eax, dword [edi]
mov byte [edi + 0xb], cl
movzx edx, cl
cmp cl, 8
jb 0x100f3f2a
shr edx, 3
imul edx, eax
pop ebp
pop ebx
mov dword [edi + 4], edx
pop edi
pop esi
add esp, 8
ret
imul edx, eax
add edx, 7
shr edx, 3
mov dword [edi + 4], edx
pop ebp
pop ebx
pop edi
pop esi
add esp, 8
ret
push str.NULL_row_buffer
push esi
call fcn.100ed7e0
push str.Uninitialized_row
push esi
call fcn.100ed7e0
push str.png_do_rgb_to_gray_found_nongray_pixel
push esi
call fcn.100ed7e0
push str.png_do_quantize_returned_rowbytes0
push esi
call fcn.100ed7e0
int3