Function at 0x562c80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ecx
push ebx
mov ebx, eax
mov eax, dword [ebx + 0x40]
imul eax, eax, 0x2c
add eax, dword [ebx + 0x48]
push ebp
cmp dword [eax + 4], 0
mov ebp, dword [esp + 0x14]
push esi
push edi
je 0x562cc2
mov ecx, dword [eax]
cmp ecx, 1
je 0x562ca5
test ecx, ecx
jne 0x562cc2
mov dword [eax], 2
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
push str.unexpected_page_info_segment__marking_previous_page_finished
push ecx
push 2
push ebx
call fcn.005632b0
add esp, 0x10
mov edi, dword [ebx + 0x40]
mov edx, dword [ebx + 0x48]
mov eax, edi
imul eax, eax, 0x2c
cmp dword [eax + edx], 0
je 0x562d41
mov esi, eax
mov eax, dword [ebx + 0x44]
inc edi
add esi, 0x2c
mov dword [esp + 0x10], esi
cmp edi, eax
jl 0x562d38
mov edx, dword [ebx + 0x48]
mov ecx, dword [ebx]
add eax, eax
add eax, eax
mov dword [ebx + 0x44], eax
cmp eax, 0x5d17457
jb 0x562cfb
xor eax, eax
jmp 0x562d09
imul eax, eax, 0x2c
push eax
mov eax, dword [ecx + 8]
push edx
push ecx
call eax
add esp, 0xc
mov dword [ebx + 0x48], eax
mov ecx, edi
cmp edi, dword [ebx + 0x44]
jge 0x562d38
mov eax, esi
mov esi, dword [ebx + 0x48]
xor edx, edx
mov dword [eax + esi], edx
mov esi, dword [ebx + 0x48]
mov dword [eax + esi + 4], edx
mov esi, dword [ebx + 0x48]
mov dword [eax + esi + 0x28], edx
inc ecx
add eax, 0x2c
cmp ecx, dword [ebx + 0x44]
jl 0x562d15
mov esi, dword [esp + 0x10]
mov ecx, dword [ebx + 0x48]
cmp dword [esi + ecx], 0
jne 0x562cd5
mov esi, edi
imul esi, esi, 0x2c
add esi, dword [ebx + 0x48]
mov dword [ebx + 0x40], edi
mov edi, dword [esp + 0x18]
mov dword [esi], 1
mov edx, dword [edi + 8]
mov dword [esi + 4], edx
cmp dword [edi + 0xc], 0x13
jae 0x562d7b
mov eax, dword [edi]
push str.segment_too_short
push eax
push 3
push ebx
call fcn.005632b0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
movzx ecx, byte [ebp]
movzx edx, byte [ebp + 1]
movzx eax, byte [ebp + 2]
shl ecx, 8
or ecx, edx
movzx edx, byte [ebp + 3]
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, edx
mov dword [esi + 0xc], ecx
movzx eax, byte [ebp + 4]
movzx ecx, byte [ebp + 5]
movzx edx, byte [ebp + 6]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 7]
shl eax, 8
or eax, edx
shl eax, 8
or eax, ecx
mov dword [esi + 8], eax
movzx edx, byte [ebp + 8]
movzx eax, byte [ebp + 9]
movzx ecx, byte [ebp + 0xa]
shl edx, 8
or edx, eax
movzx eax, byte [ebp + 0xb]
shl edx, 8
or edx, ecx
shl edx, 8
or edx, eax
mov dword [esi + 0x10], edx
movzx ecx, byte [ebp + 0xc]
movzx edx, byte [ebp + 0xd]
movzx eax, byte [ebp + 0xe]
shl ecx, 8
or ecx, edx
movzx edx, byte [ebp + 0xf]
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, edx
mov dword [esi + 0x14], ecx
mov al, byte [ebp + 0x10]
mov byte [esi + 0x24], al
movzx ecx, byte [ebp + 0x11]
movzx edx, byte [ebp + 0x12]
shl cx, 8
or cx, dx
mov eax, 0xffff8000
xor cx, ax
mov edx, eax
add cx, dx
movzx eax, cx
test eax, 0x8000
je 0x562e3d
mov dword [esi + 0x1c], 1
and eax, 0x7fff
jmp 0x562e46
mov dword [esi + 0x1c], 0
xor eax, eax
cmp dword [esi + 8], 0xffffffff
mov word [esi + 0x18], ax
jne 0x562e70
cmp dword [esi + 0x1c], 0
jne 0x562e70
mov ecx, dword [edi]
push str.height_is_unspecified_but_page_is_not_markes_as_striped
push ecx
push 2
push ebx
call fcn.005632b0
add esp, 0x10
mov dword [esi + 0x1c], 1
mov dword [esi + 0x20], 0
cmp dword [edi + 0xc], 0x13
jbe 0x562e90
mov edx, dword [edi]
push str.extra_data_in_segment
push edx
push 2
push ebx
call fcn.005632b0
add esp, 0x10
call fcn.00562be0
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
jne 0x562ea8
movzx eax, word [esi + 0x18]
mov ecx, dword [esi + 0xc]
push eax
push ecx
jmp 0x562ead
mov edx, dword [esi + 0xc]
push eax
push edx
mov eax, ebx
call fcn.0056f730
add esp, 8
mov dword [esi + 0x28], eax
test eax, eax
jne 0x562ed9
mov eax, edi
mov ecx, dword [eax]
push str.failed_to_allocate_buffer_for_page_image
push ecx
push 3
push ebx
call fcn.005632b0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov edx, dword [eax + 8]
imul edx, dword [eax + 4]
mov cl, byte [esi + 0x24]
mov eax, dword [eax + 0xc]
push edx
and cl, 4
movzx edx, cl
neg edx
sbb edx, edx
and edx, 0xff
push edx
push eax
call fcn.0065b340
mov esi, dword [esi + 0x28]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi]
imul ecx, eax
add esp, 0xc
push ecx
push eax
push edx
mov eax, edi
mov ecx, dword [eax]
push str.allocated__dx_d_page_image___d_bytes_
push ecx
push 0
push ebx
call fcn.005632b0
add esp, 0x1c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret