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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, ecx
mov eax, edx
xor edx, edx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edx
test ebx, ebx
jne 0x4dd2ef
lea eax, [ecx - 0x66]
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [ebx + 0x9c]
test esi, esi
jne 0x4dd303
lea eax, [esi - 0x66]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi], edx
jne 0x4dd312
pop esi
mov eax, 0xffffff9c
pop ebx
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [ebp + 8]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
mov dword [esi + 0x14], edi
cmp edi, eax
jbe 0x4dd32e
cmp dword [esi + 0x8c], edx
jne 0x4dd32e
mov dword [esi + 0x14], eax
mov eax, dword [esi + 8]
add eax, dword [esi + 0x58]
cmp edi, eax
jbe 0x4dd343
cmp dword [esi + 0x8c], edx
je 0x4dd343
mov dword [esi + 0x14], eax
cmp dword [esi + 0x14], edx
jbe 0x4dd582
nop dword [eax]
cmp dword [esi + 8], 0
jne 0x4dd47f
mov eax, dword [esi + 0x58]
test eax, eax
je 0x4dd47f
mov edi, 0x4000
cmp eax, edi
push 0
cmovb edi, eax
mov eax, dword [esi + 0x88]
add eax, dword [esi + 0x3c]
push eax
push dword [esi + 0x80]
mov eax, dword [esi + 0x70]
push dword [esi + 0x7c]
call eax
add esp, 0x10
test eax, eax
jne 0x4dd578
mov eax, dword [esi + 0x64]
push edi
push dword [esi]
push dword [esi + 0x80]
push dword [esi + 0x7c]
call eax
add esp, 0x10
cmp eax, edi
jne 0x4dd578
cmp dword [ebx + 0xa0], 0
je 0x4dd46e
xor edx, edx
mov dword [ebp - 0xc], edx
test edi, edi
je 0x4dd46e
nop word [eax + eax]
mov ecx, dword [ebx + 0xac]
add edx, dword [esi]
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
shr eax, 8
movzx ecx, al
movsx eax, byte [edx]
xor ecx, eax
mov byte [edx], cl
movsx ebx, cl
mov ecx, dword [ebp - 8]
mov eax, dword [ecx + 0xa4]
mov edx, dword [ecx + 0xb0]
xor eax, ebx
mov ecx, dword [ecx + 0xa4]
movzx eax, al
shr ecx, 8
mov eax, dword [edx + eax*4]
xor eax, ecx
mov ecx, dword [ebp - 8]
mov dword [ecx + 0xa4], eax
movzx eax, al
add eax, dword [ecx + 0xa8]
imul eax, eax, 0x8088405
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 [edx + eax*4]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov dword [eax + 0xac], ecx
mov eax, dword [esi]
mov byte [edx + eax], bl
inc edx
mov ebx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
cmp edx, edi
jb 0x4dd3d0
add dword [esi + 0x3c], edi
mov eax, dword [esi]
sub dword [esi + 0x58], edi
mov edx, dword [ebp - 4]
mov dword [esi + 4], eax
mov dword [esi + 8], edi
mov eax, dword [esi + 0x84]
test eax, eax
je 0x4dd500
cmp dword [esi + 0x8c], 0
jne 0x4dd500
cmp eax, 0xc
je 0x4dd56a
mov eax, dword [esi + 0x18]
lea ecx, [esi + 4]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x10], eax
call fcn.004d48e0
mov edi, eax
test edi, edi
js 0x4dd4c1
cmp dword [esi + 0x1c], 0
mov eax, 0xfffffffd
cmovne edi, eax
mov ebx, dword [esi + 0x18]
sub ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4dd4dc
mov ecx, dword [esi + 0x50]
mov edx, eax
push ebx
call fcn.004dee10
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 0x4dd582
test edi, edi
je 0x4dd56a
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esi + 8]
test edi, edi
jne 0x4dd50c
cmp dword [esi + 0x58], edi
je 0x4dd582
cmp dword [esi + 0x14], edi
cmovb edi, dword [esi + 0x14]
xor edx, edx
test edi, edi
je 0x4dd531
nop dword [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 0x4dd520
mov ebx, dword [esi + 0x10]
test ebx, ebx
jne 0x4dd53c
xor eax, eax
jmp 0x4dd54a
mov ecx, dword [esi + 0x50]
mov edx, ebx
push edi
call fcn.004dee10
add esp, 4
mov edx, dword [ebp - 4]
sub dword [esi + 0x5c], edi
sub dword [esi + 8], edi
sub dword [esi + 0x14], edi
add dword [esi + 4], edi
add dword [esi + 0x18], edi
add edx, edi
mov dword [esi + 0x50], eax
lea eax, [ebx + edi]
mov dword [esi + 0x10], eax
mov dword [ebp - 4], edx
cmp dword [esi + 0x14], 0
jbe 0x4dd582
mov ebx, dword [ebp - 8]
jmp 0x4dd350
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret