Function at 0x4051b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424595
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x435014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
xor edi, edi
cmp dword [ebx + 0x54], edi
je 0x4051fc
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push 0xffffffffffffffff
push dword [eax + 4]
call dword [sym.imp.COMCTL32.dll_ImageList_ReplaceIcon]
mov edi, 1
jmp 0x4053b8
movzx esi, word [ebp + 0xc]
push 2
push esi
call dword [sym.imp.mfc140u.dll_AfxFindResourceHandle]
push 2
push esi
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x405237
movzx eax, word [ebp + 0xc]
push 2
push eax
push esi
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x40531e
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40531e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, eax
test ecx, ecx
je 0x40531e
mov eax, dword [ecx + 0x20]
movzx edx, ax
test eax, eax
je 0x405269
cmp edx, 0x10
jmp 0x405279
movzx eax, word [ecx + 0xe]
sub eax, 1
je 0x40531e
sub eax, 3
jne 0x40531e
push 0
push esi
push dword [ebp - 0x10]
call dword [sym.imp.mfc140u.dll_AfxLoadSysColorBitmap]
mov esi, eax
test esi, esi
je 0x40531e
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], vtable.CBitmap.0
push esi
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call dword [sym.imp.mfc140u.dll_CGdiObject::Attach]
cmp dword [ebx + 0x3c], 0
je 0x4052d4
push dword [ebx + 0x38]
mov eax, dword [ebp + 8]
push dword [ebp - 0x14]
push dword [eax + 4]
mov eax, dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
call eax
test eax, eax
js 0x4052f8
mov edi, 1
jmp 0x4052f8
mov eax, dword [sym.imp.USER32.dll_GetSysColor]
push 0xf
call eax
push eax
mov eax, dword [ebp + 8]
push dword [ebp - 0x14]
push dword [eax + 4]
mov eax, dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
call eax
test eax, eax
mov ecx, 1
cmovns edi, ecx
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140u.dll_CGdiObject::Detach]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], vtable.CBitmap.0
jmp 0x4053ab
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], vtable.CBitmap.0
movzx eax, word [ebp + 0xc]
push eax
push 2
push eax
mov dword [ebp - 4], 1
call dword [sym.imp.mfc140u.dll_AfxFindResourceHandle]
push eax
call dword [sym.imp.USER32.dll_LoadBitmapW]
push eax
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc140u.dll_CGdiObject::Attach]
test eax, eax
je 0x40539a
cmp dword [ebx + 0x3c], 0
je 0x405376
push dword [ebx + 0x38]
mov eax, dword [ebp + 8]
push dword [ebp - 0x1c]
push dword [eax + 4]
mov eax, dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
call eax
test eax, eax
js 0x40539a
mov edi, 1
jmp 0x40539a
mov eax, dword [sym.imp.USER32.dll_GetSysColor]
push 0xf
call eax
push eax
mov eax, dword [ebp + 8]
push dword [ebp - 0x1c]
push dword [eax + 4]
mov eax, dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
call eax
test eax, eax
mov ecx, 1
cmovns edi, ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], vtable.CBitmap.0
call fcn.00406680
test edi, edi
je 0x4054c0
call fcn.00401590
test eax, eax
jne 0x4053ce
cmp dword [0x435e34], 1
jne 0x4054c0
call dword [sym.imp.mfc140u.dll_AfxGetThread]
test eax, eax
je 0x4053e6
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x4053f6
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.mfc140u.dll_CWnd::FromHandle]
mov dword [ebp + 0xc], eax
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_GetDC]
push eax
call dword [sym.imp.mfc140u.dll_CDC::FromHandle]
mov esi, eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], vtable.CBitmap.0
mov dword [ebp - 4], 2
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], vtable.CBitmap.0
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 3
push eax
push 0
push dword [ebp + 8]
mov ecx, ebx
push esi
call fcn.00402f10
lea eax, [ebp - 0x30]
push eax
call fcn.00404c70
push 0xf
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
mov eax, dword [ebp + 8]
push dword [ebp - 0x2c]
push dword [eax + 4]
call dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
push 0
push dword [ebp + 8]
push esi
call fcn.00402f10
lea eax, [ebp - 0x28]
push eax
call fcn.00404f10
push 0xf
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
mov eax, dword [ebp + 8]
push dword [ebp - 0x24]
push dword [eax + 4]
call dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
mov eax, dword [ebp + 0xc]
push dword [esi + 4]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x28], vtable.CBitmap.0
call fcn.00406680
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], vtable.CBitmap.0
call fcn.00406680
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8