Function at 0x4227d0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
mov esi, ecx
xorps xmm0, xmm0
mov ecx, dword [esp + 0x30]
push edi
movlpd qword [esp + 0x20], xmm0
mov edi, dword [esi + 0xec]
mov dword [esi + 0xb8], edx
mov edx, dword [esi + 0xe8]
cmp ecx, edi
jb 0x42280c
ja 0x422806
mov eax, dword [esp + 0x30]
cmp eax, edx
jbe 0x422810
mov eax, edx
mov ecx, edi
jmp 0x422810
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
mov dword [esi + 0xc0], eax
or eax, ecx
mov eax, dword [esp + 0x20]
mov dword [esi + 0xc4], ecx
je 0x422ac0
lea ebx, [esi + 0xa0]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
nop word [eax + eax]
mov eax, dword [esi + 0xa8]
or eax, dword [esi + 0xac]
jne 0x42296d
mov ecx, dword [esi + 0xe0]
mov eax, ecx
mov edx, dword [esi + 0xe4]
or eax, edx
je 0x42296d
xor ebp, ebp
mov edi, 0x4000
test edx, edx
ja 0x42287d
jb 0x422879
cmp ecx, edi
jae 0x42287d
mov edi, ecx
mov ebp, edx
mov edx, dword [esi + 0x98]
mov ecx, esi
push edi
call fcn.00421dc0
add esp, 4
test eax, eax
je 0x422b80
sub dword [esi + 0xe0], edi
lea ebx, [esi + 0xa0]
mov eax, dword [esi + 0x98]
sbb dword [esi + 0xe4], ebp
test byte [esi + 0x54], 1
mov dword [ebx], eax
mov dword [esi + 0xa8], edi
mov dword [esi + 0xac], ebp
je 0x42296d
xor edx, edx
test ebp, ebp
jb 0x42296d
ja 0x4228da
test edi, edi
je 0x42296d
mov ebx, eax
nop dword [eax]
mov ecx, dword [esi + 0xf8]
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
shr eax, 8
xor byte [ebx + edx], al
mov ebx, dword [esi + 0x98]
mov ecx, dword [esi + 0xf0]
movsx eax, byte [ebx + edx]
inc edx
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d1f08]
movzx eax, cl
add eax, dword [esi + 0xf4]
imul eax, eax, 0x8088405
mov dword [esi + 0xf0], ecx
mov ecx, dword [esi + 0xf8]
inc eax
mov dword [esi + 0xf4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4d1f08]
xor eax, eax
mov dword [esi + 0xf8], ecx
cmp eax, ebp
jb 0x4228e0
ja 0x422967
cmp edx, edi
jb 0x4228e0
lea ebx, [esi + 0xa0]
mov edx, dword [esi + 0xac]
mov ebp, dword [esi + 0x104]
mov edi, dword [esi + 0x100]
mov ecx, dword [esi + 0xa8]
mov dword [esp + 0x18], edx
cmp ebp, edx
jb 0x42299b
ja 0x422993
cmp edi, ecx
jbe 0x42299b
mov edi, ecx
mov dword [esp + 0x18], edx
mov ebp, edx
mov eax, edi
or eax, ebp
je 0x4229fc
mov eax, dword [esi + 0xa0]
lea ebx, [esi + 0xa0]
add eax, edi
sub ecx, edi
mov dl, byte [eax - 1]
mov byte [esp + 0x30], dl
mov edx, dword [esp + 0x18]
mov dword [ebx], eax
sbb edx, ebp
mov eax, dword [esi + 0x100]
sub eax, edi
mov dword [esi + 0xa8], ecx
mov edi, dword [esi + 0x104]
sbb edi, ebp
mov dword [esi + 0x100], eax
or eax, edi
mov dword [esi + 0xac], edx
mov dword [esi + 0x104], edi
jne 0x4229fc
mov al, byte [esp + 0x30]
cmp al, byte [esi + 0x108]
jne 0x422b93
cmp word [esi + 0x56], 0
jne 0x422ac8
mov eax, dword [esi + 0xc4]
mov ebp, dword [esi + 0xc0]
mov dword [esp + 0x30], eax
cmp eax, edx
ja 0x422a21
jb 0x422a27
cmp ebp, ecx
jb 0x422a27
mov ebp, ecx
mov dword [esp + 0x30], edx
push ebp
push dword [esi + 0xa0]
lea ebx, [esi + 0xa0]
push dword [esi + 0xb8]
call sub.VCRUNTIME140.dll_memcpy
mov edi, dword [esi + 0xb8]
add esp, 0xc
mov ecx, dword [esi + 0xd8]
mov edx, edi
push ebp
call fcn.004218e0
mov edx, dword [esp + 0x34]
add esp, 4
sub dword [esi + 0xe8], ebp
mov ecx, dword [esi + 0xe8]
sbb dword [esi + 0xec], edx
sub dword [esi + 0xa8], ebp
mov dword [esi + 0xd8], eax
lea eax, [edi + ebp]
sbb dword [esi + 0xac], edx
sub dword [esi + 0xc0], ebp
mov dword [esi + 0xb8], eax
sbb dword [esi + 0xc4], edx
add dword [ebx], ebp
add dword [esi + 0xc8], ebp
adc dword [esi + 0xcc], edx
add dword [esp + 0x14], ebp
adc dword [esp + 0x10], edx
or ecx, dword [esi + 0xec]
jne 0x422b5e
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov eax, dword [esi + 0xcc]
mov ecx, ebx
mov edi, dword [esi + 0xc8]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0xb8]
mov dword [esp + 0x20], eax
call fcn.004219d0
mov ebp, eax
test ebp, ebp
je 0x422af8
cmp ebp, 1
jne 0x422ba6
mov ebx, dword [esi + 0xc8]
mov edx, dword [esp + 0x20]
sub ebx, edi
mov edi, dword [esi + 0xcc]
mov ecx, dword [esi + 0xd8]
sbb edi, dword [esp + 0x30]
push ebx
call fcn.004218e0
mov ecx, dword [esi + 0xec]
add esp, 4
mov dword [esi + 0xd8], eax
mov eax, dword [esi + 0xe8]
sub eax, ebx
mov dword [esi + 0xe8], eax
sbb ecx, edi
add dword [esp + 0x14], ebx
mov dword [esi + 0xec], ecx
adc dword [esp + 0x10], edi
cmp ebp, 1
je 0x422ab8
or eax, ecx
je 0x422ab8
lea ebx, [esi + 0xa0]
mov eax, dword [esi + 0xc0]
or eax, dword [esi + 0xc4]
jne 0x422840
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
xor eax, eax
mov dword [esi + 8], 7
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
xor eax, eax
mov dword [esi + 8], 0x13
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov dword [esi + 8], 0x12
pop edi
pop esi
pop ebp
xor eax, eax
xor edx, edx
pop ebx
add esp, 0x1c
ret