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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
mov edi, ecx
mov eax, edx
xor edx, edx
mov dword [ebp - 8], edi
mov dword [ebp - 4], edx
test edi, edi
je 0x101c00f0
mov esi, dword [edi + 0x9c]
test esi, esi
je 0x101c00f0
cmp dword [esi], edx
jne 0x101bfe57
pop edi
lea eax, [edx - 0x64]
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
mov ecx, edi
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
mov dword [esi + 0x14], edi
cmp edi, eax
jbe 0x101bfe76
cmp dword [esi + 0x8c], edx
jne 0x101bfe76
mov dword [esi + 0x14], eax
mov ecx, eax
mov eax, dword [esi + 0x58]
push ebx
mov ebx, dword [esi + 8]
add eax, ebx
cmp edi, eax
jbe 0x101bfe90
cmp dword [esi + 0x8c], edx
je 0x101bfe90
mov dword [esi + 0x14], eax
mov ecx, eax
test ecx, ecx
je 0x101c00d4
test ebx, ebx
jne 0x101bffd5
mov eax, dword [esi + 0x58]
test eax, eax
je 0x101bffd5
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 [0x1024852c]
call edi
add esp, 0x10
test eax, eax
jne 0x101c00dd
mov edi, dword [esi + 0x64]
mov ecx, edi
push ebx
push dword [esi]
push dword [esi + 0x80]
push dword [esi + 0x7c]
call dword [0x1024852c]
call edi
add esp, 0x10
cmp eax, ebx
jne 0x101c00dd
mov edi, dword [ebp - 8]
cmp dword [edi + 0xa0], 0
je 0x101bffc4
xor edx, edx
mov dword [ebp - 0xc], edx
test ebx, ebx
je 0x101bffc4
nop word [eax + eax]
mov ecx, dword [edi + 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 + edx]
mov byte [eax + edx], bl
mov edx, dword [ebp - 8]
mov edi, dword [edi + 0xb0]
movsx ecx, bl
mov edx, dword [edx + 0xa4]
mov eax, edx
xor eax, ecx
shr edx, 8
mov ecx, dword [ebp - 8]
movzx eax, al
xor edx, dword [edi + eax*4]
movzx eax, dl
add eax, dword [ecx + 0xa8]
imul eax, eax, 0x8088405
mov dword [ecx + 0xa4], edx
mov edx, dword [ebp - 0xc]
inc eax
mov dword [ecx + 0xa8], eax
mov ecx, dword [ecx + 0xac]
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [edi + eax*4]
mov edi, dword [ebp - 8]
mov dword [edi + 0xac], ecx
mov eax, dword [esi]
mov byte [edx + eax], bl
inc edx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0xc], edx
cmp edx, ebx
jb 0x101bff30
add dword [esi + 0x3c], ebx
mov eax, dword [esi]
sub dword [esi + 0x58], ebx
mov edx, dword [ebp - 4]
mov dword [esi + 4], eax
mov dword [esi + 8], ebx
mov eax, dword [esi + 0x84]
test eax, eax
je 0x101c005b
cmp dword [esi + 0x8c], 0
jne 0x101c005b
cmp eax, 0xc
je 0x101c00ca
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.10177ff0
mov edi, eax
test edi, edi
js 0x101c001c
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 0x101c0037
mov ecx, dword [esi + 0x50]
mov edx, eax
push ebx
call fcn.1018e5f0
add esp, 4
mov edx, dword [ebp - 4]
sub dword [esi + 0x5c], ebx
add edx, ebx
mov dword [esi + 0x50], eax
mov dword [ebp - 4], edx
cmp edi, 1
je 0x101c00d4
test edi, edi
jne 0x101c00e7
mov ebx, dword [esi + 8]
jmp 0x101c00ca
test ebx, ebx
jne 0x101c0064
cmp dword [esi + 0x58], ebx
je 0x101c00d4
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 0x101c0091
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 0x101c0077
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x101c00a6
mov ecx, dword [esi + 0x50]
mov edx, eax
push edi
call fcn.1018e5f0
add esp, 4
mov edx, dword [ebp - 4]
sub ebx, edi
sub dword [esi + 0x5c], 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]
sub eax, edi
mov dword [esi + 8], ebx
add edx, edi
mov dword [esi + 0x14], eax
mov dword [ebp - 4], edx
cmp dword [esi + 0x14], 0
ja 0x101bfe98
pop ebx
pop edi
mov eax, edx
pop esi
mov esp, ebp
pop ebp
ret
pop ebx
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
pop ebx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
pop edi
mov eax, 0xffffff9a
pop esi
mov esp, ebp
pop ebp
ret