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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4b8
mov eax, dword [0x455664]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov ebx, ecx
cmp dword [ebx + 0x14], 0
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x4b8], ebx
mov esi, edx
je 0x42d484
mov eax, 0x40000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042eb46
mov esp, ebp
pop ebp
ret 0xc
cmp byte [ebx + 0x2c], 0
je 0x42d4a2
mov eax, 0x50000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042eb46
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx], 0
mov dword [ebp - 0x4b4], 0
je 0x42d4c0
cmp edi, 4
je 0x42d4c0
mov dword [ebp - 0x4b4], 0xc
push eax
lea eax, [ebp - 0x13c]
push eax
call dword [0x4585cc]
cmp byte [ebp - 0x13c], 0
je 0x42dd3b
lea eax, [ebp - 0x13c]
cmp byte [eax], 0x5c
jne 0x42d4e9
mov byte [eax], 0x2f
inc eax
cmp byte [eax], 0
jne 0x42d4e1
cmp edi, 4
sete dl
mov byte [ebp - 0x4a1], dl
test dl, dl
je 0x42d522
lea eax, [ebp - 0x13c]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x42d508
sub eax, edi
cmp byte [ebp + eax - 0x13d], 0x2f
mov byte [ebp - 0x4a0], 1
jne 0x42d529
mov byte [ebp - 0x4a0], 0
mov dword [ebp - 0x4b0], 8
test dl, dl
jne 0x42d546
lea edi, [ebp - 0x13c]
call fcn.0042c750
test al, al
je 0x42d550
mov dword [ebp - 0x4b0], 0
mov eax, dword [ebp + 0x10]
cmp eax, 2
jne 0x42d563
mov eax, esi
mov esi, ebx
call fcn.0042cd90
jmp 0x42d599
cmp eax, 1
jne 0x42d575
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, esi
call fcn.0042ce10
jmp 0x42d599
cmp eax, 3
jne 0x42d589
mov edx, dword [ebp + 0xc]
mov ecx, esi
push edx
mov esi, ebx
call fcn.0042cf70
jmp 0x42d599
cmp eax, 4
jne 0x42dd3b
mov esi, ebx
call fcn.0042d0a0
xor esi, esi
cmp eax, esi
jne 0x42dd40
push 0x44d617
lea eax, [ebp - 0x464]
push eax
mov dword [ebp - 0x140], esi
call dword [0x4585cc]
lea ecx, [ebp - 0x13c]
push ecx
lea edx, [ebp - 0x354]
push edx
call dword [0x4585cc]
lea eax, [ebp - 0x354]
push eax
call dword [0x458418]
cmp byte [ebp - 0x4a0], 0
mov dword [ebp - 0x484], eax
je 0x42d603
push 0x44fc34
lea ecx, [ebp - 0x354]
push ecx
call dword [0x458520]
inc dword [ebp - 0x484]
push 0x44d617
lea edx, [ebp - 0x250]
push edx
call dword [0x4585cc]
xor eax, eax
mov word [ebp - 0x472], ax
mov eax, dword [ebx + 0x68]
mov dword [ebp - 0x494], eax
mov eax, 8
mov dword [ebp - 0x358], esi
mov dword [ebp - 0x478], esi
mov dword [ebp - 0x14c], 1
mov dword [ebp - 0x144], esi
mov dword [ebp - 0x49c], 0x140b17
mov dword [ebp - 0x490], esi
mov word [ebp - 0x498], ax
cmp dword [ebx], esi
je 0x42d678
cmp byte [ebp - 0x4a1], 0
jne 0x42d678
mov eax, 9
mov word [ebp - 0x498], ax
mov word [ebp - 0x470], ax
mov eax, dword [ebp - 0x4b0]
mov word [ebp - 0x496], ax
cmp eax, esi
jne 0x42d6a5
mov eax, dword [ebx + 0x70]
cmp eax, esi
jl 0x42d6a5
add eax, dword [ebp - 0x4b4]
mov dword [ebp - 0x48c], eax
jmp 0x42d6ab
mov dword [ebp - 0x48c], esi
mov edx, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x4c]
mov esi, dword [ebx + 0x58]
mov dword [ebp - 0x488], edx
mov edx, dword [ebx + 0x18]
add edx, dword [ebx + 0x10]
xor eax, eax
mov dword [ebp - 0x468], edx
movzx edx, byte [ebx + 0x58]
mov byte [ebp - 0x17], dl
mov word [ebp - 0x474], ax
mov dword [ebp - 0x46c], ecx
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x360], eax
mov eax, dword [ebx + 0x5c]
mov edx, eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x35c], ecx
mov ecx, esi
shrd ecx, edx, 8
sar edx, 8
mov edx, eax
mov byte [ebp - 0x16], cl
mov ecx, esi
shrd ecx, edx, 0x10
sar edx, 0x10
movzx edx, byte [ebx + 0x50]
mov byte [ebp - 0x13], dl
mov byte [ebp - 0x15], cl
mov ecx, esi
mov esi, dword [ebx + 0x50]
shrd ecx, eax, 0x18
sar eax, 0x18
mov eax, dword [ebx + 0x54]
mov edi, eax
mov edx, esi
shrd edx, edi, 8
mov byte [ebp - 0x12], dl
sar edi, 8
mov edi, eax
mov edx, esi
shrd edx, edi, 0x10
mov byte [ebp - 0x11], dl
mov edx, esi
mov esi, dword [ebx + 0x60]
shrd edx, eax, 0x18
sar eax, 0x18
mov al, byte [ebx + 0x60]
mov byte [ebp - 0x10], dl
sar edi, 0x10
mov byte [ebp - 0xf], al
mov eax, dword [ebx + 0x64]
mov edi, eax
mov edx, esi
shrd edx, edi, 8
mov byte [ebp - 0xe], dl
sar edi, 8
mov edi, eax
mov edx, esi
shrd edx, edi, 0x10
mov byte [ebp - 0xd], dl
mov edx, esi
shrd edx, eax, 0x18
mov dword [ebp - 0x1c], 0xd5455
sar eax, 0x18
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 0x18], 7
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x18]
sar edi, 0x10
mov dword [ebp - 0x34], eax
mov esi, ebx
lea edi, [ebp - 0x49c]
mov dword [ebp - 0x480], 0x11
mov dword [ebp - 0x47c], 9
mov byte [ebp - 0x14], cl
mov dword [ebp - 0x30], edx
mov byte [ebp - 0x2c], cl
mov byte [ebp - 0x32], 5
call fcn.0042bc70
test eax, eax
je 0x42d7e2
call fcn.0042d260
mov eax, 0x400
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042eb46
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x484]
mov ecx, dword [ebp - 0x480]
lea edx, [ecx + eax + 0x1e]
add dword [ebx + 0x18], edx
cmp dword [ebx + 0x14], 0
je 0x42d816
call fcn.0042d260
mov eax, dword [ebx + 0x14]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042eb46
mov esp, ebp
pop ebp
ret 0xc
lea esi, [ebx + 0x30]
mov dword [ebx + 0x34], 0x23456789
mov dword [ebx + 0x38], 0x34567890
mov ebx, dword [ebx]
mov dword [esi], 0x12345678
test ebx, ebx
je 0x42d843
mov cl, byte [ebx]
test cl, cl
je 0x42d843
mov edx, esi
call fcn.0042c700
inc ebx
jne 0x42d833
cmp byte [0x4586e9], 0
jne 0x42d865
call dword [0x458378]
mov edi, eax
call dword [0x45858c]
xor edi, eax
push edi
call fcn.004308e4
add esp, 4
xor edi, edi
call fcn.004308f6
sar eax, 7
mov byte [ebp + edi - 0x28], al
inc edi
cmp edi, 0xc
jl 0x42d867
mov eax, dword [ebp - 0x494]
mov edi, dword [esi + 4]
mov ecx, dword [esi]
shr eax, 8
xor edx, edx
mov byte [ebp - 0x1d], al
mov eax, dword [esi + 8]
mov dword [ebp - 0x4ac], edx
mov dword [ebp - 0x4a8], edi
mov dl, byte [ebp + edx - 0x28]
movsx edx, dl
xor edx, ecx
and edx, 0xff
mov edi, ecx
mov ecx, dword [edx*4 + str.LDIB2AUJ]
shr edi, 8
xor ecx, edi
movzx edi, cl
add edi, dword [ebp - 0x4a8]
mov ebx, eax
imul edi, edi, 0x8088405
and ebx, 0xfffd
or ebx, 2
inc edi
mov edx, edi
shr edx, 0x18
xor edx, eax
shr eax, 8
mov dword [esi], ecx
mov dword [esi + 4], edi
and edx, 0xff
xor eax, dword [edx*4 + str.LDIB2AUJ]
mov edx, ebx
xor edx, 1
imul edx, ebx
mov ebx, dword [ebp - 0x4ac]
shr edx, 8
xor dl, byte [ebp + ebx - 0x28]
mov dword [esi + 8], eax
mov byte [ebp + ebx - 0x28], dl
mov edx, ebx
movzx ebx, byte [ebp + edx - 0x27]
mov byte [ebp - 0x4a0], bl
mov ebx, eax
and ebx, 0xfffd
or ebx, 2
mov dword [ebp - 0x4ac], ebx
movsx ebx, byte [ebp - 0x4a0]
xor ebx, ecx
and ebx, 0xff
mov ebx, dword [ebx*4 + str.LDIB2AUJ]
shr ecx, 8
xor ebx, ecx
movzx ecx, bl
add ecx, edi
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi], ebx
mov edi, ecx
shr edi, 0x18
xor edi, eax
shr eax, 8
mov dword [ebp - 0x4a8], ebx
and edi, 0xff
mov dword [esi + 4], ecx
xor eax, dword [edi*4 + str.LDIB2AUJ]
mov edi, eax
mov eax, dword [ebp - 0x4ac]
mov ebx, eax
xor ebx, 1
imul ebx, eax
shr ebx, 8
xor bl, byte [ebp - 0x4a0]
mov eax, edi
mov byte [ebp + edx - 0x27], bl
mov bl, byte [ebp + edx - 0x26]
and eax, 0xfffd
or eax, 2
mov byte [ebp - 0x4a0], bl
mov dword [ebp - 0x4ac], eax
mov eax, dword [ebp - 0x4a8]
movsx ebx, bl
xor ebx, eax
shr eax, 8
and ebx, 0xff
mov dword [ebp - 0x4a8], eax
mov dword [esi + 8], edi
mov eax, dword [ebx*4 + str.LDIB2AUJ]
xor eax, dword [ebp - 0x4a8]
mov dword [ebp - 0x4a8], eax
mov dword [esi], eax
movzx eax, al
add eax, ecx
imul eax, eax, 0x8088405
inc eax
mov ecx, eax
shr ecx, 0x18
xor ecx, edi
mov dword [esi + 4], eax
and ecx, 0xff
shr edi, 8
xor edi, dword [ecx*4 + str.LDIB2AUJ]
mov ecx, dword [ebp - 0x4ac]
mov ebx, ecx
xor ebx, 1
imul ebx, ecx
shr ebx, 8
xor bl, byte [ebp - 0x4a0]
mov ecx, edi
mov byte [ebp + edx - 0x26], bl
mov bl, byte [ebp + edx - 0x25]
mov byte [ebp - 0x4a0], bl
and ecx, 0xfffd
movsx ebx, bl
or ecx, 2
mov dword [ebp - 0x4ac], ecx
mov ecx, dword [ebp - 0x4a8]
xor ebx, ecx
and ebx, 0xff
shr ecx, 8
mov dword [esi + 8], edi
mov dword [ebp - 0x4a8], ecx
mov ecx, dword [ebx*4 + str.LDIB2AUJ]
xor ecx, dword [ebp - 0x4a8]
add edx, 4
movzx ebx, cl
add eax, ebx
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 4], eax
mov dword [ebp - 0x4a8], eax
shr eax, 0x18
xor eax, edi
and eax, 0xff
shr edi, 8
mov dword [esi], ecx
xor edi, dword [eax*4 + str.LDIB2AUJ]
mov eax, edi
mov edi, dword [ebp - 0x4ac]
mov ebx, edi
xor ebx, 1
imul ebx, edi
shr ebx, 8
xor bl, byte [ebp - 0x4a0]
mov dword [esi + 8], eax
mov byte [ebp + edx - 0x29], bl
mov dword [ebp - 0x4ac], edx
cmp edx, 0xc
jl 0x42d89b
mov ebx, dword [ebp - 0x4b8]
xor esi, esi
cmp dword [ebx], esi
je 0x42daf8
cmp byte [ebp - 0x4a1], 0
jne 0x42dae4
push 0xc
lea edx, [ebp - 0x28]
push edx
mov ecx, ebx
call fcn.0042cb80
add dword [ebx + 0x18], 0xc
cmp dword [ebx], esi
je 0x42daf8
cmp byte [ebp - 0x4a1], 0
jne 0x42daf8
mov eax, 1
jmp 0x42dafa
xor eax, eax
cmp byte [ebp - 0x4a1], 0
mov byte [ebx + 0x2d], al
jne 0x42db32
mov eax, dword [ebp - 0x4b0]
cmp eax, 8
jne 0x42db23
lea eax, [ebp - 0x49c]
push eax
mov edi, ebx
call fcn.0042d2c0
mov esi, eax
jmp 0x42db38
cmp eax, esi
jne 0x42db38
mov edi, ebx
call fcn.0042d3d0
mov esi, eax
jmp 0x42db38
mov dword [ebx + 0x90], esi
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x42db53
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x42db53
push eax
call dword [0x4583b8]
mov ecx, dword [ebx + 0x90]
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx + 0x74]
add dword [ebx + 0x18], ecx
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], edi
test eax, eax
jne 0x42dd40
test esi, esi
jne 0x42d7ca
mov edx, dword [ebp - 0x4b4]
lea eax, [ecx + edx]
cmp dword [ebp - 0x48c], eax
mov edx, dword [ebx + 0x78]
sete cl
cmp byte [ebx + 0x1c], 0
mov dword [ebp - 0x490], edx
mov dword [ebp - 0x48c], eax
mov dword [ebp - 0x488], edi
je 0x42dc3e
cmp dword [ebx], esi
je 0x42dbbe
cmp byte [ebp - 0x4a1], 0
je 0x42dc3e
test byte [ebp - 0x498], 1
mov ax, word [ebp - 0x4b0]
mov word [ebp - 0x496], ax
jne 0x42dbe1
mov ecx, 0xfff7
and word [ebp - 0x498], cx
mov dx, word [ebp - 0x498]
mov word [ebp - 0x470], dx
mov edx, dword [ebp - 0x468]
sub edx, dword [ebx + 0x10]
mov eax, ebx
call fcn.0042cce0
test al, al
je 0x42dc26
mov esi, ebx
lea edi, [ebp - 0x49c]
call fcn.0042bc70
test eax, eax
jne 0x42d7ca
mov edx, dword [ebx + 0x18]
mov eax, ebx
call fcn.0042cce0
test al, al
jne 0x42dc94
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042eb46
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x4b0]
cmp word [ebp - 0x496], ax
je 0x42dc65
mov eax, 0x4000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042eb46
mov esp, ebp
pop ebp
ret 0xc
test eax, eax
jne 0x42dc6d
test cl, cl
je 0x42dc4d
mov esi, ebx
lea edi, [ebp - 0x49c]
call fcn.0042bf10
test eax, eax
jne 0x42d7ca
mov ax, word [ebp - 0x470]
add dword [ebx + 0x18], 0x10
mov word [ebp - 0x498], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x42dd40
mov ecx, dword [ebp - 0x47c]
push ecx
call fcn.0042f30e
mov edx, dword [ebp - 0x47c]
add esp, 4
mov esi, eax
mov eax, dword [ebp - 0x35c]
push edx
push eax
push esi
call fcn.00430c10
add esp, 0xc
push 0x360
mov dword [ebp - 0x35c], esi
call fcn.0042f30e
mov ecx, 0xd8
lea esi, [ebp - 0x49c]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x44]
add esp, 4
test ecx, ecx
jne 0x42dd08
mov dword [ebx + 0x44], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042eb46
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ecx + 0x35c], 0
je 0x42dd20
mov ecx, dword [ecx + 0x35c]
cmp dword [ecx + 0x35c], 0
jne 0x42dd11
mov dword [ecx + 0x35c], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042eb46
mov esp, ebp
pop ebp
ret 0xc
mov eax, 0x10000
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042eb46
mov esp, ebp
pop ebp
ret 0xc