Function at 0x401080
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x18
mov eax, dword [0x404150]
push ebx
push ebp
push esi
push edi
and edx, 0xffff
push 2
mov ebx, ecx
push edx
push eax
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ecx, dword [0x404150]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
push 0x408
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
mov ebp, 0x100
lea ecx, [esi + 0x29]
mov word [edi], 0x300
mov word [edi + 2], bp
lea eax, [edi + 5]
mov dl, byte [ecx + 1]
add ecx, 4
mov byte [eax - 1], dl
mov dl, byte [ecx - 4]
mov byte [eax], dl
mov dl, byte [ecx - 5]
mov byte [eax + 1], dl
mov byte [eax + 2], 0
add eax, 4
dec ebp
jne 0x4010e7
push edi
call dword [sym.imp.GDI32.dll_CreatePalette]
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalHandle]
mov dword [0x404138], eax
push edi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ebp, ebp
push ebp
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [ebx + 0xc], eax
push edi
push ebp
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [0x404138]
mov ecx, dword [ebx + 0xc]
push ebp
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [ebx], eax
mov dword [esp + 0x10], ebp
mov ecx, dword [esi + 0x10]
push ebp
lea eax, [esp + 0x14]
xor edx, edx
push ebp
cmp ecx, 1
mov dword [esi + 0x10], ebp
mov dword [esi + 0x14], ebp
mov ecx, dword [ebx + 0xc]
push eax
push ebp
push esi
sete dl
push ecx
mov edi, edx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebx + 4], eax
mov edx, dword [esi]
test edi, edi
lea ebp, [esi + edx + 0x400]
je 0x401287
mov esi, dword [esi + 4]
mov edx, dword [esp + 0x10]
add esi, 3
and esi, 0xfffffffc
mov dword [esp + 0x14], esi
lea ebx, [esi + edx]
mov dword [esp + 0x2c], ebx
mov al, byte [ebp]
inc ebp
mov byte [esp + 0x30], al
test al, al
mov al, byte [ebp]
jne 0x40123e
mov byte [esp + 0x30], al
inc ebp
mov eax, dword [esp + 0x30]
and eax, 0xff
mov ecx, eax
sub ecx, 0
je 0x40121b
dec ecx
je 0x4012a6
dec ecx
je 0x401204
mov ecx, eax
mov esi, ebp
mov ebx, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, dword [esp + 0x2c]
and ecx, 3
add edx, eax
inc eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x14]
and al, 0xfe
add ebp, eax
jmp 0x4011b1
xor ecx, ecx
xor eax, eax
mov cl, byte [ebp + 1]
mov al, byte [ebp]
imul ecx, esi
add eax, edx
add ebp, 2
lea edx, [eax + ecx]
jmp 0x4011b1
cmp edx, ebx
je 0x401235
mov ecx, ebx
mov edi, edx
sub ecx, edx
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, ebx
add ebx, esi
jmp 0x4011ad
mov ecx, dword [esp + 0x30]
mov byte [esp + 0x18], al
mov eax, dword [esp + 0x18]
and ecx, 0xff
and eax, 0xff
mov dword [esp + 0x1c], ecx
mov bl, al
mov esi, ecx
mov bh, bl
mov edi, edx
mov eax, ebx
inc ebp
shl eax, 0x10
mov ax, bx
mov ebx, dword [esp + 0x2c]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, esi
mov esi, dword [esp + 0x14]
add edx, eax
jmp 0x4011b1
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x10]
imul ecx, dword [esp + 0x2c]
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4012aa
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebx + 8], eax
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8