Function at 0x14000f510
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rbp
push rdi
push r15
sub rsp, 0x60
mov rax, qword [0x140193440]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov eax, dword [0x1401e9090]
xor ebp, ebp
mov edx, dword [0x1401e89e0]
mov r15d, 0x200
mov dword [0x140196fb0], eax
mov edi, edx
add eax, 0xfffffe00
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rcx
cmp eax, 0xfe00
jbe 0x14000f561
mov dword [0x140196fb0], r15d
cmp edi, 3
jne 0x14000f58d
cmp word [0x1401e8f76], bp
jne 0x14000f58d
cmp byte [0x1401e8f63], bpl
mov eax, 7
cmovne edi, eax
cmp byte [0x1401e8f64], bpl
mov eax, 8
cmovne edi, eax
mov qword [rsp + 0x80], rbx
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0x90], r12
mov qword [rsp + 0x98], r14
test edx, edx
je 0x14000f61b
cmp dword [0x1401e8680], 1
jne 0x14000f61b
mov edi, 0xa
lea rcx, str.Writing_protective_message_SBR
call fcn.14004f2f0
mov rbx, qword [0x1401e87b8]
mov edx, 0x1c4
mov rcx, rbx
mov r8d, 0xa
mov r15d, 0x4400
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rsi, rax
test rax, rax
jne 0x14000f63e
call fcn.14004fba0
mov r8, rax
lea rdx, str.msg.txt
lea rcx, str.Could_not_locate_resource__s:__s
call fcn.14004f2f0
lea rcx, str.Could_not_access_message
jmp 0x14000f8b1
mov ecx, edi
sub ecx, 7
je 0x14000f860
sub ecx, 1
je 0x14000f70d
cmp ecx, 2
je 0x14000f5bf
mov eax, 1
jmp 0x14000f8b8
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r12, rax
test rax, rax
jne 0x14000f679
call fcn.14004fba0
mov r8, rax
lea rdx, str.msg.txt
lea rcx, str.Could_not_load_resource__s:__s
call fcn.14004f2f0
lea rcx, str.Could_not_access_message
jmp 0x14000f8b1
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, 1
mov ecx, 0x1000
mov r14d, eax
call fcn.1400c4f6c
mov rsi, rax
test rax, rax
jne 0x14000f6be
lea rdx, str.msg.txt
lea rcx, str.Could_not_allocate_resource__s
call fcn.14004f2f0
lea rcx, str.Could_not_access_message
jmp 0x14000f8b1
mov ebx, 0x1000
mov rcx, r12
cmp r14d, ebx
cmovb ebx, r14d
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r8d, ebx
mov rcx, rsi
mov rdx, rax
call fcn.140135ea0
cmp r14d, 0x1000
jbe 0x14000f952
lea r8d, [r14 - 0x1000]
lea rdx, str.msg.txt
lea rcx, str.WARNING:_Resource__s_was_truncated_by__d_bytes_
call fcn.14004f2f0
jmp 0x14000f952
mov rdx, qword [0x14019f130]
test rdx, rdx
je 0x14000f7a5
movsxd r8, dword [0x1401e9068]
lea r9, [rsp + 0x30]
mov ecx, 2
call fcn.140047d90
test eax, eax
jne 0x14000f73b
mov eax, ebp
jmp 0x14000f772
mov ebx, ebp
lea rsi, [0x140197810]
movsxd rdx, ebx
lea rcx, [rsp + 0x30]
add rdx, rsi
mov r8d, 0x20
call fcn.1401368e0
test eax, eax
je 0x14000f76d
add ebx, 0x20
cmp ebx, 0xbe0
jb 0x14000f744
mov eax, ebp
jmp 0x14000f772
mov eax, 1
test eax, eax
lea rcx, [0x140158ab0]
lea rdx, [0x140158ab4]
cmovne rdx, rcx
lea rcx, str.Writing_Grub_2.0_SBR__from_download___s
call fcn.14004f2f0
mov rsi, qword [0x14019f130]
mov r14d, dword [0x1401e9068]
jmp 0x14000f952
lea rcx, str.Writing_Grub_2.0_SBR__from_embedded_
call fcn.14004f2f0
mov rbx, qword [0x1401e87b8]
mov edx, 0x1c3
mov rcx, rbx
mov r8d, 0xa
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rsi, rax
test rax, rax
jne 0x14000f7fb
call fcn.14004fba0
mov r8, rax
lea rdx, str.core.img
lea rcx, str.Could_not_locate_resource__s:__s
call fcn.14004f2f0
lea rcx, str.Could_not_access_core.img
jmp 0x14000f8b1
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r12, rax
test rax, rax
jne 0x14000f833
call fcn.14004fba0
mov r8, rax
lea rdx, str.core.img
lea rcx, str.Could_not_load_resource__s:__s
call fcn.14004f2f0
lea rcx, str.Could_not_access_core.img
jmp 0x14000f8b1
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, r12
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rsi, rax
test rax, rax
jne 0x14000f952
lea rcx, str.Could_not_access_core.img
jmp 0x14000f8b1
lea rcx, str.Writing_Grub4Dos_SBR
call fcn.14004f2f0
mov rbx, qword [0x1401e87b8]
mov edx, 0x1c2
mov rcx, rbx
mov r8d, 0xa
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rsi, rax
test rax, rax
jne 0x14000f8ee
call fcn.14004fba0
mov r8, rax
lea rdx, str.grldr.mbr
lea rcx, str.Could_not_locate_resource__s:__s
call fcn.14004f2f0
lea rcx, str.grldr.mbr_is_either_not_present_or_too_small
call fcn.14004f2f0
xor eax, eax
mov r14, qword [rsp + 0x98]
mov r12, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400b2a30
add rsp, 0x60
pop r15
pop rdi
pop rbp
ret
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r12, rax
test rax, rax
jne 0x14000f91a
call fcn.14004fba0
mov r8, rax
lea rdx, str.grldr.mbr
lea rcx, str.Could_not_load_resource__s:__s
jmp 0x14000f8a5
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, r12
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
je 0x14000f8aa
cmp r14d, r15d
jbe 0x14000f8aa
lea rsi, [rax + 0x200]
add r14d, 0xfffffe00
lea eax, [r14 + r15]
cmp eax, dword [0x1401e90f0]
jbe 0x14000f980
lea rcx, str.__SBR_size_is_too_large___You_may_need_to_uncheck_Add_fixes_for_old_BIOSes.
call fcn.14004f2f0
cmp edi, 0xa
jne 0x14000f8b6
mov rcx, rsi
call fcn.1400e8c70
jmp 0x14000f8b6
mov r9d, r14d
lea rcx, [rsp + 0x20]
mov edx, r15d
mov r8, rsi
call fcn.140077b50
mov rcx, qword [0x14019f130]
mov ebx, eax
call fcn.1400e8c70
mov qword [0x14019f130], rbp
cmp edi, 0xa
jne 0x14000f9b5
mov rcx, rsi
call fcn.1400e8c70
test ebx, ebx
setne bpl
mov eax, ebp
jmp 0x14000f8b8