Function at 0x40f1f0
Capabilities:
Encode data using xor
Get disk information
Hash data with crc32
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x548
mov eax, dword [0x448004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x114]
xor esi, esi
mov dword [ebp - 0x548], edi
push 0x104
mov ebx, edx
mov dword [ebp - 0x520], esi
push esi
push eax
mov dword [ebp - 0x540], ebx
mov dword [ebp - 0x524], 0x5c3a3f
call fcn.00420f90
add esp, 0xc
mov byte [edi], 0
mov edi, dword [ebx + 0x10]
mov esi, 1
mov edx, dword [ebx + 0x14]
mov ecx, edi
call fcn.00434810
movsd xmm1, qword [0x4455a0]
movaps xmm2, xmm0
divsd xmm2, xmm1
mov eax, edi
and eax, 0x3fffffff
or eax, 0
divsd xmm2, xmm1
divsd xmm2, xmm1
jne 0x40f27f
mov eax, dword [ebx + 0x14]
shrd edi, eax, 0x1e
jmp 0x40f2c8
movsd xmm3, qword [0x445588]
xor eax, eax
nop dword [eax]
movd xmm1, esi
cvtdq2pd xmm1, xmm1
comisd xmm1, xmm2
jbe 0x40f2a7
movaps xmm0, xmm1
subsd xmm0, xmm2
jmp 0x40f2ae
movaps xmm0, xmm2
subsd xmm0, xmm1
divsd xmm0, xmm1
comisd xmm3, xmm0
ja 0x40f2c6
inc eax
add esi, esi
cmp eax, 0xc
jl 0x40f290
cvttsd2si edi, xmm2
jmp 0x40f2c8
mov edi, esi
push edi
lea eax, [ebx + 0xa0]
push eax
lea eax, [ebx + 0x20]
push eax
push dword [ebx + 4]
push str.ClearVentoyFromPhyDrive_PhyDrive_d____s__s__dGB__
call fcn.00414ac0
add esp, 0x14
mov ecx, 8
call fcn.00418700
push str.Lock_disk_for_clean_.............................
call fcn.00414ac0
mov ecx, dword [ebx + 4]
mov dl, 1
push 0
call fcn.0040cd60
mov esi, eax
add esp, 8
mov dword [ebp - 0x534], esi
cmp esi, 0xffffffff
jne 0x40f337
push str.Failed_to_open_physical_disk
call fcn.00414ac0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 4]
lea edx, [ebp - 0x114]
push 0x104
call fcn.0040ccb0
add esp, 4
cmp byte [ebp - 0x114], 0
jne 0x40f3a1
push str.No_drive_letter_was_assigned...
call fcn.00414ac0
add esp, 4
mov byte [ebp - 0x515], 0x44
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov cl, byte [ebp - 0x515]
shr eax, 3
test al, 1
je 0x40f388
nop dword [eax]
shr eax, 1
inc cl
test al, 1
jne 0x40f380
movsx eax, cl
push eax
push str.GetFirstUnusedDriveLetter__C:_...
mov byte [ebp - 0x524], cl
call fcn.00414ac0
add esp, 8
jmp 0x40f417
lea edi, [ebp - 0x114]
lea ecx, [edi + 1]
nop word [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x40f3b0
sub edi, ecx
test edi, edi
jle 0x40f417
lea ebx, [ebp + edi - 0x115]
nop dword [eax]
nop dword [eax + eax]
mov al, byte [ebx]
mov byte [ebp - 0x524], al
lea eax, [ebp - 0x524]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteVolumeMountPointA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea eax, [ebp - 0x524]
push eax
push str.Delete_mountpoint__s_ret:_u_code:_u
call fcn.00414ac0
dec edi
lea ebx, [ebx - 1]
add esp, 0x10
test edi, edi
jg 0x40f3d0
mov ebx, dword [ebp - 0x540]
mov esi, dword [ebp - 0x534]
mov al, byte [ebp - 0x524]
mov byte [ebp - 0x515], al
movsx eax, al
push eax
push str.Will_use__C:_as_volume_mountpoint
call fcn.00414ac0
add esp, 8
lea eax, [ebp - 0x51c]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x9001c
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 9
call fcn.00418700
mov edi, dword [ebx + 4]
mov ecx, 1
push 0
push 0
push 0x4043f0
mov edx, edi
call fcn.00403e30
add esp, 0xc
mov esi, eax
mov eax, str.FAIL
test esi, esi
mov ecx, str.SUCCESS
cmove ecx, eax
push ecx
push esi
push edi
push str.VDS_DeleteAllPartitions__d_ret:_d___s_
call fcn.00414ac0
add esp, 0x10
test esi, esi
jne 0x40f4b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Notice:_Could_not_delete_partitions:__u
call fcn.00414ac0
add esp, 8
push str.Deleting_all_partitions_........................._OK
call fcn.00414ac0
add esp, 4
mov ecx, 0xa
call fcn.00418700
push str.Lock_disk_for_write_.............................
call fcn.00414ac0
mov ecx, dword [ebx + 4]
mov dl, 1
push 1
call fcn.0040cd60
mov edi, eax
add esp, 8
mov dword [ebp - 0x544], edi
cmp edi, 0xffffffff
jne 0x40f4fa
push str.Failed_to_GetPhysicalHandle_for_write.
jmp 0x40f518
push 0x200000
call fcn.0042442e
mov esi, eax
add esp, 4
mov dword [ebp - 0x530], esi
test esi, esi
jne 0x40f53a
push str.Failed_to_alloc_memory.
call fcn.00414ac0
mov esi, 1
add esp, 4
lea ecx, [esi + 0x2f]
call fcn.00418700
lea ecx, [esi + 0x40]
call fcn.00418700
jmp 0x40fcae
push 0x200000
push 0
push esi
call fcn.00420f90
add esp, 0xc
mov dword [ebp - 0x52c], 0x200
lea eax, [ebp - 0x52c]
mov dword [ebp - 0x528], 0
push 0
push eax
push 0
push 0x200
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x51c]
push eax
push 0x1ffe00
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x51c]
push esi
push str.Write_fisrt_1MB_ret:_d_size:_u_err:_d
call fcn.00414ac0
add esp, 0x10
test esi, esi
jne 0x40f5bc
mov esi, 1
mov dword [ebp - 0x520], esi
jmp 0x40fa09
mov ecx, dword [ebx + 0x10]
lea edx, [ebp - 0x52c]
mov eax, dword [ebx + 0x14]
sub ecx, 0x200000
push 0
push edx
sbb eax, 0
mov dword [ebp - 0x52c], ecx
push eax
push ecx
push edi
mov dword [ebp - 0x528], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x51c]
push eax
push 0x200000
push dword [ebp - 0x530]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x51c]
push esi
push str.Write_2nd_1MB_ret:_d_size:_u_err:_d
call fcn.00414ac0
add esp, 0x10
test esi, esi
jne 0x40f635
mov esi, 1
mov dword [ebp - 0x520], esi
jmp 0x40fa09
push 0
lea eax, [ebp - 0x52c]
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x52c], xmm0
push dword [ebp - 0x528]
push dword [ebp - 0x52c]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x10]
cmp ecx, 0x200
jb 0x40fadc
ja 0x40f678
test eax, eax
je 0x40fadc
mov esi, dword [ebp - 0x530]
mov ebx, ecx
mov edi, eax
push ecx
shrd edi, ebx, 9
lea edx, [esi + 0x400]
mov ecx, esi
push eax
shr ebx, 9
mov dword [ebp - 0x534], edx
call fcn.00415db0
add esp, 8
mov dword [esi + 0x200], 0x20494645
mov ecx, edi
mov dword [esi + 0x204], 0x54524150
add ecx, 0xffffffff
mov byte [esi + 0x20a], 1
mov eax, ebx
mov dword [esi + 0x20c], 0x5c
adc eax, 0xffffffff
mov dword [esi + 0x210], 0
add edi, 0xffffffde
mov dword [esi + 0x224], eax
lea eax, [esi + 0x238]
mov dword [esi + 0x218], 1
adc ebx, 0xffffffff
mov dword [esi + 0x21c], 0
mov dword [esi + 0x220], ecx
mov dword [esi + 0x228], 0x22
mov dword [esi + 0x22c], 0
mov dword [esi + 0x230], edi
mov dword [esi + 0x234], ebx
mov esi, dword [sym.imp.ole32.dll_CoCreateGuid]
push eax
call esi
mov eax, dword [ebp - 0x530]
mov dword [eax + 0x248], 2
mov dword [eax + 0x24c], 0
mov dword [eax + 0x250], 0x80
mov dword [eax + 0x254], 0x80
mov eax, dword [ebp - 0x534]
movups xmm0, xmmword [0x4488ec]
movups xmmword [eax], xmm0
add eax, 0x10
push eax
call esi
mov eax, dword [ebp - 0x534]
or edx, 0xffffffff
mov dword [eax + 0x28], edi
lea esi, [eax + 2]
mov dword [eax + 0x20], 0x800
mov edi, 0x1000
mov dword [eax + 0x24], 0
mov dword [eax + 0x2c], ebx
mov dword [eax + 0x30], 0
mov dword [eax + 0x34], 0
mov dword [eax + 0x38], 0x610044
mov dword [eax + 0x3c], 0x610074
movzx ecx, byte [esi - 2]
lea esi, [esi + 4]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x43b3a0]
movzx ecx, byte [esi - 5]
movzx eax, dl
xor ecx, eax
shr edx, 8
movzx eax, byte [esi - 4]
xor edx, dword [ecx*4 + 0x43b3a0]
movzx ecx, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x43b3a0]
movzx ecx, byte [esi - 3]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x43b3a0]
sub edi, 1
jne 0x40f7b4
mov esi, dword [ebp - 0x530]
not edx
mov edi, dword [esi + 0x20c]
mov dword [esi + 0x258], edx
or edx, 0xffffffff
test edi, edi
je 0x40f84a
lea ebx, [esi + 0x200]
nop dword [eax]
movzx ecx, byte [ebx]
lea ebx, [ebx + 1]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x43b3a0]
sub edi, 1
jne 0x40f830
mov ebx, dword [ebp - 0x540]
not edx
mov edi, dword [ebp - 0x544]
mov dword [esi + 0x210], edx
lea edx, [ebp - 0x53c]
push 0
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
sub ecx, 0x200
push edx
sbb eax, 0
mov dword [ebp - 0x53c], ecx
push eax
push ecx
push edi
mov dword [ebp - 0x538], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
lea edx, [ebp - 0x514]
mov ecx, esi
call fcn.004161e0
push 0
lea eax, [ebp - 0x51c]
push eax
push 0x200
lea eax, [ebp - 0x514]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40f8e7
mov esi, 1
mov dword [ebp - 0x520], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4400
push dword [ebp - 0x51c]
push str.Write_GPT_Backup_Head_Failed__dwSize:_u___u__ErrCode:_u
call fcn.00414ac0
add esp, 0x10
jmp 0x40fa09
mov ecx, dword [ebx + 0x10]
lea edx, [ebp - 0x53c]
mov eax, dword [ebx + 0x14]
sub ecx, 0x4200
push 0
push edx
sbb eax, 0
mov dword [ebp - 0x53c], ecx
push eax
push ecx
push edi
mov dword [ebp - 0x538], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x51c]
push eax
push 0x4000
lea edx, [esi + 0x400]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40f963
mov esi, 1
mov dword [ebp - 0x520], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4400
push dword [ebp - 0x51c]
push str.Write_GPT_Backup_Part_Table_Failed__dwSize:_u___u__ErrCode:_u
call fcn.00414ac0
add esp, 0x10
jmp 0x40fa09
push 0
lea eax, [ebp - 0x53c]
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x53c], xmm0
push dword [ebp - 0x538]
push dword [ebp - 0x53c]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x51c]
push eax
push 0x4400
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40f9d0
mov esi, 1
mov dword [ebp - 0x520], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4400
push dword [ebp - 0x51c]
push str.Write_GPT_Info_Failed__dwSize:_u___u__ErrCode:_u
call fcn.00414ac0
add esp, 0x10
jmp 0x40fa09
push str.Write_GPT_Info_OK_...
call fcn.00414ac0
add esp, 4
push str.Clear_Ventoy_successfully_finished
call fcn.00414ac0
add esp, 4
lea eax, [ebp - 0x51c]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x70140
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
xor esi, esi
mov ecx, 0x30
call fcn.00418700
mov ecx, 0x41
call fcn.00418700
push dword [ebp - 0x530]
call fcn.0042422d
add esp, 4
test esi, esi
jne 0x40fca8
push str.Mounting_Ventoy_Partition_.......................
call fcn.00414ac0
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x104
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00420f90
mov ecx, dword [ebx + 4]
lea edx, [ebp - 0x114]
add esp, 0xc
push 0x104
call fcn.0040ccb0
add esp, 4
lea eax, [ebp - 0x114]
push eax
push str.Logical_drive_letter_after_write_ventoy:___s_
call fcn.00414ac0
mov eax, dword [ebp - 0x520]
add esp, 8
mov dword [ebp - 0x520], eax
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [ebp + esi - 0x114]
test al, al
je 0x40fc02
mov byte [ebp - 0x524], al
lea eax, [ebp - 0x524]
push eax
push str._s_is_ventoy_part1__already_mounted
call fcn.00414ac0
inc esi
add esp, 8
mov ecx, 1
cmp esi, 0x104
jb 0x40faa0
jmp 0x40fc93
push 0
lea eax, [ebp - 0x51c]
push eax
push 0x200
lea eax, [ebp - 0x314]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x51c]
push esi
push str.Read_MBR_ret:_d_size:_u_err:_d
call fcn.00414ac0
add esp, 0x10
test esi, esi
jne 0x40fb29
mov esi, 1
mov dword [ebp - 0x520], esi
jmp 0x40fa09
push 0x1b8
lea eax, [ebp - 0x314]
push 0
push eax
call fcn.00420f90
add esp, 0xc
lea eax, [ebp - 0x156]
push 0x40
push 0
push eax
call fcn.00420f90
mov ecx, dword [ebx + 0x14]
lea eax, [ebp - 0x156]
mov esi, dword [ebx + 0x10]
add esp, 0xc
mov edx, esi
push eax
mov eax, ecx
shrd edx, eax, 9
push ecx
sub edx, 0x800
mov ecx, 0x800
push esi
call fcn.00415b20
add esp, 0xc
mov byte [ebp - 0x156], 0
lea eax, [ebp - 0x52c]
mov byte [ebp - 0x152], 7
xorps xmm0, xmm0
movlpd qword [ebp - 0x52c], xmm0
push 0
push eax
push dword [ebp - 0x528]
push dword [ebp - 0x52c]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x51c]
push eax
push 0x200
lea eax, [ebp - 0x314]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x51c]
push esi
push str.Write_MBR_ret:_d_size:_u_err:_d
call fcn.00414ac0
add esp, 0x10
test esi, esi
jne 0x40f9dd
mov esi, 1
mov dword [ebp - 0x520], esi
jmp 0x40fa09
cmp ecx, 1
je 0x40fc93
push str.need_to_mount_ventoy_part1...
call fcn.00414ac0
add esp, 4
lea edx, [ebp - 0x114]
push 0
push ecx
mov ecx, dword [ebx + 4]
push 0
push 0x800
call fcn.0040ca50
add esp, 0x10
test eax, eax
jne 0x40fc86
mov bl, byte [ebp - 0x515]
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x524]
mov byte [ebp - 0x524], bl
push eax
call dword [sym.imp.KERNEL32.dll_SetVolumeMountPointA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x524]
push eax
push str.SetVolumeMountPoint___s____s__bRet:_u_code:_u
call fcn.00414ac0
mov eax, dword [ebp - 0x548]
add esp, 0x14
mov byte [eax], bl
jmp 0x40fc93
push str.Failed_to_find_ventoy_volume
call fcn.00414ac0
add esp, 4
push 0x44132c
call fcn.00414ac0
mov esi, dword [ebp - 0x520]
add esp, 4
jmp 0x40fcba
mov esi, dword [ebp - 0x520]
mov edx, ebx
call fcn.00413e20
cmp edi, 0xffffffff
je 0x40fcc1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret