Function at 0x54adc5
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, edx
mov dword [ebp - 4], ecx
push edi
mov ecx, esi
mov eax, dword [esi]
add eax, dword [ebp + 8]
mov dword [esi + 4], eax
call fcn.0054a8eb
mov ebx, eax
call fcn.0054a8eb
mov dword [ebp - 8], eax
call fcn.0054a90d
mov ecx, dword [ebp - 8]
mov edx, eax
xor eax, eax
mov dword [ebp + 8], edx
inc eax
cmp ecx, eax
jne 0x54aa26
cmp edx, 4
jbe 0x54aa39
cmp ecx, 3
jne 0x54aa30
cmp edx, 2
jbe 0x54aa39
cmp ecx, 4
jne 0x54aa40
cmp edx, eax
ja 0x54aa40
mov edi, dword [esi + 4]
sub edi, dword [esi]
jmp 0x54aa52
mov ecx, esi
call fcn.0054a90d
mov ecx, dword [ebp - 8]
mov edi, eax
mov edx, dword [ebp + 8]
xor eax, eax
inc eax
cmp ebx, 0x11c
ja 0x54ab63
je 0x54ab58
add ebx, 0xffffff02
cmp ebx, 0x1d
ja case.0x54aa7a.255
movzx eax, byte [ebx + 0x54ada7]
jmp dword [eax*4 + 0x54ad6f]
push 1
push edi
push ecx
lea ecx, [esi + 0x4c]
mov edx, esi
call fcn.0054a955
jmp 0x54ad57
push 1
push edi
push ecx
lea ecx, [esi + 0x58]
jmp 0x54aa88
push 1
push edi
push ecx
lea ecx, [esi + 0x5c]
jmp 0x54aa88
push 1
push edi
push ecx
lea ecx, [esi + 0x64]
jmp 0x54aa88
push 1
push edi
push ecx
lea ecx, [esi + 0x54]
jmp 0x54aa88
push 1
push edi
push ecx
lea ecx, [esi + 0x50]
jmp 0x54aa88
push 1
push edi
push ecx
lea ecx, [esi + 0x7c]
jmp 0x54aa88
push 1
push edi
push ecx
lea ecx, [esi + 0x60]
jmp 0x54aa88
push 1
push edi
push ecx
lea ecx, [esi + 0x18]
jmp 0x54aa88
push 1
push edi
push ecx
lea ecx, [esi + 0x70]
jmp 0x54aa88
push 1
push edi
push ecx
lea ecx, [esi + 0x74]
jmp 0x54aa88
cmp dword [esi + 0x1c], 0
jne 0x54ad5f
mov ecx, dword [ebp - 4]
shl edx, 2
call fcn.00522007
mov ebx, dword [ebp + 8]
mov edx, esi
mov ecx, dword [ebp - 8]
push ebx
push edi
push ecx
mov ecx, eax
mov dword [esi + 0x1c], eax
call fcn.0054a955
mov dword [esi + 0x24], ebx
jmp 0x54ad57
cmp dword [esi + 0x20], 0
je 0x54ab30
push str.at_most_one_strip_byte_counts_tag_allowed
jmp 0x54ad64
mov ecx, dword [ebp - 4]
shl edx, 2
call fcn.00522007
mov ebx, dword [ebp + 8]
mov edx, esi
mov ecx, dword [ebp - 8]
push ebx
push edi
push ecx
mov ecx, eax
mov dword [esi + 0x20], eax
call fcn.0054a955
mov dword [esi + 0x28], ebx
jmp 0x54ad57
push eax
push edi
push ecx
lea ecx, [esi + 0x68]
jmp 0x54aa88
cmp ebx, 0x143
ja 0x54ac22
je 0x54ac17
sub ebx, 0x124
je 0x54ac09
sub ebx, 1
je 0x54abfb
sub ebx, 3
je 0x54abf0
sub ebx, 0x15
je 0x54abe2
sub ebx, 3
je 0x54abaa
dec ebx
sub ebx, 1
jne case.0x54aa7a.255
push eax
push edi
push ecx
lea ecx, [esi + 0x30]
jmp 0x54aa88
cmp dword [esi + 0x44], 0
je 0x54abba
push str.at_most_one_color_map_allowed
jmp 0x54ad64
mov ecx, dword [ebp - 4]
shl edx, 2
call fcn.00522007
mov ebx, dword [ebp + 8]
mov edx, esi
mov ecx, dword [ebp - 8]
push ebx
push edi
push ecx
mov ecx, eax
mov dword [esi + 0x44], eax
call fcn.0054a955
mov dword [esi + 0x48], ebx
jmp 0x54ad57
push eax
push edi
push ecx
lea ecx, [esi + 0x88]
jmp 0x54aa88
push eax
push edi
push ecx
lea ecx, [esi + 0x78]
jmp 0x54aa88
push eax
push edi
push ecx
lea ecx, [esi + 0x84]
jmp 0x54aa88
push eax
push edi
push ecx
lea ecx, [esi + 0x80]
jmp 0x54aa88
push eax
push edi
push ecx
lea ecx, [esi + 0x2c]
jmp 0x54aa88
sub ebx, 0x144
je 0x54ad27
sub ebx, 1
je 0x54acf5
sub ebx, 0xd
je 0x54acea
sub ebx, 9
je 0x54acc0
sub ebx, 0xb7
je 0x54acb1
sub ebx, 0x8561
jne case.0x54aa7a.255
cmp dword [esi + 0x9c], ebx
je 0x54ac6b
push str.at_most_one_ICC_profile_tag_allowed
jmp 0x54ad64
mov ecx, dword [ebp - 4]
call fcn.00522007
mov ecx, dword [esi + 8]
sub ecx, dword [esi]
mov ebx, dword [ebp + 8]
cmp edi, ecx
mov dword [ebp - 8], eax
cmovbe ecx, edi
mov dword [esi + 0x9c], eax
add ecx, dword [esi]
mov dword [esi + 4], ecx
test ebx, ebx
je 0x54aca6
mov edi, eax
mov ecx, esi
call fcn.0054a8d5
mov byte [edi], al
inc edi
sub ebx, 1
jne 0x54ac94
mov ebx, dword [ebp + 8]
mov dword [esi + 0xa0], ebx
jmp case.0x54aa7a.255
push 2
push edi
push ecx
lea ecx, [esi + 0x8c]
jmp 0x54aa88
mov ecx, dword [esi + 8]
mov ebx, dword [esi]
sub ecx, ebx
cmp edi, ecx
ja 0x54ace3
lea eax, [edi + edx]
cmp eax, ecx
ja 0x54ace3
lea eax, [ebx + edi]
mov dword [esi + 0x98], edx
mov dword [esi + 0x94], eax
jmp case.0x54aa7a.255
push str.TIFF_JPEG_tables_out_of_range
jmp 0x54ad64
push eax
push edi
push ecx
lea ecx, [esi + 0x6c]
jmp 0x54aa88
cmp dword [esi + 0x38], 0
je 0x54ad02
push str.at_most_one_tile_byte_counts_tag_allowed
jmp 0x54ad64
mov ecx, dword [ebp - 4]
shl edx, 2
call fcn.00522007
mov ebx, dword [ebp + 8]
mov edx, esi
mov ecx, dword [ebp - 8]
push ebx
push edi
push ecx
mov ecx, eax
mov dword [esi + 0x38], eax
call fcn.0054a955
mov dword [esi + 0x40], ebx
jmp 0x54ad57
cmp dword [esi + 0x34], 0
je 0x54ad34
push str.at_most_one_tile_offsets_tag_allowed
jmp 0x54ad64
mov ecx, dword [ebp - 4]
shl edx, 2
call fcn.00522007
mov ebx, dword [ebp + 8]
mov edx, esi
mov ecx, dword [ebp - 8]
push ebx
push edi
push ecx
mov ecx, eax
mov dword [esi + 0x34], eax
call fcn.0054a955
mov dword [esi + 0x3c], ebx
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret
push str.at_most_one_strip_offsets_tag_allowed
push 2
push dword [ebp - 4]
call fcn.004f715e
nop
sub dword [edx - 0x556bffac], 0xaa9d0054
push esp
add byte [esi - 0x50ffab56], ah
stosb byte es:[edi], al
push esp
add byte [eax - 0x3effab56], bh
stosb byte es:[edi], al
push esp
add dh, ch
stosb byte es:[edi], al
push esp
add dl, cl
stosb byte es:[edi], al
push esp
add bl, dl
stosb byte es:[edi], al
push esp
add byte [eax], ah
stosd dword es:[edi], eax
push esp
add ah, bl
stosb byte es:[edi], al
push esp
add ch, ah
stosb byte es:[edi], al
push esp
add byte [edx - 0x53], bl
push esp
add byte [eax], al
or eax, 0x4030201
or eax, 218957069
or eax, 218959110
or eax, 218565901
or eax, 168364045
or eax, 1426852621
push ebp
mov ebp, esp
cmp dword [ebp + 8], 8
jne 0x54ade9
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x54ae08
lea eax, [edx + 2]
xor byte [eax - 1], 0x80
xor byte [eax], 0x80
lea eax, [eax + 3]
sub ecx, 1
jne 0x54add8
pop ebp
ret
cmp dword [ebp + 8], 0x10
jne 0x54ae08
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x54ae08
lea eax, [edx + 4]
xor byte [eax - 2], 0x80
xor byte [eax], 0x80
lea eax, [eax + 6]
sub ecx, 1
jne 0x54adf9
pop ebp
ret