Function at 0x40fce0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x449424]
push ebx
mov ebx, ecx
mov dword [ebp - 0x24], eax
push esi
push edi
mov dword [ebp - 0x14], ebx
mov esi, 1
mov edi, dword [ebx + 0x10]
mov ecx, edi
mov edx, dword [ebx + 0x14]
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0
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 0x40fd57
mov eax, dword [ebx + 0x14]
shrd edi, eax, 0x1e
jmp 0x40fd99
movsd xmm3, qword [0x445588]
xor eax, eax
movd xmm1, esi
cvtdq2pd xmm1, xmm1
comisd xmm1, xmm2
jbe 0x40fd78
movaps xmm0, xmm1
subsd xmm0, xmm2
jmp 0x40fd7f
movaps xmm0, xmm2
subsd xmm0, xmm1
divsd xmm0, xmm1
comisd xmm3, xmm0
ja 0x40fd97
inc eax
add esi, esi
cmp eax, 0xc
jl 0x40fd61
cvttsd2si edi, xmm2
jmp 0x40fd99
mov edi, esi
cmp dword [ebp - 0x24], 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 str.InstallVentoy2FileImage__s_PhyDrive_d____s__s__dGB__
call fcn.00414ac0
mov ecx, 8
call fcn.00418700
push 0x2105000
call fcn.0042442e
mov ebx, eax
add esp, 0x1c
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x40fe1a
push 0x2105000
push str.malloc_image_buffer_failed__d.
call fcn.00414ac0
lea ecx, [ebx + 0x30]
call fcn.00418700
lea ecx, [ebx + 0x41]
call fcn.00418700
push 1
push str.retcode:_d_n
call fcn.00414ac0
add esp, 0x10
lea edi, [ebx + 1]
jmp 0x4105de
lea eax, [ebx + 0x2104e00]
push 0x200
lea edi, [eax - 0xc00]
push 0
push eax
mov dword [ebp - 0x44], edi
call fcn.00420f90
add esp, 0xc
push 0xc00
push 0
push edi
call fcn.00420f90
add esp, 0xc
mov ecx, 0xd
call fcn.00418700
push str.Writing_Boot_Image_.............................
call fcn.00414ac0
add esp, 4
lea eax, [ebp - 0x10]
xor edx, edx
mov ecx, str.bootcore.img.xz
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00414d10
add esp, 8
test eax, eax
je 0x40fe91
push str.Failed_to_read_stage1_img
call fcn.00414ac0
mov esi, 1
mov edi, esi
jmp 0x4105b3
mov esi, dword [ebp - 0xc]
lea eax, [ebp - 8]
mov edx, dword [ebp - 0x10]
push ecx
push eax
push ebx
push 0
push ecx
mov ecx, esi
call fcn.0041ee40
add esp, 0x14
test esi, esi
je 0x40febe
push esi
call fcn.0042422d
add esp, 4
mov dword [ebp - 0xc], 0
push dword [ebp - 8]
push str.bootcore.img.xz
push str.decompress__s_len:_d
call fcn.00414ac0
add esp, 0xc
cmp dword [ebp - 0x24], 0
je 0x40ff9b
push 0xfbc00
lea eax, [ebx + 0x4400]
mov byte [ebx + 0x1f4], 0x23
push ebx
push eax
call fcn.00421640
add esp, 0xc
push 0x4400
push 0
push ebx
call fcn.00420f90
mov esi, dword [ebp - 0x14]
add esp, 0xc
mov ecx, ebx
push dword [esi + 0x14]
push dword [esi + 0x10]
call fcn.00415e80
push 0x4200
lea esi, [ebx + 0x2100000]
push 0
push esi
mov dword [ebp - 0x3c], esi
call fcn.00420f90
add esp, 0x14
lea eax, [ebx + 0x400]
push 0x4000
push eax
push esi
call fcn.00421640
add esp, 0xc
lea edx, [esi + 0x4000]
mov ecx, ebx
call fcn.004161e0
mov ecx, dword [ebx + 0x420]
mov eax, dword [ebx + 0x428]
mov edx, dword [ebx + 0x424]
sub eax, ecx
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebx + 0x42c]
sbb ecx, edx
mov dword [ebp - 0x30], edx
add eax, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x4a0]
adc ecx, 0
mov dword [ebp - 0x34], eax
mov eax, dword [ebx + 0x4a4]
mov dword [ebp - 0x38], eax
mov eax, str.Write_GPT_Info_OK_...
mov dword [ebp - 0x2c], ecx
jmp 0x41000c
push 0xffe00
lea eax, [ebx + 0x200]
push ebx
push eax
call fcn.00421640
add esp, 0xc
push 0x200
push 0
push ebx
call fcn.00420f90
mov ecx, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
push 7
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, ebx
call fcn.00415c50
mov eax, dword [ebx + 0x1c6]
add esp, 0xc
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0x1ca]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x1d6]
mov dword [ebp - 0x34], eax
mov eax, str.Write_MBR_OK_...
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x38], 0
push eax
call fcn.00414ac0
add esp, 4
push str.Writing_EFI_part_Image_.............................
call fcn.00414ac0
add esp, 4
lea eax, [ebp - 0x10]
xor edx, edx
mov ecx, str.ventoy_ventoy.disk.img.xz
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00414d10
add esp, 8
mov dword [ebp - 0x20], eax
mov esi, eax
test eax, eax
je 0x41005c
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push str.Failed_to_read_img_file__p__u
call fcn.00414ac0
add esp, 0xc
mov edi, esi
jmp 0x4105b6
mov ecx, 0x29
call fcn.00418700
push 0x80
push 0
push 0x44ae18
call fcn.00420f90
mov esi, dword [ebp - 0x10]
lea ecx, [ebp - 8]
add esp, 8
lea eax, [ebx + 0x100000]
mov edx, esi
mov dword [ebp - 0x40], eax
push ecx
push eax
push 0
push ecx
mov ecx, dword [ebp - 0xc]
call fcn.0041ee40
add esp, 0x14
cmp dword [ebp - 8], esi
jne 0x4105a4
push str.decompress_finished_success
call fcn.00414ac0
add esp, 4
lea eax, [ebx + 0x100000]
mov dword [0x44ae18], eax
call fcn.0040e5d0
push 0x441420
lea eax, [ebp - 4]
push str.VentoySparseImg.vtsi
push eax
call fcn.0042528c
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x4100e7
push str.Failed_to_create_Ventoy_img_file
jmp 0x4105a9
push str.Writing_stage1_data_.............................
call fcn.00414ac0
add esp, 4
push dword [ebp - 4]
push 0x100000
push 1
push ebx
call fcn.004246d7
mov eax, dword [ebp - 0x1c]
lea ebx, [edi + 8]
add eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
adc ecx, dword [ebp - 0x30]
push 0xbe8
mov dword [0x44b724], ecx
lea ecx, [edi + 0x18]
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [ebx], 0x800
mov dword [ebx + 4], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [0x44b720], eax
mov eax, dword [ebp - 4]
push 0
push ecx
mov dword [0x44b728], 0xffffffff
mov dword [0x4493f0], eax
mov dword [0x4493e4], ecx
call fcn.00420f90
add esp, 0x1c
mov dword [0x4488b0], 0xffffffff
mov dword [0x4493e8], 0x100000
mov dword [0x4493ec], 0
push str.Formatting_part1_exFAT_...
call fcn.00414ac0
mov eax, dword [ebp - 0x14]
add esp, 4
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0040f120
add esp, 8
test eax, eax
je 0x4101ec
push str.FormatPart1exFAT_failed.
call fcn.00414ac0
mov ebx, dword [ebp - 0x18]
xorps xmm0, xmm0
mov dword [0x4493f0], 0
mov dword [0x4493e4], 0
mov dword [0x4488b0], 0xffffffff
movlpd qword [0x4493e8], xmm0
jmp 0x4105ae
mov esi, dword [0x4488b0]
xorps xmm0, xmm0
mov eax, dword [0x4493e8]
add esi, 2
mov ecx, dword [0x4493ec]
push eax
push esi
push str.current_segment_number:_d_dataoff:_ld
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], ecx
mov dword [0x4493f0], 0
mov dword [0x4493e4], 0
mov dword [0x4488b0], 0xffffffff
movlpd qword [0x4493e8], xmm0
call fcn.00414ac0
add esp, 0xc
push str.Writing_part2_data_.............................
call fcn.00414ac0
add esp, 4
push dword [ebp - 4]
push 0x2000000
push 1
push dword [ebp - 0x40]
call fcn.004246d7
mov ecx, dword [ebp - 0x34]
lea eax, [esi + esi*2]
mov edx, dword [ebp - 8]
add esp, 0x10
mov dword [edi + eax*8], ecx
mov ecx, dword [ebp - 0x38]
mov dword [edi + eax*8 + 4], ecx
mov ecx, dword [ebp - 0x10]
mov dword [edi + eax*8 + 0x10], ecx
add ecx, 0x2000000
mov dword [edi + eax*8 + 0x14], edx
adc edx, 0
mov dword [edi + eax*8 + 8], 0x10000
inc esi
mov dword [edi + eax*8 + 0xc], 0
cmp dword [ebp - 0x24], 0
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 0x1c], esi
je 0x410319
push str.Writing_backup_gpt_table_.............................
call fcn.00414ac0
add esp, 4
push dword [ebp - 4]
push 0x4200
push 1
push dword [ebp - 0x3c]
call fcn.004246d7
mov ecx, dword [ebp - 0x14]
lea edx, [esi + esi*2]
add esp, 0x10
mov eax, dword [ecx + 0x10]
mov ecx, dword [ecx + 0x14]
shrd eax, ecx, 9
mov dword [edi + edx*8 + 8], 0x21
shr ecx, 9
add eax, 0xffffffdf
mov dword [edi + edx*8], eax
mov eax, dword [ebp - 0x10]
adc ecx, 0xffffffff
mov dword [edi + edx*8 + 4], ecx
mov ecx, dword [ebp - 8]
mov dword [edi + edx*8 + 0x10], eax
add eax, 0x4200
mov dword [edi + edx*8 + 0x14], ecx
adc ecx, 0
mov dword [edi + edx*8 + 0xc], 0
inc esi
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0x1c], esi
push str.Writing_segment_metadata_.............................
call fcn.00414ac0
add esp, 4
test esi, esi
jle 0x41036c
xor edi, edi
nop dword [eax]
mov esi, dword [ebx + 8]
mov ecx, esi
mov edx, dword [ebx + 0xc]
mov eax, edx
shrd ecx, eax, 9
shr eax, 9
push eax
push ecx
push edx
push esi
push dword [ebx + 4]
push dword [ebx]
push dword [ebx - 4]
push dword [ebx - 8]
push edi
push str.SEG__d_:__PhySector:_llu_SectorNum:_llu_DataOffset:_llu_sector:_llu_
call fcn.00414ac0
mov esi, dword [ebp - 0x1c]
lea ebx, [ebx + 0x18]
inc edi
add esp, 0x28
cmp edi, esi
jl 0x410330
mov edi, dword [ebp - 0x44]
push dword [ebp - 4]
lea ebx, [esi + esi*2]
shl ebx, 3
push ebx
push 1
push edi
mov dword [ebp - 0x20], ebx
call fcn.004246d7
add esp, 0x10
and ebx, 0x800001ff
jns 0x410396
dec ebx
or ebx, 0xfffffe00
add ebx, 1
je 0x4103b9
push dword [ebp - 4]
mov eax, 0x200
sub eax, ebx
mov ebx, dword [ebp - 0x18]
push eax
push 1
lea eax, [ebx + 0xfe000]
push eax
call fcn.004246d7
add esp, 0x10
jmp 0x4103bc
mov ebx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
lea esi, [ebx + 0x2104e00]
mov dword [esi], 0x544e4556
mov dword [esi + 4], 0x594f
mov dword [esi + 8], 1
mov eax, dword [edx + 0x10]
mov ecx, dword [edx + 0x14]
mov dword [esi + 0x10], ecx
mov ecx, dword [ebp - 8]
mov dword [esi + 0xc], eax
mov eax, dword [edx + 0x45c]
mov edx, dword [ebp - 0x1c]
mov dword [esi + 0x28], ecx
mov ecx, dword [ebp - 0x20]
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x1c], edx
mov dword [esi + 0x24], eax
test ecx, ecx
jle 0x410463
cmp ecx, 8
jb 0x410463
xor eax, eax
xorps xmm3, xmm3
xorps xmm2, xmm2
movd xmm1, dword [eax + edi]
xorps xmm0, xmm0
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
paddd xmm3, xmm1
movd xmm1, dword [eax + edi + 4]
punpcklbw xmm1, xmm0
add eax, 8
punpcklwd xmm1, xmm0
paddd xmm2, xmm1
cmp eax, ecx
jl 0x410414
paddd xmm2, xmm3
movaps xmm0, xmm2
psrldq xmm0, 8
paddd xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 4
paddd xmm2, xmm0
movd edi, xmm2
jmp 0x4104c2
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x3c], 0
test ecx, ecx
jle 0x4104c0
mov eax, dword [ebp - 0x20]
xor ecx, ecx
cmp eax, 2
jl 0x4104b3
dec eax
xor ebx, ebx
mov edx, eax
movzx eax, byte [ecx + edi]
add dword [ebp - 0x14], eax
movzx eax, byte [ecx + edi + 1]
add ecx, 2
add ebx, eax
cmp ecx, edx
jl 0x410484
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], ebx
mov ebx, dword [ebp - 0x18]
cmp ecx, dword [ebp - 0x20]
jl 0x4104b5
add eax, dword [ebp - 0x3c]
xor edi, edi
mov edi, eax
jmp 0x4104c2
mov eax, ecx
movzx edi, byte [ecx + edi]
add eax, dword [ebp - 0x3c]
add edi, eax
jmp 0x4104c2
xor edi, edi
not edi
xor eax, eax
mov dword [esi + 0x20], edi
xorps xmm2, xmm2
xorps xmm3, xmm3
nop
movd xmm1, dword [eax + esi]
xorps xmm0, xmm0
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
paddd xmm2, xmm1
movd xmm1, dword [eax + esi + 4]
punpcklbw xmm1, xmm0
add eax, 8
punpcklwd xmm1, xmm0
paddd xmm3, xmm1
cmp eax, 0x200
jb 0x4104d0
push dword [ebp - 8]
mov edi, dword [ebp - 0x10]
paddd xmm3, xmm2
movaps xmm0, xmm3
psrldq xmm0, 8
paddd xmm3, xmm0
movups xmm0, xmm3
psrldq xmm0, 4
paddd xmm3, xmm0
movd eax, xmm3
push edi
push edx
not eax
push str.Writing_footer_segnum__u___segoffset__llu__......................
mov dword [esi + 0x18], eax
call fcn.00414ac0
push dword [esi + 0x28]
push dword [esi + 0x24]
push dword [esi + 0x14]
push dword [esi + 0x10]
push dword [esi + 0xc]
push str.disk_size_llu_disk_signature_lx_segment_offset_llu
call fcn.00414ac0
push dword [ebp - 4]
push 0x200
push 1
push esi
call fcn.004246d7
push dword [ebp - 4]
call fcn.00425151
mov eax, dword [ebp - 0x20]
add esp, 0x3c
add eax, 0x1ff
cdq
and edx, 0x1ff
add eax, edx
and eax, 0xfffffe00
cdq
add eax, edi
adc edx, dword [ebp - 8]
add eax, 0x200
adc edx, 0
push edx
push eax
push str.Writing_Ventoy_image_file_finished__the_file_size_should_be__llu_.
call fcn.00414ac0
add esp, 0xc
xor esi, esi
xor edi, edi
jmp 0x4105b6
push str.decompress_finished_failed
call fcn.00414ac0
mov edi, dword [ebp - 0x20]
mov esi, edi
add esp, 4
mov ecx, 0x30
call fcn.00418700
mov ecx, 0x41
call fcn.00418700
push esi
push str.retcode:_d_n
call fcn.00414ac0
push ebx
call fcn.0042422d
add esp, 0xc
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4105ee
push eax
call fcn.0042422d
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret