Function at 0x401000
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
cmp eax, 0xc
ja 0x401016
mov eax, 5
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 8]
cmp dword [ecx], 0x21445641
je 0x40102c
mov eax, 1
mov esp, ebp
pop ebp
ret 8
push ebx
mov ebx, dword [ecx + 4]
push esi
xor esi, esi
mov ecx, 9
push edi
mov edi, 0x100
lea eax, [eax*8 - 0x60]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], 0xc
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], esi
mov byte [ebp - 1], 0
mov dword [0x416b90], esi
mov dword [ebp - 0x24], edi
mov edx, 0x200
cmp eax, ecx
jl 0x40108a
cmp edi, edx
jne 0x401080
cmp ecx, 0xc
je 0x401080
inc ecx
rol edx, 1
sub eax, ecx
inc edi
cmp eax, ecx
jge 0x401074
mov dword [ebp - 0x24], edi
mov eax, 0x40ab98
nop
mov dword [eax - 8], esi
mov dword [eax], esi
mov dword [eax - 4], 1
add eax, 0xc
cmp eax, 0x40b78c
jle 0x401090
test ebx, ebx
jne 0x4010f6
mov edx, dword [ebp + 0xc]
or ecx, 0xffffffff
mov eax, ebx
test ebx, ebx
je 0x4010d9
jmp 0x4010c0
movzx esi, byte [edx]
xor esi, ecx
and esi, 0xff
shr ecx, 8
xor ecx, dword [esi*4 + 0x409b20]
inc edx
dec eax
jne 0x4010c0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
not ecx
sub eax, ecx
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, dword [ebp - 0x24]
cmp dword [ebp - 0x1c], edi
jae 0x4012a7
mov eax, dword [ebp - 0x20]
xor ebx, ebx
lea edi, [ebx + 1]
test eax, eax
je 0x40117d
mov dword [ebp - 0x28], eax
mov edi, edi
movzx esi, byte [ebp - 1]
mov eax, dword [ebp - 0x18]
lea eax, [esi + eax*8]
mov edx, eax
and edx, 0x80000007
jns 0x401129
dec edx
or edx, 0xfffffff8
inc edx
mov ecx, 7
sub ecx, edx
mov edx, 1
shl edx, cl
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x2c], edx
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dl, byte [eax + ecx]
mov eax, dword [ebp - 0x2c]
test dl, al
je 0x401152
or ebx, edi
lea eax, [esi + 1]
and eax, 0x80000007
jns 0x401161
dec eax
or eax, 0xfffffff8
inc eax
mov byte [ebp - 1], al
test al, al
jne 0x40116b
inc dword [ebp - 0x18]
rol edi, 1
dec dword [ebp - 0x28]
jne 0x401110
cmp ebx, 0xff
ja 0x401188
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
mov byte [ecx + eax], bl
jmp 0x4011ea
mov eax, dword [ebp - 0xc]
cmp eax, 0xf00
jae 0x40119f
add eax, 0xff
cmp ebx, eax
ja 0x401299
mov esi, dword [ebp - 0x10]
lea ecx, [ebx + ebx*2]
add ecx, ecx
mov edx, dword [ecx + ecx + 0x40ab94]
add ecx, ecx
lea eax, [edx + esi]
cmp eax, dword [ebp - 0x14]
ja 0x401299
xor eax, eax
test edx, edx
je 0x4011e7
mov edi, dword [ebp + 0xc]
add esi, edi
jmp 0x4011d0
mov edx, dword [ecx + 0x40ab90]
add edx, eax
mov dl, byte [edx + edi]
mov byte [esi + eax], dl
inc eax
cmp eax, dword [ecx + 0x40ab94]
jb 0x4011d0
mov esi, dword [ebp - 0xc]
cmp esi, 0xf00
jne 0x40128c
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
test eax, 0xfffff000
je 0x40120b
mov dword [ebp - 8], 0x100
mov eax, dword [ebp - 8]
dec eax
cmp eax, 0xff
jne 0x40121b
mov eax, 0xfff
mov ecx, dword [ebp - 0x10]
lea eax, [eax + eax*2]
add eax, eax
add eax, eax
lea edx, [ebx + ebx*2]
mov dword [eax + 0x40ab90], ecx
mov edx, dword [edx*4 + 0x40ab94]
inc edx
mov dword [eax + 0x40ab94], edx
mov dword [eax + 0x40ab98], 0
cmp esi, 0xf00
jae 0x401252
inc esi
mov dword [ebp - 0xc], esi
lea eax, [ecx + edx - 1]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov edi, 1
shl edi, cl
inc edx
mov dword [ebp - 0x10], eax
mov dword [0x416b90], eax
mov dword [ebp - 0x1c], edx
cmp edi, edx
jne 0x40127c
cmp ecx, 0xc
jae 0x40127c
inc ecx
mov dword [ebp - 0x20], ecx
mov ebx, dword [ebp - 0x14]
cmp eax, ebx
jb 0x4010f3
jmp 0x4010aa
jae 0x40120b
mov eax, dword [ebp - 8]
add eax, esi
jmp 0x40121b
pop edi
pop esi
mov eax, 3
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp dword [ebp - 0x10], ebx
jae 0x4010aa
pop edi
pop esi
mov eax, 4
pop ebx
mov esp, ebp
pop ebp
ret 8