Function at 0x14005e620
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x90]
sub rsp, 0x190
mov rax, qword [0x1400d7040]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov rsi, r8
mov rbx, rdx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rdi, rax
test rax, rax
jne 0x14005e69e
lea rdx, str.Failed_to_get_module_handle
call fcn.14007eb20
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.14007e3f0
movzx edx, al
mov rcx, rbx
call fcn.14007fe90
mov rcx, rbx
call fcn.14007df50
xor al, al
jmp 0x14005e939
cmp qword [rbx + 0x18], 0xf
jbe 0x14005e6a8
mov rbx, qword [rbx]
mov r8, rbx
mov edx, 0x67
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rbx, rax
test rax, rax
jne 0x14005e6fb
lea rdx, str.Failed_to_find_resource
call fcn.14007eb20
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.14007e3f0
movzx edx, al
mov rcx, rbx
call fcn.14007fe90
mov rcx, rbx
call fcn.14007df50
xor al, al
jmp 0x14005e939
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x14005e746
lea rdx, str.Failed_to_load_resource
call fcn.14007eb20
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.14007e3f0
movzx edx, al
mov rcx, rbx
call fcn.14007fe90
mov rcx, rbx
call fcn.14007df50
xor al, al
jmp 0x14005e939
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
jne 0x14005e791
lea rdx, str.Failed_to_lock_resource
call fcn.14007eb20
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.14007e3f0
movzx edx, al
mov rcx, rbx
call fcn.14007fe90
mov rcx, rbx
call fcn.14007df50
xor al, al
jmp 0x14005e939
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test eax, eax
jne 0x14005e7dd
lea rdx, str.Resource_size_is_zero
call fcn.14007eb20
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.14007e3f0
movzx edx, al
mov rcx, rbx
call fcn.14007fe90
mov rcx, rbx
call fcn.14007df50
xor al, al
jmp 0x14005e939
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x70]
call fcn.1400b06a0
cmp qword [rsi + 0x18], 0xf
jbe 0x14005e7f9
mov rsi, qword [rsi]
mov r8d, 0x20
mov rdx, rsi
lea rcx, [rsp + 0x70]
call fcn.14007d990
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rdi, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x70], rdi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x6c], edx
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
test byte [rbp + rcx - 0x80], 6
je 0x14005e87b
lea rdx, str.Failed_to_open_output_file
call fcn.14007eb20
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.14007e3f0
movzx edx, al
mov rcx, rbx
call fcn.14007fe90
mov rcx, rbx
call fcn.14007df50
xor bl, bl
jmp 0x14005e8cf
mov r8, rbx
mov rdx, r14
lea rcx, [rsp + 0x70]
call fcn.14007cce0
lea rcx, [rsp + 0x78]
call fcn.14007d890
test rax, rax
jne 0x14005e8cd
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
mov eax, 6
mov edx, 2
cmp qword [rbp + rcx - 0x48], 0
cmovne eax, edx
or eax, dword [rbp + rcx - 0x80]
and eax, 0x17
mov dword [rbp + rcx - 0x80], eax
mov edx, dword [rbp + rcx - 0x7c]
and edx, eax
jne 0x14005e960
mov bl, 1
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x70], rdi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x6c], edx
lea rcx, [rsp + 0x78]
call fcn.14007ca30
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x70], rax
mov rcx, qword [rsp + 0x70]
movsxd rdx, dword [rcx + 4]
lea r8d, [rdx - 0x10]
mov dword [rsp + rdx + 0x6c], r8d
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x18], rax
lea rcx, [rbp + 0x18]
call fcn.140083068
nop
movzx eax, bl
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.140080ef0
lea r11, [rsp + 0x190]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
test dl, 4
je 0x14005e96e
lea rbx, str.ios_base::badbit_set
jmp 0x14005e983
test dl, 2
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x30]
call fcn.14004b6b0
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.14004c130
lea rdx, [0x1400d4b70]
lea rcx, [rsp + 0x40]
call fcn.140084c50
int3