Function at 0x43ac08
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x4b8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x480], rcx
mov r12d, edx
mov edi, r8d
movzx edx, dx
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdx, rax
test rax, rax
je 0x43acb1
mov rcx, qword [rbp + 0x480]
call qword [sym.imp.KERNEL32.dll_LoadResource]
lea rdx, str.ERROR:_LoadResource_failed_error
mov rcx, rax
test rax, rax
je 0x43ac78
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r13, rax
test rax, rax
jne 0x43aca1
lea rdx, str.ERROR:_could_not_lock_bitmap_error
mov rcx, qword [0x0053bb30]
call fcn.004d0399
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r13
mov edx, eax
call fcn.004d03e4
mov rcx, rax
call fcn.004d075f
jmp 0x43acb1
cmp word [rax + 0xc], 1
je 0x43ad57
jmp 0x43ad70
xor ebx, ebx
test dil, dil
jne 0x43b1a9
mov rcx, qword [0x0053bb30]
lea rdx, str.ERROR:_Bitmap_not_found_id
call fcn.004d0399
mov edx, r12d
mov rcx, rax
call fcn.004d03e4
lea rdx, str.__error
mov rcx, rax
call fcn.004d0399
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r12
mov edx, eax
call fcn.004d03e4
mov rcx, rax
call fcn.004d075f
mov rcx, qword [0x0053bb30]
lea rdx, [0x00532ebb]
call fcn.004d0399
lea rdx, str.miw_gdi.cpp
mov rcx, rax
call fcn.004d0399
lea rdx, [0x00532ed2]
mov rcx, rax
call fcn.004d0399
mov edx, 0xc6
mov rcx, rax
call fcn.004d0482
mov rcx, rax
call fcn.004d075f
mov dword [0], 0
ud2
mov ax, word [rax + 0xe]
lea edx, [rax - 4]
test dx, 0xfffb
jne 0x43ad70
cmp dword [r13 + 0x10], 0
je 0x43adf2
mov rcx, qword [0x0053bb30]
lea rdx, str.ERROR:_bad_bmp_format_id
call fcn.004d0399
mov edx, r12d
mov rcx, rax
call fcn.004d03e4
mov rcx, rax
call fcn.004d075f
mov rcx, qword [0x0053bb30]
lea rdx, str.biPlanes
call fcn.004d0399
movzx edx, word [r13 + 0xc]
mov rcx, rax
call fcn.004d03e4
lea rdx, str.__biBitCount
mov rcx, rax
call fcn.004d0399
movzx edx, word [r13 + 0xe]
mov rcx, rax
call fcn.004d03e4
lea rdx, str.__biCompression
mov rcx, rax
call fcn.004d0399
mov edx, dword [r13 + 0x10]
mov rcx, rax
call fcn.004d03e4
jmp 0x43afdd
lea r12, [rbp + 8]
mov ecx, 0xa
mov rsi, r13
mov rdi, r12
rep movsd dword [rdi], dword [rsi]
mov dword [rbp + 8], 0x28
lea rdi, [rbp + 0x30]
mov ecx, 0x100
mov esi, dword [r13]
mov ebx, dword [rbp + 0x28]
add rsi, r13
rep movsd dword [rdi], dword [rsi]
test ebx, ebx
jne 0x43ae34
cmp ax, 8
mov ebx, 0x100
mov eax, 0x10
cmovne ebx, eax
mov eax, dword [r13]
mov edx, ebx
lea rsi, [rax + rdx*4]
lea rax, [r13 + rsi]
mov qword [rbp - 0x30], rax
xor eax, eax
cmp dword [r12 + rax*4 + 0x28], 0xffc0c0
mov dword [rbp - 0x24], eax
je 0x43ae65
inc rax
cmp ebx, eax
ja 0x43ae49
mov dword [rbp - 0x24], 0
mov r13, qword [sym.imp.USER32.dll_GetSysColor]
mov ecx, 0x16
mov rsi, r12
xor r14d, r14d
call r13
mov r15d, 0xff
movzx edi, al
mov dword [rbp - 0x28], edi
movzx edi, ah
sar eax, 0x10
movzx eax, al
mov dword [rbp - 0x34], edi
mov edi, 0xc0
mov dword [rbp - 0x40], eax
movzx eax, byte [rsi + 0x2a]
mov r9b, byte [rsi + 0x29]
mov cl, byte [rsi + 0x28]
test al, al
jne 0x43aeb7
mov edx, ecx
or dl, r9b
jne 0x43af1c
mov ecx, 8
jmp 0x43af0e
cmp al, 0x40
jne 0x43aecd
cmp r9b, 0x40
jne 0x43af1c
cmp cl, 0x40
jne 0x43af1c
mov ecx, 0x15
jmp 0x43af0e
cmp al, 0x80
jne 0x43aee3
cmp r9b, 0x80
jne 0x43af1c
cmp cl, 0x80
jne 0x43af1c
mov ecx, 0x10
jmp 0x43af0e
cmp al, 0xff
jne 0x43af1c
cmp r9b, 0xc0
jne 0x43af00
cmp cl, 0xc0
jne 0x43af1c
mov byte [rsi + 0x2a], 0
mov byte [rsi + 0x29], 0
mov byte [rsi + 0x28], 0
jmp 0x43af5c
mov edx, ecx
and edx, r9d
inc dl
jne 0x43af1c
mov ecx, 5
call r13
mov byte [rsi + 0x2a], al
mov byte [rsi + 0x29], ah
sar eax, 0x10
jmp 0x43af59
imul eax, dword [rbp - 0x28]
cdq
idiv edi
cmp eax, 0xff
cmovg eax, r15d
mov byte [rsi + 0x2a], al
movzx eax, r9b
imul eax, dword [rbp - 0x34]
cdq
idiv edi
cmp eax, 0xff
cmovg eax, r15d
mov byte [rsi + 0x29], al
movzx eax, cl
imul eax, dword [rbp - 0x40]
cdq
idiv edi
cmp eax, 0xff
cmovg eax, r15d
mov byte [rsi + 0x28], al
inc r14d
add rsi, 4
cmp ebx, r14d
jne 0x43ae9a
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetDC]
mov rbx, rax
test rax, rax
jne 0x43af94
mov rcx, qword [0x0053bb30]
lea rdx, str.ERROR:_loadIconFromBitmap_could_not_get_ScreenDC
call fcn.004d0399
jmp 0x43b18e
mov qword [rsp + 0x20], r12
mov rdx, r12
mov rcx, rax
mov r8d, 4
mov dword [rsp + 0x28], 0
mov r9, qword [rbp - 0x30]
call qword [sym.imp.GDI32.dll_CreateDIBitmap]
xor ecx, ecx
mov rdx, rbx
mov r12, rax
call qword [sym.imp.USER32.dll_ReleaseDC]
test r12, r12
jne 0x43afec
lea rdx, str.ERROR:_CreateDIBitmap_failed
mov rcx, qword [0x0053bb30]
call fcn.004d0399
mov rcx, rax
xor ebx, ebx
call fcn.004d075f
jmp 0x43b1a9
mov r10d, dword [rbp + 0xc]
movzx eax, word [rbp + 0x16]
mov r15, rsp
mov r11d, dword [rbp + 0x10]
lea r8d, [r10 + 7]
mov dword [rbp - 0x28], eax
shr r8d, 3
mov eax, r11d
inc r8d
and r8d, 0xfffffffe
imul eax, r8d
add rax, 0xf
shr rax, 4
shl rax, 4
call fcn.004d3790
sub rsp, rax
cmp dword [rbp - 0x28], 8
lea ecx, [r10 + 3]
lea rbx, [rsp + 0x30]
je 0x43b040
lea ecx, [r10 + 1]
shr ecx, 1
add ecx, 3
and ecx, 0xfffffffc
lea eax, [r11 - 1]
mov rsi, qword [rbp - 0x30]
xor r13d, r13d
imul eax, ecx
mov rdx, rbx
add rsi, rax
mov eax, r8d
mov qword [rbp - 0x40], rax
mov eax, ecx
mov qword [rbp - 0x48], rax
cmp r11d, r13d
je 0x43b10c
mov rax, qword [rbp - 0x40]
lea r9, [rdx + rax]
xor eax, eax
cmp r10d, eax
jbe 0x43b0eb
lea r14d, [rax + 8]
lea ecx, [rax + 7]
mov byte [rdx], 0
cmp r10d, r14d
mov edi, r14d
mov dword [rbp - 0x34], ecx
cmovbe edi, r10d
mov dword [rbp - 0x30], edi
mov edi, eax
add rdi, rsi
mov ecx, dword [rbp - 0x34]
sub ecx, eax
cmp dword [rbp - 0x30], eax
jbe 0x43b0e3
cmp dword [rbp - 0x28], 4
jne 0x43b0c6
mov r8d, eax
shr r8d, 1
movzx r8d, byte [rsi + r8]
test al, 1
je 0x43b0c0
and r8d, 0xf
jmp 0x43b0ca
shr r8d, 4
jmp 0x43b0ca
movzx r8d, byte [rdi]
cmp dword [rbp - 0x24], r8d
jne 0x43b0dc
mov r8d, 1
shl r8d, cl
or byte [rdx], r8b
inc eax
inc rdi
jmp 0x43b09b
inc rdx
mov eax, r14d
jmp 0x43b077
cmp r9, rdx
je 0x43b0fd
mov rcx, r9
mov rdi, rdx
xor eax, eax
sub rcx, rdx
rep stosb byte [rdi], al
sub rsi, qword [rbp - 0x48]
inc r13d
mov rdx, r9
jmp 0x43b064
mov qword [rsp + 0x20], rbx
mov edx, r11d
mov r9d, 1
mov ecx, r10d
mov r8d, 1
call qword [sym.imp.GDI32.dll_CreateBitmap]
lea rdx, str.ERROR:_CreateMaskBitmap_failed
mov rsp, r15
mov r13, rax
test rax, rax
je 0x43afd1
mov qword [rbp - 0x18], 1
lea rcx, [rbp - 0x18]
mov dword [rbp - 0x10], 0
mov qword [rbp - 8], rax
mov qword [rbp], r12
call qword [sym.imp.USER32.dll_CreateIconIndirect]
mov rbx, rax
test rax, rax
jne 0x43b198
mov rcx, qword [0x0053bb30]
lea rdx, str.ERROR:_CreateIconIndirect_failed_error
call fcn.004d0399
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r12
mov edx, eax
call fcn.004d03e4
mov rcx, rax
call fcn.004d075f
jmp 0x43b1a9
mov rcx, r12
mov rsi, qword [sym.imp.GDI32.dll_DeleteObject]
call rsi
mov rcx, r13
call rsi
mov rax, rbx
lea rsp, [rbp + 0x438]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret