Function at 0x140018830
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rbp
push rbx
push r13
lea rbp, [rsp - 0x47]
sub rsp, 0xa0
mov rax, qword [0x140063848]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r13d, r8d
mov rax, rdx
mov rbx, rcx
test r8d, 0xffffdfef
je 0x140018593
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14001880c
mov qword [rsp + 0xd0], rsi
mov qword [rsp + 0xd8], rdi
mov qword [rsp + 0x98], r12
mov qword [rsp + 0x90], r14
xor r14d, r14d
mov qword [rbp - 0x11], r14
mov edi, r14d
test r8b, 0x10
je 0x140018602
test rcx, rcx
jne 0x1400185f0
test rdx, rdx
je 0x1400185f0
lea r9, [rbp - 0x11]
xor r8d, r8d
mov edx, 0x8000000
mov rcx, rax
call fcn.1400177d0
test al, al
jne 0x14001867a
xor eax, eax
jmp 0x1400187ec
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1400187ec
lea r8, [0x140050d58]
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rsi, rax
test rax, rax
je 0x140018673
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rdi, rax
test rax, rax
je 0x140018673
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r12, rax
test rax, rax
je 0x14001865a
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
lea r8, [rbp - 0x11]
mov rcx, r12
mov edx, eax
call fcn.140026e00
test al, al
jne 0x14001867a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1400187ec
mov rcx, qword [rbp - 0x11]
mov r12d, 1
lea r8, [rbp - 0x19]
mov edx, r12d
mov rbx, r14
mov qword [rbp - 0x19], r14
call fcn.1400281b0
test eax, eax
js 0x1400187d2
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetDC]
mov rsi, rax
test rax, rax
je 0x1400187c9
lea r8d, [r12 + 0x27]
lea rcx, [rbp + 3]
xor edx, edx
call fcn.14003e820
mov rcx, qword [rbp - 0x19]
mov dword [rbp - 1], 0x28
call fcn.140028110
mov rcx, qword [rbp - 0x19]
mov dword [rbp + 3], eax
call fcn.140028120
mov qword [rbp + 0xb], 0x180001
mov rcx, rsi
mov dword [rbp + 7], eax
bt r13d, 0xd
jae 0x140018737
lea r9, [rbp - 9]
lea rdx, [rbp - 1]
xor r8d, r8d
mov dword [rsp + 0x28], r14d
mov qword [rbp - 9], r14
mov qword [rsp + 0x20], r14
call qword [sym.imp.GDI32.dll_CreateDIBSection]
mov rbx, rax
test rax, rax
je 0x1400187be
mov rdx, qword [rbp - 9]
mov rcx, qword [rbp - 0x19]
call fcn.140018480
call qword [sym.imp.GDI32.dll_GdiFlush]
jmp 0x1400187be
mov edx, dword [rbp + 3]
mov r8d, eax
lea r12d, [rdx + rdx*2]
shl r12d, 3
shr r12d, 3
call qword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov rbx, rax
test rax, rax
je 0x1400187be
mov eax, r12d
neg eax
and eax, 3
add eax, r12d
imul eax, dword [rbp + 7]
movsxd rcx, eax
call fcn.14002e3a0
mov r12, rax
test rax, rax
je 0x1400187b2
mov rcx, qword [rbp - 0x19]
mov rdx, rax
call fcn.140018480
mov r9d, dword [rbp + 7]
lea rax, [rbp - 1]
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.GDI32.dll_SetDIBits]
mov rcx, r12
call fcn.14002e3f0
jmp 0x1400187be
mov rcx, rbx
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rbx, r14
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.USER32.dll_ReleaseDC]
lea rcx, [rbp - 0x19]
call fcn.140028140
lea rcx, [rbp - 0x11]
call fcn.140026bf0
test rdi, rdi
je 0x1400187e9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov rax, rbx
mov r12, qword [rsp + 0x98]
mov rdi, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0xd0]
mov r14, qword [rsp + 0x90]
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.14003e7f0
add rsp, 0xa0
pop r13
pop rbx
pop rbp
ret
jmp 0x140018550