Function at 0x1800a7080
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rax, qword [0x180267080]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rsi, r9
mov r13, r8
mov r12d, edx
mov rdi, rcx
test edx, edx
jne 0x1800a70c0
xor al, al
jmp 0x1800a7398
xor r14d, r14d
mov qword [rsp + 0x30], r14
lea rbx, [rcx + 0x48]
mov qword [rsp + 0x30], rbx
test rbx, rbx
je 0x1800a70e5
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800a70e5
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov eax, dword [rdi + 8]
cmp eax, 1
jne 0x1800a7119
cmp qword [rdi + 0x20], 0
je 0x1800a721f
mov r9, rsi
mov r8, r13
mov edx, r12d
mov rcx, rdi
call fcn.1800a77f0
movzx edi, al
test al, al
jne 0x1800a737c
jmp 0x1800a721f
cmp eax, 2
jne 0x1800a721f
cmp qword [rdi + 0x40], 0
je 0x1800a721f
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x28], rbx
test rbx, rbx
je 0x1800a714b
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800a714b
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov r8, rsi
cmp qword [rsi + 0x18], 8
jb 0x1800a7158
mov r8, qword [rsi]
movzx edx, r12w
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbp, rax
test rax, rax
jne 0x1800a718f
test rbx, rbx
je 0x1800a721f
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800a7185
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x28], r14
jmp 0x1800a721f
mov rdx, rbp
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r15d, eax
test eax, eax
je 0x1800a716e
mov rdx, rbp
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rbp, rax
test rax, rax
je 0x1800a716e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
jne 0x1800a71f0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
nop
test rbx, rbx
je 0x1800a721c
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800a71e6
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r14d, r14d
mov qword [rsp + 0x28], r14
jmp 0x1800a721f
mov rdi, r15
mov rdx, r15
mov rcx, r13
call fcn.18009ef10
mov r8, r15
mov rdx, r14
mov rcx, qword [r13 + 0x10]
call fcn.1801801b0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
nop
jmp 0x1800a7359
xor r14d, r14d
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x28], rbx
test rbx, rbx
je 0x1800a723d
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800a723d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov eax, dword [0x180270970]
test al, 1
jne 0x1800a7269
or eax, 1
mov dword [0x180270970], eax
mov qword [0x180270978], r14
call fcn.180089700
lea rcx, [0x1801c3400]
call fcn.18017e404
nop
mov rax, qword [0x180270978]
mov rcx, qword [rax + 0x78]
lea rdi, [0x180000000]
test rcx, rcx
cmovne rdi, rcx
cmp qword [rsi + 0x18], 8
jb 0x1800a728c
mov rsi, qword [rsi]
movzx edx, r12w
mov r8, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
jne 0x1800a72c4
test rbx, rbx
je 0x1800a72bc
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800a72b7
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x28], r14
xor dil, dil
jmp 0x1800a737c
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r14d, eax
test eax, eax
jne 0x1800a7302
test rbx, rbx
je 0x1800a72fa
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800a72ea
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r14d, r14d
mov qword [rsp + 0x28], r14
xor dil, dil
jmp 0x1800a737c
xor r14d, r14d
xor dil, dil
jmp 0x1800a737c
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
test rax, rax
je 0x1800a72d7
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbp, rax
test rax, rax
jne 0x1800a7332
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x1800a72d7
mov rdi, r14
mov rdx, r14
mov rcx, r13
call fcn.18009ef10
mov r8, r14
mov rdx, rbp
mov rcx, qword [r13 + 0x10]
call fcn.1801801b0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeResource]
nop
test rbx, rbx
je 0x1800a7376
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800a736c
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r14d, r14d
mov qword [rsp + 0x28], r14
jmp 0x1800a7379
xor r14d, r14d
mov dil, 1
test rbx, rbx
je 0x1800a7394
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800a738f
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x30], r14
movzx eax, dil
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.18017df00
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret