Function at 0x4163e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x448004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov eax, ecx
mov dword [ebp - 0x32c], edx
mov ecx, dword [ebp + 0x10]
xorps xmm0, xmm0
push edi
push eax
push str..PhysicalDrive_d
mov dword [ebp - 0x324], eax
lea eax, [ebp - 0x108]
mov dword [ebp - 0x328], ecx
mov ecx, dword [ebp + 0x14]
push 0x80
push eax
mov dword [ebp - 0x334], ecx
movups xmmword [ebp - 0x118], xmm0
call fcn.00401010
add esp, 0x10
lea eax, [ebp - 0x108]
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 - 0x108]
push eax
push edi
push str.Create_file_Handle:_p__s_status:_u
call fcn.00414ac0
add esp, 0x10
cmp edi, 0xffffffff
je 0x416ad5
push 0
lea eax, [ebp - 0x31c]
push eax
push 0x200
lea eax, [ebp - 0x318]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call ebx
push eax
push dword [ebp - 0x31c]
push esi
push str.Read_MBR_Ret:_u_Size:_u_code:_u
call fcn.00414ac0
add esp, 0x10
test esi, esi
je 0x416ace
cmp dword [ebp - 0x31c], 0x200
jne 0x416ace
mov cl, byte [ebp - 0x11a]
mov al, byte [ebp - 0x119]
cmp cl, 0x55
jne 0x416ab9
cmp al, 0xaa
jne 0x416ab9
cmp byte [ebp - 0x156], 0xee
jne 0x4168b0
push 0x4400
call fcn.0042442e
mov ebx, eax
add esp, 4
mov dword [ebp - 0x330], ebx
test ebx, ebx
je 0x416ace
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x31c]
push eax
push 0x4400
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x416882
cmp dword [ebp - 0x31c], 0x4400
jne 0x416882
cmp dword [ebx + 0x200], 0x20494645
jne 0x416862
cmp dword [ebx + 0x204], 0x54524150
jne 0x416862
lea edi, [ebx + 0x40e]
mov dword [ebp - 0x320], 0
mov ebx, dword [ebp - 0x324]
nop dword [eax]
lea edx, [edi + 2]
mov esi, 0xc
lea eax, [ebp - 0x118]
nop
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x4165b6
add edx, 4
add eax, 4
sub esi, 4
jae 0x4165a0
jmp 0x4166d3
mov eax, dword [ebp - 0x320]
inc eax
push eax
push ebx
push str._Disk_d_GPT_Partition__d_
call fcn.00414ac0
movzx eax, byte [edi + 1]
add esp, 0xc
push eax
movzx eax, byte [edi]
push eax
movzx eax, byte [edi - 1]
push eax
movzx eax, byte [edi - 2]
push eax
movzx eax, byte [edi - 3]
push eax
movzx eax, byte [edi - 4]
push eax
movzx eax, byte [edi - 5]
push eax
movzx eax, byte [edi - 6]
push eax
movzx eax, word [edi - 8]
push eax
movzx eax, word [edi - 0xa]
push eax
push dword [edi - 0xe]
lea eax, [ebp - 0x88]
push str._08x__04x__04x__02x_02x__02x_02x_02x_02x_02x_02x
push 0x80
push eax
call fcn.00401010
lea eax, [ebp - 0x88]
push eax
push str.PartTbl.PartType___s
call fcn.00414ac0
movzx eax, byte [edi + 0x11]
add esp, 0x40
push eax
movzx eax, byte [edi + 0x10]
push eax
movzx eax, byte [edi + 0xf]
push eax
movzx eax, byte [edi + 0xe]
push eax
movzx eax, byte [edi + 0xd]
push eax
movzx eax, byte [edi + 0xc]
push eax
movzx eax, byte [edi + 0xb]
push eax
movzx eax, byte [edi + 0xa]
push eax
movzx eax, word [edi + 8]
push eax
movzx eax, word [edi + 6]
push eax
push dword [edi + 2]
lea eax, [ebp - 0x88]
push str._08x__04x__04x__02x_02x__02x_02x_02x_02x_02x_02x
push 0x80
push eax
call fcn.00401010
lea eax, [ebp - 0x88]
push eax
push str.PartTbl.PartGuid___s
call fcn.00414ac0
add esp, 0x40
push dword [edi + 0x16]
push dword [edi + 0x12]
push str.PartTbl.StartLBA___llu
call fcn.00414ac0
add esp, 0xc
push dword [edi + 0x1e]
push dword [edi + 0x1a]
push str.PartTbl.LastLBA___llu
call fcn.00414ac0
add esp, 0xc
push dword [edi + 0x26]
push dword [edi + 0x22]
push str.PartTbl.Attribute__0x_llx
call fcn.00414ac0
add esp, 0xc
lea eax, [edi + 0x2a]
push eax
push str.PartTbl.Name___S
call fcn.00414ac0
add esp, 8
mov ecx, dword [ebp - 0x320]
sub edi, 0xffffff80
inc ecx
mov dword [ebp - 0x320], ecx
cmp ecx, 0x80
jl 0x416590
mov ebx, dword [ebp - 0x330]
mov edx, str.VTOYEFI
mov esi, 0xa
lea edi, [ebx + 0x4b8]
mov ecx, edi
nop word [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x41681b
add ecx, 4
add edx, 4
sub esi, 4
jae 0x416710
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x41681b
mov ecx, dword [ebx + 0x420]
mov eax, dword [ebx + 0x424]
cmp ecx, 0x800
jne 0x4167f9
test eax, eax
jne 0x4167f9
mov eax, dword [ebx + 0x428]
mov edi, dword [ebx + 0x42c]
add eax, 1
mov ecx, dword [ebx + 0x4a0]
mov edx, edi
mov esi, dword [ebx + 0x4a4]
adc edx, 0
cmp ecx, eax
jne 0x4167bd
cmp esi, edx
jne 0x4167bd
mov eax, dword [ebx + 0x4a8]
sub eax, ecx
cmp eax, 0xffff
jne 0x4167bd
mov edx, dword [ebp - 0x334]
mov esi, ebx
mov eax, dword [ebx + 0x4b0]
mov ecx, dword [ebx + 0x4b4]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x328]
mov eax, dword [ebx + 0x4a0]
mov ecx, dword [ebx + 0x4a4]
mov dword [edx], eax
mov dword [edx + 4], ecx
jmp 0x416a4e
push dword [ebx + 0x4ac]
push dword [ebx + 0x4a8]
push esi
push ecx
push edi
push dword [ebx + 0x428]
push 0
push 0x800
push str.Part2_not_match___llu__llu____llu__llu_
call fcn.00414ac0
add esp, 0x24
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
push eax
push ecx
push str.Part1_not_match__llu
call fcn.00414ac0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
cmp word [edi], 0
je 0x416842
push edi
push str.Invalid_ventoy_efi_part_name___S_
call fcn.00414ac0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
push str.Invalid_ventoy_efi_part_name__null_
call fcn.00414ac0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
push str.Invalid_GPT_signature
call fcn.00414ac0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x31c]
push esi
push str.Failed_to_read_gpt_info__d__u__d
call fcn.00414ac0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
lea esi, [ebp - 0x156]
nop
inc edi
push edi
push dword [ebp - 0x324]
push str._Disk_d_MBR_Partition__d_
call fcn.00414ac0
movzx eax, byte [esi - 4]
add esp, 0xc
push eax
push str.PartTbl.Active__0x_x
call fcn.00414ac0
movzx eax, byte [esi]
push eax
push str.PartTbl.FsFlag__0x_x
call fcn.00414ac0
push dword [esi + 4]
push str.PartTbl.StartSectorId___u
call fcn.00414ac0
push dword [esi + 8]
push str.PartTbl.SectorCount___u
call fcn.00414ac0
movzx eax, byte [esi - 3]
push eax
push str.PartTbl.StartHead___u
call fcn.00414ac0
movzx eax, word [esi - 2]
and eax, 0x3f
push eax
push str.PartTbl.StartSector___u
call fcn.00414ac0
movzx eax, word [esi - 2]
shr eax, 6
push eax
push str.PartTbl.StartCylinder___u
call fcn.00414ac0
movzx eax, byte [esi + 1]
push eax
push str.PartTbl.EndHead___u
call fcn.00414ac0
movzx eax, word [esi + 2]
add esp, 0x40
and eax, 0x3f
push eax
push str.PartTbl.EndSector___u
call fcn.00414ac0
movzx eax, word [esi + 2]
shr eax, 6
push eax
push str.PartTbl.EndCylinder___u
call fcn.00414ac0
add esp, 0x10
lea esi, [esi + 0x10]
cmp edi, 4
jl 0x4168c0
mov eax, dword [ebp - 0x152]
cmp eax, 0x800
je 0x4169b2
push eax
push str.Part1_not_match__u
call fcn.00414ac0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x14e]
mov eax, dword [ebp - 0x142]
add edx, 0x800
mov ecx, dword [ebp - 0x13e]
cmp eax, edx
jne 0x416a84
cmp ecx, 0x10000
jne 0x416a84
mov cl, byte [ebp - 0x15a]
cmp cl, 0x80
je 0x416a39
mov dl, byte [ebp - 0x14a]
cmp dl, 0x80
je 0x416a39
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.00414ac0
mov cl, byte [ebp - 0x13a]
add esp, 0xc
cmp cl, 0x80
je 0x416a33
mov al, byte [ebp - 0x12a]
cmp al, 0x80
je 0x416a33
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.00414ac0
add esp, 0xc
mov eax, dword [ebp - 0x142]
mov ecx, dword [ebp - 0x328]
lea esi, [ebp - 0x318]
mov dword [ecx], eax
mov dword [ecx + 4], 0
push dword [ebp - 0x324]
mov edi, dword [ebp - 0x32c]
mov ecx, 0x80
rep movsd dword es:[edi], dword [esi]
push str.PhysicalDrive_d_is_ventoy_disk
call fcn.00414ac0
add esp, 8
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
push 0x10000
push ecx
push edx
push eax
movzx eax, byte [ebp - 0x146]
push 0xef
push eax
push str.Part2_not_match__0x_x_0x_x____u__u____u__u_
call fcn.00414ac0
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
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.00414ac0
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.0041fa5e
mov esp, ebp
pop ebp
ret