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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5ac
mov eax, dword [0x473004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov dword [ebp - 0x5a0], eax
mov dword [ebp - 0x5ac], ebx
cmp dword [ebx + 0x14], 0
je 0x40c8f1
mov eax, 0x40000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret 0x10
cmp byte [ebx + 0x2c], 0
je 0x40c90d
mov eax, 0x50000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret 0x10
push esi
mov esi, dword [ebp + 0x14]
push edi
xor edi, edi
mov dword [ebp - 0x5a8], edi
cmp dword [ebx], edi
je 0x40c92f
cmp esi, 4
mov eax, 0xc
cmovne edi, eax
mov dword [ebp - 0x5a8], edi
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x238]
sub edx, ecx
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40c940
cmp word [ebp - 0x238], ax
je 0x40d06c
lea eax, [ebp - 0x238]
mov ecx, 0x2f
cmp word [eax], 0x5c
jne 0x40c971
mov word [eax], cx
add eax, 2
cmp word [eax], 0
jne 0x40c968
cmp esi, 4
jne 0x40c9b3
lea ecx, [ebp - 0x238]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c990
sub ecx, edx
sar ecx, 1
cmp word [ebp + ecx*2 - 0x23a], 0x2f
je 0x40c9b3
mov byte [ebp - 0x599], 1
jmp 0x40c9dc
mov byte [ebp - 0x599], 0
mov dword [ebp - 0x5a4], 8
cmp esi, 4
je 0x40c9dc
lea eax, [ebp - 0x238]
push eax
call fcn.0040d980
add esp, 4
test al, al
je 0x40c9e6
mov dword [ebp - 0x5a4], 0
cmp esi, 2
jne 0x40c9fa
push dword [ebp - 0x5a0]
mov ecx, ebx
call fcn.0040fc70
jmp 0x40ca38
cmp esi, 1
jne 0x40ca11
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp - 0x5a0]
call fcn.0040fd20
jmp 0x40ca38
cmp esi, 3
jne 0x40ca28
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp - 0x5a0]
call fcn.0040fea0
jmp 0x40ca38
cmp esi, 4
jne 0x40d06c
mov ecx, ebx
call fcn.0040fb60
test eax, eax
jne 0x40d071
push eax
push eax
push 0x104
mov dword [ebp - 0x23c], eax
mov byte [ebp - 0x560], al
lea eax, [ebp - 0x450]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x238]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [ebp - 0x450]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ca80
sub ecx, edx
mov dword [ebp - 0x580], ecx
cmp byte [ebp - 0x599], al
je 0x40cabf
lea edi, [ebp - 0x450]
dec edi
nop
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x40caa0
mov ax, word [0x46699c]
mov word [edi], ax
inc dword [ebp - 0x580]
mov edi, dword [ebp - 0x5a8]
xor eax, eax
mov byte [ebp - 0x34c], 0
cmp dword [ebx], 0
mov word [ebp - 0x56e], ax
mov eax, dword [ebx + 0x68]
mov dword [ebp - 0x590], eax
mov eax, 8
mov dword [ebp - 0x454], 0
mov dword [ebp - 0x574], 0
mov dword [ebp - 0x248], 1
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x598], 0x140b17
mov dword [ebp - 0x58c], 0
mov word [ebp - 0x594], ax
je 0x40cb36
cmp esi, 4
je 0x40cb36
mov eax, 9
mov word [ebp - 0x594], ax
mov word [ebp - 0x56c], ax
mov eax, dword [ebp - 0x5a4]
mov word [ebp - 0x592], ax
test eax, eax
jne 0x40cb5f
mov eax, dword [ebx + 0x70]
test eax, eax
js 0x40cb5f
add eax, edi
mov dword [ebp - 0x588], eax
jmp 0x40cb69
mov dword [ebp - 0x588], 0
mov eax, dword [ebx + 0x70]
mov dword [ebp - 0x584], eax
xor eax, eax
mov word [ebp - 0x570], ax
mov eax, dword [ebx + 0x4c]
mov dword [ebp - 0x568], eax
mov eax, dword [ebx + 0x10]
add eax, dword [ebx + 0x18]
mov dword [ebp - 0x564], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x45c], eax
lea eax, [ebp - 0x24]
mov edx, dword [ebx + 0x5c]
mov dword [ebp - 0x458], eax
mov al, byte [ebx + 0x58]
mov ecx, dword [ebx + 0x58]
mov byte [ebp - 0x13], al
mov eax, edx
shrd ecx, eax, 8
mov esi, dword [ebx + 0x50]
sar eax, 8
mov byte [ebp - 0x12], cl
mov eax, edx
mov ecx, dword [ebx + 0x58]
shrd ecx, eax, 0x10
push ebx
sar eax, 0x10
mov eax, dword [ebx + 0x58]
shrd eax, edx, 0x18
mov byte [ebp - 0x11], cl
mov ecx, esi
mov dword [ebp - 0x5a0], eax
mov byte [ebp - 0x10], al
mov al, byte [ebx + 0x50]
mov byte [ebp - 0xf], al
sar edx, 0x18
mov edx, dword [ebx + 0x54]
mov eax, edx
shrd ecx, eax, 8
mov dword [ebp - 0x18], 0xd5455
sar eax, 8
mov byte [ebp - 0xe], cl
mov eax, edx
mov ecx, esi
mov byte [ebp - 0x14], 7
shrd ecx, eax, 0x10
movq xmm0, qword [ebp - 0x18]
sar eax, 0x10
mov eax, esi
mov byte [ebp - 0xd], cl
mov esi, dword [ebx + 0x60]
mov ecx, esi
shrd eax, edx, 0x18
push 0x410f40
mov byte [ebp - 0xc], al
mov al, byte [ebx + 0x60]
mov byte [ebp - 0xb], al
sar edx, 0x18
mov edx, dword [ebx + 0x64]
mov eax, edx
shrd ecx, eax, 8
movq qword [ebp - 0x24], xmm0
sar eax, 8
mov byte [ebp - 0xa], cl
mov eax, edx
mov ecx, esi
mov dword [ebp - 0x57c], 0x11
shrd ecx, eax, 0x10
mov dword [ebp - 0x578], 9
sar eax, 0x10
mov eax, esi
mov byte [ebp - 9], cl
shrd eax, edx, 0x18
mov byte [ebp - 0x22], 5
mov byte [ebp - 8], al
mov eax, dword [ebp - 0x5a0]
mov byte [ebp - 0x1c], al
lea eax, [ebp - 0x598]
sar edx, 0x18
push eax
call fcn.00410730
add esp, 0xc
test eax, eax
je 0x40ccb2
mov ecx, ebx
call fcn.0040f590
pop edi
pop esi
mov eax, 0x400
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x57c]
add eax, 0x1e
add eax, dword [ebp - 0x580]
add dword [ebx + 0x18], eax
cmp dword [ebx + 0x14], 0
je 0x40cce7
mov ecx, ebx
call fcn.0040f590
mov eax, dword [ebx + 0x14]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret 0x10
lea edi, [ebx + 0x30]
mov dword [ebx + 0x34], 0x23456789
mov dword [edi], 0x12345678
mov dword [ebx + 0x38], 0x34567890
mov esi, dword [ebx]
test esi, esi
je 0x40cd19
mov al, byte [esi]
test al, al
je 0x40cd19
push eax
push edi
call fcn.00410f60
add esp, 8
add esi, 1
jne 0x40cd04
cmp byte [0x47b4f0], 0
jne 0x40cd3b
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
push esi
call fcn.00445e05
add esp, 4
xor esi, esi
nop dword [eax]
call fcn.00445de4
sar eax, 7
mov byte [ebp + esi - 0x30], al
inc esi
cmp esi, 0xc
jl 0x40cd40
mov eax, dword [ebp - 0x590]
shr eax, 8
xor ebx, ebx
mov byte [ebp - 0x25], al
mov al, byte [ebp + ebx - 0x30]
mov ecx, dword [edi]
mov byte [ebp - 0x599], al
movsx eax, al
xor eax, dword [edi]
movzx eax, al
mov edx, dword [edi + 8]
mov esi, edx
shr ecx, 8
and esi, 0xfffd
or esi, 2
mov eax, dword [eax*4 + 0x4663f0]
xor eax, ecx
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul eax, eax, 0x8088405
inc eax
mov dword [edi + 4], eax
shr eax, 0x18
xor eax, edx
shr edx, 8
movzx eax, al
xor edx, dword [eax*4 + 0x4663f0]
mov eax, esi
xor eax, 1
mov dword [edi + 8], edx
imul eax, esi
shr eax, 8
xor al, byte [ebp - 0x599]
mov byte [ebp + ebx - 0x30], al
inc ebx
cmp ebx, 0xc
jl 0x40cd60
mov ebx, dword [ebp - 0x5ac]
mov esi, dword [ebp + 0x14]
cmp dword [ebx], 0
je 0x40cdf4
cmp esi, 4
je 0x40cdf4
push 0xc
lea eax, [ebp - 0x30]
mov ecx, ebx
push eax
call fcn.00410fb0
add dword [ebx + 0x18], 0xc
cmp dword [ebx], 0
mov dword [ebp - 0x5a0], 0
je 0x40ce0f
cmp esi, 4
je 0x40ce0f
mov eax, 1
jmp 0x40ce11
xor eax, eax
mov edi, dword [ebp - 0x5a4]
mov byte [ebx + 0x2d], al
cmp esi, 4
je 0x40ce4d
cmp edi, 8
jne 0x40ce3a
lea eax, [ebp - 0x598]
mov ecx, ebx
push eax
call fcn.0040f5f0
mov dword [ebp - 0x5a0], eax
jmp 0x40ce57
test edi, edi
jne 0x40ce57
mov ecx, ebx
call fcn.0040f7d0
mov dword [ebp - 0x5a0], eax
jmp 0x40ce57
mov dword [ebx + 0x90], 0
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x40ce72
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x40ce72
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x90]
add dword [ebx + 0x18], ecx
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x74]
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], edx
test eax, eax
jne 0x40d071
cmp dword [ebp - 0x5a0], eax
jne 0x40cc9a
add ecx, dword [ebp - 0x5a8]
cmp dword [ebp - 0x588], ecx
mov eax, dword [ebx + 0x78]
sete byte [ebp - 0x599]
mov dword [ebp - 0x58c], eax
cmp byte [ebx + 0x1c], 0
mov dword [ebp - 0x588], ecx
mov dword [ebp - 0x584], edx
je 0x40cf5f
cmp dword [ebx], 0
je 0x40cedf
cmp esi, 4
jne 0x40cf5f
mov ax, word [ebp - 0x594]
mov word [ebp - 0x592], di
test al, 1
jne 0x40cf00
mov ecx, 0xfff7
and ax, cx
mov word [ebp - 0x594], ax
mov word [ebp - 0x56c], ax
mov ecx, ebx
mov eax, dword [ebp - 0x564]
sub eax, dword [ebx + 0x10]
push eax
call fcn.0040ffb0
test al, al
je 0x40cf47
push ebx
lea eax, [ebp - 0x598]
push 0x410f40
push eax
call fcn.00410730
add esp, 0xc
test eax, eax
jne 0x40cc9a
push dword [ebx + 0x18]
mov ecx, ebx
call fcn.0040ffb0
test al, al
jne 0x40cfbc
pop edi
pop esi
mov eax, 0x2000000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret 0x10
cmp word [ebp - 0x592], di
jne 0x40cf75
test edi, edi
jne 0x40cf8d
cmp byte [ebp - 0x599], 0
jne 0x40cf8d
pop edi
pop esi
mov eax, 0x4000000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret 0x10
push ebx
lea eax, [ebp - 0x598]
push 0x410f40
push eax
call fcn.00410610
add esp, 0xc
test eax, eax
jne 0x40cc9a
mov ax, word [ebp - 0x56c]
add dword [ebx + 0x18], 0x10
mov word [ebp - 0x594], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x40d071
push dword [ebp - 0x578]
call fcn.0040b2e8
push dword [ebp - 0x578]
mov esi, eax
push dword [ebp - 0x458]
push esi
call fcn.00416880
push 0x360
mov dword [ebp - 0x458], esi
call fcn.0040b9a6
mov edx, eax
lea esi, [ebp - 0x598]
mov ecx, 0xd8
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x44]
add esp, 0x14
test ecx, ecx
jne 0x40d029
pop edi
pop esi
mov dword [ebx + 0x44], edx
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
je 0x40d051
nop dword [eax + eax]
mov ecx, dword [eax]
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
jne 0x40d040
pop edi
pop esi
mov dword [ecx + 0x35c], edx
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x10000
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b1e5
mov esp, ebp
pop ebp
ret 0x10