Function at 0x4c881f
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x5bdddc
call fcn.0057ffbc
sub esp, 0xb4
mov eax, dword [ebp + 0x18]
push ebx
and eax, 2
push esi
cmp al, 2
push edi
sete byte [ebp - 0x38]
xor ebx, ebx
mov edi, ecx
cmp byte [ebp - 0x38], bl
mov dword [ebp - 0x20], edi
jne 0x4c885a
cmp dword [ebp + 0x14], ebx
jne 0x4c885a
mov dword [edi], 5
jmp 0x4c8e65
mov eax, dword [ebp + 0x10]
mov dword [edi], ebx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x84], ebx
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x80], ebx
mov dword [eax], ebx
mov al, byte [ebp + 0x18]
and al, 1
mov dword [ebp - 0x8e], ebx
mov byte [ebp - 0x11], al
lea eax, [ebp - 0x74]
push eax
push 0x102
push esi
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x64], ebx
call fcn.004e0c5e
add esp, 0xc
cmp word [ebp - 0x74], 1
je 0x4c88b3
mov dword [edi], 0x1c
jmp 0x4c8e65
lea eax, [ebp - 0x78]
push eax
push 0x115
push esi
call fcn.004e0c5e
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0x152
push esi
call fcn.004e0c5e
movzx eax, word [ebp - 0x78]
movzx ecx, word [ebp - 0x7c]
sub eax, ecx
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x8e]
push eax
push 0x103
push esi
call fcn.004e0c5e
lea eax, [ebp - 0x80]
push eax
push 0x11c
push esi
call fcn.004e0c5e
lea eax, [ebp - 0x64]
push eax
push 0x106
push esi
call fcn.004dddd0
add esp, 0x40
test eax, eax
jne 0x4c8945
mov eax, dword [ebp - 0x40]
dec eax
je 0x4c8935
push str.Cant_determine_TIFF_photometric
push 3
call fcn.0053cac5
pop ecx
pop ecx
jmp 0x4c88a8
push esi
mov ecx, edi
call fcn.004c8fe0
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x1c]
push eax
push 0x100
push esi
call fcn.004dddd0
lea eax, [ebp - 0x10]
push eax
push 0x101
push esi
call fcn.004dddd0
lea eax, [ebp - 0x4c]
push eax
push 0x112
push esi
call fcn.004e0c5e
add esp, 0x24
cmp byte [ebp - 0x11], bl
je 0x4c8981
mov dword [ebp - 0x4c], 1
lea eax, [ebp - 0x70]
mov ecx, edi
push eax
lea eax, [ebp - 0x66]
push eax
lea eax, [ebp - 0x65]
push eax
movzx eax, word [ebp - 0x4c]
push eax
call fcn.004c7c42
lea eax, [ebp - 0x8a]
push eax
push pe_nt_image_headers32
push esi
call fcn.004dddd0
lea eax, [ebp - 0xa4]
push eax
push 0x11a
push esi
call fcn.004dddd0
lea eax, [ebp - 0xa0]
push eax
push 0x11b
push esi
call fcn.004dddd0
add esp, 0x24
cmp word [ebp - 0x80], 2
jne 0x4c89e3
cmp dword [ebp - 0x40], 1
jg 0x4c88a8
push esi
mov byte [ebp - 0x11], bl
call fcn.004e7b1b
test eax, eax
pop ecx
je 0x4c89f5
mov byte [ebp - 0x11], 1
lea ecx, [ebp - 0x88]
call fcn.004d38ad
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], ebx
lea esi, [eax + 7]
shr esi, 3
cmp byte [ebp - 0x38], bl
je 0x4c8a21
lea esi, [eax + 0x1f]
mov dword [ebp - 0x44], 0x30
shr esi, 5
shl esi, 2
mov eax, esi
mov dword [ebp - 0x54], esi
imul eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x44]
cmp dword [ebp - 0x70], 0xffffffff
mov ecx, eax
je 0x4c8a60
mov edx, dword [ebp - 0x10]
lea ecx, [edx + 7]
shr ecx, 3
cmp byte [ebp - 0x38], bl
mov dword [ebp - 0x54], ecx
je 0x4c8a52
lea ecx, [edx + 0x1f]
shr ecx, 5
shl ecx, 2
mov dword [ebp - 0x54], ecx
imul ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x44]
mov dword [ebp - 0x40], eax
cmp eax, ecx
ja 0x4c8a63
mov dword [ebp - 0x40], ecx
lea ecx, [ebp - 0x60]
call fcn.004c9116
push dword [ebp - 0x40]
lea ecx, [ebp - 0x60]
call fcn.004c9122
mov eax, dword [ebp - 0x58]
cmp eax, ebx
jne 0x4c8a88
mov dword [edi], 1
jmp 0x4c8e65
cmp byte [ebp - 0x38], bl
mov dword [ebp - 0x24], eax
je 0x4c8a98
mov ecx, dword [ebp - 0x44]
add eax, ecx
mov dword [ebp - 0x24], eax
push dword [ebp - 0x10]
mov ecx, edi
push 1
call fcn.004c8fbc
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x18]
shr eax, 3
and al, 1
cmp byte [ebp - 0x11], bl
mov byte [ebp + 0x1b], al
jne 0x4c8c31
mov eax, dword [ebp - 0x1c]
push dword [ebp + 8]
mov dword [ebp - 0x28], eax
mov eax, esi
neg eax
add eax, eax
mov dword [ebp - 0x6c], eax
call fcn.004e75fc
push eax
call fcn.004e6781
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp - 0x3c], eax
jne 0x4c8b02
push str.No_space_for_strip_buffer
push dword [ebp + 8]
call fcn.004e7b14
pop ecx
push eax
call fcn.004e7699
pop ecx
mov dword [edi], 1
pop ecx
jmp 0x4c8da8
lea eax, [ebp - 0x50]
push eax
push 0x116
push dword [ebp + 8]
call fcn.004e0c5e
push dword [ebp + 8]
call fcn.004e7643
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x28]
mov ecx, eax
add esp, 0x10
sub ecx, dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], eax
sbb eax, eax
and eax, ecx
cmp byte [ebp + 0x1b], bl
mov dword [ebp - 0x30], eax
je 0x4c8b3b
mov dword [ebp - 0x6c], ebx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], ebx
cmp eax, ebx
jbe 0x4c8d94
mov ecx, dword [ebp - 0x50]
mov edi, 0x6387e8
mov edx, dword [ebp - 0x18]
add edx, ecx
cmp edx, eax
jbe 0x4c8b62
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
jmp 0x4c8b65
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x28]
imul eax, dword [ebp - 0x48]
push eax
push dword [ebp - 0x3c]
push ebx
push dword [ebp - 0x18]
push dword [ebp + 8]
call fcn.004e744f
add esp, 0xc
push eax
push dword [ebp + 8]
call fcn.004e67e0
add esp, 0x10
test eax, eax
jge 0x4c8b98
mov eax, dword [ebp - 0x20]
mov dword [eax], 0x14
mov eax, dword [ebp - 0x2c]
imul eax, esi
add eax, dword [ebp - 0x24]
cmp byte [ebp + 0x1b], bl
je 0x4c8bb3
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x2c]
dec eax
imul eax, esi
add eax, dword [ebp - 0x24]
push dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x20]
push dword [ebp - 0x6c]
push dword [ebp - 0x30]
push dword [ebp - 0x28]
push esi
push dword [ebp - 0x48]
push eax
call fcn.004c8f66
mov eax, dword [ebp - 0x28]
mov ecx, edi
sub dword [ebp - 0x2c], eax
call fcn.004b50e3
cmp dword [eax + 4], 1
jne 0x4c8c10
mov ecx, edi
call fcn.004b50e3
cmp dword [eax], ebx
je 0x4c8c10
mov ecx, edi
call fcn.004b50e3
mov ecx, edi
mov dword [ebp - 0x28], eax
call fcn.004b50e3
push dword [eax + 8]
mov eax, dword [ebp - 0x28]
push dword [ebp - 0x10]
push dword [ebp - 0x18]
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x4c8c12
xor eax, eax
cmp eax, ebx
jne 0x4c8d88
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x10]
add dword [ebp - 0x18], ecx
cmp dword [ebp - 0x18], eax
jb 0x4c8b51
jmp 0x4c8d91
lea ecx, [ebp - 0xc0]
call fcn.004cbe46
lea eax, [ebp - 0x50]
push eax
push 0x142
push dword [ebp + 8]
call fcn.004dddd0
lea eax, [ebp - 0x2c]
push eax
push 0x143
push dword [ebp + 8]
call fcn.004dddd0
push dword [ebp + 8]
call fcn.004e7400
push eax
call fcn.004e6781
add esp, 0x20
cmp eax, ebx
mov dword [ebp - 0x3c], eax
jne 0x4c8c80
push str.No_space_for_tile_buffer
jmp 0x4c8ae6
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x18], ebx
cmp ecx, ebx
jbe 0x4c8d94
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x2c]
xor edx, edx
div edi
mov eax, dword [ebp - 0x18]
sub edi, edx
lea edx, [edi + eax]
cmp edx, ecx
jbe 0x4c8cab
sub ecx, eax
mov dword [ebp - 0x48], ecx
jmp 0x4c8cae
mov dword [ebp - 0x48], edi
xor edi, edi
cmp dword [ebp - 0x1c], ebx
jbe 0x4c8d29
mov al, byte [ebp + 0x1b]
neg al
sbb eax, eax
and al, 0xf8
add eax, 8
mov dword [ebp - 0x30], eax
push ebx
push ebx
push dword [ebp - 0x18]
push edi
push dword [ebp - 0x3c]
push dword [ebp + 8]
call fcn.004e6b06
add esp, 0x18
test eax, eax
jge 0x4c8ce5
mov eax, dword [ebp - 0x20]
mov dword [eax], 0x14
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x2c]
cmp byte [ebp + 0x1b], bl
je 0x4c8cf6
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x50]
push edi
lea ecx, [eax + 7]
shr ecx, 3
push ecx
lea ecx, [ebp - 0xc0]
push dword [ebp - 0x2c]
push eax
push dword [ebp - 0x3c]
push esi
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call fcn.004cc195
add edi, dword [ebp - 0x50]
cmp edi, dword [ebp - 0x1c]
jb 0x4c8cc4
mov edi, 0x6387e8
mov ecx, edi
call fcn.004b50e3
cmp dword [eax + 4], 1
jne 0x4c8d6c
mov ecx, edi
call fcn.004b50e3
cmp dword [eax], ebx
je 0x4c8d6c
mov ecx, edi
call fcn.004b50e3
mov ecx, edi
mov dword [ebp - 0x30], eax
call fcn.004b50e3
push dword [eax + 8]
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x10]
push dword [ebp - 0x18]
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x4c8d6e
xor eax, eax
cmp eax, ebx
jne 0x4c8d88
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
add eax, dword [ebp - 0x48]
cmp eax, ecx
mov dword [ebp - 0x18], eax
jb 0x4c8c8e
jmp 0x4c8d91
mov eax, dword [ebp - 0x20]
mov dword [eax], 0xe
mov edi, dword [ebp - 0x20]
push dword [ebp - 0x3c]
call fcn.004e6786
mov eax, dword [edi]
pop ecx
cmp eax, ebx
je 0x4c8db5
cmp eax, 0x14
je 0x4c8db5
lea ecx, [ebp - 0x60]
call fcn.004c921f
jmp 0x4c8f4d
cmp dword [ebp - 0x70], 0xffffffff
jne 0x4c8dda
push dword [ebp - 0x38]
lea eax, [ebp - 0x10]
mov ecx, edi
push esi
push 1
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x4c]
call fcn.004c7cdb
mov dword [edi], eax
jmp 0x4c8e59
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x34]
sub eax, dword [ebp - 0x44]
mov dword [ebp - 4], ebx
push eax
mov dword [ebp + 0x18], eax
call fcn.004b5a9f
xor eax, eax
cmp dword [ebp - 0x34], ebx
jle 0x4c8e08
mov ecx, dword [ebp - 0x30]
mov byte [ecx + eax], bl
inc eax
cmp eax, dword [ebp - 0x34]
jl 0x4c8dfc
cmp dword [ebp - 0x30], ebx
jne 0x4c8e15
mov dword [edi], 1
jmp 0x4c8e4d
push dword [ebp - 0x38]
lea eax, [ebp - 0x10]
mov ecx, edi
push dword [ebp - 0x54]
push esi
push 1
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x24]
push dword [ebp - 0x4c]
call fcn.004c7e66
push dword [ebp + 0x18]
mov dword [edi], eax
push dword [ebp - 0x30]
push dword [ebp - 0x24]
call dword [0x63878c]
mov esi, dword [ebp - 0x54]
add esp, 0xc
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.004bbc29
cmp dword [edi], ebx
je 0x4c8e6c
lea ecx, [ebp - 0x60]
call fcn.004c921f
xor eax, eax
jmp 0x4c8f55
cmp word [ebp - 0x64], 1
jne 0x4c8e95
mov eax, esi
xor ecx, ecx
imul eax, dword [ebp - 0x10]
test eax, eax
jbe 0x4c8e95
mov eax, dword [ebp - 0x24]
or dl, 0xff
sub dl, byte [eax]
mov byte [eax], dl
mov edx, esi
imul edx, dword [ebp - 0x10]
inc eax
inc ecx
cmp ecx, edx
jb 0x4c8e82
cmp byte [ebp - 0x38], bl
je 0x4c8f26
lea eax, [ebp - 0x9c]
mov ecx, edi
push eax
push dword [ebp + 8]
call fcn.004c8038
push 4
lea eax, [ebp - 0x9c]
push 1
push eax
lea ecx, [ebp - 0x88]
call fcn.004b9c67
mov eax, dword [ebp - 0x58]
mov dword [eax], 0x28
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x10]
mov dword [eax + 8], ecx
mov word [eax + 0xc], 1
mov word [eax + 0xe], 1
mov dword [eax + 0x10], ebx
imul esi, dword [ebp - 0x10]
mov dword [eax + 0x14], esi
mov ecx, dword [ebp - 0x9c]
mov dword [eax + 0x18], ecx
mov ecx, dword [ebp - 0x98]
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], 2
mov dword [eax + 0x24], ebx
mov eax, dword [ebp - 0x58]
or byte [eax + 0x28], 0xff
or byte [eax + 0x29], 0xff
or byte [eax + 0x2a], 0xff
mov byte [eax + 0x2c], bl
mov byte [eax + 0x2d], bl
mov byte [eax + 0x2e], bl
jmp 0x4c8f3d
mov eax, dword [ebp + 0x14]
or byte [eax], 0xff
or byte [eax + 1], 0xff
or byte [eax + 2], 0xff
mov byte [eax + 4], bl
mov byte [eax + 5], bl
mov byte [eax + 6], bl
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
lea ecx, [ebp - 0x60]
call fcn.004c9283
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x14