Function at 0x140001e40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x190
mov rax, qword [0x140038080]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov rsi, rdx
movzx edx, cx
xor ecx, ecx
lea r8d, [rcx + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
test rax, rax
jne 0x140001eb8
lea rdx, str.Failed_to_find_resource.
call fcn.140004690
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140004500
movzx edx, al
mov rcx, rbx
call fcn.140005050
mov rcx, rbx
call fcn.1400042f0
xor al, al
jmp 0x1400020d3
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x140001f02
lea rdx, str.Failed_to_load_resource.
call fcn.140004690
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140004500
movzx edx, al
mov rcx, rbx
call fcn.140005050
mov rcx, rbx
call fcn.1400042f0
xor al, al
jmp 0x1400020d3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdi, rax
test rax, rax
jne 0x140001f4d
lea rdx, str.Failed_to_lock_resource.
call fcn.140004690
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140004500
movzx edx, al
mov rcx, rbx
call fcn.140005050
mov rcx, rbx
call fcn.1400042f0
xor al, al
jmp 0x1400020d3
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test eax, eax
jne 0x140001f98
lea rdx, str.Resource_size_is_0.
call fcn.140004690
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140004500
movzx edx, al
mov rcx, rbx
call fcn.140005050
mov rcx, rbx
call fcn.1400042f0
xor al, al
jmp 0x1400020d3
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rsp + 0x70]
call fcn.140008780
mov rdx, rsi
lea rcx, [rsp + 0x70]
call fcn.1400033d0
nop
cmp qword [rsp + 0xf8], 0
jne 0x140001ffa
lea rdx, str.Failed_to_open_output_file.
call fcn.140004690
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.140004500
movzx edx, al
mov rcx, rbx
call fcn.140005050
mov rcx, rbx
call fcn.1400042f0
xor bl, bl
jmp 0x14000205a
mov r8, rbx
mov rdx, rdi
lea rcx, [rsp + 0x70]
call fcn.1400036f0
lea rcx, [rsp + 0x78]
call fcn.140003eb0
test rax, rax
jne 0x140002058
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
mov eax, 6
mov edx, 2
cmp qword [rsp + rcx + 0xb8], 0
cmovne eax, edx
or eax, dword [rsp + rcx + 0x80]
and eax, 0x17
mov dword [rsp + rcx + 0x80], eax
mov edx, dword [rsp + rcx + 0x84]
and edx, eax
jne 0x1400020f8
mov bl, 1
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x70], rax
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.140003110
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 [rsp + 0x118], rax
lea rcx, [rsp + 0x118]
call fcn.140005958
nop
movzx eax, bl
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.1400061e0
lea r11, [rsp + 0x190]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
test dl, 4
je 0x140002106
lea rbx, [0x140032fd8]
jmp 0x14000211b
test dl, 2
lea rbx, [0x140032ff0]
lea rax, [0x140033008]
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x30]
call fcn.140001420
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140001ce0
lea rdx, [0x140037088]
lea rcx, [rsp + 0x40]
call fcn.140007fe4
int3