Function at 0x10038700
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x10058684]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0xc
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], eax
jge 0x10038733
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001d73b
mov esp, ebp
pop ebp
ret
mov eax, dword [0x1005b63c]
inc eax
mov dword [0x1005b63c], eax
cmp eax, 1
jne 0x10038758
push 0
call fcn.1003fb65
xor eax, 0xbb40e64e
push eax
call fcn.1001f90e
add esp, 8
push ebx
mov ebx, edi
mov ecx, esi
call fcn.10038680
add esp, 4
mov dword [ebp - 0x14], 0
lea esp, [esp]
call fcn.1001f920
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x20], edx
mov edx, dword [esi]
mov ebx, edx
shr edx, 8
sar eax, 7
and eax, 0xff
xor ebx, eax
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x20]
mov edx, ecx
xor edx, 1
imul edx, ecx
shr edx, 8
xor dl, al
mov eax, dword [ebp - 0x14]
mov byte [ebp + eax - 0x10], dl
inc eax
mov dword [ebp - 0x14], eax
cmp eax, 0xa
jl 0x10038770
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, edi
mov ecx, esi
call fcn.10038680
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x10]
add esp, 4
xor eax, eax
sub ecx, edx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [esi + 8]
movzx ebx, byte [ebp + eax - 0x10]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
movzx ebx, byte [ebp + eax - 0xf]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x1c]
shr edx, 8
xor dl, byte [ebp + eax - 0x10]
add ecx, eax
mov byte [ebp + ecx - 0x10], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
movzx ebx, byte [ebp + eax - 0xe]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp + eax - 0xf]
mov byte [ecx + eax + 1], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
shr edx, 8
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
movzx ebx, byte [ebp + eax - 0xd]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
shr edx, 8
xor dl, byte [ebp + eax - 0xe]
mov ecx, dword [ebp - 0x18]
mov byte [ecx + eax + 2], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
movzx ebx, byte [ebp + eax - 0xc]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp + eax - 0xd]
mov byte [ecx + eax + 3], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp + eax - 0xc]
add eax, 5
mov byte [ecx + eax - 1], dl
cmp eax, 0xa
jl 0x10038805
mov ecx, dword [esi + 8]
mov ebx, dword [ebp + 0x10]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x1c], edx
mov edx, dword [esi]
shr ebx, 0x10
mov dword [ebp - 0x20], ebx
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
mov ebx, dword [ebp + 0x10]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x1c]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp - 0x20]
shr ebx, 0x18
mov byte [ecx + eax], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x1c], edx
mov edx, dword [esi]
mov dword [ebp - 0x20], ebx
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
add eax, 2
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x1c]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp - 0x20]
pop ebx
mov byte [ecx + eax - 1], dl
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001d73b
mov esp, ebp
pop ebp
ret