Function at 0x46ed00
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x509c
call fcn.0048ab40
mov eax, dword [0x4c3c64]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
xor edi, edi
mov dword [ebp - 0x5094], ecx
cmp dword [ebx + 0x14], edi
je 0x46ed43
mov eax, 0x40000
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0xc
cmp byte [ebx + 0x2c], 0
je 0x46ed60
mov eax, 0x50000
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x509c], edi
cmp dword [ebx], edi
je 0x46ed79
cmp esi, 4
je 0x46ed79
mov dword [ebp - 0x509c], 0xc
lea edx, [ebp - 0x2034]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, di
jne 0x46ed81
cmp word [ebp - 0x2034], di
je 0x46f5d9
lea eax, [ebp - 0x2034]
cmp word [eax], 0x5c
jne 0x46edb1
mov edx, 0x2f
mov word [eax], dx
add eax, 2
cmp word [eax], di
jne 0x46eda3
cmp esi, 4
sete dl
mov byte [ebp - 0x508d], dl
test dl, dl
je 0x46edf3
lea eax, [ebp - 0x2034]
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x46edd2
sub eax, esi
sar eax, 1
cmp word [ebp + eax*2 - 0x2036], 0x2f
mov byte [ebp - 0x508e], 1
jne 0x46edfa
mov byte [ebp - 0x508e], 0
mov dword [ebp - 0x5098], 8
test dl, dl
jne 0x46ee17
lea edx, [ebp - 0x2034]
call fcn.0046e110
test al, al
je 0x46ee1d
mov dword [ebp - 0x5098], edi
mov eax, dword [ebp + 0x10]
cmp eax, 2
jne 0x46ee34
mov eax, dword [ebp - 0x5094]
mov ecx, ebx
call fcn.0046e700
jmp 0x46ee75
cmp eax, 1
jne 0x46ee4e
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp - 0x5094]
push eax
mov esi, ebx
call fcn.0046e790
xor edi, edi
jmp 0x46ee75
cmp eax, 3
jne 0x46ee65
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x5094]
mov esi, ebx
call fcn.0046e8d0
jmp 0x46ee75
cmp eax, 4
jne 0x46f5d9
mov esi, ebx
call fcn.0046e9a0
cmp eax, edi
jne 0x46f5de
push edi
push edi
push 0x1000
lea ecx, [ebp - 0x4048]
push ecx
push 0xffffffffffffffff
lea edx, [ebp - 0x2034]
push edx
push edi
push 0xfde9
mov dword [ebp - 0x203c], edi
mov byte [ebp - 0x5054], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x4048]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x46eeb6
sub eax, edx
mov dword [ebp - 0x5074], eax
cmp byte [ebp - 0x508e], cl
je 0x46eeed
lea edi, [ebp - 0x4048]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x46eed4
mov ax, word [0x4b66f8]
mov word [edi], ax
inc dword [ebp - 0x5074]
xor edi, edi
xor ecx, ecx
mov eax, 0x14
mov word [ebp - 0x5062], cx
mov ecx, dword [ebx + 0x68]
mov word [ebp - 0x508a], ax
mov edx, 0xb17
mov eax, 8
mov byte [ebp - 0x3048], 0
mov dword [ebp - 0x404c], edi
mov dword [ebp - 0x5068], edi
mov dword [ebp - 0x2048], 1
mov dword [ebp - 0x2040], edi
mov word [ebp - 0x508c], dx
mov dword [ebp - 0x5084], ecx
mov dword [ebp - 0x5080], edi
mov word [ebp - 0x5088], ax
cmp dword [ebx], edi
je 0x46ef65
cmp byte [ebp - 0x508d], 0
jne 0x46ef65
mov eax, 9
mov word [ebp - 0x5088], ax
mov word [ebp - 0x5060], ax
mov eax, dword [ebp - 0x5098]
mov word [ebp - 0x5086], ax
cmp eax, edi
jne 0x46ef94
mov eax, dword [ebx + 0x70]
cmp eax, edi
jl 0x46ef94
mov edx, dword [ebp - 0x509c]
add eax, edx
mov dword [ebp - 0x507c], eax
jmp 0x46ef9a
mov dword [ebp - 0x507c], edi
mov eax, dword [ebx + 0x70]
mov edx, dword [ebx + 0x4c]
mov esi, dword [ebx + 0x58]
mov edi, dword [ebx + 0x5c]
mov dword [ebp - 0x5078], eax
mov eax, dword [ebx + 0x10]
add eax, dword [ebx + 0x18]
xor ecx, ecx
mov word [ebp - 0x5064], cx
mov dword [ebp - 0x505c], edx
mov dword [ebp - 0x5058], eax
mov al, byte [ebx + 0x58]
lea ecx, [ebp - 0x28]
lea edx, [ebp - 0x34]
mov dword [ebp - 0x4054], ecx
mov dword [ebp - 0x4050], edx
mov byte [ebp - 0x23], al
mov eax, esi
mov edx, edi
mov cl, 8
mov dword [ebp - 0x5070], 0x11
mov dword [ebp - 0x506c], 9
mov byte [ebp - 0x28], 0x55
mov byte [ebp - 0x27], 0x54
mov byte [ebp - 0x26], 0xd
mov byte [ebp - 0x25], 0
mov byte [ebp - 0x24], 7
call fcn.0049bad0
mov byte [ebp - 0x22], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.0049bad0
mov byte [ebp - 0x21], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.0049bad0
mov cl, byte [ebx + 0x50]
mov esi, dword [ebx + 0x50]
mov edi, dword [ebx + 0x54]
mov byte [ebp - 0x20], al
mov byte [ebp - 0x1f], cl
mov eax, esi
mov edx, edi
mov cl, 8
call fcn.0049bad0
mov byte [ebp - 0x1e], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.0049bad0
mov byte [ebp - 0x1d], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.0049bad0
movzx edx, byte [ebx + 0x60]
mov esi, dword [ebx + 0x60]
mov edi, dword [ebx + 0x64]
mov byte [ebp - 0x1c], al
mov byte [ebp - 0x1b], dl
mov eax, esi
mov edx, edi
mov cl, 8
call fcn.0049bad0
mov byte [ebp - 0x1a], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.0049bad0
mov byte [ebp - 0x19], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.0049bad0
mov ecx, dword [ebp - 0x24]
mov byte [ebp - 0x18], al
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], ecx
movzx edx, byte [ebp - 0x20]
mov esi, ebx
lea edi, [ebp - 0x508c]
mov byte [ebp - 0x2c], dl
mov byte [ebp - 0x32], 5
call fcn.0046d620
test eax, eax
je 0x46f0e2
call fcn.0046eb20
mov eax, 0x400
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x5070]
mov ecx, dword [ebp - 0x5074]
lea edx, [eax + ecx + 0x1e]
add dword [ebx + 0x18], edx
cmp dword [ebx + 0x14], 0
je 0x46f115
call fcn.0046eb20
mov eax, dword [ebx + 0x14]
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebx]
lea edi, [ebx + 0x30]
mov dword [edi], 0x12345678
mov dword [ebx + 0x34], 0x23456789
mov dword [ebx + 0x38], 0x34567890
test esi, esi
je 0x46f144
mov cl, byte [esi]
test cl, cl
je 0x46f144
mov edx, edi
call fcn.0046e0c0
add esi, 1
jne 0x46f132
cmp byte [0x4c8709], 0
jne 0x46f166
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
push esi
call fcn.00486831
add esp, 4
xor esi, esi
call fcn.00486843
sar eax, 7
mov byte [ebp + esi - 0x14], al
inc esi
cmp esi, 0xc
jl 0x46f168
mov eax, dword [ebp - 0x5084]
shr eax, 8
mov byte [ebp - 9], al
mov dword [ebp - 0x5094], 0
mov ecx, dword [ebp - 0x5094]
mov cl, byte [ebp + ecx - 0x14]
movsx ecx, cl
mov esi, dword [edi]
xor ecx, esi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x4b3068]
mov eax, dword [edi + 8]
shr esi, 8
xor ecx, esi
mov dword [edi], ecx
movzx ecx, cl
add ecx, dword [edi + 4]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [edi + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
and edx, 0xfffd
or edx, 2
shr eax, 8
xor eax, dword [ecx*4 + 0x4b3068]
mov esi, dword [edi]
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x5094]
xor cl, byte [ebp + eax - 0x14]
mov byte [ebp + eax - 0x14], cl
mov cl, byte [ebp + eax - 0x13]
movsx ecx, cl
xor ecx, esi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x4b3068]
mov eax, dword [edi + 8]
shr esi, 8
xor ecx, esi
mov dword [edi], ecx
movzx ecx, cl
add ecx, dword [edi + 4]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [edi + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
mov esi, dword [edi]
and edx, 0xfffd
or edx, 2
shr eax, 8
xor eax, dword [ecx*4 + 0x4b3068]
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x5094]
xor cl, byte [ebp + eax - 0x13]
mov byte [ebp + eax - 0x13], cl
mov cl, byte [ebp + eax - 0x12]
mov eax, dword [edi + 8]
movsx ecx, cl
xor ecx, esi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x4b3068]
shr esi, 8
xor ecx, esi
mov dword [edi], ecx
movzx ecx, cl
add ecx, dword [edi + 4]
mov edx, eax
imul ecx, ecx, 0x8088405
and edx, 0xfffd
or edx, 2
inc ecx
mov dword [edi + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x4b3068]
mov esi, dword [edi]
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x5094]
xor cl, byte [ebp + eax - 0x12]
mov byte [ebp + eax - 0x12], cl
mov cl, byte [ebp + eax - 0x11]
movsx ecx, cl
xor ecx, esi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x4b3068]
mov eax, dword [edi + 8]
shr esi, 8
xor ecx, esi
mov dword [edi], ecx
movzx ecx, cl
add ecx, dword [edi + 4]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [edi + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x4b3068]
and edx, 0xfffd
or edx, 2
mov ecx, edx
xor ecx, 1
imul ecx, edx
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x5094]
shr ecx, 8
xor cl, byte [ebp + eax - 0x11]
add eax, 4
cmp eax, 0xc
mov byte [ebp + eax - 0x15], cl
mov dword [ebp - 0x5094], eax
jl 0x46f190
xor esi, esi
cmp dword [ebx], esi
je 0x46f394
cmp byte [ebp - 0x508d], 0
jne 0x46f380
push 0xc
lea edx, [ebp - 0x14]
push edx
mov ecx, ebx
call fcn.0046e4e0
add dword [ebx + 0x18], 0xc
cmp dword [ebx], esi
je 0x46f394
cmp byte [ebp - 0x508d], 0
jne 0x46f394
mov eax, 1
jmp 0x46f396
xor eax, eax
cmp byte [ebp - 0x508d], 0
mov byte [ebx + 0x2d], al
jne 0x46f3ce
mov eax, dword [ebp - 0x5098]
cmp eax, 8
jne 0x46f3bf
lea eax, [ebp - 0x508c]
push eax
mov edi, ebx
call fcn.0046eb80
mov esi, eax
jmp 0x46f3d4
cmp eax, esi
jne 0x46f3d4
mov edi, ebx
call fcn.0046ec90
mov esi, eax
jmp 0x46f3d4
mov dword [ebx + 0x90], esi
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x46f3ef
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x46f3ef
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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 0x46f5de
test esi, esi
jne 0x46f0cb
mov edx, dword [ebp - 0x509c]
lea eax, [ecx + edx]
cmp dword [ebp - 0x507c], eax
mov edx, dword [ebx + 0x78]
sete cl
cmp byte [ebx + 0x1c], 0
mov dword [ebp - 0x5080], edx
mov dword [ebp - 0x507c], eax
mov dword [ebp - 0x5078], edi
je 0x46f4d9
cmp dword [ebx], esi
je 0x46f45a
cmp byte [ebp - 0x508d], 0
je 0x46f4d9
test byte [ebp - 0x5088], 1
mov ax, word [ebp - 0x5098]
mov word [ebp - 0x5086], ax
jne 0x46f47d
mov ecx, 0xfff7
and word [ebp - 0x5088], cx
mov dx, word [ebp - 0x5088]
mov word [ebp - 0x5060], dx
mov edx, dword [ebp - 0x5058]
sub edx, dword [ebx + 0x10]
mov eax, ebx
call fcn.0046e640
test al, al
je 0x46f4c2
mov esi, ebx
lea edi, [ebp - 0x508c]
call fcn.0046d620
test eax, eax
jne 0x46f0cb
mov edx, dword [ebx + 0x18]
mov eax, ebx
call fcn.0046e640
test al, al
jne 0x46f52e
mov eax, 0x2000000
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x5098]
cmp word [ebp - 0x5086], ax
je 0x46f4ff
mov eax, 0x4000000
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0xc
test eax, eax
jne 0x46f507
test cl, cl
je 0x46f4e8
mov esi, ebx
lea edi, [ebp - 0x508c]
call fcn.0046d8c0
test eax, eax
jne 0x46f0cb
mov ax, word [ebp - 0x5060]
add dword [ebx + 0x18], 0x10
mov word [ebp - 0x5088], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x46f5de
mov ecx, dword [ebp - 0x506c]
push ecx
call fcn.00476b9d
mov edx, dword [ebp - 0x506c]
add esp, 4
mov esi, eax
mov eax, dword [ebp - 0x4050]
push edx
push eax
push esi
call fcn.004862a0
add esp, 0xc
push 0x3054
mov dword [ebp - 0x4050], esi
call fcn.00476b6e
add esp, 4
push 0x3054
lea ecx, [ebp - 0x508c]
mov esi, eax
push ecx
push esi
call fcn.004862a0
mov eax, dword [ebx + 0x44]
add esp, 0xc
test eax, eax
jne 0x46f5a7
mov dword [ebx + 0x44], esi
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0xc
cmp dword [eax + 0x3050], 0
je 0x46f5bf
mov eax, dword [eax + 0x3050]
cmp dword [eax + 0x3050], 0
jne 0x46f5b0
mov dword [eax + 0x3050], esi
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0xc
mov eax, 0x10000
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0xc