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

Disassembly:
sub esp, 0x14
cmp eax, 0xc
push edi
mov edi, ecx
jge 0x1000b532
xor eax, eax
pop edi
add esp, 0x14
ret
mov eax, dword [0x10013050]
inc eax
cmp eax, 1
mov dword [0x10013050], eax
jne 0x1000b557
push 0
call sub.CRTDLL.dll_time
xor eax, 0xbb40e64e
push eax
call sub.CRTDLL.dll_srand
add esp, 8
mov eax, dword [esp + 0x1c]
mov edx, esi
call fcn.1000b4b0
push ebx
mov dword [esp + 8], 0
push ebp
lea esp, [esp]
call sub.CRTDLL.dll_rand
mov ebp, dword [esi]
mov edx, dword [esi + 8]
sar eax, 7
and eax, 0xff
mov ecx, ebp
xor ecx, eax
and ecx, 0xff
mov ecx, dword [edi + ecx*4]
shr ebp, 8
xor ecx, ebp
mov ebp, dword [esi + 4]
mov dword [esi], ecx
and ecx, 0xff
add ecx, ebp
imul ecx, ecx, 0x8088405
mov ebx, edx
and ebx, 0xfffd
or ebx, 2
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, edx
shr edx, 8
and ecx, 0xff
xor edx, dword [edi + ecx*4]
mov dword [esi + 8], edx
mov edx, ebx
xor edx, 1
imul edx, ebx
shr edx, 8
xor dl, al
mov eax, dword [esp + 0xc]
mov byte [esp + eax + 0x14], dl
inc eax
cmp eax, 0xa
mov dword [esp + 0xc], eax
jl 0x1000b570
mov eax, dword [esp + 0x24]
mov edx, esi
call fcn.1000b4b0
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x14]
xor eax, eax
sub ecx, edx
mov dword [esp + 0xc], ecx
xor ecx, ecx
mov cl, byte [esp + eax + 0x14]
mov ebx, dword [esi]
mov edx, dword [esi + 8]
mov ebp, edx
and ebp, 0xfffd
or ebp, 2
xor ecx, ebx
and ecx, 0xff
mov ecx, dword [edi + ecx*4]
shr ebx, 8
xor ecx, ebx
mov dword [esi], ecx
mov ebx, dword [esi + 4]
and ecx, 0xff
add ecx, ebx
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, edx
and ecx, 0xff
mov ebx, dword [edi + ecx*4]
mov ecx, ebp
xor ecx, 1
imul ecx, ebp
shr ecx, 8
shr edx, 8
xor edx, ebx
mov dword [esi + 8], edx
xor cl, byte [esp + eax + 0x14]
mov edx, dword [esp + 0xc]
add edx, eax
mov byte [esp + edx + 0x14], cl
mov ebx, dword [esi]
xor ecx, ecx
mov cl, byte [esp + eax + 0x15]
mov edx, dword [esi + 8]
mov ebp, edx
and ebp, 0xfffd
or ebp, 2
xor ecx, ebx
and ecx, 0xff
mov ecx, dword [edi + ecx*4]
shr ebx, 8
xor ecx, ebx
mov ebx, dword [esi + 4]
mov dword [esi], ecx
and ecx, 0xff
add ecx, ebx
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, edx
and ecx, 0xff
mov ebx, dword [edi + ecx*4]
mov ecx, ebp
xor ecx, 1
imul ecx, ebp
shr edx, 8
xor edx, ebx
shr ecx, 8
mov dword [esi + 8], edx
xor cl, byte [esp + eax + 0x15]
mov edx, dword [esp + 0x28]
mov byte [edx + eax + 1], cl
mov ebx, dword [esi]
mov edx, dword [esi + 8]
xor ecx, ecx
mov cl, byte [esp + eax + 0x16]
mov ebp, edx
and ebp, 0xfffd
or ebp, 2
xor ecx, ebx
and ecx, 0xff
mov ecx, dword [edi + ecx*4]
shr ebx, 8
xor ecx, ebx
mov dword [esi], ecx
and ecx, 0xff
add ecx, dword [esi + 4]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, edx
and ecx, 0xff
mov ebx, dword [edi + ecx*4]
mov ecx, ebp
xor ecx, 1
imul ecx, ebp
shr ecx, 8
shr edx, 8
xor edx, ebx
mov dword [esi + 8], edx
xor cl, byte [esp + eax + 0x16]
mov edx, dword [esp + 0x28]
mov byte [edx + eax + 2], cl
xor ecx, ecx
mov cl, byte [esp + eax + 0x17]
mov ebx, dword [esi]
mov edx, dword [esi + 8]
mov ebp, edx
and ebp, 0xfffd
or ebp, 2
xor ecx, ebx
and ecx, 0xff
mov ecx, dword [edi + ecx*4]
shr ebx, 8
xor ecx, ebx
mov ebx, dword [esi + 4]
mov dword [esi], ecx
and ecx, 0xff
add ecx, ebx
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, edx
and ecx, 0xff
mov ebx, dword [edi + ecx*4]
mov ecx, ebp
xor ecx, 1
imul ecx, ebp
shr ecx, 8
shr edx, 8
xor edx, ebx
mov dword [esi + 8], edx
xor cl, byte [esp + eax + 0x17]
mov edx, dword [esp + 0x28]
mov byte [edx + eax + 3], cl
mov ebx, dword [esi]
xor ecx, ecx
mov cl, byte [esp + eax + 0x18]
mov edx, dword [esi + 8]
mov ebp, edx
and ebp, 0xfffd
or ebp, 2
xor ecx, ebx
and ecx, 0xff
mov ecx, dword [edi + ecx*4]
shr ebx, 8
xor ecx, ebx
mov ebx, dword [esi + 4]
mov dword [esi], ecx
and ecx, 0xff
add ecx, ebx
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, edx
and ecx, 0xff
mov ebx, dword [edi + ecx*4]
shr edx, 8
xor edx, ebx
mov bl, byte [esp + eax + 0x18]
mov ecx, ebp
xor ecx, 1
imul ecx, ebp
mov ebp, dword [esp + 0x28]
shr ecx, 8
xor cl, bl
mov dword [esi + 8], edx
mov byte [eax + ebp + 4], cl
add eax, 5
cmp eax, 0xa
jl 0x1000b604
mov edx, dword [esi + 8]
mov ebx, dword [esi]
mov ecx, edx
and ecx, 0xfffd
or ecx, 2
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x2c]
shr ecx, 0x10
mov dword [esp + 0x10], ecx
xor ecx, ebx
and ecx, 0xff
mov ecx, dword [edi + ecx*4]
shr ebx, 8
xor ecx, ebx
mov ebx, dword [esi + 4]
mov dword [esi], ecx
and ecx, 0xff
add ecx, ebx
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, edx
and ecx, 0xff
mov ebx, dword [edi + ecx*4]
mov ecx, dword [esp + 0xc]
shr edx, 8
xor edx, ebx
mov bl, byte [esp + 0x10]
mov dword [esi + 8], edx
mov edx, ecx
xor edx, 1
imul edx, ecx
shr edx, 8
xor dl, bl
mov byte [eax + ebp], dl
mov edx, dword [esi + 8]
mov ebx, dword [esi]
mov ecx, edx
and ecx, 0xfffd
or ecx, 2
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x2c]
shr ecx, 0x18
mov dword [esp + 0xc], ecx
xor ecx, ebx
and ecx, 0xff
mov ecx, dword [edi + ecx*4]
shr ebx, 8
xor ecx, ebx
mov ebx, dword [esi + 4]
mov dword [esi], ecx
and ecx, 0xff
add ecx, ebx
imul ecx, ecx, 0x8088405
inc eax
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, edx
shr edx, 8
and ecx, 0xff
mov ebx, dword [edi + ecx*4]
mov ecx, dword [esp + 0x10]
xor edx, ebx
mov dword [esi + 8], edx
mov edx, ecx
xor edx, 1
imul edx, ecx
mov cl, byte [esp + 0xc]
shr edx, 8
xor dl, cl
mov byte [eax + ebp], dl
pop ebp
pop ebx
inc eax
pop edi
add esp, 0x14
ret