Function at 0x10068020
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x1036900c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ecx]
lea edx, [ebp - 0xc]
push ebx
push esi
push edi
push 8
push edx
mov dword [ebp - 0x68], ecx
call dword [eax]
push 8
xor edx, edx
lea ecx, [ebp - 0xc]
call fcn.10125e10
add esp, 4
test eax, eax
jne 0x100680fb
sub esp, 8
call fcn.101216b0
mov esi, eax
add esp, 8
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x28], eax
test esi, esi
jne 0x10068077
xor edi, edi
jmp 0x100680a9
mov ecx, dword [esi + 0x278]
push 0x12c
test ecx, ecx
je 0x1006808e
push esi
call ecx
add esp, 8
jmp 0x10068093
call eax
add esp, 4
mov edi, eax
test edi, edi
je 0x100680a9
push 0x12c
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov edx, dword [sym.imp.VCRUNTIME140.dll_longjmp]
push ecx
mov ecx, esi
mov dword [ebp - 0x50], edi
call fcn.10121350
add esp, 4
push 0
push eax
call sub.VCRUNTIME140.dll__setjmp3
mov esi, dword [ebp - 0x44]
add esp, 8
test eax, eax
je 0x1006810e
test esi, esi
je 0x100680fb
xor edx, edx
mov ecx, esi
call fcn.101264b0
lea edx, [ebp - 0x50]
mov ecx, esi
call fcn.101264b0
mov ecx, esi
mov dword [ebp - 0x44], 0
call fcn.101226f0
mov ecx, esi
call fcn.101327b0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102af895
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x34], esi
test esi, esi
je 0x10068150
mov eax, dword [ebp - 0x68]
mov dword [esi + 0x60], eax
mov dword [esi + 0x5c], 0x10067ff0
cmp dword [esi + 0x58], 0
je 0x1006813b
mov edx, str.Cant_set_both_read_data_fn_and_write_data_fn_in_the_same_structure
mov dword [esi + 0x58], 0
mov ecx, esi
call fcn.10120e10
mov dword [esi + 0x174], 0
test esi, esi
je 0x10068150
mov byte [esi + 0x155], 8
cmp byte [esi + 0x150], 8
mov edi, dword [ebp - 0x50]
mov dword [ebp - 0x6c], edi
jb 0x1006816e
cmp byte [esi + 0x14f], 3
je 0x1006816e
test byte [edi + 8], 0x10
je 0x10068175
mov ecx, esi
call fcn.1011c4b0
push 1
mov edx, 0xff
mov ecx, esi
call fcn.101257f0
mov eax, dword [esi + 0x7c]
add esp, 4
test eax, 0x8000
je 0x10068198
or eax, 0x1000000
mov dword [esi + 0x7c], eax
cmp byte [esi + 0x14c], 0
je 0x100681a7
or eax, 2
mov dword [esi + 0x7c], eax
mov ecx, esi
call fcn.1011c590
mov eax, dword [esi + 0x78]
test al, 0x40
je 0x100681ce
mov edx, str.invalid_after_png_start_read_image_or_png_read_update_info
mov ecx, esi
test eax, 0x400000
je 0x10068769
call fcn.10120e10
jmp 0x100681dd
or eax, 0x4000
or dword [esi + 0x7c], 0x400
mov dword [esi + 0x78], eax
mov edx, edi
mov ecx, esi
call fcn.10121770
mov edx, edi
mov ecx, esi
call fcn.10121d60
mov ebx, dword [esi + 0x100]
mov eax, dword [esi + 0x104]
shl ebx, 2
imul eax, ebx
push 0x18
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], eax
call dword [ebp - 0x28]
mov ecx, eax
add esp, 4
mov dword [ebp - 0x2c], ecx
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
mov eax, dword [esi + 0x100]
mov edx, dword [esi + 0x104]
mov dword [ecx + 8], eax
mov eax, ebx
mov dword [ecx + 0xc], edx
xor ecx, ecx
mov dword [ebp - 0x30], edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call dword [ebp - 0x28]
add esp, 4
mov dword [ebp - 0x3c], eax
push dword [ebp - 0x1c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x30]
xor ecx, ecx
add esp, 0xc
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call dword [ebp - 0x28]
mov edx, eax
add esp, 4
mov eax, dword [ebp - 0x30]
xor ecx, ecx
mov dword [ebp - 0x40], edx
test eax, eax
jle 0x100682a7
mov edx, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x40]
mov dword [esi + ecx*4], edx
inc ecx
add edx, ebx
cmp ecx, eax
jl 0x10068297
mov esi, dword [ebp - 0x34]
mov edx, dword [ebp - 0x40]
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [ebp - 0x64], eax
test edi, edi
je 0x100686fb
mov eax, dword [edi + 8]
and eax, 0x10000
je 0x100686fb
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov edx, dword [edi + 0x10c]
mov dword [ebp - 0x30], edx
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x1c]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call dword [ebp - 0x28]
add esp, 4
mov dword [ebp - 0x54], eax
push dword [ebp - 0x1c]
call dword [ebp - 0x28]
add esp, 4
mov dword [ebp - 0x38], eax
push dword [ebp - 0x1c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x2c]
add esp, 0xc
mov ecx, dword [edi + 0x110]
mov edx, 2
mov dword [eax + 0x14], ecx
xor ecx, ecx
mov eax, dword [ebp - 0x30]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call dword [ebp - 0x28]
mov ecx, eax
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x2c]
add esp, 4
cmp dword [ebp - 0x30], 0
mov dword [ebp - 0x58], ecx
mov dword [eax + 4], ecx
jle 0x100686e0
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x48], eax
sub eax, dword [ebp - 0x1c]
mov dword [ebp - 0x4c], eax
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [esi + 0x74]
test eax, 0x10000
je 0x1006877a
cmp dword [esi + 0x260], 0
je 0x10068454
and dword [esi + 0x78], 0xffffffbf
and eax, 0xfffdfff3
mov dword [esi + 0x118], 0
mov byte [esi + 0x14d], 0
mov dword [esi + 0x74], eax
mov byte [ebp - 0xd], 0
nop dword [eax]
mov ecx, esi
call fcn.10132bf0
mov ebx, eax
mov eax, dword [esi + 0x11c]
cmp eax, 0x49444154
jne 0x100683d8
cmp byte [ebp - 0xd], 0
jne 0x10068762
cmp dword [esi + 0x260], 1
ja 0x10068762
mov edx, ebx
mov ecx, esi
call fcn.10132db0
jmp 0x100683a0
mov ecx, esi
cmp eax, 0x6663544c
jne 0x100683f2
push ebx
mov edx, edi
call fcn.10136790
add esp, 4
mov byte [ebp - 0xd], 1
jmp 0x100683a0
cmp eax, 0x66644154
jne 0x1006841b
mov edx, ebx
call fcn.10136aa0
cmp byte [ebp - 0xd], 0
jne 0x10068433
cmp dword [esi + 0x260], 1
jbe 0x10068433
lea edx, [ebx - 4]
mov ecx, esi
call fcn.10132db0
jmp 0x100683a0
mov edx, str.Skipped__ignored__a_chunk_between_APNG_chunks
call fcn.10120e10
mov edx, ebx
mov ecx, esi
call fcn.10132db0
jmp 0x100683a0
mov ecx, dword [esi + 0x74]
test ecx, 0x20000
je 0x1006876e
lea eax, [ebx - 4]
or ecx, 4
mov ebx, dword [ebp - 0x18]
mov dword [esi + 0x134], eax
mov dword [esi + 0x74], ecx
push 0x20000
mov edx, edi
mov ecx, esi
call fcn.10132730
add esp, 4
test eax, eax
je 0x100684e1
movzx ecx, word [edi + 0x126]
movzx eax, word [edi + 0x124]
test cx, cx
je 0x100684d5
cmp ecx, 0x64
je 0x100684d5
mov edx, dword [ebp - 0x2c]
mov edx, dword [edx + 4]
cmp ecx, 0xa
jne 0x1006849a
mov ecx, dword [ebp - 0x14]
lea eax, [eax + eax*4]
add eax, eax
mov word [edx + ecx*2], ax
jmp 0x100684ed
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
lea edx, [edx + ebx*2]
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x24], edx
mov edx, 0x3e8
cmp cx, dx
jne 0x100684c6
mov ecx, dword [ebp - 0x24]
mov eax, 0xcccccccd
mul dword [ebp - 0x20]
shr edx, 3
mov word [ecx], dx
jmp 0x100684ed
imul eax, eax, 0x64
xor edx, edx
div ecx
mov ecx, dword [ebp - 0x24]
mov word [ecx], ax
jmp 0x100684ed
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x58]
mov word [edx + ecx*2], ax
jmp 0x100684ed
mov eax, dword [ebp - 0x14]
xor edx, edx
mov ecx, dword [ebp - 0x58]
mov word [ecx + eax*2], dx
mov edx, dword [ebp - 0x40]
mov ecx, esi
call fcn.10122310
mov ecx, dword [edi + 0x120]
mov eax, dword [edi + 0x11c]
imul ecx, ebx
add ecx, dword [ebp - 0x38]
lea ebx, [ecx + eax*4]
movzx eax, byte [edi + 0x129]
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x24], ecx
sub eax, 0
je 0x100685f8
sub eax, 1
jne 0x1006863c
mov dword [ebp - 0x20], eax
cmp dword [edi + 0x118], eax
jbe 0x1006863c
mov edx, dword [edi + 0x114]
mov dword [ebp - 0x5c], 0
mov esi, ecx
test edx, edx
je 0x100685d7
movzx edi, byte [esi + 3]
lea ebx, [ebx + 4]
movzx ecx, byte [ebx - 4]
lea esi, [esi + 4]
movzx eax, byte [esi - 4]
mov edx, 0xff
imul eax, edi
sub edx, edi
imul ecx, edx
add ecx, eax
sar ecx, 8
mov byte [ebx - 4], cl
movzx ecx, byte [ebx - 3]
movzx eax, byte [esi - 3]
imul ecx, edx
imul eax, edi
add ecx, eax
sar ecx, 8
mov byte [ebx - 3], cl
movzx ecx, byte [ebx - 2]
movzx eax, byte [esi - 2]
imul ecx, edx
imul eax, edi
add ecx, eax
sar ecx, 8
mov byte [ebx - 2], cl
movzx ecx, byte [ebx - 1]
movzx eax, byte [esi - 1]
imul eax, edi
mov edi, dword [ebp - 0x6c]
imul ecx, edx
add ecx, eax
mov eax, dword [ebp - 0x5c]
sar ecx, 8
inc eax
mov byte [ebx - 1], cl
mov edx, dword [edi + 0x114]
mov dword [ebp - 0x5c], eax
cmp eax, edx
jb 0x10068554
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x60]
inc eax
add ebx, dword [ebp - 0x18]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], eax
cmp eax, dword [edi + 0x118]
jb 0x10068543
jmp 0x10068639
cmp dword [edi + 0x118], 0
mov dword [ebp - 0x20], 0
jbe 0x1006863c
mov esi, dword [ebp - 0x20]
nop dword [eax + eax]
mov eax, dword [edi + 0x114]
shl eax, 2
push eax
push ecx
push ebx
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x24]
inc esi
add ecx, dword [ebp - 0x18]
add esp, 0xc
add ebx, dword [ebp - 0x18]
mov dword [ebp - 0x24], ecx
cmp esi, dword [edi + 0x118]
jb 0x10068610
mov esi, dword [ebp - 0x34]
push dword [ebp - 0x1c]
push dword [ebp - 0x38]
push dword [ebp - 0x48]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [edi + 0x120]
add esp, 0xc
mov ebx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x38]
mov eax, dword [edi + 0x11c]
imul ecx, ebx
add ecx, edx
lea eax, [ecx + eax*4]
mov dword [ebp - 0x20], eax
movzx eax, byte [edi + 0x128]
sub eax, 1
je 0x10068693
sub eax, 1
mov eax, dword [ebp - 0x14]
jne 0x100686ca
test eax, eax
jle 0x100686ca
push dword [ebp - 0x1c]
push dword [ebp - 0x4c]
push edx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x100686c7
xor ebx, ebx
cmp dword [edi + 0x118], ebx
jbe 0x100686c4
mov esi, dword [ebp - 0x20]
mov eax, dword [edi + 0x114]
shl eax, 2
push eax
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esi, dword [ebp - 0x18]
inc ebx
add esp, 0xc
cmp ebx, dword [edi + 0x118]
jb 0x100686a0
mov esi, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
inc eax
add dword [ebp - 0x48], ecx
add dword [ebp - 0x4c], ecx
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp - 0x30]
jl 0x10068360
push dword [ebp - 0x38]
mov ebx, dword [ebp - 0x64]
call ebx
add esp, 4
push dword [ebp - 0x3c]
call ebx
mov ebx, dword [ebp - 0x2c]
add esp, 4
mov eax, dword [ebp - 0x54]
jmp 0x1006870f
mov ecx, esi
call fcn.10122310
mov ebx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x3c]
mov dword [ebx + 0x10], 1
push dword [ebp - 0x40]
mov dword [ebx], eax
call dword [ebp - 0x64]
add esp, 4
mov edx, edi
mov ecx, esi
call fcn.101223e0
test esi, esi
je 0x1006874f
xor edx, edx
mov ecx, esi
call fcn.101264b0
lea edx, [ebp - 0x50]
mov ecx, esi
call fcn.101264b0
mov ecx, esi
mov dword [ebp - 0x44], 0
call fcn.101226f0
mov ecx, esi
call fcn.101327b0
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.102af895
mov esp, ebp
pop ebp
ret
mov edx, str.png_read_frame_head__:_out_of_place_IDAT
mov ecx, esi
call fcn.10120c80
mov edx, str.png_read_frame_head__:_out_of_place_fdAT
mov ecx, esi
call fcn.10120c80
mov edx, str.attempt_to_png_read_frame_head___but_no_acTL_present
mov ecx, esi
call fcn.10120c80
int3