Function at 0x412350
Capabilities:
Read file on windows
Unmount volume via ioctl
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18fc
call fcn.004344c0
mov eax, dword [0x448004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor eax, eax
mov dword [ebp - 0x18ac], edx
push edi
push 0x104
push eax
mov dword [ebp - 0x18e8], eax
mov ebx, ecx
mov dword [ebp - 0x18dc], eax
mov dword [ebp - 0x18e0], eax
lea eax, [ebp - 0x110]
push eax
mov dword [ebp - 0x18bc], ebx
mov dword [ebp - 0x18c0], 0
mov dword [ebp - 0x18d8], 0
mov dword [ebp - 0x18d0], 0
mov dword [ebp - 0x18cc], 1
mov dword [ebp - 0x18c8], 0x5c3a3f
call fcn.00420f90
add esp, 0xc
mov dword [ebp - 0x18b0], 0
xor edi, edi
mov dword [ebp - 0x18e4], edi
mov dword [ebp - 0x18c4], edi
push 0x4416b0
call fcn.00414ac0
mov edi, dword [ebx + 0x10]
add esp, 4
mov edx, dword [ebx + 0x14]
mov ecx, edi
mov esi, 1
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 0x412436
mov eax, dword [ebx + 0x14]
shrd edi, eax, 0x1e
jmp 0x412478
movsd xmm3, qword [0x445588]
xor eax, eax
movd xmm1, esi
cvtdq2pd xmm1, xmm1
comisd xmm1, xmm2
jbe 0x412457
movaps xmm0, xmm1
subsd xmm0, xmm2
jmp 0x41245e
movaps xmm0, xmm2
subsd xmm0, xmm1
divsd xmm0, xmm1
comisd xmm3, xmm0
ja 0x412476
inc eax
add esi, esi
cmp eax, 0xc
jl 0x412440
cvttsd2si edi, xmm2
jmp 0x412478
mov edi, esi
cmp dword [ebx + 8], 0
lea eax, [ebx + 0xa0]
push edi
push eax
lea eax, [ebx + 0x20]
mov ecx, 0x43f9d0
push eax
push dword [ebx + 4]
mov eax, 0x43f9d4
cmove eax, ecx
push eax
push dword [ebp - 0x18ac]
push str.UpdateVentoy2PhyDrive_try_d__s_PhyDrive_d____s__s__dGB__
call fcn.00414ac0
add esp, 0x1c
push 0x4416b0
call fcn.00414ac0
add esp, 4
mov ecx, 8
call fcn.00418700
push str.Lock_disk_for_umount_............................
call fcn.00414ac0
mov ecx, dword [ebx + 4]
mov dl, 1
push 0
call fcn.0040cd60
mov edi, eax
add esp, 8
mov dword [ebp - 0x18a4], edi
cmp edi, 0xffffffff
jne 0x41250c
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 - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 8], 0
je 0x4125e1
push 0x8800
call fcn.0042442e
mov esi, eax
add esp, 4
mov dword [ebp - 0x18e4], esi
test esi, esi
je 0x4124f6
push 0x8800
push 0
push esi
call fcn.00420f90
add esp, 0xc
lea eax, [esi + 0x4400]
mov dword [ebp - 0x18c4], eax
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18a8]
push eax
push 0x4400
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x4400
lea eax, [esi + 0x4400]
push esi
push eax
call fcn.00421640
mov ecx, 0x80
lea edi, [ebp - 0x16a0]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x18e4]
add esp, 0xc
mov esi, dword [edi + 0x4a0]
mov edi, dword [edi + 0x4a4]
push edi
push esi
push str.GPT_StartSector_in_PartTbl:_llu
mov dword [ebp - 0x18b8], esi
mov dword [ebp - 0x18b4], edi
call fcn.00414ac0
mov ecx, dword [ebx + 0x10]
add esp, 0xc
mov eax, dword [ebx + 0x14]
mov edx, str.GPT_Reserved_Disk_Space:_llu_MB
shrd ecx, eax, 9
shr eax, 9
sub ecx, esi
sbb eax, edi
mov edi, dword [ebp - 0x18a4]
add ecx, 0xfffeffdf
jmp 0x41264a
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18a8]
push eax
push 0x200
lea eax, [ebp - 0x16a0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [ebp - 0x14ca]
xor eax, eax
push eax
push esi
push str.MBR_StartSector_in_PartTbl:_llu
mov dword [ebp - 0x18b8], esi
mov dword [ebp - 0x18b4], eax
call fcn.00414ac0
mov ecx, dword [ebx + 0x10]
add esp, 0xc
mov eax, dword [ebx + 0x14]
mov edx, str.MBR_Reserved_Disk_Space:_llu_MB
shrd ecx, eax, 9
shr eax, 9
sub ecx, esi
sbb eax, 0
add ecx, 0xffff0000
adc eax, 0xffffffff
shrd ecx, eax, 0xb
shr eax, 0xb
push eax
push ecx
push edx
call fcn.00414ac0
add esp, 0xc
push 0
push 0
push 0xff000
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18a8]
push eax
push 0x1000
lea eax, [ebp - 0x1418]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebx + 4]
lea edx, [ebp - 0x110]
push 0x104
call fcn.0040ccb0
add esp, 4
cmp byte [ebp - 0x110], 0
jne 0x4126bc
push str.No_drive_letter_was_assigned...
call fcn.00414ac0
add esp, 4
jmp 0x41273e
lea esi, [ebp - 0x110]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4126c5
sub esi, ecx
test esi, esi
jle 0x41273e
lea edi, [ebp + esi - 0x111]
nop dword [eax]
mov cl, byte [edi]
mov byte [ebp - 0x18c8], cl
call fcn.00415aa0
test eax, eax
jne 0x4126f9
dec esi
dec edi
test esi, esi
jg 0x4126e0
jmp 0x412738
lea eax, [ebp - 0x18c8]
push eax
push str._s_is_ventoy_logical_drive
call fcn.00414ac0
add esp, 8
lea eax, [ebp - 0x18c8]
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 - 0x18c8]
push eax
push str.Delete_mountpoint__s_ret:_u_code:_u
call fcn.00414ac0
add esp, 0x10
mov edi, dword [ebp - 0x18a4]
push 0
lea eax, [ebp - 0x18a8]
push eax
push 0
push 0
push 0
push 0
push 0x9001c
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebx + 8], 1
jne 0x41299e
push dword [ebx + 0x4ac]
mov esi, dword [ebp - 0x18ac]
push dword [ebx + 0x4a8]
push esi
push str.TryId_d_EFI_GPT_partition_type_is_0x_llx
call fcn.00414ac0
add esp, 0x10
mov ecx, 9
call fcn.00418700
cmp esi, 1
jne 0x4128e3
push str.Change_GPT_partition_type_to_ESP
call fcn.00414ac0
mov eax, dword [ebp - 0x18b8]
add esp, 4
mov ecx, dword [ebp - 0x18b4]
mov edi, dword [ebx + 4]
shld ecx, eax, 9
mov dword [ebp - 0x1498], 0xc12a7328
shl eax, 9
mov dword [ebp - 0x18a4], eax
mov dword [ebp - 0x1428], eax
lea eax, [ebp - 0x14a0]
cdq
push edx
push eax
mov dword [ebp - 0x18ac], ecx
mov edx, edi
mov dword [ebp - 0x1424], ecx
lea ecx, [esi + 1]
push 0x404720
mov dword [ebp - 0x1494], 0x11d2f81f
mov dword [ebp - 0x1490], 0xa0004bba
mov dword [ebp - 0x148c], 0x3bc93ec9
call fcn.00403e30
mov esi, eax
add esp, 0xc
test esi, esi
mov edx, str.FAIL
mov eax, str.SUCCESS
cmove eax, edx
push eax
push esi
push edi
push str.VDS_ChangeVtoyEFI2ESP__d_ret:_d___s_
call fcn.00414ac0
add esp, 0x10
test esi, esi
jne 0x4128c8
push dword [ebp - 0x18ac]
mov ecx, edi
push dword [ebp - 0x18a4]
call fcn.00404d60
add esp, 8
test eax, eax
jns 0x412879
push str.FAIL
push esi
push edi
push str.PSHELL_ChangeVtoyEFI2ESP__d__ret:_d___s_
call fcn.00414ac0
add esp, 0x10
jmp 0x41299e
push eax
push edi
push str.Set_Partition__DiskNumber__d__PartitionNumber__d__gpttype_C12A7328_F81F_11D2_BA4B_00A0C93EC93B__Confirm:_false
lea eax, [ebp - 0x418]
push 0x200
push eax
call fcn.00401010
add esp, 0x14
lea ecx, [ebp - 0x418]
call fcn.00404ee0
mov esi, eax
mov ecx, str.FAIL
test esi, esi
mov eax, str.SUCCESS
cmove eax, ecx
push eax
push esi
push edi
push str.PSHELL_ChangeVtoyEFI2ESP__d__ret:_d___s_
call fcn.00414ac0
add esp, 0x10
test esi, esi
je 0x41299e
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xbb8
mov dword [ebp - 0x18d0], 1
call eax
jmp 0x41299e
cmp esi, 2
jne 0x4129e2
push str.Change_GPT_partition_attribute
call fcn.00414ac0
mov eax, dword [ebp - 0x18b8]
lea ecx, [esi - 1]
mov ebx, dword [ebp - 0x18b4]
add esp, 4
mov edi, dword [ebp - 0x18bc]
shld ebx, eax, 9
mov dword [ebp - 0x14a0], 1
shl eax, 9
mov edi, dword [edi + 4]
mov dword [ebp - 0x18ac], eax
mov dword [ebp - 0x1428], eax
lea eax, [ebp - 0x14a0]
cdq
push edx
push eax
push 0x404560
mov edx, edi
mov dword [ebp - 0x149c], 0x80000000
mov dword [ebp - 0x1424], ebx
call fcn.00403e30
add esp, 0xc
mov esi, eax
test esi, esi
mov ecx, str.FAIL
mov eax, str.SUCCESS
cmove eax, ecx
push eax
push esi
push ebx
push dword [ebp - 0x18ac]
push edi
push str.VDS_ChangeVtoyEFIAttr__d__offset:_llu__ret:_d___s_
call fcn.00414ac0
add esp, 0x18
test esi, esi
je 0x412998
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x7d0
mov dword [ebp - 0x18e8], 1
call eax
mov ebx, dword [ebp - 0x18bc]
mov esi, dword [ebp - 0x18b0]
mov ecx, 0xa
call fcn.00418700
push str.Lock_disk_for_update_............................
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 - 0x18bc], edi
cmp edi, 0xffffffff
jne 0x412b32
push str.Failed_to_GetPhysicalHandle_for_write.
jmp 0x4133a2
cmp esi, 3
jne 0x412a13
mov ecx, dword [ebp - 0x18b8]
mov eax, dword [ebp - 0x18b4]
shld eax, ecx, 9
shl ecx, 9
push eax
push ecx
mov ecx, dword [ebx + 4]
call fcn.00401bf0
add esp, 8
mov dword [ebp - 0x18e0], 1
jmp 0x41299e
cmp esi, 4
jne 0x41299e
push str.Clean_disk_GPT_partition_table
call fcn.00414ac0
mov ecx, dword [ebx + 4]
lea edx, [ebp - 0x18b0]
add esp, 4
push dword [ebx + 0x14]
push dword [ebx + 0x10]
call fcn.00412070
add esp, 8
test eax, eax
je 0x412b20
mov ecx, dword [0x44aea0]
push ecx
lea eax, [ecx + 1]
mov dword [0x44aea0], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebx + 4]
lea eax, [ebp - 0x218]
push str.._ventoyphydrive_d__u__d.bin
push 0x104
push eax
call fcn.00401010
push 0x44098c
lea eax, [ebp - 0x218]
mov dword [ebp - 0x18a4], 0
push eax
lea eax, [ebp - 0x18a4]
push eax
call fcn.0042528c
mov eax, dword [ebp - 0x18a4]
add esp, 0x24
test eax, eax
jne 0x412abe
lea eax, [ebp - 0x218]
push eax
push str.Failed_to_open_file__s
call fcn.00414ac0
mov esi, dword [ebp - 0x18b0]
add esp, 8
jmp 0x412ae0
mov esi, dword [ebp - 0x18b0]
push eax
push 0x400000
push 1
push esi
call fcn.004246d7
push dword [ebp - 0x18a4]
call fcn.00425151
add esp, 0x14
lea eax, [ebp - 0x218]
push eax
push str.Save_backup_data_to__s
call fcn.00414ac0
push str.Success_to_backup_data_before_clean
call fcn.00414ac0
mov ecx, dword [ebx + 4]
add esp, 0xc
mov dword [ebp - 0x18dc], 1
call fcn.00401b40
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4129a4
push str.Failed_to_backup_data_before_clean
call fcn.00414ac0
add esp, 4
jmp 0x41299e
mov ecx, 0xb
call fcn.00418700
push str.Lock_volume_for_update_..........................
call fcn.00414ac0
or eax, 0xffffffff
add esp, 4
cmp dword [ebp - 0x18dc], 0
mov dword [ebp - 0x18a4], eax
je 0x412caf
mov ecx, dword [ebx + 0x10]
lea edx, [esi + 0x200000]
mov eax, dword [ebx + 0x14]
add ecx, 0xffe00000
push 0x200000
adc eax, 0xffffffff
push eax
push ecx
mov ecx, edi
call fcn.00412290
add esp, 0xc
lea edx, [esi + 0x4400]
neg eax
mov ecx, edi
sbb eax, eax
push 0x1fbc00
and eax, 1
push 0
push 0x4400
mov dword [ebp - 0x18cc], eax
call fcn.00412290
add esp, 0xc
test eax, eax
jne 0x412bb8
mov dword [ebp - 0x18cc], eax
push str.Volume_not_found__maybe_not_supported
call fcn.00414ac0
add esp, 4
mov eax, dword [ebp - 0x18b8]
lea edx, [ebp - 0x18f8]
mov ecx, dword [ebp - 0x18b4]
push 0
shld ecx, eax, 9
push edx
shl eax, 9
push ecx
push eax
push edi
mov dword [ebp - 0x18ec], ecx
mov dword [ebp - 0x18d4], eax
mov dword [ebp - 0x18f8], eax
mov dword [ebp - 0x18f4], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0x4000
call fcn.0042442e
add esp, 4
mov esi, eax
lea eax, [ebp - 0x18ac]
push 0
push eax
push 0x4000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov edi, eax
call fcn.0042422d
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x18ac]
push edi
push str.Try_write_part2_bRet:_u_dwSize:_u_code:_u
call fcn.00414ac0
add esp, 0x10
test edi, edi
je 0x412c61
cmp dword [ebp - 0x18ac], 0x4000
je 0x412fca
cmp dword [ebp - 0x18d0], 0
je 0x412f2b
push str.TryWritePart2_agagin_...
call fcn.00414ac0
add esp, 4
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x18b4]
mov edi, dword [ebp - 0x18bc]
mov ecx, edi
push dword [ebp - 0x18b8]
call fcn.0040eab0
add esp, 8
test eax, eax
jne 0x412fd0
jmp 0x412f31
cmp dword [ebp - 0x18e0], 0
jne 0x412bb8
cmp dword [ebp - 0x18d0], 0
jne 0x412bb8
xor esi, esi
nop dword [eax + eax]
push 1
push ecx
push dword [ebp - 0x18b4]
mov ecx, dword [ebx + 4]
lea edx, [ebp - 0x110]
push dword [ebp - 0x18b8]
call fcn.0040ca50
add esp, 0x10
mov dword [ebp - 0x18ac], eax
test eax, eax
je 0x412e32
push esi
push str._Volume_not_found__wait_and_retry__d..._
call fcn.00414ac0
add esp, 8
push 2
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 4
jl 0x412cd0
cmp dword [ebp - 0x18ac], 0x490
je 0x412bb8
mov dword [ebp - 0x18c0], 1
mov ecx, 8
call fcn.00418700
mov edx, ebx
call fcn.00413e20
cmp edi, 0xffffffff
je 0x412d51
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18d0], 0
je 0x413468
push str.Recover_GPT_partition_type_to_basic
call fcn.00414ac0
mov edi, dword [ebp - 0x18b8]
add esp, 4
mov eax, dword [ebp - 0x18b4]
mov ecx, dword [ebx + 4]
shld eax, edi, 9
mov dword [ebp - 0x18ac], ecx
mov dword [ebp - 0x18d4], eax
mov dword [ebp - 0x1424], eax
lea eax, [ebp - 0x14a0]
cdq
push edx
push eax
mov edx, ecx
shl edi, 9
push 0x404720
mov ecx, 2
mov dword [ebp - 0x1498], 0xebd0a0a2
mov dword [ebp - 0x1494], 0x4433b9e5
mov dword [ebp - 0x1490], 0xb668c087
mov dword [ebp - 0x148c], 0xc79926b7
mov dword [ebp - 0x1428], edi
call fcn.00403e30
mov esi, eax
add esp, 0xc
test esi, esi
mov ecx, str.FAIL
mov eax, str.SUCCESS
cmove eax, ecx
push eax
push esi
push dword [ebp - 0x18ac]
push str.VDS_ChangeVtoyEFI2Basic__d_ret:_d___s_
call fcn.00414ac0
add esp, 0x10
test esi, esi
jne 0x413468
push dword [ebp - 0x18d4]
mov esi, dword [ebp - 0x18ac]
mov ecx, esi
push edi
call fcn.00404d60
add esp, 8
test eax, eax
jns 0x413421
xor ecx, ecx
jmp 0x413449
lea eax, [ebp - 0x110]
push eax
push str.Now_lock_and_dismount_volume___s_
call fcn.00414ac0
add esp, 8
xor esi, esi
nop dword [eax + eax]
push 0
push 0xa0000080
push 3
push 0
push 1
push 0xc0000000
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18a4], eax
cmp eax, 0xffffffff
jne 0x412eb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_create_file_volume__errcode:_u__wait_and_retry_...
call fcn.00414ac0
add esp, 8
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 4
jl 0x412e50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_create_file_volume__errcode:_u
call fcn.00414ac0
add esp, 8
jmp 0x412bc5
push 0
lea ecx, [ebp - 0x18a8]
push ecx
push 0
push 0
push 0
push 0
push 0x90018
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.FSCTL_LOCK_VOLUME_bRet:_u_code:_u
call fcn.00414ac0
add esp, 0xc
lea eax, [ebp - 0x18a8]
push 0
push eax
mov eax, dword [ebp - 0x18a4]
push 0
push 0
push 0
push 0
push 0x90020
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.FSCTL_DISMOUNT_VOLUME_bRet:_u_code:_u
call fcn.00414ac0
add esp, 0xc
jmp 0x412bc5
mov edi, dword [ebp - 0x18bc]
cmp dword [ebx + 8], 0
jne 0x41339d
mov ecx, edi
call fcn.00411eb0
test eax, eax
je 0x412fbb
push str.MBR_DiskCheckWriteAccess_success
call fcn.00414ac0
add esp, 4
mov dword [ebp - 0x18d8], 1
push str.Try_write_failed__now_delete_partition_2_for_MBR...
call fcn.00414ac0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Now_delete_partition_2...
call fcn.00414ac0
mov ecx, dword [ebx + 4]
add esp, 4
push dword [ebp - 0x18ec]
push dword [ebp - 0x18d4]
call fcn.00401bf0
mov ecx, dword [ebx + 4]
add esp, 4
mov dl, 1
push 1
call fcn.0040cd60
mov edi, eax
mov dword [ebp - 0x18bc], eax
add esp, 8
cmp edi, 0xffffffff
jne 0x412fd0
push str.Failed_to_GetPhysicalHandle_for_write.
jmp 0x4133a2
push str.MBR_DiskCheckWriteAccess_failed
call fcn.00414ac0
add esp, 4
jmp 0x412fd0
mov edi, dword [ebp - 0x18bc]
mov ecx, 0xc
call fcn.00418700
push str.Write_Ventoy_to_disk_............................
call fcn.00414ac0
add esp, 4
mov ecx, edi
push dword [ebp - 0x18b4]
push dword [ebp - 0x18b8]
call fcn.0040eb50
add esp, 8
test eax, eax
jne 0x4133aa
mov esi, dword [ebp - 0x18a4]
cmp esi, 0xffffffff
je 0x413059
push eax
lea eax, [ebp - 0x18a8]
push eax
push 0
push 0
push 0
push 0
push 0x9001c
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.FSCTL_UNLOCK_VOLUME_bRet:_u_code:_u
call fcn.00414ac0
mov eax, dword [ebp - 0x18a4]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
mov dword [ebp - 0x18a4], eax
push str.Updating_Boot_Image_.............................
call fcn.00414ac0
mov edx, dword [ebx + 8]
add esp, 4
mov ecx, edi
call fcn.0040eff0
test eax, eax
jne 0x4133aa
push eax
push eax
push 0xff000
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18a8]
push eax
push 0x1000
lea eax, [ebp - 0x1418]
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 - 0x18a8]
push esi
push str.Write_resv_data_ret:_u_dwSize:_u_Error:_u
call fcn.00414ac0
add esp, 0x10
lea ecx, [ebp - 0x18a0]
call fcn.00416320
cmp dword [ebx + 8], 0
mov ecx, 0x22
movzx eax, byte [ebp - 0x1844]
movups xmm0, xmmword [ebp - 0x1520]
cmovne eax, ecx
mov byte [ebp - 0x1844], al
mov eax, dword [ebp - 0x18d8]
movups xmmword [ebp - 0x1720], xmm0
test eax, eax
jne 0x413136
lea ecx, [ebp - 0x18a0]
mov esi, 0x1b4
lea edx, [ebp - 0x16a0]
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x413130
add ecx, 4
add edx, 4
sub esi, 4
jae 0x413110
push str.Boot_image_has_no_difference__no_need_to_write.
call fcn.00414ac0
add esp, 4
jmp 0x4131a3
mov eax, dword [ebp - 0x18d8]
push eax
push str.Boot_image_need_to_write__u.
call fcn.00414ac0
add esp, 8
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18a8]
mov ecx, 0x6e
push eax
push 0x200
lea esi, [ebp - 0x18a0]
lea edi, [ebp - 0x16a0]
lea eax, [ebp - 0x16a0]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x18bc]
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 - 0x18a8]
push esi
push str.Write_Boot_Image_ret:_u_dwSize:_u_Error:_u
call fcn.00414ac0
add esp, 0x10
cmp dword [ebx + 8], 0
jne 0x41321c
cmp byte [ebp - 0x14e2], 0
jne 0x41321c
cmp byte [ebp - 0x14d2], 0x80
jne 0x41321c
push str.Need_to_chage_1st_partition_active_and_2nd_partition_inactive.
call fcn.00414ac0
add esp, 4
mov byte [ebp - 0x14e2], 0x80
mov byte [ebp - 0x14d2], 0
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18a8]
push eax
push 0x200
lea eax, [ebp - 0x16a0]
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 - 0x18a8]
push esi
push str.Write_NEW_MBR_ret:_u_dwSize:_u_Error:_u
call fcn.00414ac0
add esp, 0x10
cmp dword [ebp - 0x18dc], 0
je 0x41328e
mov esi, dword [ebp - 0x18b0]
mov ecx, edi
push 0x4400
push 0
push 0
mov edx, esi
call fcn.00412290
add esp, 0xc
push esi
test eax, eax
jne 0x413257
call fcn.0042422d
add esp, 4
push str.Write_backup_data_failed
jmp 0x413369
call fcn.0042422d
add esp, 4
cmp dword [ebp - 0x18cc], 0
je 0x41324d
lea eax, [ebp - 0x218]
push eax
push str.Write_backup_data_success__now_delete__s
call fcn.00414ac0
add esp, 8
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x413371
cmp dword [ebp - 0x18e0], 0
je 0x41337c
mov esi, dword [ebp - 0x18c4]
lea edx, [ebp - 0x418]
mov ecx, esi
call fcn.004161e0
mov ecx, dword [esi + 0x220]
lea edx, [ebp - 0x418]
mov eax, dword [esi + 0x224]
shld eax, ecx, 9
push 0x200
shl ecx, 9
push eax
push ecx
mov ecx, edi
call fcn.00412290
add esp, 0xc
mov ecx, 0x200
neg eax
sbb edi, edi
mov eax, esi
and edi, dword [ebp - 0x18cc]
push 0x4000
mov eax, dword [eax + 0x224]
mul ecx
mov edx, 0x200
mov ecx, eax
mov eax, esi
mov eax, dword [eax + 0x220]
mul edx
add ecx, edx
add eax, 0xffffc000
lea edx, [esi + 0x400]
adc ecx, 0xffffffff
push ecx
mov ecx, dword [ebp - 0x18bc]
push eax
call fcn.00412290
mov edx, dword [ebp - 0x18c4]
add esp, 0xc
neg eax
sbb esi, esi
push 0x4200
and esi, edi
lea edx, [edx + 0x200]
mov edi, dword [ebp - 0x18bc]
mov ecx, edi
push 0
push 0x200
call fcn.00412290
add esp, 0xc
mov ecx, str.Write_backup_partition_table_success
neg eax
sbb eax, eax
and eax, esi
mov eax, str.Write_backup_partition_table_failed
cmovne eax, ecx
push eax
call fcn.00414ac0
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [ebp - 0x18a8]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x70140
push edi
call esi
jmp 0x4133ba
push str.TryWritePart2_failed_....
call fcn.00414ac0
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x18c0], 1
mov eax, dword [ebp - 0x18a4]
cmp eax, 0xffffffff
je 0x413402
push 0
lea ecx, [ebp - 0x18a8]
push ecx
push 0
push 0
push 0
push 0
push 0x9001c
push eax
call esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.FSCTL_UNLOCK_VOLUME_bRet:_u_code:_u
call fcn.00414ac0
mov eax, dword [ebp - 0x18a4]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18c0], 0
jne 0x412d34
push 0x4426b0
call fcn.00414ac0
add esp, 4
jmp 0x412d45
push eax
push esi
push str.Set_Partition__DiskNumber__d__PartitionNumber__d__gpttype_ebd0a0a2_b9e5_4433_87c0_68b6b72699c7__Confirm:_false
lea eax, [ebp - 0x418]
push 0x200
push eax
call fcn.00401010
add esp, 0x14
lea ecx, [ebp - 0x418]
call fcn.00404ee0
mov ecx, eax
test ecx, ecx
mov edx, str.FAIL
mov eax, str.SUCCESS
cmove eax, edx
push eax
push ecx
push esi
push str.PSHELL_ChangeVtoyEFI2Basic__d__ret:_d___s_
call fcn.00414ac0
add esp, 0x10
cmp dword [ebx + 8], 1
jne 0x413564
mov eax, dword [ebp - 0x18e8]
test eax, eax
jne 0x413489
cmp byte [ebx + 0x4af], 0xc0
je 0x413564
push 0xc0000000
push 1
push dword [ebx + 0x4ac]
push dword [ebx + 0x4a8]
push eax
push str.Change_EFI_partition_attr__u__0x_llx__to__0x_llx_
call fcn.00414ac0
mov eax, dword [ebp - 0x18b8]
mov ecx, dword [ebp - 0x18b4]
mov edi, dword [ebx + 4]
shld ecx, eax, 9
mov dword [ebp - 0x14a0], 1
shl eax, 9
mov dword [ebp - 0x18b8], eax
mov dword [ebp - 0x1428], eax
lea eax, [ebp - 0x14a0]
cdq
push edx
push eax
mov dword [ebp - 0x18b4], ecx
mov edx, edi
mov dword [ebp - 0x1424], ecx
mov ecx, 1
push 0x404560
mov dword [ebp - 0x149c], 0xc0000000
call fcn.00403e30
add esp, 0x24
mov esi, eax
test esi, esi
mov ecx, str.FAIL
mov eax, str.SUCCESS
cmove eax, ecx
push eax
push esi
push dword [ebp - 0x18b4]
push dword [ebp - 0x18b8]
push edi
push str.VDS_ChangeVtoyEFIAttr__d__offset:_llu__ret:_d___s_
call fcn.00414ac0
add esp, 0x18
test esi, esi
je 0x413557
push str.Change_EFI_partition_attr_success
call fcn.00414ac0
mov dword [ebx + 0x4a8], 1
mov dword [ebx + 0x4ac], 0xc0000000
jmp 0x413561
push str.Change_EFI_partition_attr_failed
call fcn.00414ac0
add esp, 4
mov eax, dword [ebp - 0x18e4]
test eax, eax
je 0x413577
push eax
call fcn.0042422d
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x18c0]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret