Function at 0x41cf32
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8dc
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x890], eax
mov dword [ebp - 0x898], 0
mov dword [ebp - 0x89c], 0
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 0
je 0x41d2a2
lea eax, [ebp - 0x858]
mov dword [esp + 4], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov dword [esp], eax
call fcn.0042e8a4
test eax, eax
jns 0x41cfb5
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.unable_to_stat_HFS_boot_file__s
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0042c971
mov eax, 0xffffffff
jmp 0x41dafa
mov dword [esp + 4], 0x452ee8
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
jne 0x41cffd
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.unable_to_open_HFS_boot_file__s
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0042c971
mov eax, 0xffffffff
jmp 0x41dafa
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x800
mov dword [esp + 4], 1
lea eax, [ebp - 0x818]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x800
je 0x41d052
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.unable_to_read_HFS_boot_file__s
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0042c971
mov eax, 0xffffffff
jmp 0x41dafa
lea ecx, [ebp - 0x618]
mov dword [ebp - 0x8bc], ecx
cmp byte [ebp - 0x618], 0x50
jne 0x41d08f
cmp byte [ebp - 0x617], 0x4d
jne 0x41d08f
lea esi, [ebp - 0x5e8]
mov eax, str.Apple_Driver
mov ecx, 0xc
cld
mov edi, eax
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
je 0x41d0bb
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_is_not_a_HFS_boot_file
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0042c971
mov eax, 0xffffffff
jmp 0x41dafa
mov dword [esp + 8], 2
mov dword [esp + 4], 0xfffffc00
mov dword [esp], ebx
call sub.msvcrt.dll_fseek
test eax, eax
je 0x41d103
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.unable_to_seek_HFS_boot_file__s
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0042c971
mov eax, 0xffffffff
jmp 0x41dafa
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x200
mov dword [esp + 4], 2
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x200
je 0x41d15a
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.unable_to_read_HFS_boot_block__s
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0042c971
mov eax, 0xffffffff
jmp 0x41dafa
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
call fcn.004219eb
cmp ax, 0x4c4b
je 0x41d1a4
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_does_not_contain_a_valid_boot_block
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0042c971
mov eax, 0xffffffff
jmp 0x41dafa
mov eax, dword [ebp - 0x840]
mov edx, dword [ebp - 0x83c]
mov dword [ebp - 0x8a8], eax
mov dword [ebp - 0x8a4], edx
mov ebx, eax
mov esi, edx
add ebx, 0xfffff400
adc esi, 0xffffffff
mov edx, dword [ebp + 8]
mov dword [edx + 0x10], ebx
mov dword [edx + 0x14], esi
mov dword [edx + 0x28], 0x800
mov dword [edx + 0x2c], 0
mov dword [edx + 0x20], 0
mov ecx, dword [ebp - 0x89c]
lea eax, [ecx + ecx*4]
lea eax, [ebp + eax*4 - 0x878]
mov dword [ebp - 0x8ac], eax
mov eax, ebx
mov edx, esi
test esi, esi
jns 0x41d219
mov eax, dword [ebp - 0x8a8]
mov edx, dword [ebp - 0x8a4]
add eax, 0xfffffbff
adc edx, 0xffffffff
mov ebx, eax
shrd ebx, edx, 0xb
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x10]
and eax, 0x7ff
mov edx, 0
or eax, edx
setne byte [ebp - 0x8ad]
movzx eax, byte [ebp - 0x8ad]
add eax, ebx
mov ecx, dword [ebp - 0x8ac]
mov dword [ecx], eax
mov ebx, dword [ebp - 0x89c]
lea eax, [ebx + ebx*4]
lea ebx, [ebp + eax*4 - 0x18]
lea edx, [ebx - 0x870]
mov dword [edx + 8], 2
mov eax, dword [ebp - 0x8bc]
add eax, 0x30
mov dword [edx + 4], eax
mov eax, dword [0x455018]
mov dword [edi + 8], eax
mov dword [edx + 0xc], eax
mov dword [ebx - 0x870], 0
inc dword [ebp - 0x898]
mov eax, dword [ebx - 0x860]
add dword [0x455018], eax
add dword [0x45514c], eax
inc dword [ebp - 0x89c]
mov edi, dword [ebp - 0x89c]
lea eax, [edi + edi*4]
lea eax, [ebp + eax*4 - 0x888]
mov dword [eax + 8], 4
mov dword [eax + 4], 0x452fbf
mov edx, eax
mov eax, dword [0x466c50]
mov eax, dword [eax + 0x10]
test eax, eax
jns 0x41d2d1
add eax, 3
sar eax, 2
mov dword [edx + 0xc], eax
mov edx, dword [ebp - 0x89c]
lea eax, [edx + edx*4]
lea eax, [ebp + eax*4 - 0x18]
lea ecx, [eax - 0x860]
mov edx, dword [0x455018]
mov edi, edx
sub edi, dword [eax - 0x864]
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
test edx, edx
jns 0x41d30d
add eax, 0x7ff
adc edx, 0
mov ebx, eax
shrd ebx, edx, 0xb
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
mov edx, dword [edx + 0x14]
mov dword [ebp - 0x8d0], eax
mov dword [ebp - 0x8cc], edx
mov eax, dword [ebp - 0x8d0]
and eax, 0x7ff
mov edx, 0
or eax, edx
setne byte [ebp - 0x8ae]
movzx eax, byte [ebp - 0x8ae]
add eax, ebx
sub edi, eax
mov dword [ecx], edi
mov ecx, dword [ebp - 0x89c]
lea edx, [ecx + ecx*4]
mov eax, dword [str.CDROM]
mov dword [ebp + edx*4 - 0x888], eax
inc ecx
mov dword [ebp - 0x89c], ecx
cmp dword [0x430040], 1
jle 0x41d3b5
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x18]
test eax, eax
jne 0x41d382
mov eax, 0x452fc9
mov dword [esp + 0xc], eax
mov eax, str.with_boot_file
mov edi, dword [ebp + 8]
cmp dword [edi + 0x18], 0
jne 0x41d399
mov eax, 0x452fc9
mov dword [esp + 8], eax
mov dword [esp + 4], str.Creating_HFS_Label__s__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0042c789
cmp dword [ebp - 0x898], 1
sbb eax, eax
and eax, 0xfffffa00
add eax, 0x800
mov dword [ebp - 0x894], eax
mov edx, dword [ebp - 0x890]
mov dword [ebp - 0x88c], edx
mov byte [edx], 0x45
mov ecx, dword [ebp - 0x890]
mov byte [ecx + 1], 0x52
mov dword [esp + 4], eax
mov eax, ecx
add eax, 2
mov dword [esp], eax
call fcn.004092f3
mov eax, 0x800
cdq
idiv dword [ebp - 0x894]
imul eax, dword [0x455018]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x890]
add eax, 4
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x890]
add eax, 8
mov dword [esp], eax
call fcn.004092f3
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x890]
add eax, 0xa
mov dword [esp], eax
call fcn.004092f3
mov ebx, dword [ebp - 0x890]
add ebx, dword [ebp - 0x894]
mov dword [ebp - 0x8bc], ebx
mov byte [ebx], 0x50
mov byte [ebx + 1], 0x4d
mov ebx, dword [ebp - 0x89c]
inc ebx
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x8bc]
add eax, 4
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x8bc]
add eax, 8
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x8bc]
add eax, 0xc
mov dword [esp], eax
call fcn.00409344
mov edi, dword [ebp - 0x8bc]
mov dword [edi + 0x10], 0x6c707041
mov dword [edi + 0x14], 0x65
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0x6c707041
mov dword [edi + 0x34], 0x61705f65
mov dword [edi + 0x38], 0x74697472
mov dword [edi + 0x3c], 0x5f6e6f69
mov dword [edi + 0x40], 0x70616d
mov dword [edi + 0x44], 0
mov dword [edi + 0x48], 0
mov dword [edi + 0x4c], 0
mov dword [esp + 4], 0
mov eax, edi
add eax, 0x50
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], ebx
mov eax, edi
add eax, 0x54
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], 0x33
mov eax, edi
add eax, 0x58
mov dword [esp], eax
call fcn.00409344
mov dword [ebp - 0x8a0], 0
mov eax, dword [ebp - 0x89c]
cmp dword [ebp - 0x8a0], eax
jge 0x41d797
mov eax, dword [ebp - 0x8a0]
add eax, 2
imul eax, dword [ebp - 0x894]
add eax, dword [ebp - 0x890]
mov dword [ebp - 0x8bc], eax
mov edx, dword [ebp - 0x8a0]
lea eax, [edx + edx*4]
lea ebx, [ebp + eax*4 - 0x888]
cmp dword [ebx + 8], 2
jne 0x41d67b
lea eax, [ebp - 0x818]
mov dword [esp + 8], 0x200
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x88c]
mov dword [esp], ecx
call sub.msvcrt.dll_memcpy
mov edx, 0x800
mov eax, edx
cdq
idiv dword [ebp - 0x894]
mov esi, eax
imul eax, dword [0x455018]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x88c]
add eax, 4
mov dword [esp], eax
call fcn.00409344
mov eax, esi
imul eax, dword [ebx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x88c]
add eax, 0x12
mov dword [esp], eax
call fcn.00409344
lea eax, [ebp - 0x618]
mov dword [esp + 8], 0x200
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x8bc]
mov dword [esp], edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x89c]
inc eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 4
mov dword [esp], eax
call fcn.00409344
mov eax, esi
imul eax, dword [ebx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 8
mov dword [esp], eax
call fcn.00409344
jmp 0x41d77f
mov ecx, dword [ebp - 0x8bc]
mov byte [ecx], 0x50
mov byte [ecx + 1], 0x4d
mov eax, dword [ebp - 0x89c]
inc eax
mov dword [esp + 4], eax
mov eax, ecx
add eax, 4
mov dword [esp], eax
call fcn.00409344
mov edi, dword [ebp - 0x8a0]
lea ebx, [edi + edi*4]
lea ebx, [ebp + ebx*4 - 0x18]
lea esi, [ebx - 0x870]
mov eax, dword [esi + 0xc]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 8
mov dword [esp], eax
call fcn.00409344
mov eax, dword [ebx - 0x860]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 0xc
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 8], 0x20
mov eax, dword [ebx - 0x870]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 0x10
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp + 8], 0x20
mov eax, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 0x30
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x8bc]
add eax, 0x50
mov dword [esp], eax
call fcn.00409344
mov eax, dword [ebx - 0x860]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 0x54
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], 0x33
mov eax, dword [ebp - 0x8bc]
add eax, 0x58
mov dword [esp], eax
call fcn.00409344
inc dword [ebp - 0x8a0]
mov eax, dword [ebp - 0x89c]
cmp dword [ebp - 0x8a0], eax
jl 0x41d582
cmp dword [ebp - 0x898], 0
je 0x41daf5
mov edx, dword [ebp - 0x890]
add edx, 0x200
mov dword [ebp - 0x8bc], edx
cmp dword [ebp - 0x89c], 2
jg 0x41d8f4
mov ecx, dword [ebp - 0x890]
mov byte [ecx + 0x200], 0x50
mov byte [edx + 1], 0x4d
mov ebx, dword [ebp - 0x89c]
inc ebx
mov dword [esp + 4], ebx
mov eax, ecx
add eax, 0x204
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x890]
add eax, 0x208
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x890]
add eax, 0x20c
mov dword [esp], eax
call fcn.00409344
mov edi, dword [ebp - 0x8bc]
mov dword [edi + 0x10], 0x6c707041
mov dword [edi + 0x14], 0x65
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0x6c707041
mov dword [edi + 0x34], 0x61705f65
mov dword [edi + 0x38], 0x74697472
mov dword [edi + 0x3c], 0x5f6e6f69
mov dword [edi + 0x40], 0x70616d
mov dword [edi + 0x44], 0
mov dword [edi + 0x48], 0
mov dword [edi + 0x4c], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x890]
add eax, 0x250
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x890]
add eax, 0x254
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], 0x33
mov eax, dword [ebp - 0x890]
add eax, 0x258
mov dword [esp], eax
call fcn.00409344
mov eax, dword [ebp - 0x890]
add eax, 0x400
mov dword [ebp - 0x8bc], eax
mov dword [ebp - 0x8a0], 0
mov edx, dword [ebp - 0x89c]
cmp dword [ebp - 0x8a0], edx
jge 0x41daf5
mov eax, dword [ebp - 0x890]
add eax, 0x800
cmp eax, dword [ebp - 0x8bc]
jne 0x41d935
mov ecx, dword [ebp - 0x890]
add ecx, 0xa00
mov dword [ebp - 0x8bc], ecx
mov ebx, dword [ebp - 0x8a0]
lea eax, [ebx + ebx*4]
cmp dword [ebp + eax*4 - 0x880], 2
jne 0x41d9cf
lea eax, [ebp - 0x418]
mov dword [esp + 8], 0x200
mov dword [esp + 4], eax
mov edi, dword [ebp - 0x8bc]
mov dword [esp], edi
call sub.msvcrt.dll_memcpy
cmp byte [edi], 0x50
jne 0x41d977
cmp byte [edi + 1], 0x4d
je 0x41d986
sub dword [ebp - 0x8bc], 0x200
jmp 0x41dad3
mov eax, dword [ebp - 0x89c]
inc eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 4
mov dword [esp], eax
call fcn.00409344
mov edx, dword [ebp - 0x8a0]
lea eax, [edx + edx*4]
mov eax, dword [ebp + eax*4 - 0x87c]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 8
mov dword [esp], eax
call fcn.00409344
jmp 0x41dad3
mov ecx, dword [ebp - 0x8bc]
mov byte [ecx], 0x50
mov byte [ecx + 1], 0x4d
mov eax, dword [ebp - 0x89c]
inc eax
mov dword [esp + 4], eax
mov eax, ecx
add eax, 4
mov dword [esp], eax
call fcn.00409344
mov edi, dword [ebp - 0x8a0]
lea ebx, [edi + edi*4]
lea ebx, [ebp + ebx*4 - 0x18]
lea esi, [ebx - 0x870]
mov eax, dword [esi + 0xc]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 8
mov dword [esp], eax
call fcn.00409344
mov eax, dword [ebx - 0x860]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 0xc
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 8], 0x20
mov eax, dword [ebx - 0x870]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 0x10
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp + 8], 0x20
mov eax, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 0x30
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x8bc]
add eax, 0x50
mov dword [esp], eax
call fcn.00409344
mov eax, dword [ebx - 0x860]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8bc]
add eax, 0x54
mov dword [esp], eax
call fcn.00409344
mov dword [esp + 4], 0x33
mov eax, dword [ebp - 0x8bc]
add eax, 0x58
mov dword [esp], eax
call fcn.00409344
inc dword [ebp - 0x8a0]
add dword [ebp - 0x8bc], 0x200
mov eax, dword [ebp - 0x89c]
cmp dword [ebp - 0x8a0], eax
jl 0x41d910
mov eax, 0
add esp, 0x8dc
pop ebx
pop esi
pop edi
pop ebp
ret