Function at 0x410cc0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x43d004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
push ecx
mov dword [ebp - 0x290], eax
mov eax, dword [ebp + 0x14]
push str..PhysicalDrive_d
mov dword [ebp - 0x2a0], eax
lea eax, [ebp - 0x88]
push 0x80
push eax
mov dword [ebp - 0x294], edx
mov dword [ebp - 0x298], ecx
call fcn.00401010
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
mov dword [ebp - 0x29c], edi
call ebx
push eax
lea eax, [ebp - 0x88]
push eax
push edi
push str.Create_file_Handle:_p__s_status:_u
call fcn.0040f530
add esp, 0x10
cmp edi, 0xffffffff
je 0x411224
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.0040f530
add esp, 0x10
test esi, esi
je 0x41121d
cmp dword [ebp - 0x28c], 0x200
jne 0x41121d
mov cl, byte [ebp - 0x8a]
mov al, byte [ebp - 0x89]
cmp cl, 0x55
jne 0x411208
cmp al, 0xaa
jne 0x411208
mov edi, dword [ebp - 0x298]
lea esi, [ebp - 0xc6]
xor ebx, ebx
inc ebx
push ebx
push edi
push str._Disk_d_Partition_Table__d_
call fcn.0040f530
movzx eax, byte [esi - 4]
add esp, 0xc
push eax
push str.PartTbl.Active__0x_x
call fcn.0040f530
movzx eax, byte [esi]
push eax
push str.PartTbl.FsFlag__0x_x
call fcn.0040f530
push dword [esi + 4]
push str.PartTbl.StartSectorId___u
call fcn.0040f530
push dword [esi + 8]
push str.PartTbl.SectorCount___u
call fcn.0040f530
movzx eax, byte [esi - 3]
push eax
push str.PartTbl.StartHead___u
call fcn.0040f530
movzx eax, word [esi - 2]
and eax, 0x3f
push eax
push str.PartTbl.StartSector___u
call fcn.0040f530
movzx eax, word [esi - 2]
shr eax, 6
push eax
push str.PartTbl.StartCylinder___u
call fcn.0040f530
movzx eax, byte [esi + 1]
push eax
push str.PartTbl.EndHead___u
call fcn.0040f530
movzx eax, word [esi + 2]
add esp, 0x40
and eax, 0x3f
push eax
push str.PartTbl.EndSector___u
call fcn.0040f530
movzx eax, word [esi + 2]
shr eax, 6
push eax
push str.PartTbl.EndCylinder___u
call fcn.0040f530
add esp, 0x10
lea esi, [esi + 0x10]
cmp ebx, 4
jl 0x410dd1
cmp byte [ebp - 0xc6], 0xee
mov edi, dword [ebp - 0x29c]
jne 0x4110cc
push 0x4400
call fcn.0041c36a
mov esi, eax
add esp, 4
test esi, esi
je 0x41121d
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 0x41109e
cmp dword [ebp - 0x28c], 0x4400
jne 0x41109e
cmp dword [esi + 0x200], 0x20494645
jne 0x41107e
cmp dword [esi + 0x204], 0x54524150
jne 0x41107e
lea ebx, [esi + 0x4b8]
mov edx, str.VTOYEFI
mov ecx, ebx
mov edi, 0xa
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x411037
add ecx, 4
add edx, 4
sub edi, 4
jae 0x410f30
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x411037
mov ecx, dword [esi + 0x420]
mov eax, dword [esi + 0x424]
cmp ecx, 0x800
jne 0x411015
test eax, eax
jne 0x411015
mov eax, dword [esi + 0x428]
mov ebx, dword [esi + 0x42c]
add eax, 1
mov ecx, dword [esi + 0x4a0]
mov edx, ebx
mov edi, dword [esi + 0x4a4]
adc edx, 0
cmp ecx, eax
jne 0x410fd9
cmp edi, edx
jne 0x410fd9
mov eax, dword [esi + 0x4a8]
sub eax, ecx
cmp eax, 0xffff
jne 0x410fd9
mov edx, dword [ebp - 0x2a0]
mov eax, dword [esi + 0x4b0]
mov ecx, dword [esi + 0x4b4]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x290]
mov eax, dword [esi + 0x4a0]
mov ecx, dword [esi + 0x4a4]
mov dword [edx + 4], ecx
jmp 0x41119b
push dword [esi + 0x4ac]
push dword [esi + 0x4a8]
push edi
push ecx
push ebx
push dword [esi + 0x428]
push 0
push 0x800
push str.Part2_not_match___llu__llu____llu__llu_
call fcn.0040f530
add esp, 0x24
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
mov esp, ebp
pop ebp
ret
push eax
push ecx
push str.Part1_not_match__llu
call fcn.0040f530
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
mov esp, ebp
pop ebp
ret
cmp word [ebx], 0
je 0x41105e
push ebx
push str.Invalid_ventoy_efi_part_name___S_
call fcn.0040f530
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
mov esp, ebp
pop ebp
ret
push str.Invalid_ventoy_efi_part_name__null_
call fcn.0040f530
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
mov esp, ebp
pop ebp
ret
push str.Invalid_GPT_signature
call fcn.0040f530
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
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.0040f530
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc2]
cmp eax, 0x800
je 0x411101
push eax
push str.Part1_not_match__u
call fcn.0040f530
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
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 0x4111d3
cmp ecx, 0x10000
jne 0x4111d3
mov cl, byte [ebp - 0xca]
cmp cl, 0x80
je 0x411188
mov dl, byte [ebp - 0xba]
cmp dl, 0x80
je 0x411188
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.0040f530
mov cl, byte [ebp - 0xaa]
add esp, 0xc
cmp cl, 0x80
je 0x411182
mov al, byte [ebp - 0x9a]
cmp al, 0x80
je 0x411182
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.0040f530
add esp, 0xc
mov eax, dword [ebp - 0xb2]
mov edx, dword [ebp - 0x290]
lea esi, [ebp - 0x288]
mov dword [edx + 4], 0
push dword [ebp - 0x298]
mov edi, dword [ebp - 0x294]
mov ecx, 0x80
mov dword [edx], eax
rep movsd dword es:[edi], dword [esi]
push str.PhysicalDrive_d_is_ventoy_disk
call fcn.0040f530
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
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.0040f530
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
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.0040f530
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.00417710
mov esp, ebp
pop ebp
ret