Function at 0x43b108
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 0x43b1b1
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 0x43b178
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r13, rax
test rax, rax
jne 0x43b1a1
lea rdx, str.ERROR:_could_not_lock_bitmap_error
mov rcx, qword [0x0053cb90]
call fcn.004d0ff9
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r13
mov edx, eax
call fcn.004d1044
mov rcx, rax
call fcn.004d13bf
jmp 0x43b1b1
cmp word [rax + 0xc], 1
je 0x43b257
jmp 0x43b270
xor ebx, ebx
test dil, dil
jne 0x43b6a9
mov rcx, qword [0x0053cb90]
lea rdx, str.ERROR:_Bitmap_not_found_id
call fcn.004d0ff9
mov edx, r12d
mov rcx, rax
call fcn.004d1044
lea rdx, str.__error
mov rcx, rax
call fcn.004d0ff9
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r12
mov edx, eax
call fcn.004d1044
mov rcx, rax
call fcn.004d13bf
mov rcx, qword [0x0053cb90]
lea rdx, [0x00533edb]
call fcn.004d0ff9
lea rdx, str.miw_gdi.cpp
mov rcx, rax
call fcn.004d0ff9
lea rdx, [0x00533ef2]
mov rcx, rax
call fcn.004d0ff9
mov edx, 0xc6
mov rcx, rax
call fcn.004d10e2
mov rcx, rax
call fcn.004d13bf
mov dword [0], 0
ud2
mov ax, word [rax + 0xe]
lea edx, [rax - 4]
test dx, 0xfffb
jne 0x43b270
cmp dword [r13 + 0x10], 0
je 0x43b2f2
mov rcx, qword [0x0053cb90]
lea rdx, str.ERROR:_bad_bmp_format_id
call fcn.004d0ff9
mov edx, r12d
mov rcx, rax
call fcn.004d1044
mov rcx, rax
call fcn.004d13bf
mov rcx, qword [0x0053cb90]
lea rdx, str.biPlanes
call fcn.004d0ff9
movzx edx, word [r13 + 0xc]
mov rcx, rax
call fcn.004d1044
lea rdx, str.__biBitCount
mov rcx, rax
call fcn.004d0ff9
movzx edx, word [r13 + 0xe]
mov rcx, rax
call fcn.004d1044
lea rdx, str.__biCompression
mov rcx, rax
call fcn.004d0ff9
mov edx, dword [r13 + 0x10]
mov rcx, rax
call fcn.004d1044
jmp 0x43b4dd
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 0x43b334
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 0x43b365
inc rax
cmp ebx, eax
ja 0x43b349
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 0x43b3b7
mov edx, ecx
or dl, r9b
jne 0x43b41c
mov ecx, 8
jmp 0x43b40e
cmp al, 0x40
jne 0x43b3cd
cmp r9b, 0x40
jne 0x43b41c
cmp cl, 0x40
jne 0x43b41c
mov ecx, 0x15
jmp 0x43b40e
cmp al, 0x80
jne 0x43b3e3
cmp r9b, 0x80
jne 0x43b41c
cmp cl, 0x80
jne 0x43b41c
mov ecx, 0x10
jmp 0x43b40e
cmp al, 0xff
jne 0x43b41c
cmp r9b, 0xc0
jne 0x43b400
cmp cl, 0xc0
jne 0x43b41c
mov byte [rsi + 0x2a], 0
mov byte [rsi + 0x29], 0
mov byte [rsi + 0x28], 0
jmp 0x43b45c
mov edx, ecx
and edx, r9d
inc dl
jne 0x43b41c
mov ecx, 5
call r13
mov byte [rsi + 0x2a], al
mov byte [rsi + 0x29], ah
sar eax, 0x10
jmp 0x43b459
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 0x43b39a
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetDC]
mov rbx, rax
test rax, rax
jne 0x43b494
mov rcx, qword [0x0053cb90]
lea rdx, str.ERROR:_loadIconFromBitmap_could_not_get_ScreenDC
call fcn.004d0ff9
jmp 0x43b68e
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 0x43b4ec
lea rdx, str.ERROR:_CreateDIBitmap_failed
mov rcx, qword [0x0053cb90]
call fcn.004d0ff9
mov rcx, rax
xor ebx, ebx
call fcn.004d13bf
jmp 0x43b6a9
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.004d43f0
sub rsp, rax
cmp dword [rbp - 0x28], 8
lea ecx, [r10 + 3]
lea rbx, [rsp + 0x30]
je 0x43b540
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 0x43b60c
mov rax, qword [rbp - 0x40]
lea r9, [rdx + rax]
xor eax, eax
cmp r10d, eax
jbe 0x43b5eb
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 0x43b5e3
cmp dword [rbp - 0x28], 4
jne 0x43b5c6
mov r8d, eax
shr r8d, 1
movzx r8d, byte [rsi + r8]
test al, 1
je 0x43b5c0
and r8d, 0xf
jmp 0x43b5ca
shr r8d, 4
jmp 0x43b5ca
movzx r8d, byte [rdi]
cmp dword [rbp - 0x24], r8d
jne 0x43b5dc
mov r8d, 1
shl r8d, cl
or byte [rdx], r8b
inc eax
inc rdi
jmp 0x43b59b
inc rdx
mov eax, r14d
jmp 0x43b577
cmp r9, rdx
je 0x43b5fd
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 0x43b564
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 0x43b4d1
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 0x43b698
mov rcx, qword [0x0053cb90]
lea rdx, str.ERROR:_CreateIconIndirect_failed_error
call fcn.004d0ff9
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r12
mov edx, eax
call fcn.004d1044
mov rcx, rax
call fcn.004d13bf
jmp 0x43b6a9
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