Function at 0x100066758
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], rbp
mov r13, rdx
lea r14, [0x100153eb8]
mov ecx, 5
lea r12, [0x10001e540]
mov rax, qword [0x100153eb8]
cmp rax, r14
je 0x1000667c1
test byte [rax + 0x1c], 1
je 0x1000667c1
cmp byte [rax + 0x19], cl
jb 0x1000667c1
lea edx, [rcx + 0xe]
mov r9d, 0x5dd
mov r8, r12
mov rcx, qword [rax + 0x10]
call fcn.100036510
mov rax, qword [0x100153eb8]
mov rbp, qword [0x100158690]
test rbp, rbp
jne 0x1000667ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov rax, qword [0x100153eb8]
jmp 0x1000667ec
xor edi, edi
mov esi, 2
cmp rax, r14
je 0x10006681b
test byte [rax + 0x1c], sil
je 0x10006681b
cmp byte [rax + 0x19], 4
jb 0x10006681b
lea edx, [rsi + 0x12]
mov r9d, edi
mov r8, r12
mov rcx, qword [rax + 0x10]
call fcn.100036510
mov rax, qword [0x100153eb8]
xor ebx, ebx
test rbp, rbp
je 0x100066889
mov edx, 0x5dd
mov r8d, 0x3f9
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
test rax, rax
jne 0x100066854
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x100066856
xor edi, edi
mov rax, qword [0x100153eb8]
cmp rax, r14
je 0x100066889
test byte [rax + 0x1c], sil
je 0x100066889
cmp byte [rax + 0x19], 4
jb 0x100066889
mov edx, 0x15
mov r9d, edi
mov r8, r12
mov rcx, qword [rax + 0x10]
call fcn.100036510
mov rax, qword [0x100153eb8]
xor r12d, r12d
test rbx, rbx
je 0x1000668f4
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r12, rax
test rax, rax
jne 0x1000668bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x1000668bd
xor edi, edi
mov rax, qword [0x100153eb8]
cmp rax, r14
je 0x1000668f4
test byte [rax + 0x1c], sil
je 0x1000668f4
cmp byte [rax + 0x19], 4
jb 0x1000668f4
mov edx, 0x16
mov r9d, edi
lea r8, [0x10001e540]
mov rcx, qword [rax + 0x10]
call fcn.100036510
mov rax, qword [0x100153eb8]
test r12, r12
je 0x100066a4e
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
test eax, eax
jne 0x100066925
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x100066927
xor edi, edi
mov rax, qword [0x100153eb8]
cmp rax, r14
je 0x10006695e
test byte [rax + 0x1c], sil
je 0x10006695e
cmp byte [rax + 0x19], 4
jb 0x10006695e
mov edx, 0x17
mov r9d, edi
lea r8, [0x10001e540]
mov rcx, qword [rax + 0x10]
call fcn.100036510
mov rax, qword [0x100153eb8]
test ebp, ebp
je 0x100066a4e
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbx, rax
mov rcx, rax
neg rcx
sbb edi, edi
not edi
and edi, 0x80004005
mov rax, qword [0x100153eb8]
cmp rax, r14
je 0x1000669b9
test byte [rax + 0x1c], sil
je 0x1000669b9
cmp byte [rax + 0x19], 4
jb 0x1000669b9
mov edx, 0x18
mov r9d, edi
lea r8, [0x10001e540]
mov rcx, qword [rax + 0x10]
call fcn.100036510
mov rax, qword [0x100153eb8]
test rbx, rbx
je 0x100066a4e
cmp rax, r14
je 0x1000669e8
test byte [rax + 0x1c], sil
je 0x1000669e8
cmp byte [rax + 0x19], 4
jb 0x1000669e8
mov edx, 0x19
lea r8, [0x10001e540]
mov rcx, qword [rax + 0x10]
call fcn.100034784
lea rcx, [0x100152100]
mov rax, qword [0x100152100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x70], rax
mov r8d, ebp
mov rdx, rbx
lea rcx, [rsp + 0x70]
call fcn.1000697ec
mov rbx, qword [rsp + 0x70]
mov rdx, rbx
mov rcx, r13
call fcn.100069910
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x100066a47
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [0x100153eb8]
jmp 0x100066a4e
mov rax, qword [0x100153eb8]
cmp rax, r14
je 0x100066a83
test byte [rax + 0x1c], 1
je 0x100066a83
movzx ecx, byte [rax + 0x19]
test edi, edi
mov edx, 5
cmovns esi, edx
cmp ecx, esi
jl 0x100066a83
mov edx, 0x1a
mov r9d, edi
lea r8, [0x10001e540]
mov rcx, qword [rax + 0x10]
call fcn.100036510
mov eax, edi
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret