Function at 0x6607cae2
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 0x18]
push ebx
xor ebx, ebx
push esi
cmp eax, ebx
push edi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
je 0x6607cb02
mov dword [eax], ebx
movzx eax, word [ebp + 0xc]
push 2
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
cmp esi, ebx
jne 0x6607cb21
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
mov edi, eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
mov dword [ebp - 0x1c], esi
je 0x6607cca3
cmp dword [ebp + 0x14], 0
je 0x6607cd09
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
mov dword [ebp - 0x18], 1
test ebx, ebx
je 0x6607ccb4
mov ecx, edi
mov edi, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test ebx, ebx
je 0x6607ccb4
cmp dword [ebx], 0x28
jne 0x6607cca3
mov cx, word [ebx + 0xe]
cmp cx, 0x10
jae 0x6607cca3
mov edi, dword [ebx + 0x20]
xor esi, esi
cmp edi, esi
jne 0x6607cba7
push 1
pop edi
shl edi, cl
push esi
call dword [sym.imp.USER32.dll_GetDC]
cmp dword [ebp + 0x18], esi
mov dword [ebp - 8], eax
je 0x6607cbe7
cmp dword [0x6610f6e0], esi
je 0x6607cbe7
lea eax, [edi*4 + 8]
push eax
push esi
push dword [0x6610f6c0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, esi
mov dword [ebp - 4], eax
je 0x6607cca3
mov word [eax], 0x300
mov word [eax + 2], di
cmp edi, esi
jle 0x6607cc5d
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], edi
add eax, 4
mov dword [ebp - 0x10], eax
lea eax, [ebx + 0x28]
cmp dword [ebp + 0x14], esi
mov dword [ebp - 0xc], esi
jle 0x6607cc31
mov esi, dword [ebp + 0x10]
mov edx, dword [esi]
xor ecx, ecx
mov cl, byte [esi + 1]
mov ch, byte [esi]
shr edx, 0x10
movzx edx, dl
shl ecx, 8
or ecx, edx
cmp dword [eax], ecx
je 0x6607cd10
inc dword [ebp - 0xc]
add esi, 8
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp + 0x14]
jl 0x6607cc05
xor esi, esi
cmp dword [ebp - 4], esi
je 0x6607cc51
mov edx, dword [eax]
xor ecx, ecx
mov ch, byte [eax]
mov cl, byte [eax + 1]
shr edx, 0x10
movzx edx, dl
shl ecx, 8
or ecx, edx
mov edx, dword [ebp - 0x10]
xor esi, esi
mov dword [edx], ecx
add dword [ebp - 0x10], 4
add eax, 4
dec dword [ebp - 0x14]
jne 0x6607cbfa
cmp dword [ebp - 8], esi
je 0x6607cca3
cmp dword [ebp - 4], esi
je 0x6607cc8d
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_CreatePalette]
mov ecx, dword [ebp + 0x18]
cmp eax, esi
mov dword [ecx], eax
je 0x6607cc8d
push esi
push eax
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_SelectPalette]
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_RealizePalette]
push esi
lea eax, [ebx + edi*4 + 0x28]
push ebx
push eax
push 4
push ebx
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x6607ccb4
cmp dword [ebp - 0x18], 0
je 0x6607ccb4
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x1c], 0
je 0x6607ccc3
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [ebp - 4], 0
je 0x6607ccda
push dword [ebp - 4]
push 0
push dword [0x6610f6c0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 8], 0
je 0x6607cceb
push dword [ebp - 8]
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x6607cb1a
movzx eax, word [ebp + 0xc]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadBitmapA]
jmp 0x6607cb1a
mov ebx, esi
jmp 0x6607cb7a
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0xc]
lea esi, [ecx + edx*8 + 4]
xor ecx, ecx
mov edx, dword [esi]
mov cl, byte [esi + 1]
mov ch, byte [esi]
shr edx, 0x10
movzx edx, dl
shl ecx, 8
or ecx, edx
mov dword [eax], ecx
jmp 0x6607cc2f