Function at 0x180052940
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 [0x18028e088]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rsi, r9
mov r13, r8
mov r12d, edx
mov rdi, rcx
test edx, edx
jne 0x180052980
xor al, al
jmp 0x180052c2d
xor r14d, r14d
mov qword [rsp + 0x30], r14
lea rbx, [rcx + 0x48]
mov qword [rsp + 0x30], rbx
test rbx, rbx
je 0x1800529a5
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800529a5
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov eax, dword [rdi + 8]
cmp eax, 1
jne 0x1800529d9
cmp qword [rdi + 0x20], 0
je 0x180052adf
mov r9, rsi
mov r8, r13
mov edx, r12d
mov rcx, rdi
call fcn.180053050
movzx edi, al
test al, al
jne 0x180052c11
jmp 0x180052adf
cmp eax, 2
jne 0x180052adf
cmp qword [rdi + 0x40], 0
je 0x180052adf
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x28], rbx
test rbx, rbx
je 0x180052a0b
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052a0b
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov r8, rsi
cmp qword [rsi + 0x18], 8
jb 0x180052a18
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 0x180052a4f
test rbx, rbx
je 0x180052adf
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052a45
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x28], r14
jmp 0x180052adf
mov rdx, rbp
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r15d, eax
test eax, eax
je 0x180052a2e
mov rdx, rbp
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rbp, rax
test rax, rax
je 0x180052a2e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
jne 0x180052ab0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
nop
test rbx, rbx
je 0x180052adc
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052aa6
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r14d, r14d
mov qword [rsp + 0x28], r14
jmp 0x180052adf
mov rdi, r15
mov rdx, r15
mov rcx, r13
call fcn.180053d10
mov r8, r15
mov rdx, r14
mov rcx, qword [r13 + 0x10]
call fcn.1801ceec0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
nop
jmp 0x180052bee
xor r14d, r14d
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x28], rbx
test rbx, rbx
je 0x180052afd
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052afd
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
call fcn.18000ef10
mov rcx, qword [rax]
mov rax, qword [rcx + 0x78]
lea rdi, [0x180000000]
test rax, rax
cmovne rdi, rax
cmp qword [rsi + 0x18], 8
jb 0x180052b21
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 0x180052b59
test rbx, rbx
je 0x180052b51
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052b4c
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x28], r14
xor dil, dil
jmp 0x180052c11
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r14d, eax
test eax, eax
jne 0x180052b97
test rbx, rbx
je 0x180052b8f
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052b7f
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r14d, r14d
mov qword [rsp + 0x28], r14
xor dil, dil
jmp 0x180052c11
xor r14d, r14d
xor dil, dil
jmp 0x180052c11
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
test rax, rax
je 0x180052b6c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbp, rax
test rax, rax
jne 0x180052bc7
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x180052b6c
mov rdi, r14
mov rdx, r14
mov rcx, r13
call fcn.180053d10
mov r8, r14
mov rdx, rbp
mov rcx, qword [r13 + 0x10]
call fcn.1801ceec0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeResource]
nop
test rbx, rbx
je 0x180052c0b
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052c01
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r14d, r14d
mov qword [rsp + 0x28], r14
jmp 0x180052c0e
xor r14d, r14d
mov dil, 1
test rbx, rbx
je 0x180052c29
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052c24
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.1801ccd30
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret