Function at 0x4206f9
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8bc
mov ebx, dword [esp + 0x8d0]
mov eax, dword [0x49713c]
mov eax, dword [eax + 0x24]
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x4209f5
lea edx, [esp + 0x78]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__stat64]
test eax, eax
jns 0x42075f
mov eax, dword [ebx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.unable_to_stat_HFS_boot_file__s
mov eax, dword [0x49713c]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0043dbe2
mov eax, 0xffffffff
jmp 0x4211b2
mov dword [esp + 4], 0x451454
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov ebp, eax
test eax, eax
jne 0x4207a1
mov eax, dword [ebx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.unable_to_open_HFS_boot_file__s
mov eax, dword [0x49713c]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0043dbe2
mov eax, 0xffffffff
jmp 0x4211b2
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x800
mov dword [esp + 4], 1
lea eax, [esp + 0xb0]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x800
je 0x4207fc
mov eax, dword [ebx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.unable_to_read_HFS_boot_file__s
mov eax, dword [0x49713c]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0043dbe2
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
mov eax, 0xffffffff
jmp 0x4211b2
cmp byte [esp + 0x2b0], 0x50
jne 0x42082d
cmp byte [esp + 0x2b1], 0x4d
jne 0x42082d
lea esi, [esp + 0x2e0]
mov edi, str.Apple_Driver
mov ecx, 0xc
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
je 0x42085e
mov eax, dword [ebx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_is_not_a_HFS_boot_file
mov eax, dword [0x49713c]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0043dbe2
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
mov eax, 0xffffffff
jmp 0x4211b2
mov dword [esp + 0xc], 2
mov dword [esp + 4], 0xfffffc00
mov dword [esp + 8], 0xffffffff
mov dword [esp], ebp
call fcn.00445e70
test eax, eax
je 0x4208b3
mov eax, dword [ebx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.unable_to_seek_HFS_boot_file__s
mov eax, dword [0x49713c]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0043dbe2
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
mov eax, 0xffffffff
jmp 0x4211b2
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 0x200
mov dword [esp + 4], 2
mov eax, dword [0x49713c]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x200
je 0x42090f
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 [0x49713c]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0043dbe2
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
mov eax, 0xffffffff
jmp 0x4211b2
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
mov eax, dword [0x49713c]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
call fcn.00423f59
cmp ax, 0x4c4b
je 0x420956
mov eax, dword [ebx + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_does_not_contain_a_valid_boot_block
mov eax, dword [0x49713c]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0043dbe2
mov eax, 0xffffffff
jmp 0x4211b2
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
add eax, 0xfffff400
adc edx, 0xffffffff
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov dword [ebx + 0x28], 0x800
mov dword [ebx + 0x2c], 0
mov dword [ebx + 0x20], 0
mov ecx, eax
and ecx, 0x7ff
test ecx, ecx
setne cl
movzx ecx, cl
mov ebp, edx
sar ebp, 0x1f
and ebp, 0x7ff
mov edi, 0
add eax, ebp
adc edx, edi
shrd eax, edx, 0xb
add eax, ecx
mov dword [esp + 0x60], eax
mov dword [esp + 0x58], 2
lea edx, [esp + 0x2e0]
mov dword [esp + 0x54], edx
mov edx, dword [0x45f21c]
mov dword [ebx + 8], edx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x50], 0
add edx, eax
mov dword [0x45f21c], edx
add dword [0x45f0ac], eax
mov dword [esp + 0x1c], 1
jmp 0x4209fd
mov dword [esp + 0x1c], 0
mov ebp, dword [esp + 0x1c]
lea ecx, [ebp*4]
add ecx, ebp
shl ecx, 2
lea eax, [esp + ecx + 0x50]
mov dword [eax + 8], 4
mov dword [eax + 4], 0x45152b
mov edx, dword [0x49713c]
mov edx, dword [edx + 0x10]
lea esi, [edx + 3]
test edx, edx
cmovs edx, esi
sar edx, 2
mov dword [eax + 0xc], edx
mov esi, dword [0x45f21c]
sub esi, edx
mov edi, dword [ebx + 0x14]
sar edi, 0x1f
and edi, 0x7ff
mov eax, edi
mov edx, 0
add eax, dword [ebx + 0x10]
adc edx, dword [ebx + 0x14]
shrd eax, edx, 0xb
sub esi, eax
mov eax, dword [ebx + 0x10]
and eax, 0x7ff
test eax, eax
setne al
movzx eax, al
sub esi, eax
mov dword [esp + ecx + 0x60], esi
mov eax, dword [str.CDROM]
mov dword [esp + ecx + 0x50], eax
mov eax, ebp
add eax, 1
mov dword [esp + 0x2c], eax
cmp dword [0x447110], 1
jle 0x420ac8
mov eax, dword [ebx + 0x18]
test eax, eax
mov edx, 0x451433
cmovne edx, eax
mov eax, 0x451433
mov ecx, str.with_boot_file
cmovne eax, ecx
mov dword [esp + 0xc], edx
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.0043db2f
mov ebp, dword [esp + 0x1c]
cmp ebp, 1
sbb esi, esi
and esi, 0xfffffa00
add esi, 0x800
mov edi, dword [esp + 0x24]
mov eax, edi
mov byte [edi], 0x45
mov byte [edi + 1], 0x52
mov dword [esp + 4], esi
add eax, 2
mov dword [esp], eax
call fcn.0041ba3d
mov eax, 0x800
cdq
idiv esi
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
lea ecx, [edi + 4]
mov dword [esp + 0x48], ecx
imul eax, dword [0x45f21c]
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0041ba88
mov dword [esp + 4], 1
lea eax, [edi + 8]
mov dword [esp], eax
call fcn.0041ba3d
mov dword [esp + 4], 1
lea eax, [edi + 0xa]
mov dword [esp], eax
call fcn.0041ba3d
lea ebx, [edi + esi]
mov byte [ebx], 0x50
mov byte [ebx + 1], 0x4d
mov dword [esp + 0x1c], ebp
mov eax, ebp
add eax, 2
mov ebp, eax
mov dword [esp + 0x28], eax
mov dword [esp + 4], eax
lea eax, [ebx + 4]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], 1
lea eax, [ebx + 8]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], ebp
lea eax, [ebx + 0xc]
mov dword [esp], eax
call fcn.0041ba88
mov dword [ebx + 0x10], 0x6c707041
mov dword [ebx + 0x14], 0x65
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x2c], 0
mov dword [ebx + 0x30], 0x6c707041
mov dword [ebx + 0x34], 0x61705f65
mov dword [ebx + 0x38], 0x74697472
mov dword [ebx + 0x3c], 0x5f6e6f69
mov dword [ebx + 0x40], 0x70616d
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x4c], 0
mov dword [esp + 4], 0
lea eax, [ebx + 0x50]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], ebp
lea eax, [ebx + 0x54]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], 0x33
add ebx, 0x58
mov dword [esp], ebx
call fcn.0041ba88
cmp dword [esp + 0x2c], 0
jle 0x420e7e
lea ebx, [esp + 0x58]
mov dword [esp + 0x30], esi
lea ebp, [edi + esi*2 + 4]
mov eax, dword [esp + 0x1c]
add eax, 2
mov dword [esp + 0x34], eax
mov dword [esp + 0x20], 1
and edi, 1
mov dword [esp + 0x4c], edi
lea eax, [ebp - 4]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ebx
cmp dword [ebx], 2
jne 0x420db5
mov edi, dword [esp + 0x24]
lea esi, [esp + 0xb0]
mov eax, 0x200
cmp dword [esp + 0x4c], 0
je 0x420ca9
movzx eax, byte [esp + 0xb0]
mov byte [edi], al
lea edi, [edi + 1]
lea esi, [esi + 1]
mov eax, 0x1ff
test edi, 2
je 0x420cc0
movzx edx, word [esi]
mov word [edi], dx
add edi, 2
add esi, 2
sub eax, 2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, 0
test al, 2
je 0x420cdb
movzx edx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x420ce6
movzx eax, byte [esi + edx]
mov byte [edi + edx], al
mov eax, dword [esp + 0x44]
imul eax, dword [0x45f21c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.0041ba88
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
imul eax, dword [edx + 4]
mov dword [esp + 0x3c], eax
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
add eax, 0x12
mov dword [esp], eax
call fcn.0041ba88
mov edx, dword [esp + 0x38]
mov edi, edx
lea esi, [esp + 0x2b0]
mov eax, 0x200
test dl, 1
je 0x420d50
movzx eax, byte [esp + 0x2b0]
mov byte [edx], al
lea edi, [edx + 1]
lea esi, [esi + 1]
mov eax, 0x1ff
test edi, 2
je 0x420d67
movzx edx, word [esi]
mov word [edi], dx
add edi, 2
add esi, 2
sub eax, 2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, 0
test al, 2
je 0x420d82
movzx edx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x420d8d
movzx eax, byte [esi + edx]
mov byte [edi + edx], al
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.0041ba88
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], eax
lea eax, [ebp + 4]
mov dword [esp], eax
call fcn.0041ba88
jmp 0x420e64
mov byte [ebp - 4], 0x50
mov byte [ebp - 3], 0x4d
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.0041ba88
mov eax, dword [ebx + 4]
shl eax, 2
mov dword [esp + 4], eax
lea eax, [ebp + 4]
mov dword [esp], eax
call fcn.0041ba88
mov eax, dword [ebx + 8]
lea esi, [eax*4]
mov dword [esp + 4], esi
lea eax, [ebp + 8]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 8], 0x20
mov eax, dword [ebx - 8]
mov dword [esp + 4], eax
lea eax, [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp + 8], 0x20
mov eax, dword [ebx - 4]
mov dword [esp + 4], eax
lea eax, [ebp + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp + 4], 0
lea eax, [ebp + 0x4c]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], esi
lea eax, [ebp + 0x50]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], 0x33
lea eax, [ebp + 0x54]
mov dword [esp], eax
call fcn.0041ba88
add dword [esp + 0x20], 1
add ebx, 0x14
add ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x20], eax
jne 0x420c69
mov eax, 0
cmp dword [esp + 0x1c], 0
je 0x4211b2
cmp dword [esp + 0x2c], 2
jle 0x420ea4
mov eax, dword [esp + 0x24]
lea ebp, [eax + 0x200]
jmp 0x420fdb
mov esi, dword [esp + 0x24]
mov eax, esi
mov byte [esi + 0x200], 0x50
mov byte [esi + 0x201], 0x4d
mov ebx, dword [esp + 0x28]
mov dword [esp + 4], ebx
add eax, 0x204
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], 1
mov eax, esi
add eax, 0x208
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], ebx
mov eax, esi
add eax, 0x20c
mov dword [esp], eax
call fcn.0041ba88
mov dword [esi + 0x210], 0x6c707041
mov dword [esi + 0x214], 0x65
mov dword [esi + 0x218], 0
mov dword [esi + 0x21c], 0
mov dword [esi + 0x220], 0
mov dword [esi + 0x224], 0
mov dword [esi + 0x228], 0
mov dword [esi + 0x22c], 0
mov dword [esi + 0x230], 0x6c707041
mov dword [esi + 0x234], 0x61705f65
mov dword [esi + 0x238], 0x74697472
mov dword [esi + 0x23c], 0x5f6e6f69
mov dword [esi + 0x240], 0x70616d
mov dword [esi + 0x244], 0
mov dword [esi + 0x248], 0
mov dword [esi + 0x24c], 0
mov dword [esp + 4], 0
lea eax, [esi + 0x250]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], ebx
lea eax, [esi + 0x254]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], 0x33
lea eax, [esi + 0x258]
mov dword [esp], eax
call fcn.0041ba88
lea ebp, [esi + 0x400]
mov eax, 0
cmp dword [esp + 0x2c], 0
jle 0x4211b2
lea ebx, [esp + 0x5c]
mov eax, dword [esp + 0x1c]
add eax, 2
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
mov eax, dword [esp + 0x24]
lea edx, [eax + 0x800]
mov dword [esp + 0x24], edx
add eax, 0xa00
mov dword [esp + 0x2c], eax
cmp ebp, dword [esp + 0x24]
cmove ebp, dword [esp + 0x2c]
mov dword [esp + 0x30], ebx
cmp dword [ebx - 4], 2
jne 0x4210e0
mov edi, ebp
lea esi, [esp + 0x4b0]
mov eax, 0x200
test ebp, 1
je 0x42105c
movzx eax, byte [esp + 0x4b0]
mov byte [ebp], al
lea edi, [ebp + 1]
lea esi, [esi + 1]
mov eax, 0x1ff
test edi, 2
je 0x421073
movzx edx, word [esi]
mov word [edi], dx
add edi, 2
add esi, 2
sub eax, 2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, 0
test al, 2
je 0x42108e
movzx edx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x421099
movzx eax, byte [esi + edx]
mov byte [edi + edx], al
cmp byte [ebp], 0x50
jne 0x4210a5
cmp byte [ebp + 1], 0x4d
je 0x4210b0
sub ebp, 0x200
jmp 0x421191
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
lea eax, [ebp + 4]
mov dword [esp], eax
call fcn.0041ba88
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
shl eax, 2
mov dword [esp + 4], eax
lea eax, [ebp + 8]
mov dword [esp], eax
call fcn.0041ba88
jmp 0x421191
mov byte [ebp], 0x50
mov byte [ebp + 1], 0x4d
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
lea eax, [ebp + 4]
mov dword [esp], eax
call fcn.0041ba88
mov eax, dword [ebx]
shl eax, 2
mov dword [esp + 4], eax
lea eax, [ebp + 8]
mov dword [esp], eax
call fcn.0041ba88
mov eax, dword [ebx + 4]
lea esi, [eax*4]
mov dword [esp + 4], esi
lea eax, [ebp + 0xc]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 8], 0x20
mov eax, dword [ebx - 0xc]
mov dword [esp + 4], eax
lea eax, [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp + 8], 0x20
mov eax, dword [ebx - 8]
mov dword [esp + 4], eax
lea eax, [ebp + 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp + 4], 0
lea eax, [ebp + 0x50]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], esi
lea eax, [ebp + 0x54]
mov dword [esp], eax
call fcn.0041ba88
mov dword [esp + 4], 0x33
lea eax, [ebp + 0x58]
mov dword [esp], eax
call fcn.0041ba88
add ebp, 0x200
add dword [esp + 0x1c], 1
add ebx, 0x14
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x1c], eax
jne 0x421019
mov eax, 0
add esp, 0x8bc
pop ebx
pop esi
pop edi
pop ebp
ret