Function at 0x40e0b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x29c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
push ecx
mov dword [ebp - 0x294], eax
mov eax, dword [ebp + 0x14]
push str..PhysicalDrive_d
mov dword [ebp - 0x298], eax
lea eax, [ebp - 0x88]
push 0x80
push eax
mov dword [ebp - 0x290], edx
mov dword [ebp - 0x29c], ecx
call fcn.004136cf
add esp, 0x10
lea eax, [ebp - 0x88]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call ebx
push eax
lea eax, [ebp - 0x88]
push eax
push edi
push str.Create_file_Handle:_p__s_status:_u
call fcn.0040c4e0
add esp, 0x10
cmp edi, 0xffffffff
je 0x40e607
push 0
lea eax, [ebp - 0x28c]
push eax
push 0x200
lea eax, [ebp - 0x288]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call ebx
push eax
push dword [ebp - 0x28c]
push esi
push str.Read_MBR_Ret:_u_Size:_u_code:_u
call fcn.0040c4e0
add esp, 0x10
test esi, esi
je 0x40e600
cmp dword [ebp - 0x28c], 0x200
jne 0x40e600
mov cl, byte [ebp - 0x8a]
mov al, byte [ebp - 0x89]
cmp cl, 0x55
jne 0x40e5eb
cmp al, 0xaa
jne 0x40e5eb
xor ebx, ebx
lea esi, [ebp - 0xc6]
inc ebx
push ebx
push str._Partition_Table__d_
call fcn.0040c4e0
movzx eax, byte [esi - 4]
push eax
push str.PartTbl.Active__0x_x
call fcn.0040c4e0
movzx eax, byte [esi]
push eax
push str.PartTbl.FsFlag__0x_x
call fcn.0040c4e0
push dword [esi + 4]
push str.PartTbl.StartSectorId___u
call fcn.0040c4e0
push dword [esi + 8]
push str.PartTbl.SectorCount___u
call fcn.0040c4e0
movzx eax, byte [esi - 3]
push eax
push str.PartTbl.StartHead___u
call fcn.0040c4e0
movzx eax, word [esi - 2]
and eax, 0x3f
push eax
push str.PartTbl.StartSector___u
call fcn.0040c4e0
movzx eax, word [esi - 2]
shr eax, 6
push eax
push str.PartTbl.StartCylinder___u
call fcn.0040c4e0
movzx eax, byte [esi + 1]
add esp, 0x40
push eax
push str.PartTbl.EndHead___u
call fcn.0040c4e0
movzx eax, word [esi + 2]
and eax, 0x3f
push eax
push str.PartTbl.EndSector___u
call fcn.0040c4e0
movzx eax, word [esi + 2]
shr eax, 6
push eax
push str.PartTbl.EndCylinder___u
call fcn.0040c4e0
add esp, 0x18
lea esi, [esi + 0x10]
cmp ebx, 4
jl 0x40e1b5
cmp byte [ebp - 0xc6], 0xee
jne 0x40e4af
push 0x4400
call fcn.00413be0
mov esi, eax
add esp, 4
test esi, esi
je 0x40e600
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x28c]
push eax
push 0x4400
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40e481
cmp dword [ebp - 0x28c], 0x4400
jne 0x40e481
cmp dword [esi + 0x200], 0x20494645
jne 0x40e461
cmp dword [esi + 0x204], 0x54524150
jne 0x40e461
lea ebx, [esi + 0x4b8]
mov edx, str.VTOYEFI
mov ecx, ebx
mov edi, 0xa
lea ebx, [ebx]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40e41a
add ecx, 4
add edx, 4
sub edi, 4
jae 0x40e310
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x40e41a
mov ecx, dword [esi + 0x420]
mov eax, dword [esi + 0x424]
cmp ecx, 0x800
jne 0x40e3f8
test eax, eax
jne 0x40e3f8
mov eax, dword [esi + 0x428]
mov ebx, dword [esi + 0x42c]
add eax, 1
mov edi, dword [esi + 0x4a0]
mov ecx, ebx
mov edx, dword [esi + 0x4a4]
adc ecx, 0
cmp edi, eax
jne 0x40e3bc
cmp edx, ecx
jne 0x40e3bc
mov eax, dword [esi + 0x4a8]
sub eax, edi
inc eax
cmp eax, 0x10000
jne 0x40e3bc
mov ecx, dword [ebp - 0x298]
mov eax, dword [esi + 0x4b0]
mov dword [ecx], eax
mov eax, dword [esi + 0x4b4]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x294]
mov eax, dword [esi + 0x4a0]
mov dword [ecx], eax
mov eax, dword [esi + 0x4a4]
mov dword [ecx + 4], eax
jmp 0x40e580
push dword [esi + 0x4ac]
push dword [esi + 0x4a8]
push edx
push edi
push ebx
push dword [esi + 0x428]
push 0
push 0x800
push str.Part2_not_match___llu__llu____llu__llu_
call fcn.0040c4e0
add esp, 0x24
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
push eax
push ecx
push str.Part1_not_match__llu
call fcn.0040c4e0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
cmp word [ebx], 0
je 0x40e441
push ebx
push str.Invalid_ventoy_efi_part_name___S_
call fcn.0040c4e0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
push str.Invalid_ventoy_efi_part_name__null_
call fcn.0040c4e0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
push str.Invalid_GPT_signature
call fcn.0040c4e0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x28c]
push ebx
push str.Failed_to_read_gpt_info__d__u__d
call fcn.0040c4e0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc2]
cmp eax, 0x800
je 0x40e4e4
push eax
push str.Part1_not_match__u
call fcn.0040c4e0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xbe]
mov eax, dword [ebp - 0xb2]
add edx, 0x800
mov ecx, dword [ebp - 0xae]
cmp eax, edx
jne 0x40e5b6
cmp ecx, 0x10000
jne 0x40e5b6
mov cl, byte [ebp - 0xca]
cmp cl, 0x80
je 0x40e56b
mov dl, byte [ebp - 0xba]
cmp dl, 0x80
je 0x40e56b
movzx eax, dl
push eax
movzx eax, cl
push eax
push str.Part1_and_Part2_are_both_NOT_active_0x_x_0x_x
call fcn.0040c4e0
mov cl, byte [ebp - 0xaa]
add esp, 0xc
cmp cl, 0x80
je 0x40e565
mov al, byte [ebp - 0x9a]
cmp al, 0x80
je 0x40e565
movzx eax, al
push eax
movzx eax, cl
push eax
push str.Part3_and_Part4_are_both_NOT_active_0x_x_0x_x
call fcn.0040c4e0
add esp, 0xc
mov eax, dword [ebp - 0xb2]
mov ecx, dword [ebp - 0x294]
lea esi, [ebp - 0x288]
mov dword [ecx], eax
mov dword [ecx + 4], 0
push dword [ebp - 0x29c]
mov edi, dword [ebp - 0x290]
mov ecx, 0x80
rep movsd dword es:[edi], dword [esi]
push str.PhysicalDrive_d_is_ventoy_disk
call fcn.0040c4e0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
push 0x10000
push ecx
push edx
push eax
movzx eax, byte [ebp - 0xb6]
push 0xef
push eax
push str.Part2_not_match__0x_x_0x_x____u__u____u__u_
call fcn.0040c4e0
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
movzx eax, al
push eax
movzx eax, cl
push eax
push str.Byte55_ByteAA_not_match_0x_x_0x_x
call fcn.0040c4e0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004136c0
mov esp, ebp
pop ebp
ret