Function at 0x10283740
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
push ebp
push esi
mov esi, ecx
mov ebp, edx
push edi
imul eax, dword [esi + 0x40], 0x2c
add eax, dword [esi + 0x48]
cmp dword [eax + 4], 0
je 0x10283779
mov ecx, dword [eax]
cmp ecx, 1
je 0x10283760
test ecx, ecx
jne 0x10283779
push str.unexpected_page_info_segment__marking_previous_page_finished
mov dword [eax], 2
push dword [ebp]
push 2
push esi
call fcn.10283d90
add esp, 0x10
mov ebx, dword [esi + 0x40]
mov eax, dword [esi + 0x48]
imul edi, ebx, 0x2c
cmp dword [edi + eax], 0
je 0x102837f5
mov eax, dword [esi + 0x44]
inc ebx
add edi, 0x2c
cmp ebx, eax
jl 0x102837ec
mov ecx, dword [esi]
shl eax, 2
mov dword [esi + 0x44], eax
cmp eax, 0x5d17457
jb 0x102837a6
xor eax, eax
jmp 0x102837b6
imul eax, eax, 0x2c
push eax
push dword [esi + 0x48]
mov eax, dword [ecx + 8]
push ecx
call eax
add esp, 0xc
mov edx, ebx
mov dword [esi + 0x48], eax
cmp ebx, dword [esi + 0x44]
jge 0x102837ec
mov ecx, edi
mov eax, dword [esi + 0x48]
lea ecx, [ecx + 0x2c]
inc edx
mov dword [ecx + eax - 0x2c], 0
mov eax, dword [esi + 0x48]
mov dword [ecx + eax - 0x28], 0
mov eax, dword [esi + 0x48]
mov dword [ecx + eax - 4], 0
cmp edx, dword [esi + 0x44]
jl 0x102837c2
mov eax, dword [esi + 0x48]
cmp dword [edi + eax], 0
jne 0x10283788
imul edi, ebx, 0x2c
mov dword [esi + 0x40], ebx
add edi, dword [esi + 0x48]
mov dword [edi], 1
mov eax, dword [ebp + 8]
mov dword [edi + 4], eax
cmp dword [ebp + 0xc], 0x13
jae 0x10283828
push str.segment_too_short
push dword [ebp]
push 3
push esi
call fcn.10283d90
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
ret
mov edx, dword [esp + 0x14]
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
mov dword [edi + 0xc], ecx
movzx ecx, byte [edx + 4]
movzx eax, byte [edx + 5]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 6]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 7]
shl ecx, 8
or ecx, eax
mov dword [edi + 8], ecx
movzx ecx, byte [edx + 8]
movzx eax, byte [edx + 9]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xb]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x10], ecx
movzx ecx, byte [edx + 0xc]
movzx eax, byte [edx + 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xf]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x14], ecx
mov al, byte [edx + 0x10]
mov byte [edi + 0x24], al
movzx ecx, byte [edx + 0x11]
movzx eax, byte [edx + 0x12]
shl cx, 8
or cx, ax
mov eax, 0xffff8000
xor cx, ax
add cx, ax
movzx eax, cx
test eax, 0x8000
je 0x102838eb
mov dword [edi + 0x1c], 1
and eax, 0x7fff
jmp 0x102838f4
mov dword [edi + 0x1c], 0
xor eax, eax
cmp dword [edi + 8], 0xffffffff
mov word [edi + 0x18], ax
jne 0x1028391e
cmp dword [edi + 0x1c], 0
jne 0x1028391e
push str.height_is_unspecified_but_page_is_not_markes_as_striped
push dword [ebp]
push 2
push esi
call fcn.10283d90
add esp, 0x10
mov dword [edi + 0x1c], 1
mov dword [edi + 0x20], 0
cmp dword [ebp + 0xc], 0x13
jbe 0x1028393e
push str.extra_data_in_segment
push dword [ebp]
push 2
push esi
call fcn.10283d90
add esp, 0x10
push edi
mov edx, ebp
mov ecx, esi
call fcn.102836a0
mov eax, dword [edi + 8]
add esp, 4
mov edx, dword [edi + 0xc]
mov ecx, esi
cmp eax, 0xffffffff
jne 0x1028395c
movzx eax, word [edi + 0x18]
push eax
call fcn.102ba020
mov ecx, eax
mov dword [edi + 0x28], eax
add esp, 4
test ecx, ecx
jne 0x10283986
push str.failed_to_allocate_buffer_for_page_image
push dword [ebp]
push 3
push esi
call fcn.10283d90
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [ecx + 8]
imul eax, dword [ecx + 4]
push eax
mov al, byte [edi + 0x24]
and al, 4
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xff
push eax
push dword [ecx + 0xc]
call sub.MSVCR120.dll_memset
mov edx, dword [edi + 0x28]
add esp, 0xc
mov ecx, dword [edx + 4]
mov eax, dword [edx + 8]
imul eax, ecx
push eax
push ecx
push dword [edx]
push str.allocated__dx_d_page_image___d_bytes_
push dword [ebp]
push 0
push esi
call fcn.10283d90
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret