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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov eax, edx
xor ebx, ebx
mov edx, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], edx
push esi
push edi
mov edi, dword [ebp + 8]
test edx, edx
je 0x10123ea5
mov esi, dword [edx + 0x9c]
test esi, esi
je 0x10123ea5
cmp dword [esi], ebx
jne 0x10123bfc
pop edi
pop esi
lea eax, [ebx - 0x64]
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x10], eax
mov edx, edi
mov eax, dword [esi + 0x5c]
mov dword [esi + 0x14], edi
cmp edi, eax
jbe 0x10123c18
cmp dword [esi + 0x8c], ebx
jne 0x10123c18
mov dword [esi + 0x14], eax
mov edx, eax
mov eax, dword [esi + 8]
add eax, dword [esi + 0x58]
cmp edi, eax
jbe 0x10123c2f
cmp dword [esi + 0x8c], ebx
je 0x10123c2f
mov dword [esi + 0x14], eax
mov edx, eax
test edx, edx
je 0x10123e01
nop word [eax + eax]
mov ebx, dword [esi + 8]
test ebx, ebx
jne 0x10123d6f
mov eax, dword [esi + 0x58]
test eax, eax
je 0x10123d6f
mov edi, dword [esi + 0x70]
mov ebx, 0x4000
cmp eax, ebx
mov ecx, edi
push 0
cmovb ebx, eax
mov eax, dword [esi + 0x88]
add eax, dword [esi + 0x3c]
push eax
push dword [esi + 0x80]
mov dword [ebp - 0x10], ebx
push dword [esi + 0x7c]
call dword [0x1019a4f8]
call edi
add esp, 0x10
test eax, eax
jne 0x10123e88
mov edi, dword [esi + 0x64]
mov ecx, edi
push ebx
push dword [esi]
push dword [esi + 0x80]
push dword [esi + 0x7c]
call dword [0x1019a4f8]
call edi
add esp, 0x10
cmp eax, ebx
jne 0x10123e88
mov edx, dword [ebp - 8]
cmp dword [edx + 0xa0], 0
je 0x10123d61
xor edi, edi
mov dword [ebp - 0xc], edi
test ebx, ebx
je 0x10123d61
mov ecx, dword [edx + 0xac]
mov eax, dword [esi]
and ecx, 0xfffd
or ecx, 2
mov ebx, ecx
xor ebx, 1
imul ebx, ecx
shr ebx, 8
xor bl, byte [eax + edi]
mov byte [eax + edi], bl
mov edi, dword [edx + 0xb0]
mov edx, dword [edx + 0xa4]
mov eax, edx
movsx ecx, bl
xor eax, ecx
shr edx, 8
movzx eax, al
mov eax, dword [edi + eax*4]
xor eax, edx
mov edx, dword [ebp - 8]
mov ecx, dword [edx + 0xac]
mov dword [edx + 0xa4], eax
movzx eax, al
add eax, dword [edx + 0xa8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 0xa8], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [edi + eax*4]
mov edi, dword [ebp - 0xc]
mov dword [edx + 0xac], ecx
mov eax, dword [esi]
mov byte [edi + eax], bl
inc edi
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0xc], edi
cmp edi, ebx
jb 0x10123cd1
add dword [esi + 0x3c], ebx
mov eax, dword [esi]
sub dword [esi + 0x58], ebx
mov dword [esi + 4], eax
mov dword [esi + 8], ebx
mov eax, dword [esi + 0x84]
test eax, eax
je 0x10123e0a
cmp dword [esi + 0x8c], 0
jne 0x10123e0a
cmp eax, 0xc
je 0x10123df4
mov eax, dword [esi + 0x18]
lea ecx, [esi + 4]
mov dword [ebp - 0x10], eax
mov edx, 2
mov eax, dword [esi + 0x10]
mov dword [ebp - 0xc], eax
call fcn.10124710
mov edi, eax
test edi, edi
js 0x10123dba
cmp dword [esi + 0x1c], 0
mov eax, 0xfffffffd
cmovne edi, eax
mov ebx, dword [esi + 0x18]
sub ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x10123dd5
mov ecx, dword [esi + 0x50]
mov edx, eax
push ebx
call fcn.10128ca0
add esp, 4
sub dword [esi + 0x5c], ebx
mov dword [esi + 0x50], eax
mov eax, dword [ebp - 4]
add eax, ebx
mov dword [ebp - 4], eax
cmp edi, 1
je 0x10123eaa
test edi, edi
jne 0x10123e92
mov ebx, dword [ebp - 4]
cmp dword [esi + 0x14], 0
ja 0x10123c40
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
jne 0x10123e17
cmp dword [esi + 0x58], ebx
je 0x10123e9b
mov eax, dword [esi + 0x14]
cmp eax, ebx
mov edi, eax
mov dword [ebp - 0xc], eax
cmovae edi, ebx
xor edx, edx
test edi, edi
je 0x10123e4a
nop word [eax + eax]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, edi
jb 0x10123e30
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10123e5f
mov ecx, dword [esi + 0x50]
mov edx, eax
push edi
call fcn.10128ca0
add esp, 4
sub dword [esi + 0x5c], edi
sub ebx, edi
add dword [esi + 0x10], edi
add dword [esi + 4], edi
add dword [esi + 0x18], edi
mov dword [esi + 0x50], eax
mov eax, dword [ebp - 0xc]
mov dword [esi + 8], ebx
sub eax, edi
mov ebx, dword [ebp - 4]
add ebx, edi
mov dword [esi + 0x14], eax
mov dword [ebp - 4], ebx
jmp 0x10123df7
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xffffff9a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret