Function at 0x10082adb
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x1c
push ebp
xor eax, eax
and dword [esp + 0x10], eax
push esi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x38]
push edi
xor ebp, ebp
xor edi, edi
test eax, eax
jne 0x1010359e
movzx eax, word [esp + 0x30]
push 2
push eax
push dword [esp + 0x34]
call dword [sym.imp.kernel32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x10082c84
push ebx
push esi
push dword [esp + 0x34]
call dword [sym.imp.kernel32.dll_SizeofResource]
push esi
push dword [esp + 0x34]
mov ebx, eax
call dword [sym.imp.kernel32.dll_LoadResource]
mov dword [esp + 0x20], eax
test eax, eax
je 0x10103638
cmp dword [esp + 0x3c], edi
je 0x10082cae
push ebx
push 0x40
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov esi, eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], 1
test esi, esi
je 0x10082c58
push ebx
push dword [esp + 0x24]
push esi
call sub.msvcr100.dll_memcpy
add esp, 0xc
test esi, esi
je 0x10082c58
cmp dword [esi], 0x28
jne 0x10082c4a
movzx eax, word [esi + 0xe]
cmp eax, 0x10
jae 0x10082c4a
mov ebx, dword [esi + 0x20]
test ebx, ebx
jne 0x10082b9d
inc ebx
mov cl, al
shl ebx, cl
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, eax
mov dword [esp + 0x28], ebp
cmp dword [esp + 0x40], edi
jne 0x101035a5
test ebx, ebx
jle 0x10082c26
lea eax, [edi + 4]
mov ecx, ebx
lea ebp, [esi + 0x28]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
xor edx, edx
cmp dword [esp + 0x3c], edx
jle 0x10082c05
movzx ecx, byte [esi + edx*8]
movzx eax, byte [esi + edx*8 + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + edx*8 + 2]
shl ecx, 8
or ecx, eax
cmp dword [ebp], ecx
je 0x10082c8d
inc edx
cmp edx, dword [esp + 0x3c]
jl 0x10082bd5
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test edi, edi
jne 0x101035db
add eax, 4
add ebp, 4
dec ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
jne 0x10082bcd
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x10082c4a
test edi, edi
jne 0x10103600
push 0
push esi
lea eax, [ebx + 0xa]
lea eax, [esi + eax*4]
push eax
push 4
push esi
push ebp
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov dword [esp + 0x24], eax
cmp dword [esp + 0x1c], 0
je 0x10082c58
push esi
call dword [sym.imp.kernel32.dll_GlobalFree]
push dword [esp + 0x20]
call dword [sym.imp.kernel32.dll_FreeResource]
test edi, edi
jne 0x1010362b
test ebp, ebp
je 0x10082c77
push ebp
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x10103638
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x1c
ret 0x14
movzx ecx, byte [esi + edx*8 + 4]
movzx eax, byte [esi + edx*8 + 5]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + edx*8 + 6]
shl ecx, 8
or ecx, eax
mov dword [ebp], ecx
jmp 0x10082bfd
mov esi, eax
mov dword [esp + 0x18], eax
jmp 0x10082b73
and dword [eax], edi
jmp 0x10082afb
cmp dword [0x10240a88], edi
je 0x10082bb5
lea eax, [ebx*4 + 8]
push eax
call dword [sym.imp.msvcr100.dll_malloc]
mov edi, eax
pop ecx
test edi, edi
je 0x10082c4a
mov eax, 0x300
mov word [edi], ax
mov word [edi + 2], bx
jmp 0x10082bb5
movzx eax, byte [ebp]
movzx ecx, byte [ebp + 1]
shl eax, 8
or ecx, eax
movzx eax, byte [ebp + 2]
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x10]
mov dword [eax], ecx
mov ecx, dword [esp + 0x14]
jmp 0x10082c0d
push edi
call dword [sym.imp.GDI32.dll_CreatePalette]
mov ecx, dword [esp + 0x40]
mov dword [ecx], eax
test eax, eax
je 0x10082c32
push 0
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebp
call dword [sym.imp.GDI32.dll_RealizePalette]
jmp 0x10082c32
push edi
call dword [sym.imp.msvcr100.dll_free]
pop ecx
jmp 0x10082c6a
movzx eax, word [esp + 0x34]
push eax
push dword [esp + 0x34]
call dword [sym.imp.USER32.dll_LoadBitmapA]
jmp 0x10082c83