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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [ebp + 8]
mov edi, 0xffffff9a
test eax, eax
je 0x4e7876
mov ebx, dword [eax + 0xe0]
test ebx, ebx
je 0x4e7876
cmp dword [ebx], 0
je 0x4e7868
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x4e786f
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edi
mov edx, dword [ebx + 0x7c]
mov esi, dword [ebx + 8]
mov ecx, dword [ebx + 0x78]
mov eax, ecx
add eax, esi
adc edx, 0
cmp eax, edi
sbb edx, 0
jae 0x4e75ed
cmp dword [ebx + 0xc8], 0
je 0x4e75ed
add ecx, esi
mov dword [ebx + 0x14], ecx
je 0x4e7880
lea eax, [ebx + 4]
mov dword [ebp - 0x1c], eax
lea eax, [ebx + 0x88]
mov dword [ebp - 0x20], eax
xor edi, edi
mov dword [ebp - 0x28], ebx
test esi, esi
jne 0x4e775d
mov esi, dword [ebx + 0x78]
mov edx, dword [ebx + 0x7c]
mov eax, esi
or eax, edx
je 0x4e775b
mov ecx, 0x4000
cmp esi, ecx
mov eax, edx
sbb eax, 0
mov eax, 0
cmovae edx, eax
mov dword [ebp - 0x24], edx
cmovae esi, ecx
mov eax, dword [ebx + 0xc0]
add eax, dword [ebx + 0x40]
mov ecx, dword [ebx + 0xc4]
adc ecx, dword [ebx + 0x44]
push 0
push ecx
push eax
push dword [ebx + 0xb4]
push dword [ebp - 0x20]
call fcn.004f80f6
add esp, 0x14
test eax, eax
jne 0x4e7873
push esi
push dword [ebx]
push dword [ebx + 0xb4]
push dword [ebx + 0xa4]
call dword [ebx + 0x8c]
add esp, 0x10
cmp eax, esi
jne 0x4e7873
mov dword [ebp - 0x18], edi
mov edi, dword [ebp + 8]
cmp dword [edi + 0xe4], 0
mov edx, 0xfffd
je 0x4e773f
xor eax, eax
mov dword [ebp - 0x2c], esi
mov ecx, dword [edi + 0xf4]
and ecx, edx
lea edx, [ecx + 2]
xor ecx, 3
imul ecx, edx
mov edx, dword [ebx]
mov dword [ebp - 0x14], eax
xor ch, byte [edx + eax]
mov byte [edx + eax], ch
movzx edx, ch
mov eax, dword [edi + 0xf8]
mov dword [ebp - 0x10], eax
mov esi, dword [edi + 0xec]
mov ebx, esi
mov eax, 0xff
and ebx, eax
xor ebx, edx
mov edx, dword [edi + 0xf4]
shr esi, 8
mov eax, dword [ebp - 0x10]
xor esi, dword [eax + ebx*4]
mov dword [edi + 0xec], esi
mov eax, 0xff
and esi, eax
add esi, dword [edi + 0xf0]
imul esi, esi, 0x8088405
inc esi
mov dword [edi + 0xf0], esi
shr esi, 0x18
mov ebx, edx
and ebx, eax
xor ebx, esi
mov esi, dword [ebp - 0x2c]
shr edx, 8
mov eax, dword [ebp - 0x10]
xor edx, dword [eax + ebx*4]
mov ebx, dword [ebp - 0x28]
mov dword [edi + 0xf4], edx
mov edx, dword [ebx]
mov eax, dword [ebp - 0x14]
mov byte [edx + eax], ch
mov edx, 0xfffd
mov ecx, eax
inc ecx
mov eax, ecx
cmp esi, ecx
jne 0x4e769f
add dword [ebx + 0x40], esi
mov eax, dword [ebp - 0x24]
adc dword [ebx + 0x44], eax
sub dword [ebx + 0x78], esi
sbb dword [ebx + 0x7c], eax
mov eax, dword [ebx]
mov dword [ebx + 4], eax
mov dword [ebx + 8], esi
mov edi, dword [ebp - 0x18]
jmp 0x4e775d
xor esi, esi
mov eax, dword [ebx + 0xb8]
test eax, eax
je 0x4e7770
cmp dword [ebx + 0xc8], 0
je 0x4e77e8
test esi, esi
jne 0x4e7780
mov eax, dword [ebx + 0x78]
or eax, dword [ebx + 0x7c]
je 0x4e7876
mov eax, dword [ebx + 0x14]
cmp eax, esi
cmovb esi, eax
test esi, esi
je 0x4e779f
xor eax, eax
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0x10]
mov cl, byte [ecx + eax]
mov byte [edx + eax], cl
inc eax
cmp esi, eax
jne 0x4e778e
add dword [ebx + 0x68], esi
adc dword [ebx + 0x6c], 0
push esi
push dword [ebx + 0x10]
push dword [ebx + 0x70]
call fcn.004a7610
add esp, 0xc
mov dword [ebx + 0x70], eax
sub dword [ebx + 0x80], esi
sbb dword [ebx + 0x84], 0
sub dword [ebx + 8], esi
sub dword [ebx + 0x14], esi
add dword [ebx + 0x10], esi
add dword [ebx + 4], esi
add dword [ebx + 0x18], esi
add edi, esi
cmp dword [ebx + 0x14], 0
je 0x4e7876
mov esi, dword [ebx + 8]
jmp 0x4e7601
cmp eax, 0xc
je 0x4e77d6
mov esi, dword [ebx + 0x10]
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x10], eax
push 2
push dword [ebp - 0x1c]
call fcn.0044cad0
add esp, 8
mov ecx, eax
test eax, eax
mov dword [ebp - 0x18], edi
js 0x4e7818
cmp dword [ebx + 0x1c], 0
mov eax, 0xfffffffd
cmovne ecx, eax
mov dword [ebp - 0x14], ecx
mov ecx, esi
mov eax, dword [ebp - 0x10]
mov edi, dword [ebx + 0x18]
sub edi, eax
mov esi, 0
sbb esi, esi
mov eax, dword [ebx + 0x70]
add dword [ebx + 0x68], edi
adc dword [ebx + 0x6c], esi
push edi
push ecx
push eax
call fcn.004a7610
add esp, 0xc
mov dword [ebx + 0x70], eax
sub dword [ebx + 0x80], edi
sbb dword [ebx + 0x84], esi
mov eax, dword [ebp - 0x18]
add eax, edi
mov edi, eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4e77d6
cmp eax, 1
je 0x4e7876
jmp 0x4e7878
mov edi, 0xffffff9c
jmp 0x4e7876
xor edi, edi
jmp 0x4e7876
xor edi, edi
dec edi
mov eax, edi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
xor eax, eax
jmp 0x4e7878