Function at 0x514170
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, 0x30
mov esi, dword [ebp + 8]
mov eax, dword [0x557008]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor edi, edi
dec edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edi
mov ebx, 0xffffff9a
test esi, esi
je 0x5141e6
mov eax, dword [esi + 0x60]
or eax, dword [esi + 0x64]
je 0x5141e6
cmp dword [esi + 0xe0], 0
jne 0x5141fa
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], edi
mov eax, dword [esi + 0x48]
add eax, dword [esi + 0xd8]
mov ecx, dword [esi + 0x4c]
adc ecx, dword [esi + 0xdc]
push 0
push ecx
push eax
push dword [esi + 0x30]
push esi
call fcn.0051c9e0
add esp, 0x14
test eax, eax
je 0x514215
mov ebx, 0xffffff99
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a927c
mov eax, ebx
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
push esi
call fcn.00513840
add esp, 4
jmp 0x5141ac
push edi
call fcn.00460250
add esp, 4
mov ebx, 0xffffff98
jmp 0x5141e6
mov edx, dword [esi + 0x30]
lea ebx, [ebp - 0x20]
mov ecx, esi
push ebx
call fcn.00514af0
add esp, 4
mov dword [ebp - 0x34], eax
mov eax, dword [ebx]
mov dword [ebp - 0x38], eax
mov edx, dword [esi + 0x30]
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
call fcn.00515030
add esp, 4
mov dword [ebp - 0x3c], eax
mov edx, dword [esi + 0x30]
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.00515030
add esp, 4
mov ebx, eax
mov edx, dword [esi + 0x30]
mov ecx, esi
lea eax, [ebp - 0x24]
push eax
call fcn.00515030
add esp, 4
mov ecx, edi
test eax, eax
jne 0x5142c5
or ebx, dword [ebp - 0x3c]
or ebx, dword [ebp - 0x34]
sete al
mov edx, dword [ebp - 0x38]
jne 0x5142ad
cmp edx, 0x4034b50
jne 0x5142ad
mov eax, dword [ebp - 0x24]
mov ecx, 0xffffff99
cmp eax, dword [esi + 0x8c]
jne 0x5142c5
cmp eax, 0xc
ja 0x5142a6
mov ecx, 0x1101
bt ecx, eax
mov ecx, 0
jb 0x5142c5
mov ecx, 0xffffff99
jmp 0x5142c5
xor ecx, ecx
cmp edx, 0x4034b50
mov edx, 0xffffff99
cmove edx, ecx
xor ecx, ecx
dec ecx
test al, al
cmovne ecx, edx
mov dword [ebp - 0x38], ecx
mov edx, dword [esi + 0x30]
mov ecx, esi
lea ebx, [ebp - 0x24]
push ebx
call fcn.00514af0
add esp, 4
mov dword [ebp - 0x34], eax
mov edx, dword [esi + 0x30]
mov ecx, esi
push ebx
call fcn.00514af0
add esp, 4
mov ebx, edi
test eax, eax
jne 0x51431a
xor ebx, ebx
neg dword [ebp - 0x34]
sbb ebx, ebx
or ebx, dword [ebp - 0x38]
jne 0x51431a
mov eax, dword [ebp - 0x24]
mov ebx, 0
cmp eax, dword [esi + 0x94]
je 0x51431a
xor eax, eax
test byte [ebp - 0x28], 8
mov ebx, 0xffffff99
cmovne ebx, eax
mov edx, dword [esi + 0x30]
mov ecx, esi
lea eax, [ebp - 0x24]
push eax
call fcn.00514af0
add esp, 4
mov ecx, edi
test eax, eax
jne 0x514361
test ebx, ebx
jne 0x51435f
mov eax, dword [ebp - 0x24]
mov ecx, ebx
cmp eax, 0xffffffff
je 0x514361
xor eax, dword [esi + 0x98]
xor ecx, ecx
or eax, dword [esi + 0x9c]
je 0x514361
xor eax, eax
test byte [ebp - 0x28], 8
mov ecx, 0xffffff99
cmovne ecx, eax
jmp 0x514361
mov ecx, ebx
mov ebx, ecx
mov edx, dword [esi + 0x30]
mov ecx, esi
lea eax, [ebp - 0x24]
push eax
call fcn.00514af0
add esp, 4
test eax, eax
jne 0x5143a8
test ebx, ebx
jne 0x5143a6
mov eax, dword [ebp - 0x24]
mov edi, ebx
cmp eax, 0xffffffff
je 0x5143a8
xor eax, dword [esi + 0xa0]
xor edi, edi
or eax, dword [esi + 0xa4]
je 0x5143a8
xor eax, eax
test byte [ebp - 0x28], 8
mov edi, 0xffffff99
cmovne edi, eax
jmp 0x5143a8
mov edi, ebx
mov edx, dword [esi + 0x30]
lea eax, [ebp - 0x2c]
mov ecx, esi
push eax
call fcn.00515030
add esp, 4
test eax, eax
jne 0x5143d6
mov ebx, dword [ebp - 0x2c]
test edi, edi
jne 0x5143dc
xor eax, eax
cmp ebx, dword [esi + 0xa8]
mov edi, 0xffffff99
cmove edi, eax
jmp 0x5143dc
xor edi, edi
dec edi
mov ebx, dword [ebp - 0x2c]
mov edx, dword [esi + 0x30]
lea eax, [ebp - 0x30]
mov ecx, esi
push eax
call fcn.00515030
add esp, 4
mov edx, dword [esi + 0xdc]
mov ecx, dword [esi + 0xd8]
mov dword [ebp - 0x38], ebx
add ecx, ebx
adc edx, 0
add ecx, 0x1e
adc edx, 0
or eax, edi
mov ebx, 0xffffff99
jne 0x5141e6
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x34], ecx
mov ebx, dword [ebp - 0x30]
push 0xd0
call fcn.00460200
add esp, 4
test eax, eax
je 0x51420e
mov edi, eax
push 0x4000
call fcn.00460200
add esp, 4
mov dword [edi], eax
mov ecx, dword [ebp - 0x3c]
mov dword [edi + 0x54], ecx
mov ecx, dword [ebp - 0x34]
mov dword [edi + 0x50], ecx
mov dword [ebp - 0x34], ebx
mov dword [edi + 0x58], ebx
mov ebx, dword [ebp + 0x14]
xor ecx, ecx
mov dword [edi + 0x64], ecx
mov dword [edi + 0x60], ecx
mov dword [edi + 0xc8], ebx
test eax, eax
je 0x514205
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov dword [edi + 0x48], 0
test ecx, ecx
je 0x514487
mov edx, dword [esi + 0x8c]
mov dword [ecx], edx
test eax, eax
je 0x514516
mov dword [eax], 6
mov ecx, dword [esi + 0x88]
and ecx, 6
cmp ecx, 2
je 0x5144b4
cmp ecx, 6
je 0x514511
cmp ecx, 4
jne 0x514516
mov ecx, 2
jmp 0x514514
mov ecx, 9
jmp 0x514514
test ebx, ebx
jne 0x51458a
cmp eax, 8
jne 0x51458a
mov eax, edi
add eax, 4
xor ecx, ecx
mov dword [edi + 0x24], ecx
mov dword [edi + 0x28], ecx
mov dword [edi + 0x2c], ecx
mov dword [edi + 4], ecx
mov dword [edi + 8], ecx
push 0x38
push str.1.2.13.1_motley
push 0xfffffffffffffff1
push eax
call fcn.0041d660
add esp, 0x10
test eax, eax
je 0x514508
mov ebx, eax
push edi
call fcn.00460250
add esp, 4
jmp 0x5141e6
mov dword [edi + 0x48], 8
jmp 0x51458a
xor ecx, ecx
inc ecx
mov dword [eax], ecx
mov eax, dword [esi + 0x94]
mov dword [edi + 0x74], eax
xor ecx, ecx
mov dword [edi + 0x70], ecx
mov dword [edi + 0x6c], ecx
mov dword [edi + 0x68], ecx
mov eax, dword [esi + 0x8c]
mov dword [edi + 0xb8], eax
mov edx, dword [esi + 0x30]
mov dword [edi + 0xb4], edx
movups xmm0, xmmword [esi]
movups xmm1, xmmword [esi + 0x10]
movups xmmword [edi + 0x88], xmm0
movups xmmword [edi + 0x98], xmm1
movups xmm0, xmmword [esi + 0x1c]
movups xmmword [edi + 0xa4], xmm0
movsd xmm0, qword [esi + 0x48]
movsd qword [edi + 0xc0], xmm0
mov dword [edi + 0x18], ecx
test ebx, ebx
jne 0x5144bb
cmp eax, 0xc
jne 0x5144bb
mov dword [edi + 0xc8], 1
mov ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x38]
movsd xmm0, qword [esi + 0x98]
movsd qword [edi + 0x78], xmm0
movsd xmm0, qword [esi + 0xa0]
movsd qword [edi + 0x80], xmm0
xor ebx, ebx
add ecx, dword [esi + 0xd8]
mov eax, dword [esi + 0xdc]
adc eax, ebx
add ecx, 0x1e
mov dword [edi + 0x40], ecx
adc eax, ebx
mov dword [edi + 0x44], eax
mov dword [edi + 8], ebx
mov dword [esi + 0xe0], edi
mov eax, dword [ebp + 0x18]
mov dword [esi + 0xe4], ebx
test eax, eax
je 0x5141e6
mov edi, eax
call fcn.004ee230
mov dword [ebp - 0x38], eax
mov dword [esi + 0xf8], eax
mov dword [esi + 0xec], 0x12345678
mov dword [esi + 0xf0], 0x23456789
mov dword [esi + 0xf4], 0x34567890
mov al, byte [edi]
test al, al
je 0x514685
mov edx, edi
inc edx
mov ecx, 0x12345678
mov ebx, 0x23456789
mov edi, 0x34567890
mov dword [ebp - 0x34], edx
mov ah, cl
xor ah, al
movzx eax, ah
shr ecx, 8
mov edx, dword [ebp - 0x38]
xor ecx, dword [edx + eax*4]
mov eax, ecx
mov edx, 0xff
and eax, edx
add eax, ebx
imul ebx, eax, 0x8088405
inc ebx
mov eax, ebx
shr eax, 0x18
mov edx, edi
mov esi, 0xff
and edx, esi
mov esi, dword [ebp + 8]
xor edx, eax
mov dword [esi + 0xec], ecx
mov dword [esi + 0xf0], ebx
shr edi, 8
mov eax, dword [ebp - 0x38]
xor edi, dword [eax + edx*4]
mov edx, dword [ebp - 0x34]
mov dword [esi + 0xf4], edi
mov al, byte [edx]
inc edx
test al, al
jne 0x514628
mov eax, dword [esi + 0xe0]
mov ecx, dword [eax + 0xc0]
add ecx, dword [eax + 0x40]
mov edx, dword [eax + 0xc4]
adc edx, dword [eax + 0x44]
push 0
push edx
push ecx
push dword [esi + 0x30]
push esi
call fcn.0051c9e0
add esp, 0x14
test eax, eax
jne 0x51420e
mov edi, dword [esi + 0x30]
mov ecx, dword [esi + 4]
mov ebx, dword [esi + 0x1c]
call dword [section..00cfg]
lea eax, [ebp - 0x1c]
push 0xc
push eax
push edi
push ebx
call ecx
add esp, 0x10
mov ebx, 0xffffff98
cmp eax, 0xc
jb 0x5141e6
mov eax, dword [esi + 0xf8]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0xf4]
mov edx, dword [esi + 0xec]
mov edi, dword [esi + 0xf0]
mov dword [ebp - 0x38], 0
mov ecx, eax
and ecx, 0xfffd
mov ebx, eax
or ebx, 2
xor ecx, 3
imul ecx, ebx
mov ebx, dword [ebp - 0x38]
xor ch, byte [ebp + ebx - 0x1c]
mov byte [ebp + ebx - 0x1c], ch
mov ebx, edx
xor bl, ch
movzx ecx, bl
shr edx, 8
mov ebx, dword [ebp - 0x34]
xor edx, dword [ebx + ecx*4]
mov ecx, edx
mov ebx, 0xff
and ecx, ebx
add ecx, edi
imul edi, ecx, 0x8088405
inc edi
mov ecx, edi
shr ecx, 0x18
mov dword [ebp - 0x3c], ecx
mov ebx, eax
mov ecx, 0xff
and ebx, ecx
xor ebx, dword [ebp - 0x3c]
mov dword [esi + 0xec], edx
mov dword [esi + 0xf0], edi
shr eax, 8
mov ecx, dword [ebp - 0x34]
xor eax, dword [ecx + ebx*4]
mov dword [esi + 0xf4], eax
mov ecx, dword [ebp - 0x38]
inc ecx
mov dword [ebp - 0x38], ecx
cmp ecx, 0xc
jne 0x514701
mov eax, dword [esi + 0xe0]
add dword [eax + 0x40], 0xc
adc dword [eax + 0x44], 0
mov eax, dword [esi + 0xe0]
add dword [eax + 0x78], 0xfffffff4
adc dword [eax + 0x7c], 0xffffffff
mov dword [esi + 0xe4], 1
xor ebx, ebx
jmp 0x5141e6