Function at 0x40bb30
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 [0x472004]
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 0x40bb71
mov eax, 0x40000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a46c
mov esp, ebp
pop ebp
ret 0x10
cmp byte [ebx + 0x2c], 0
je 0x40bb8d
mov eax, 0x50000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a46c
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 0x40bbaf
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 0x40bbc0
cmp word [ebp - 0x238], ax
je 0x40c2ec
lea eax, [ebp - 0x238]
mov ecx, 0x2f
cmp word [eax], 0x5c
jne 0x40bbf1
mov word [eax], cx
add eax, 2
cmp word [eax], 0
jne 0x40bbe8
cmp esi, 4
jne 0x40bc33
lea ecx, [ebp - 0x238]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bc10
sub ecx, edx
sar ecx, 1
cmp word [ebp + ecx*2 - 0x23a], 0x2f
je 0x40bc33
mov byte [ebp - 0x599], 1
jmp 0x40bc5c
mov byte [ebp - 0x599], 0
mov dword [ebp - 0x5a4], 8
cmp esi, 4
je 0x40bc5c
lea eax, [ebp - 0x238]
push eax
call fcn.0040cc00
add esp, 4
test al, al
je 0x40bc66
mov dword [ebp - 0x5a4], 0
cmp esi, 2
jne 0x40bc7a
push dword [ebp - 0x5a0]
mov ecx, ebx
call fcn.0040eef0
jmp 0x40bcb8
cmp esi, 1
jne 0x40bc91
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp - 0x5a0]
call fcn.0040efa0
jmp 0x40bcb8
cmp esi, 3
jne 0x40bca8
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp - 0x5a0]
call fcn.0040f120
jmp 0x40bcb8
cmp esi, 4
jne 0x40c2ec
mov ecx, ebx
call fcn.0040ede0
test eax, eax
jne 0x40c2f1
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 0x40bd00
sub ecx, edx
mov dword [ebp - 0x580], ecx
cmp byte [ebp - 0x599], al
je 0x40bd3f
lea edi, [ebp - 0x450]
dec edi
nop
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x40bd20
mov ax, word [0x465124]
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 0x40bdb6
cmp esi, 4
je 0x40bdb6
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 0x40bddf
mov eax, dword [ebx + 0x70]
test eax, eax
js 0x40bddf
add eax, edi
mov dword [ebp - 0x588], eax
jmp 0x40bde9
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 0x4101c0
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.0040f9b0
add esp, 0xc
test eax, eax
je 0x40bf32
mov ecx, ebx
call fcn.0040e810
pop edi
pop esi
mov eax, 0x400
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a46c
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 0x40bf67
mov ecx, ebx
call fcn.0040e810
mov eax, dword [ebx + 0x14]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a46c
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 0x40bf99
mov al, byte [esi]
test al, al
je 0x40bf99
push eax
push edi
call fcn.004101e0
add esp, 8
add esi, 1
jne 0x40bf84
cmp byte [0x47a2e0], 0
jne 0x40bfbb
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
push esi
call fcn.004431a5
add esp, 4
xor esi, esi
nop dword [eax]
call fcn.00443184
sar eax, 7
mov byte [ebp + esi - 0x30], al
inc esi
cmp esi, 0xc
jl 0x40bfc0
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 + 0x464b78]
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 + 0x464b78]
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 0x40bfe0
mov ebx, dword [ebp - 0x5ac]
mov esi, dword [ebp + 0x14]
cmp dword [ebx], 0
je 0x40c074
cmp esi, 4
je 0x40c074
push 0xc
lea eax, [ebp - 0x30]
mov ecx, ebx
push eax
call fcn.00410230
add dword [ebx + 0x18], 0xc
cmp dword [ebx], 0
mov dword [ebp - 0x5a0], 0
je 0x40c08f
cmp esi, 4
je 0x40c08f
mov eax, 1
jmp 0x40c091
xor eax, eax
mov edi, dword [ebp - 0x5a4]
mov byte [ebx + 0x2d], al
cmp esi, 4
je 0x40c0cd
cmp edi, 8
jne 0x40c0ba
lea eax, [ebp - 0x598]
mov ecx, ebx
push eax
call fcn.0040e870
mov dword [ebp - 0x5a0], eax
jmp 0x40c0d7
test edi, edi
jne 0x40c0d7
mov ecx, ebx
call fcn.0040ea50
mov dword [ebp - 0x5a0], eax
jmp 0x40c0d7
mov dword [ebx + 0x90], 0
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x40c0f2
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x40c0f2
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 0x40c2f1
cmp dword [ebp - 0x5a0], eax
jne 0x40bf1a
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 0x40c1df
cmp dword [ebx], 0
je 0x40c15f
cmp esi, 4
jne 0x40c1df
mov ax, word [ebp - 0x594]
mov word [ebp - 0x592], di
test al, 1
jne 0x40c180
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.0040f230
test al, al
je 0x40c1c7
push ebx
lea eax, [ebp - 0x598]
push 0x4101c0
push eax
call fcn.0040f9b0
add esp, 0xc
test eax, eax
jne 0x40bf1a
push dword [ebx + 0x18]
mov ecx, ebx
call fcn.0040f230
test al, al
jne 0x40c23c
pop edi
pop esi
mov eax, 0x2000000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a46c
mov esp, ebp
pop ebp
ret 0x10
cmp word [ebp - 0x592], di
jne 0x40c1f5
test edi, edi
jne 0x40c20d
cmp byte [ebp - 0x599], 0
jne 0x40c20d
pop edi
pop esi
mov eax, 0x4000000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a46c
mov esp, ebp
pop ebp
ret 0x10
push ebx
lea eax, [ebp - 0x598]
push 0x4101c0
push eax
call fcn.0040f890
add esp, 0xc
test eax, eax
jne 0x40bf1a
mov ax, word [ebp - 0x56c]
add dword [ebx + 0x18], 0x10
mov word [ebp - 0x594], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x40c2f1
push dword [ebp - 0x578]
call fcn.0040a568
push dword [ebp - 0x578]
mov esi, eax
push dword [ebp - 0x458]
push esi
call fcn.00415b00
push 0x360
mov dword [ebp - 0x458], esi
call fcn.0040ac26
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 0x40c2a9
pop edi
pop esi
mov dword [ebx + 0x44], edx
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a46c
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
je 0x40c2d1
nop dword [eax + eax]
mov ecx, dword [eax]
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
jne 0x40c2c0
pop edi
pop esi
mov dword [ecx + 0x35c], edx
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a46c
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.0040a46c
mov esp, ebp
pop ebp
ret 0x10