Function at 0x140040b84
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov qword [rax - 0x38], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
mov r13, rdx
lea r12, [0x140148ea8]
mov ecx, 5
lea r14, [0x1400060d0]
mov rax, qword [0x140148ea8]
cmp rax, r12
je 0x140040bf1
test byte [rax + 0x1c], 1
je 0x140040bf1
cmp byte [rax + 0x19], cl
jb 0x140040bf1
lea edx, [rcx + 0xe]
mov r9d, 0x5dd
mov r8, r14
mov rcx, qword [rax + 0x10]
call fcn.14000fd64
mov rax, qword [0x140148ea8]
mov rdi, qword [0x14014d170]
test rdi, rdi
jne 0x140040c1a
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov rax, qword [0x140148ea8]
jmp 0x140040c1c
xor esi, esi
mov r15b, 4
mov ebp, 2
cmp rax, r12
je 0x140040c4e
test byte [rax + 0x1c], bpl
je 0x140040c4e
cmp byte [rax + 0x19], r15b
jb 0x140040c4e
lea edx, [rbp + 0x12]
mov r9d, esi
mov r8, r14
mov rcx, qword [rax + 0x10]
call fcn.14000fd64
mov rax, qword [0x140148ea8]
xor ebx, ebx
test rdi, rdi
je 0x140040cbc
mov edx, 0x5dd
mov r8d, 0x3f9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
test rax, rax
jne 0x140040c87
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x140040c89
xor esi, esi
mov rax, qword [0x140148ea8]
cmp rax, r12
je 0x140040cbc
test byte [rax + 0x1c], bpl
je 0x140040cbc
cmp byte [rax + 0x19], r15b
jb 0x140040cbc
mov edx, reloc.OLEAUT32.dll_SafeArrayUnlock
mov r9d, esi
mov r8, r14
mov rcx, qword [rax + 0x10]
call fcn.14000fd64
mov rax, qword [0x140148ea8]
xor r14d, r14d
test rbx, rbx
je 0x140040d27
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r14, rax
test rax, rax
jne 0x140040cee
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x140040cf0
xor esi, esi
mov rax, qword [0x140148ea8]
cmp rax, r12
je 0x140040d27
test byte [rax + 0x1c], bpl
je 0x140040d27
cmp byte [rax + 0x19], r15b
jb 0x140040d27
mov edx, reloc.OLEAUT32.dll_SafeArrayAccessData
mov r9d, esi
lea r8, [0x1400060d0]
mov rcx, qword [rax + 0x10]
call fcn.14000fd64
mov rax, qword [0x140148ea8]
test r14, r14
je 0x140040ef6
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
movsxd rdi, eax
test eax, eax
jne 0x140040d59
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x140040d5b
xor esi, esi
mov rax, qword [0x140148ea8]
cmp rax, r12
je 0x140040d92
test byte [rax + 0x1c], bpl
je 0x140040d92
cmp byte [rax + 0x19], r15b
jb 0x140040d92
mov edx, reloc.Cabinet.dll_FDIDestroy
mov r9d, esi
lea r8, [0x1400060d0]
mov rcx, qword [rax + 0x10]
call fcn.14000fd64
mov rax, qword [0x140148ea8]
test edi, edi
je 0x140040ef6
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r15, rax
mov rcx, rax
neg rcx
sbb esi, esi
not esi
and esi, 0x80004005
mov rax, qword [0x140148ea8]
cmp rax, r12
je 0x140040ded
test byte [rax + 0x1c], bpl
je 0x140040ded
cmp byte [rax + 0x19], 4
jb 0x140040ded
mov edx, DispGetParam
mov r9d, esi
lea r8, [0x1400060d0]
mov rcx, qword [rax + 0x10]
call fcn.14000fd64
mov rax, qword [0x140148ea8]
test r15, r15
je 0x140040ef6
cmp rax, r12
je 0x140040e1c
test byte [rax + 0x1c], bpl
je 0x140040e1c
cmp byte [rax + 0x19], 4
jb 0x140040e1c
mov edx, DispGetParam
lea r8, [0x1400060d0]
mov rcx, qword [rax + 0x10]
call fcn.14000fcb0
mov rax, qword [section..data]
mov rbx, qword [rax + 0x18]
mov rcx, rbx
call qword [fcn.140015690]
lea rcx, section..data
call rbx
lea rbx, [rax + 0x18]
mov qword [rsp + 0x70], rbx
mov r14d, dword [rbx - 0x10]
mov r12, r15
sub r12, rbx
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140040e6e
mov edx, edi
lea rcx, [rsp + 0x70]
call fcn.140044540
mov rbx, qword [rsp + 0x70]
mov r9, rdi
mov rdx, rdi
mov rcx, rbx
cmp r12, r14
mov r14, rdi
ja 0x140040e8b
lea r8, [r12 + rbx]
call qword [sym.imp.msvcrt.dll_memmove_s]
jmp 0x140040e94
mov r8, r15
call qword [sym.imp.msvcrt.dll_memcpy_s]
test edi, edi
js 0x140040ee8
cmp edi, dword [rbx - 0xc]
jg 0x140040ee8
mov dword [rbx - 0x10], edi
mov byte [r14 + rbx], 0
mov rdx, rbx
mov rcx, r13
call fcn.140043ce0
nop
lea r14, [rbx - 0x18]
lock add dword [r14 + 0x10], 0xffffffff
jg 0x140040ed8
mov rdi, qword [r14]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.140015690]
mov rdx, r14
mov rcx, rdi
call rbx
mov rax, qword [0x140148ea8]
lea r12, [0x140148ea8]
jmp 0x140040ef6
mov ecx, 0x80070057
call fcn.1400119f0
nop
jmp 0x140040ef5
nop
cmp rax, r12
je 0x140040f2b
test byte [rax + 0x1c], 1
je 0x140040f2b
movzx ecx, byte [rax + 0x19]
test esi, esi
mov edx, 5
cmovns ebp, edx
cmp ecx, ebp
jl 0x140040f2b
mov edx, DispGetParam
mov r9d, esi
lea r8, [0x1400060d0]
mov rcx, qword [rax + 0x10]
call fcn.14000fd64
mov eax, esi
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret