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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov eax, esp
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], 0
lea ecx, [esp + 0xc]
push 0xc
push eax
push edi
push ecx
call fcn.00421f00
add esp, 0x10
movzx eax, byte [esp + 0xc]
cmp al, 4
jne 0x4225b0
mov ecx, dword [edi + 0x18]
mov eax, dword [edi + 0x10]
mov ebx, ecx
movzx ebp, cl
shr ecx, 8
or ebx, 3
mov edx, ebx
and edx, 0xfffffffe
imul edx, ebx
movzx ebx, byte [esp]
xor bl, al
shr eax, 8
xor bl, dh
movzx edx, bl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
add edx, dword [edi + 0x14]
imul esi, edx, 0x8088405
lea ebx, [esi + 1]
shr ebx, 0x18
xor ebp, ebx
xor ecx, dword [ebp*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 1]
xor dl, al
shr eax, 8
xor dl, bh
movzx ebx, cl
shr ecx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [esi + edx + 1]
imul ebp, edx, 0x8088405
lea esi, [ebp + 1]
shr esi, 0x18
xor ebx, esi
xor ecx, dword [ebx*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 2]
xor dl, al
shr eax, 8
xor dl, bh
movzx ebx, cl
shr ecx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
imul ebp, edx, 0x8088405
lea esi, [ebp + 1]
shr esi, 0x18
xor ebx, esi
xor ecx, dword [ebx*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 3]
xor dl, al
shr eax, 8
xor dl, bh
movzx ebx, cl
shr ecx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
imul ebp, edx, 0x8088405
lea esi, [ebp + 1]
shr esi, 0x18
xor ebx, esi
xor ecx, dword [ebx*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 4]
xor dl, al
shr eax, 8
xor dl, bh
movzx ebx, cl
shr ecx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
imul ebp, edx, 0x8088405
lea esi, [ebp + 1]
shr esi, 0x18
xor ebx, esi
xor ecx, dword [ebx*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 5]
xor dl, al
shr eax, 8
xor dl, bh
movzx ebx, cl
shr ecx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
imul ebp, edx, 0x8088405
lea esi, [ebp + 1]
shr esi, 0x18
xor ebx, esi
xor ecx, dword [ebx*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 6]
xor dl, al
shr eax, 8
xor dl, bh
movzx ebx, cl
shr ecx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
imul ebp, edx, 0x8088405
lea esi, [ebp + 1]
shr esi, 0x18
xor ebx, esi
xor ecx, dword [ebx*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 7]
xor dl, al
shr eax, 8
xor dl, bh
movzx ebx, cl
shr ecx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
imul ebp, edx, 0x8088405
lea esi, [ebp + 1]
shr esi, 0x18
xor ebx, esi
xor ecx, dword [ebx*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 8]
xor dl, al
shr eax, 8
xor dl, bh
movzx ebx, cl
shr ecx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
imul ebp, edx, 0x8088405
lea esi, [ebp + 1]
shr esi, 0x18
xor ebx, esi
xor ecx, dword [ebx*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 9]
xor dl, al
shr eax, 8
xor dl, bh
movzx ebx, cl
shr ecx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
imul ebp, edx, 0x8088405
lea esi, [ebp + 1]
shr esi, 0x18
xor ebx, esi
xor ecx, dword [ebx*4 + 0x69ce30]
mov edx, ecx
movzx esi, cl
shr ecx, 8
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
movzx edx, byte [esp + 0xa]
xor dl, al
shr eax, 8
xor dl, bh
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
imul ebp, edx, 0x8088405
lea edx, [ebp + 1]
shr edx, 0x18
xor esi, edx
xor ecx, dword [esi*4 + 0x69ce30]
mov edx, ecx
or edx, 3
mov ebx, edx
and ebx, 0xfffffffe
imul ebx, edx
mov edx, eax
shr eax, 8
xor bh, byte [esp + 0xb]
xor dl, bh
movzx edx, dl
xor eax, dword [edx*4 + 0x69ce30]
movzx edx, al
lea edx, [ebp + edx + 1]
movzx ebp, cl
shr ecx, 8
imul edx, edx, 0x8088405
inc edx
mov esi, edx
shr esi, 0x18
xor ebp, esi
xor ecx, dword [ebp*4 + 0x69ce30]
mov dword [edi + 0x18], ecx
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x30]
mov dword [edi + 0x14], edx
cmp word [eax], 0
je 0x4225ca
cmp bh, byte [eax + 3]
mov esi, dword [esp + 0x28]
jne 0x4225d3
movsd xmm1, qword [edi + 0x10]
movsd xmm0, qword [edi + 0x18]
movsd xmm2, qword [edi]
movsd qword [esi + 0x18], xmm1
movsd xmm1, qword [edi + 8]
movsd qword [esi + 0x20], xmm0
movsd qword [esi + 8], xmm2
movsd qword [esi + 0x10], xmm1
mov dword [esi], 0
jmp 0x4225de
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0xd]
mov dword [esi + 8], edx
mov dword [esi + 5], ecx
mov ecx, 1
mov byte [esi + 4], al
mov dword [esi], ecx
jmp 0x4225de
cmp bh, byte [eax + 7]
mov esi, dword [esp + 0x28]
je 0x422581
xor eax, eax
mov dword [esi + 8], 0
mov dword [esi], eax
mov eax, esi
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret