Function at 0x67d1c0
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 0x67d495
mov esi, dword [edx + 0x9c]
test esi, esi
je 0x67d495
cmp dword [esi], ebx
jne 0x67d1fc
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 0x67d218
cmp dword [esi + 0x8c], ebx
jne 0x67d218
mov dword [esi + 0x14], eax
mov edx, eax
mov eax, dword [esi + 8]
add eax, dword [esi + 0x58]
cmp edi, eax
jbe 0x67d22f
cmp dword [esi + 0x8c], ebx
je 0x67d22f
mov dword [esi + 0x14], eax
mov edx, eax
test edx, edx
je 0x67d3f1
nop word [eax + eax]
mov ebx, dword [esi + 8]
test ebx, ebx
jne 0x67d35f
mov eax, dword [esi + 0x58]
test eax, eax
je 0x67d35f
mov ebx, 0x4000
cmp eax, ebx
push 0
cmovb ebx, 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]
mov dword [ebp - 0x10], ebx
call eax
add esp, 0x10
test eax, eax
jne 0x67d478
mov eax, dword [esi + 0x64]
push ebx
push dword [esi]
push dword [esi + 0x80]
push dword [esi + 0x7c]
call eax
add esp, 0x10
cmp eax, ebx
jne 0x67d478
mov edx, dword [ebp - 8]
cmp dword [edx + 0xa0], 0
je 0x67d351
xor edi, edi
mov dword [ebp - 0xc], edi
test ebx, ebx
je 0x67d351
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 0x67d2c1
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 0x67d3fa
cmp dword [esi + 0x8c], 0
jne 0x67d3fa
cmp eax, 0xc
je 0x67d3e4
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.00671680
mov edi, eax
test edi, edi
js 0x67d3aa
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 0x67d3c5
mov ecx, dword [esi + 0x50]
mov edx, eax
push ebx
call fcn.0067e210
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 0x67d49a
test edi, edi
jne 0x67d482
mov ebx, dword [ebp - 4]
cmp dword [esi + 0x14], 0
ja 0x67d240
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
jne 0x67d407
cmp dword [esi + 0x58], ebx
je 0x67d48b
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 0x67d43a
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 0x67d420
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x67d44f
mov ecx, dword [esi + 0x50]
mov edx, eax
push edi
call fcn.0067e210
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 0x67d3e7
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