Function at 0x180052950
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 0x180052990
xor al, al
jmp 0x180052c3d
xor r14d, r14d
mov qword [rsp + 0x30], r14
lea rbx, [rcx + 0x48]
mov qword [rsp + 0x30], rbx
test rbx, rbx
je 0x1800529b5
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800529b5
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov eax, dword [rdi + 8]
cmp eax, 1
jne 0x1800529e9
cmp qword [rdi + 0x20], 0
je 0x180052aef
mov r9, rsi
mov r8, r13
mov edx, r12d
mov rcx, rdi
call fcn.180053060
movzx edi, al
test al, al
jne 0x180052c21
jmp 0x180052aef
cmp eax, 2
jne 0x180052aef
cmp qword [rdi + 0x40], 0
je 0x180052aef
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x28], rbx
test rbx, rbx
je 0x180052a1b
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052a1b
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov r8, rsi
cmp qword [rsi + 0x18], 8
jb 0x180052a28
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 0x180052a5f
test rbx, rbx
je 0x180052aef
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052a55
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x28], r14
jmp 0x180052aef
mov rdx, rbp
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r15d, eax
test eax, eax
je 0x180052a3e
mov rdx, rbp
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rbp, rax
test rax, rax
je 0x180052a3e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
jne 0x180052ac0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
nop
test rbx, rbx
je 0x180052aec
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052ab6
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r14d, r14d
mov qword [rsp + 0x28], r14
jmp 0x180052aef
mov rdi, r15
mov rdx, r15
mov rcx, r13
call fcn.180053d20
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 0x180052bfe
xor r14d, r14d
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x28], rbx
test rbx, rbx
je 0x180052b0d
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052b0d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
call fcn.18000ef20
mov rcx, qword [rax]
mov rax, qword [rcx + 0x78]
lea rdi, [0x180000000]
test rax, rax
cmovne rdi, rax
cmp qword [rsi + 0x18], 8
jb 0x180052b31
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 0x180052b69
test rbx, rbx
je 0x180052b61
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052b5c
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rsp + 0x28], r14
xor dil, dil
jmp 0x180052c21
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r14d, eax
test eax, eax
jne 0x180052ba7
test rbx, rbx
je 0x180052b9f
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052b8f
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r14d, r14d
mov qword [rsp + 0x28], r14
xor dil, dil
jmp 0x180052c21
xor r14d, r14d
xor dil, dil
jmp 0x180052c21
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
test rax, rax
je 0x180052b7c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbp, rax
test rax, rax
jne 0x180052bd7
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x180052b7c
mov rdi, r14
mov rdx, r14
mov rcx, r13
call fcn.180053d20
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 0x180052c1b
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052c11
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r14d, r14d
mov qword [rsp + 0x28], r14
jmp 0x180052c1e
xor r14d, r14d
mov dil, 1
test rbx, rbx
je 0x180052c39
mov rcx, qword [rbx]
test rcx, rcx
je 0x180052c34
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