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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x441d20]
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x18], eax
mov edx, dword [0x441d24]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], edx
push edi
cmp edx, 0x100000
jb 0x406b13
ja 0x4064d5
test eax, eax
jb 0x406b13
mov ecx, eax
mov dword [ebp - 0x30], 0x4e210000
add ecx, 0xffffffdf
mov dword [ebp - 0xc], 0
mov eax, edx
mov dword [ebp - 0x1c], ecx
adc eax, 0xffffffff
mov edx, 0x22
add ecx, 0xffffffde
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x48], ecx
mov ecx, 1
adc eax, 0xffffffff
mov dword [ebp - 0x14], edx
xor esi, esi
mov dword [ebp - 0x44], eax
or ebx, 0xffffffff
mov dword [ebp - 8], ecx
xor eax, eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x40], eax
nop dword [eax]
shl eax, 7
mov dword [ebp - 0x3c], eax
and eax, 0x1ff
mov dword [ebp - 0x5c], eax
jne 0x406549
mov edi, dword [ebp + 0xc]
push 0x200
push 0
push edi
call fcn.0041a3d0
mov ecx, dword [ebp - 8]
add esp, 0xc
mov edx, dword [ebp - 0x14]
mov eax, ecx
or eax, esi
je 0x406788
mov eax, dword [ebp - 0xc]
add edx, 0x7ff
adc eax, 0
and edx, 0xfffff800
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x14], edx
mov esi, dword [eax + 4]
mov edi, dword [eax]
add eax, 8
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x38], eax
test esi, esi
ja 0x406637
jb 0x406592
cmp edi, 0x64
ja 0x406637
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push esi
push edi
call fcn.0042d610
mov ecx, edx
mov edi, eax
mov edx, 0xe147ae15
mov dword [ebp - 8], edi
mul edx
mov dword [ebp - 0x10], ecx
mov esi, edx
mov dword [ebp - 0x58], eax
mov eax, edi
mov edx, 0x47ae147a
mul edx
mov edi, eax
mov dword [ebp - 0x4c], edx
mov eax, ecx
mov ecx, 0xe147ae15
mul ecx
mov dword [ebp - 0x24], edx
mov ecx, eax
mov eax, dword [ebp - 0x10]
mov edx, 0x47ae147a
mul edx
add ecx, esi
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x54], edx
mov edx, dword [ebp - 0x24]
adc edx, 0
mov dword [ebp - 0x50], eax
add edi, ecx
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x28], edi
mov edi, dword [ebp - 8]
adc ecx, 0
xor eax, eax
add edx, ecx
mov ecx, dword [ebp - 0x50]
adc eax, eax
add ecx, edx
mov edx, dword [ebp - 0x54]
adc edx, eax
sub edi, ecx
sbb esi, edx
shrd edi, esi, 1
shr esi, 1
add edi, ecx
adc esi, edx
mov edx, dword [ebp - 0x14]
shrd edi, esi, 6
shr esi, 6
add edi, 0x7ff
adc esi, 0
and edi, 0xfffff800
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], edi
mov ecx, dword [ebp - 0x2c]
mov eax, edi
add eax, edx
mov dword [ebp - 0x54], eax
mov eax, esi
adc eax, dword [ebp - 0xc]
cmp eax, ecx
jb 0x406676
mov eax, dword [ebp - 0x1c]
ja 0x406654
cmp dword [ebp - 0x54], eax
jbe 0x406676
cmp dword [ebp - 0xc], ecx
ja 0x406774
jb 0x406667
cmp edx, eax
jae 0x406774
mov edi, eax
mov esi, ecx
sub edi, edx
mov dword [ebp - 8], edi
sbb esi, dword [ebp - 0xc]
mov dword [ebp - 0x10], esi
mov eax, edi
or eax, esi
je 0x406788
mov eax, dword [ebp - 0x5c]
mov edi, 0x4344b8
add eax, dword [ebp + 0xc]
mov ecx, 0x10
mov dword [ebp - 0x24], eax
mov edx, eax
sub edi, eax
mov al, byte [edi + edx]
lea edx, [edx + 1]
mov byte [edx - 1], al
sub ecx, 1
jne 0x406697
mov edx, dword [ebp - 0x24]
mov edi, dword [ebp + 0xc]
add edx, 0x10
push ecx
mov ecx, dword [ebp - 0x30]
call fcn.004063e0
mov edx, dword [ebp - 0x24]
add esp, 4
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x14]
mov ecx, eax
mov byte [edx + 0x20], al
mov eax, dword [ebp - 0xc]
shrd ecx, eax, 8
mov byte [edx + 0x21], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x22], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x23], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x24], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x25], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x26], cl
shr eax, 8
shrd ecx, eax, 8
mov eax, esi
mov byte [edx + 0x27], cl
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0x14]
mov edx, ecx
mov dword [ebp - 0x14], ecx
adc eax, dword [ebp - 0xc]
add edx, 0xffffffff
mov ecx, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x24]
adc ecx, 0xffffffff
mov byte [eax + 0x28], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x29], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2a], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2b], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2c], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2d], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2e], dl
shrd edx, ecx, 8
mov byte [eax + 0x2f], dl
jmp 0x40678b
xorps xmm0, xmm0
movlpd qword [ebp - 0x60], xmm0
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 8], eax
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x3c]
sub eax, 0xffffff80
test eax, 0x1ff
jne 0x40680d
xor esi, esi
nop word [eax + eax]
mov dh, byte [esi + edi]
mov dl, 1
test dh, dl
mov eax, 0
setne al
xor ebx, eax
mov ecx, ebx
mov eax, ebx
shr ecx, 1
mov ebx, ecx
xor ebx, 0xedb88320
and al, 1
cmove ebx, ecx
add dl, dl
jne 0x4067a5
inc esi
cmp esi, 0x200
jb 0x4067a0
mov esi, dword [ebp - 0x3c]
mov edx, edi
shr esi, 9
push 1
push 0
lea eax, [esi + 2]
push eax
call fcn.00406200
add esp, 0xc
test eax, eax
jne 0x406c77
add esi, dword [ebp - 0x1c]
mov edx, edi
push 1
adc eax, dword [ebp - 0x2c]
push eax
push esi
call fcn.00406200
add esp, 0xc
test eax, eax
jne 0x406c77
mov eax, dword [ebp - 0x40]
mov esi, dword [ebp - 0x10]
inc eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x40], eax
cmp eax, 0x80
jb 0x406520
push 0x200
push 0
push edi
call fcn.0041a3d0
mov esi, str.EFI_PART
add esp, 0xc
mov ecx, edi
mov edx, 0x10
sub esi, edi
mov al, byte [esi + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
sub edx, 1
jne 0x406846
mov eax, dword [ebp - 0x18]
not ebx
mov dword [edi + 0x1c], edx
mov byte [edi + 0x58], bl
shr ebx, 8
mov byte [edi + 0x59], bl
shr ebx, 8
mov byte [edi + 0x5a], bl
shr ebx, 8
add eax, 0xffffffff
mov dword [ebp - 0x18], eax
mov edx, eax
mov byte [edi + 0x20], al
mov byte [edi + 0x5b], bl
mov ebx, dword [ebp - 0x34]
adc ebx, 0xffffffff
mov esi, dword [ebp - 0x2c]
mov eax, ebx
mov dword [edi + 0x18], 1
shrd edx, eax, 8
mov ecx, esi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x5c], edx
mov byte [edi + 0x21], dl
shr eax, 8
shrd edx, eax, 8
mov dword [edi + 0x28], 0x22
mov dword [ebp - 0x54], edx
mov byte [edi + 0x22], dl
shr eax, 8
shrd edx, eax, 8
mov dword [edi + 0x2c], 0
mov dword [ebp - 0x50], edx
mov byte [edi + 0x23], dl
shr eax, 8
shrd edx, eax, 8
mov dword [edi + 0x54], 0x80
mov dword [ebp - 0x4c], edx
mov byte [edi + 0x24], dl
shr eax, 8
shrd edx, eax, 8
mov dword [edi + 0x50], 0x80
mov dword [ebp - 0x48], edx
mov byte [edi + 0x25], dl
shr eax, 8
shrd edx, eax, 8
mov dword [edi + 0x48], 2
mov dword [ebp - 0x44], edx
mov byte [edi + 0x26], dl
shr eax, 8
shrd edx, eax, 8
mov dword [ebp - 0x3c], edx
mov byte [edi + 0x27], dl
mov edx, dword [ebp - 0x1c]
add edx, 0xffffffff
mov byte [edi + 0x30], dl
adc ecx, 0xffffffff
shrd edx, ecx, 8
shr ecx, 8
mov byte [edi + 0x31], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [edi + 0x32], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [edi + 0x33], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [edi + 0x34], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [edi + 0x35], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [edi + 0x36], dl
shrd edx, ecx, 8
mov byte [edi + 0x37], dl
lea edx, [edi + 0x38]
push ecx
mov ecx, dword [ebp - 0x30]
call fcn.004063e0
add esp, 4
or edx, 0xffffffff
xor eax, eax
mov dword [ebp - 0x40], eax
mov bh, byte [eax + edi]
mov bl, 1
nop dword [eax]
test bh, bl
mov eax, 0
setne al
xor edx, eax
mov ecx, edx
mov eax, edx
shr ecx, 1
mov edx, ecx
xor edx, 0xedb88320
and al, 1
cmove edx, ecx
add bl, bl
jne 0x406980
mov eax, dword [ebp - 0x40]
inc eax
mov dword [ebp - 0x40], eax
cmp eax, 0x5c
jb 0x406974
not edx
lea ebx, [edi + 0x10]
mov eax, ebx
push 1
push 0
push 1
mov byte [eax], dl
shr edx, 8
mov byte [eax + 1], dl
shr edx, 8
mov byte [eax + 2], dl
shr edx, 8
mov byte [eax + 3], dl
mov edx, edi
call fcn.00406200
add esp, 0xc
test eax, eax
jne 0x406c77
mov eax, dword [ebp - 0x18]
or edx, 0xffffffff
mov byte [edi + 0x18], al
mov eax, dword [ebp - 0x5c]
mov byte [edi + 0x19], al
mov eax, dword [ebp - 0x54]
mov byte [edi + 0x1a], al
mov eax, dword [ebp - 0x50]
mov byte [edi + 0x1b], al
mov eax, dword [ebp - 0x4c]
mov byte [edi + 0x1c], al
mov eax, dword [ebp - 0x48]
mov byte [edi + 0x1d], al
mov eax, dword [ebp - 0x44]
mov byte [edi + 0x1e], al
mov eax, dword [ebp - 0x3c]
mov byte [edi + 0x1f], al
mov eax, dword [ebp - 0x1c]
mov byte [edi + 0x48], al
shrd eax, esi, 8
mov dword [edi + 0x20], 1
shr esi, 8
mov byte [edi + 0x49], al
shrd eax, esi, 8
mov dword [edi + 0x24], 0
shr esi, 8
mov byte [edi + 0x4a], al
shrd eax, esi, 8
shr esi, 8
mov byte [edi + 0x4b], al
shrd eax, esi, 8
shr esi, 8
mov byte [edi + 0x4c], al
shrd eax, esi, 8
shr esi, 8
mov byte [edi + 0x4d], al
shrd eax, esi, 8
shr esi, 8
mov byte [edi + 0x4e], al
shrd eax, esi, 8
xor esi, esi
mov byte [edi + 0x4f], al
mov eax, ebx
mov dword [eax], 0
mov bh, byte [esi + edi]
mov bl, 1
nop dword [eax + eax]
test bh, bl
mov eax, 0
setne al
xor edx, eax
mov ecx, edx
mov eax, edx
shr ecx, 1
mov edx, ecx
xor edx, 0xedb88320
and al, 1
cmove edx, ecx
add bl, bl
jne 0x406a80
inc esi
cmp esi, 0x5c
jb 0x406a76
not edx
mov byte [edi + 0x10], dl
shr edx, 8
mov byte [edi + 0x11], dl
shr edx, 8
push 1
push dword [ebp - 0x34]
mov byte [edi + 0x12], dl
push dword [ebp - 0x18]
shr edx, 8
mov byte [edi + 0x13], dl
mov edx, edi
call fcn.00406200
add esp, 0xc
test eax, eax
jne 0x406c77
push 0x200
push eax
push edi
call fcn.0041a3d0
lea ecx, [edi + 0x1be]
mov esi, 0x434404
add esp, 0xc
mov edx, 0x10
sub esi, ecx
nop dword [eax + eax]
mov al, byte [esi + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
sub edx, 1
jne 0x406b00
jmp 0x406c5a
mov bl, 8
mov byte [ebp - 1], bl
xor edx, edx
movzx ecx, bl
div ecx
cmp eax, 0xfc3f
jb 0x406b34
mov eax, dword [ebp - 0x18]
add bl, bl
mov byte [ebp - 1], bl
jne 0x406b18
mov byte [ebp - 1], 0xff
mov edi, dword [ebp + 0xc]
push 0x200
push 0
push edi
call fcn.0041a3d0
add esp, 0xc
lea eax, [edi + 0x1cd]
xor ecx, ecx
mov ebx, 0x800
mov dword [ebp - 0x40], ecx
mov edi, eax
mov dword [ebp - 0x34], ebx
nop dword [eax]
test ebx, ebx
je 0x406c57
mov edx, dword [ebp - 0x18]
cmp ebx, edx
jae 0x406c57
mov ecx, dword [esi + ecx*8]
mov dword [ebp - 0x1c], ecx
cmp ecx, 0x64
ja 0x406b97
jne 0x406b84
mov ecx, edx
jmp 0x406b94
mov eax, 0x51eb851f
mul edx
shr edx, 5
imul ecx, edx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
lea eax, [ecx + ebx]
cmp eax, edx
ja 0x406ba2
cmp eax, ebx
jae 0x406ba9
mov ecx, edx
sub ecx, ebx
mov dword [ebp - 0x1c], ecx
test ecx, ecx
je 0x406c57
mov eax, ebx
mov byte [edi - 3], cl
shr eax, 8
xor edx, edx
mov byte [edi - 6], al
shr eax, 8
mov byte [edi - 5], al
shr eax, 8
mov byte [edi - 4], al
mov eax, ecx
shr eax, 8
mov ecx, 0x3f
mov byte [edi - 2], al
shr eax, 8
mov byte [edi - 1], al
shr eax, 8
mov byte [edi], al
mov eax, dword [ebp + 8]
mov byte [edi - 0xb], al
mov eax, ebx
div ecx
movzx esi, byte [ebp - 1]
mov byte [edi - 7], bl
mov ebx, edx
xor edx, edx
inc bl
div esi
mov ecx, eax
mov byte [edi - 0xe], dl
shr ecx, 2
xor edx, edx
and cl, 0xc0
mov byte [edi - 0xc], al
or cl, bl
mov byte [edi - 0xd], cl
mov ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x34], ecx
lea eax, [ecx - 1]
mov ecx, 0x3f
div ecx
mov ebx, edx
xor edx, edx
div esi
mov esi, dword [ebp - 0x38]
inc bl
mov ecx, eax
mov byte [edi - 0xa], dl
shr ecx, 2
and cl, 0xc0
mov byte [edi - 8], al
or cl, bl
mov ebx, dword [ebp - 0x34]
mov byte [edi - 9], cl
add edi, 0x10
mov ecx, dword [ebp - 0x40]
inc ecx
mov dword [ebp - 0x40], ecx
cmp ecx, 4
jb 0x406b60
mov edi, dword [ebp + 0xc]
push 1
push 0
push 0
mov edx, edi
mov word [edi + 0x1fe], 0xaa55
call fcn.00406200
add esp, 0xc
test eax, eax
je 0x406c83
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret