Function at 0x6780f5a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xffffffffffffffff
push 0x6797fd78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_FindResourceA]
push esi
mov esi, dword [esp + 0x34]
push edi
mov edi, dword [esp + 0x34]
push 0xe
mov ebx, ecx
push esi
push edi
mov dword [esp + 0x1c], ebx
call ebp
test eax, eax
je 0x6780f66e
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x6780f66e
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x6780f7e2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x6780f7e2
xor ebp, ebp
mov bp, word [eax + 4]
dec ebp
js 0x6780f7af
mov ebx, dword [esp + 0x40]
lea ecx, [ebp*8]
sub ecx, ebp
lea esi, [eax + ecx*2 + 7]
mov eax, dword [esp + 0x3c]
xor edx, edx
mov dl, byte [esi - 1]
cmp edx, eax
jne 0x6780f655
xor ecx, ecx
mov cl, byte [esi]
cmp ecx, ebx
jne 0x6780f655
mov ecx, dword [esp + 0x10]
xor edx, edx
mov dx, word [esi + 0xb]
push 0
push ebx
push eax
push edx
push edi
call sym.MfcHlpr520.dll_public:_int___thiscall_CMHPImageManagerIconHandle::CreateIconFromResource_struct_HINSTANCE_____char_const___class_CSize__int_
test eax, eax
jne 0x6780f664
dec ebp
sub esi, 0xe
test ebp, ebp
jge 0x6780f627
xor eax, eax
jmp 0x6780f7e2
mov eax, 1
jmp 0x6780f7e2
push 3
push esi
push edi
call ebp
mov esi, eax
test esi, esi
je 0x6780f7e2
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x6780f7e2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
test ebp, ebp
je 0x6780f7e2
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp word [ebp + 0xe], 0x20
jne 0x6780f7b3
lea ecx, [esp + 0x14]
call fcn.6797d946
push 0
mov dword [esp + 0x30], 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CDC::Attach
push 0x34
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x6780f6fe
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
xor eax, eax
jmp 0x6780f7e2
mov ecx, 0xa
mov esi, ebp
mov edi, ebx
push 0
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
cdq
sub eax, edx
lea edx, [esp + 0x3c]
sar eax, 1
imul ecx, eax
mov dword [ebx + 8], eax
lea eax, [esp + 0x18]
shl ecx, 2
neg eax
mov dword [ebx + 0x14], ecx
mov edi, dword [esp + 0x1c]
sbb eax, eax
push 0
push edx
and eax, edi
push 0
push ebx
push eax
mov dword [esp + 0x50], 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov edi, dword [esp + 0x38]
test edi, edi
je 0x6780f794
test eax, eax
je 0x6780f794
mov ecx, dword [ebx + 0x14]
lea esi, [ebp + 0x28]
mov edx, ecx
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
call sym.MfcHlpr520.dll_public:_class_CMHPImageManagerIconHandle_const____thiscall_CMHPImageManagerIconHandle::operator_struct_HBITMAP____const_
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
mov ebx, dword [esp + 0x10]
jmp 0x6780f7d6
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
xor eax, eax
jmp 0x6780f7e2
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
push 0
push ecx
push edx
push 0x30000
push 1
push eax
push ebp
call dword [sym.imp.USER32.dll_CreateIconFromResourceEx]
push eax
mov ecx, ebx
call sym.MfcHlpr520.dll_public:_class_CMHPImageManagerIconHandle_const____thiscall_CMHPImageManagerIconHandle::operator_struct_HICON____const_
mov ecx, ebx
call sym.MfcHlpr520.dll_public:_int___thiscall_CMHPImageManagerIconHandle::IsEmpty_void_const
neg eax
sbb eax, eax
inc eax
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 0x14