Function at 0x40ef80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x5a3190]
xorps xmm0, xmm0
mov edx, dword [0x5a2ae0]
mov dword [ebp - 8], 0x200
mov dword [0x553360], eax
push ebx
push esi
mov esi, edx
movups xmmword [ebp - 0x18], xmm0
mov dword [ebp - 0x18], ecx
push edi
cmp eax, 0x200
jb 0x40efba
cmp eax, 0x10000
jbe 0x40efc4
mov dword [0x553360], 0x200
cmp esi, 3
jne 0x40eff1
cmp word [0x5a307c], 0
jne 0x40eff1
cmp byte [0x5a306b], 0
mov eax, 7
cmovne esi, eax
cmp byte [0x5a306c], 0
mov eax, 8
cmovne esi, eax
test edx, edx
je 0x40f05a
cmp dword [0x5a2894], 1
jne 0x40f05a
mov esi, 0xa
push str.Writing_protective_message_SBR
call fcn.0044b0b0
mov ecx, dword [0x5a29d0]
lea eax, [ebp - 4]
add esp, 4
mov dword [ebp - 4], 0x1000
mov edx, 0x1c4
mov dword [ebp - 8], 0x4400
push 1
push eax
push str.msg.txt
push 0xa
call fcn.00449730
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x40f07b
push str.Could_not_access_message
call fcn.0044b0b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
sub eax, 7
je 0x40f18b
sub eax, 1
je 0x40f083
sub eax, 2
je 0x40f003
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 4]
jmp 0x40f22c
mov ecx, dword [0x55a320]
test ecx, ecx
je 0x40f0c6
mov edx, dword [0x5a3170]
call fcn.004464c0
test eax, eax
mov edx, 0x52cf6c
mov ecx, 0x52cf68
cmove ecx, edx
push ecx
push str.Writing_Grub_2.0_SBR__from_download___s
call fcn.0044b0b0
mov ebx, dword [0x55a320]
add esp, 8
mov edi, dword [0x5a3170]
jmp 0x40f22c
push str.Writing_Grub_2.0_SBR__from_embedded_
call fcn.0044b0b0
mov edi, dword [0x5a29d0]
add esp, 4
push 0xa
push 0x1c3
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
jne 0x40f11b
call fcn.0044b6b0
push eax
push str.core.img
push str.Could_not_locate_resource__s:__s
call fcn.0044b0b0
add esp, 0xc
push str.Could_not_access_core.img
call fcn.0044b0b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
jne 0x40f158
call fcn.0044b6b0
push eax
push str.core.img
push str.Could_not_load_resource__s:__s
call fcn.0044b0b0
add esp, 0xc
push str.Could_not_access_core.img
call fcn.0044b0b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
jne 0x40f22c
push str.Could_not_access_core.img
call fcn.0044b0b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Writing_Grub4Dos_SBR
call fcn.0044b0b0
mov edi, dword [0x5a29d0]
add esp, 4
push 0xa
push 0x1c2
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
jne 0x40f1e0
call fcn.0044b6b0
push eax
push str.grldr.mbr
push str.Could_not_locate_resource__s:__s
call fcn.0044b0b0
add esp, 0xc
push str.grldr.mbr_is_either_not_present_or_too_small
call fcn.0044b0b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
jne 0x40f201
call fcn.0044b6b0
push eax
push str.grldr.mbr
push str.Could_not_load_resource__s:__s
jmp 0x40f1c2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x40f1ca
cmp edi, 0x200
jbe 0x40f1ca
lea ebx, [eax + 0x200]
sub edi, 0x200
mov ecx, dword [ebp - 8]
lea eax, [edi + ecx]
cmp eax, dword [0x5a31a8]
jbe 0x40f25e
push str.__SBR_size_is_too_large___You_may_need_to_uncheck_Add_fixes_for_old_BIOSes.
call fcn.0044b0b0
add esp, 4
cmp esi, 0xa
jne 0x40f1d7
push ebx
call fcn.004d1211
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push edi
push 0
push ecx
mov edx, ebx
lea ecx, [ebp - 0x18]
call fcn.0046d880
push dword [0x55a320]
mov edi, eax
call fcn.004d1211
add esp, 0x14
mov dword [0x55a320], 0
cmp esi, 0xa
jne 0x40f296
push ebx
call fcn.004d1211
add esp, 4
xor eax, eax
test edi, edi
pop edi
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret