Function at 0x409f00
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, 0x598
mov eax, dword [0x43d004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x154]
push edi
push 0x104
mov ebx, edx
mov dword [ebp - 0x594], esi
push 0
push eax
mov dword [ebp - 0x58c], ebx
mov dword [ebp - 0x564], 0
mov dword [ebp - 0x560], 0x5c3a3f
call fcn.00418c40
mov byte [esi], 0
add esp, 0xc
mov edi, dword [ebx + 0x10]
mov esi, 1
mov edx, dword [ebx + 0x14]
mov ecx, edi
mov dword [ebp - 0x568], 0
call fcn.0042c390
movsd xmm1, qword [0x43b198]
movaps xmm2, xmm0
divsd xmm2, xmm1
mov eax, edi
and eax, 0x3fffffff
or eax, 0
divsd xmm2, xmm1
divsd xmm2, xmm1
jne 0x409f9c
mov eax, dword [ebx + 0x14]
shrd edi, eax, 0x1e
jmp 0x409fe8
movsd xmm3, qword [0x43b130]
xor eax, eax
nop word [eax + eax]
movd xmm1, esi
cvtdq2pd xmm1, xmm1
comisd xmm1, xmm2
jbe 0x409fc7
movaps xmm0, xmm1
subsd xmm0, xmm2
jmp 0x409fce
movaps xmm0, xmm2
subsd xmm0, xmm1
divsd xmm0, xmm1
comisd xmm3, xmm0
ja 0x409fe6
inc eax
add esi, esi
cmp eax, 0xc
jl 0x409fb0
cvttsd2si edi, xmm2
jmp 0x409fe8
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.0040f530
add esp, 0x14
push 0
push 8
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b138]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push str.Lock_disk_for_clean_.............................
call fcn.0040f530
mov ecx, dword [ebx + 4]
mov dl, 1
push 0
call fcn.004081a0
mov esi, eax
add esp, 8
mov dword [ebp - 0x578], esi
cmp esi, 0xffffffff
jne 0x40a095
push str.Failed_to_open_physical_disk
call fcn.0040f530
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00417710
mov esp, ebp
pop ebp
ret
push ecx
mov ecx, dword [ebx + 4]
lea edx, [ebp - 0x154]
call fcn.004080f0
add esp, 4
cmp byte [ebp - 0x154], 0
jne 0x40a0f8
push str.No_drive_letter_was_assigned...
call fcn.0040f530
add esp, 4
mov byte [ebp - 0x555], 0x44
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov cl, byte [ebp - 0x555]
shr eax, 3
test al, 1
je 0x40a0df
shr eax, 1
inc cl
test al, 1
jne 0x40a0d7
movsx eax, cl
push eax
push str.GetFirstUnusedDriveLetter__C:_...
mov byte [ebp - 0x560], cl
call fcn.0040f530
add esp, 8
jmp 0x40a167
lea edi, [ebp - 0x154]
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x40a101
sub edi, ecx
test edi, edi
jle 0x40a167
lea ebx, [ebp + edi - 0x155]
nop word [eax + eax]
mov al, byte [ebx]
mov byte [ebp - 0x560], al
lea eax, [ebp - 0x560]
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 - 0x560]
push eax
push str.Delete_mountpoint__s_ret:_u_code:_u
call fcn.0040f530
dec edi
lea ebx, [ebx - 1]
add esp, 0x10
test edi, edi
jg 0x40a120
mov ebx, dword [ebp - 0x58c]
mov esi, dword [ebp - 0x578]
mov al, byte [ebp - 0x560]
mov byte [ebp - 0x555], al
movsx eax, al
push eax
push str.Will_use__C:_as_volume_mountpoint
call fcn.0040f530
add esp, 8
lea eax, [ebp - 0x55c]
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]
push 0
push 9
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b140]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov edi, dword [ebx + 4]
mov ecx, 1
push 0
push 0
push 0x402bc0
mov edx, edi
call fcn.00402600
mov esi, eax
add esp, 0xc
mov ecx, str.FAIL
test esi, esi
mov eax, str.SUCCESS
cmove eax, ecx
push eax
push esi
push edi
push str.VDS_DeleteAllPartitions__d_ret:_d___s_
call fcn.0040f530
add esp, 0x10
test esi, esi
jne 0x40a244
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Notice:_Could_not_delete_partitions:__u
call fcn.0040f530
add esp, 8
push str.Deleting_all_partitions_........................._OK
call fcn.0040f530
add esp, 4
push 0
push 0xa
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b148]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push str.Lock_disk_for_write_.............................
call fcn.0040f530
mov ecx, dword [ebx + 4]
mov dl, 1
push 1
call fcn.004081a0
mov edi, eax
add esp, 8
mov dword [ebp - 0x590], edi
cmp edi, 0xffffffff
jne 0x40a2dc
push str.Failed_to_GetPhysicalHandle_for_write.
call fcn.0040f530
add esp, 4
mov esi, 1
mov dword [ebp - 0x564], esi
jmp 0x40a8d2
push 0x200000
call fcn.0041c36a
add esp, 4
mov dword [ebp - 0x568], eax
test eax, eax
jne 0x40a2fa
push str.Failed_to_alloc_memory.
jmp 0x40a2c4
push 0x200000
push 0
push eax
call fcn.00418c40
add esp, 0xc
mov dword [ebp - 0x574], 0x200
lea eax, [ebp - 0x574]
mov dword [ebp - 0x570], 0
push 0
push eax
push 0
push 0x200
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x55c]
push eax
push 0x1ffe00
push dword [ebp - 0x568]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x55c]
push esi
push str.Write_fisrt_1MB_ret:_d_size:_u_err:_d
call fcn.0040f530
add esp, 0x10
test esi, esi
je 0x40a2cc
mov ecx, dword [ebx + 0x10]
lea edx, [ebp - 0x574]
mov eax, dword [ebx + 0x14]
sub ecx, 0x200000
push 0
push edx
sbb eax, 0
mov dword [ebp - 0x574], ecx
push eax
push ecx
push edi
mov dword [ebp - 0x570], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x55c]
push eax
push 0x200000
push dword [ebp - 0x568]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x55c]
push esi
push str.Write_2nd_1MB_ret:_d_size:_u_err:_d
call fcn.0040f530
add esp, 0x10
test esi, esi
je 0x40a2cc
push 0
lea eax, [ebp - 0x574]
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x574], xmm0
push dword [ebp - 0x570]
push dword [ebp - 0x574]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edx, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x10]
cmp edx, 0x200
jb 0x40a79c
ja 0x40a425
test ecx, ecx
je 0x40a79c
mov eax, dword [ebp - 0x568]
mov edi, ecx
mov ebx, edx
push edx
shrd edi, ebx, 9
lea esi, [eax + 0x200]
mov dword [ebp - 0x578], esi
lea esi, [eax + 0x400]
push ecx
mov ecx, eax
shr ebx, 9
mov dword [ebp - 0x588], esi
call fcn.00410750
mov edx, dword [ebp - 0x568]
add esp, 8
mov esi, dword [ebp - 0x578]
mov ecx, edi
add ecx, 0xffffffff
mov eax, ebx
adc eax, 0xffffffff
mov dword [edx + 0x218], 1
add edi, 0xffffffde
mov dword [edx + 0x224], eax
mov dword [esi], 0x20494645
lea eax, [edx + 0x238]
mov dword [esi + 4], 0x54524150
adc ebx, 0xffffffff
mov esi, dword [sym.imp.ole32.dll_CoCreateGuid]
mov byte [edx + 0x20a], 1
push eax
mov dword [edx + 0x20c], 0x5c
mov dword [edx + 0x210], 0
mov dword [edx + 0x21c], 0
mov dword [edx + 0x220], ecx
mov dword [edx + 0x228], 0x22
mov dword [edx + 0x22c], 0
mov dword [edx + 0x230], edi
mov dword [edx + 0x234], ebx
call esi
mov eax, dword [ebp - 0x568]
mov dword [eax + 0x248], 2
mov dword [eax + 0x24c], 0
mov dword [eax + 0x250], 0x80
mov dword [eax + 0x254], 0x80
mov eax, dword [ebp - 0x588]
movups xmm0, xmmword [0x43d8e4]
movups xmmword [eax], xmm0
add eax, 0x10
push eax
call esi
mov eax, dword [ebp - 0x588]
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 + 0x432ec0]
movzx ecx, byte [esi - 5]
movzx eax, dl
xor ecx, eax
shr edx, 8
movzx eax, byte [esi - 4]
xor edx, dword [ecx*4 + 0x432ec0]
movzx ecx, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x432ec0]
movzx ecx, byte [esi - 3]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x432ec0]
sub edi, 1
jne 0x40a572
mov esi, dword [ebp - 0x568]
not edx
mov edi, dword [esi + 0x20c]
mov dword [esi + 0x258], edx
or edx, 0xffffffff
test edi, edi
je 0x40a601
mov ebx, dword [ebp - 0x578]
movzx ecx, byte [ebx]
lea ebx, [ebx + 1]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x432ec0]
sub edi, 1
jne 0x40a5e7
mov ebx, dword [ebp - 0x58c]
not edx
mov edi, dword [ebp - 0x590]
mov dword [esi + 0x210], edx
lea edx, [ebp - 0x584]
push 0
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
sub ecx, 0x200
push edx
sbb eax, 0
mov dword [ebp - 0x584], ecx
push eax
push ecx
push edi
mov dword [ebp - 0x580], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
lea edx, [ebp - 0x554]
mov ecx, esi
call fcn.00410b80
push 0
lea eax, [ebp - 0x55c]
push eax
push 0x200
lea eax, [ebp - 0x554]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a69e
mov esi, 1
mov dword [ebp - 0x564], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4400
push dword [ebp - 0x55c]
push str.Write_GPT_Backup_Head_Failed__dwSize:_u___u__ErrCode:_u
call fcn.0040f530
add esp, 0x10
jmp 0x40a8d2
mov ecx, dword [ebx + 0x10]
lea edx, [ebp - 0x584]
mov eax, dword [ebx + 0x14]
sub ecx, 0x4200
push 0
push edx
sbb eax, 0
mov dword [ebp - 0x584], ecx
push eax
push ecx
push edi
mov dword [ebp - 0x580], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x55c]
push eax
push 0x4000
lea eax, [esi + 0x400]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a71a
mov esi, 1
mov dword [ebp - 0x564], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4400
push dword [ebp - 0x55c]
push str.Write_GPT_Backup_Part_Table_Failed__dwSize:_u___u__ErrCode:_u
call fcn.0040f530
add esp, 0x10
jmp 0x40a8d2
push 0
lea eax, [ebp - 0x584]
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x584], xmm0
push dword [ebp - 0x580]
push dword [ebp - 0x584]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x55c]
push eax
push 0x4400
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a78a
mov esi, 1
mov dword [ebp - 0x564], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4400
push dword [ebp - 0x55c]
push str.Write_GPT_Info_Failed__dwSize:_u___u__ErrCode:_u
call fcn.0040f530
add esp, 0x10
jmp 0x40a8d2
push str.Write_GPT_Info_OK_...
call fcn.0040f530
add esp, 4
jmp 0x40a8a6
push 0
lea eax, [ebp - 0x55c]
push eax
push 0x200
lea eax, [ebp - 0x354]
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 - 0x55c]
push esi
push str.Read_MBR_ret:_d_size:_u_err:_d
call fcn.0040f530
add esp, 0x10
test esi, esi
je 0x40a2cc
push 0x1b8
lea eax, [ebp - 0x354]
push 0
push eax
call fcn.00418c40
add esp, 0xc
lea eax, [ebp - 0x196]
push 0x40
push 0
push eax
call fcn.00418c40
mov ecx, dword [ebx + 0x14]
lea eax, [ebp - 0x196]
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.004104c0
add esp, 0xc
mov byte [ebp - 0x196], 0
lea eax, [ebp - 0x574]
mov byte [ebp - 0x192], 7
xorps xmm0, xmm0
movlpd qword [ebp - 0x574], xmm0
push 0
push eax
push dword [ebp - 0x570]
push dword [ebp - 0x574]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x55c]
push eax
push 0x200
lea eax, [ebp - 0x354]
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 - 0x55c]
push esi
push str.Write_MBR_ret:_d_size:_u_err:_d
call fcn.0040f530
add esp, 0x10
test esi, esi
je 0x40a2cc
push str.Clear_Ventoy_successfully_finished
call fcn.0040f530
add esp, 4
lea eax, [ebp - 0x55c]
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
push 0
push 0x30
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b188]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [ebp - 0x568]
test eax, eax
je 0x40a92d
push eax
call fcn.0041bffb
add esp, 4
test esi, esi
jne 0x40aa6e
push str.Mounting_Ventoy_Partition_.......................
call fcn.0040f530
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x104
lea eax, [ebp - 0x154]
push esi
push eax
call fcn.00418c40
mov ecx, dword [ebx + 4]
lea edx, [ebp - 0x154]
add esp, 8
call fcn.004080f0
add esp, 4
lea eax, [ebp - 0x154]
push eax
push str.Logical_drive_letter_after_write_ventoy:___s_
call fcn.0040f530
add esp, 8
xor ecx, ecx
nop dword [eax]
mov al, byte [ebp + esi - 0x154]
test al, al
je 0x40a9c8
mov byte [ebp - 0x560], al
lea eax, [ebp - 0x560]
push eax
push str._s_is_ventoy_part1__already_mounted
call fcn.0040f530
inc esi
add esp, 8
mov ecx, 1
cmp esi, 0x104
jb 0x40a990
jmp 0x40aa59
cmp ecx, 1
je 0x40aa59
push str.need_to_mount_ventoy_part1...
call fcn.0040f530
add esp, 4
lea edx, [ebp - 0x154]
push 0
push ecx
mov ecx, dword [ebx + 4]
push 0
push 0x800
call fcn.00407e90
add esp, 0x10
test eax, eax
jne 0x40aa4c
mov bl, byte [ebp - 0x555]
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x560]
mov byte [ebp - 0x560], 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 - 0x154]
push eax
lea eax, [ebp - 0x560]
push eax
push str.SetVolumeMountPoint___s____s__bRet:_u_code:_u
call fcn.0040f530
mov eax, dword [ebp - 0x594]
add esp, 0x14
mov byte [eax], bl
jmp 0x40aa59
push str.Failed_to_find_ventoy_volume
call fcn.0040f530
add esp, 4
push 0x437b04
call fcn.0040f530
mov esi, dword [ebp - 0x564]
add esp, 4
jmp 0x40aa75
mov edx, ebx
call fcn.0040e890
cmp edi, 0xffffffff
je 0x40aa81
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.00417710
mov esp, ebp
pop ebp
ret