Function at 0x408760
Capabilities:
Extract resource via kernel32 functions
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x42e540
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
mov dword [esp + 4], ecx
push ebp
push esi
lea ecx, [esp + 0x44]
call fcn.00426a7f
lea ecx, [esp + 0x54]
mov dword [esp + 0x6c], 0
call fcn.00426a7f
mov eax, dword [esp + 0x74]
push 0
push 0x8000
lea ecx, [esp + 0x4c]
mov eax, dword [eax]
mov byte [esp + 0x74], 1
push eax
call fcn.00426b91
test eax, eax
je 0x40881d
lea ecx, [esp + 0x34]
push 0xe
push ecx
lea ecx, [esp + 0x4c]
call fcn.00426cae
mov edx, dword [esp + 0x3e]
lea esi, [edx - 0xe]
push esi
call fcn.00425303
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x408814
push esi
push ebp
lea ecx, [esp + 0x4c]
call fcn.00426cae
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x40880b
mov eax, dword [esp + 0x78]
push 0
push 0x9001
lea ecx, [esp + 0x5c]
mov eax, dword [eax]
push eax
call fcn.00426b91
test eax, eax
jne 0x408851
push ebp
call fcn.0042532c
add esp, 4
lea ecx, [esp + 0x44]
call fcn.00426dac
lea ecx, [esp + 0x54]
mov byte [esp + 0x6c], 0
call fcn.00426ad4
lea ecx, [esp + 0x44]
mov dword [esp + 0x6c], 0xffffffff
call fcn.00426ad4
pop esi
xor al, al
pop ebp
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret 0x18
mov ecx, dword [esp + 0x7c]
push ebx
push edi
lea edx, [ecx*4 + 0x28]
push edx
call fcn.00425303
mov ebx, eax
mov eax, dword [esp + 0x94]
mov ecx, 0xa
mov esi, ebp
mov edi, ebx
mov edx, dword [esp + 0x8c]
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x20], eax
mov eax, dword [esp + 0x90]
mov dword [ebx + 0x24], 0
mov word [ebx + 0xe], ax
mov ecx, dword [ebp + 4]
and eax, 0xffff
mov dword [ebx + 4], ecx
imul eax, dword [ebx + 4]
mov ecx, dword [ebp + 8]
add eax, 0x1f
sar eax, 3
and al, 0xfc
mov dword [ebx + 8], ecx
imul eax, ecx
mov dword [ebx + 0x14], eax
mov eax, dword [edx + 4]
add esp, 4
test eax, eax
jne 0x4089c4
mov esi, dword [esp + 0x84]
lea eax, [esi*4 + 8]
push eax
call fcn.00425303
mov edi, eax
add esp, 4
cmp esi, 0x100
mov dword [esp + 0x7c], edi
mov word [edi], 0x300
mov word [edi + 2], si
jne 0x408964
call fcn.0042acfa
mov eax, dword [eax + 8]
push str.PALETTE256
push str.PALETTE256
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4089ad
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x4089ad
mov ecx, esi
lea edi, [ebx + 0x28]
mov esi, eax
mov eax, dword [esp + 0x7c]
rep movsd dword es:[edi], dword [esi]
add eax, 5
lea esi, [ebx + 0x29]
mov edi, 0x100
mov cl, byte [esi + 1]
add esi, 4
mov byte [eax - 1], cl
mov dl, byte [esi - 4]
mov byte [eax], dl
mov cl, byte [esi - 5]
mov byte [eax + 1], cl
mov byte [eax + 2], 0
add eax, 4
dec edi
jne 0x408944
jmp 0x4089a9
mov eax, 0x43c8dc
add edi, 5
lea esi, [ebx + 0x29]
mov dl, byte [eax - 4]
add eax, 0xc
mov byte [esi - 1], dl
mov cl, byte [eax - 0xc]
mov byte [esi], cl
mov dl, byte [eax - 8]
mov byte [esi + 1], dl
mov byte [esi + 2], 0
mov cl, byte [eax - 8]
add esi, 4
mov byte [edi - 1], cl
mov dl, byte [eax - 0xc]
mov byte [edi], dl
mov cl, byte [eax - 0x10]
mov byte [edi + 1], cl
mov byte [edi + 2], 0
add edi, 4
cmp eax, 0x43c99c
jl 0x40896f
mov edi, dword [esp + 0x7c]
push edi
call dword [sym.imp.GDI32.dll_CreatePalette]
mov ecx, dword [esp + 0x88]
push eax
call fcn.00428968
push edi
jmp 0x408a21
mov edi, dword [esp + 0x84]
lea edx, [edi*4]
push edx
call fcn.00425303
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x7c], esi
push esi
push edi
mov ecx, dword [eax + 4]
push 0
push ecx
call dword [sym.imp.GDI32.dll_GetPaletteEntries]
test edi, edi
jle 0x408a20
lea eax, [ebx + 0x29]
inc esi
mov dl, byte [esi + 1]
add esi, 4
mov byte [eax - 1], dl
mov cl, byte [esi - 4]
mov byte [eax], cl
mov dl, byte [esi - 5]
mov byte [eax + 1], dl
mov byte [eax + 2], 0
add eax, 4
dec edi
jne 0x4089fe
mov esi, dword [esp + 0x7c]
push esi
call fcn.0042532c
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
mov dword [esp + 0x30], eax
mov ax, word [esp + 0x4c]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x38], edx
mov word [esp + 0x3c], ax
mov edx, dword [ebx]
lea esi, [ecx*4]
add esp, 4
mov dword [esp + 0x1c], esi
lea eax, [esi + edx + 0xe]
lea edx, [esp + 0x2c]
mov dword [esp + 0x36], eax
mov ecx, dword [ebx + 0x14]
add ecx, eax
push 0xe
mov dword [esp + 0x32], ecx
push edx
lea ecx, [esp + 0x64]
call fcn.00426ce8
mov edx, dword [ebx]
lea ecx, [esp + 0x5c]
add esi, edx
push esi
push ebx
call fcn.00426ce8
xor eax, eax
mov ax, word [ebp + 0xe]
imul eax, dword [ebp + 4]
cdq
and edx, 7
add eax, edx
mov esi, eax
sar esi, 3
mov eax, esi
mov dword [esp + 0x80], esi
and eax, 3
jbe 0x408ac2
mov ecx, 4
sub ecx, eax
add esi, ecx
mov dword [esp + 0x80], esi
xor eax, eax
mov ax, word [ebx + 0xe]
imul eax, dword [ebx + 4]
cdq
and edx, 7
add eax, edx
mov edi, eax
sar edi, 3
mov eax, edi
mov dword [esp + 0x90], edi
and eax, 3
jbe 0x408af5
mov edx, 4
sub edx, eax
add edi, edx
mov dword [esp + 0x90], edi
lea eax, [esi + esi*4]
lea eax, [eax + eax*4]
shl eax, 2
push eax
call fcn.00425303
mov dword [esp + 0x14], eax
lea eax, [edi + edi*4]
lea ecx, [eax + eax*4]
shl ecx, 2
push ecx
call fcn.00425303
mov dword [esp + 0x84], eax
mov eax, dword [ebp + 8]
add esp, 8
mov dword [esp + 0x8c], 0
test eax, eax
jbe 0x408c70
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x84], 0x64
sub eax, edx
cmp eax, 0x64
ja 0x408b57
mov dword [esp + 0x84], eax
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x10]
imul edx, esi
push edx
push eax
lea ecx, [esp + 0x54]
call fcn.00426cae
mov edx, dword [esp + 0x84]
xor eax, eax
imul edx, edi
mov edi, dword [esp + 0x7c]
mov ecx, edx
mov esi, ecx
mov dword [esp + 0x18], edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x84]
xor edi, edi
test eax, eax
jbe 0x408c37
mov eax, dword [ebp + 4]
xor esi, esi
test eax, eax
jbe 0x408c17
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x18]
push esi
push edi
push ebp
push edx
call fcn.00409310
mov eax, dword [eax]
xor ecx, ecx
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x25]
mov ch, al
mov eax, dword [esp + 0x26]
and edx, 0xff
and eax, 0xff
or ecx, edx
shl ecx, 8
or ecx, eax
push ecx
mov ecx, dword [esp + 0x8c]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.GDI32.dll_GetNearestPaletteIndex]
mov ecx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x80]
push eax
push esi
push edi
push ebx
call fcn.00409500
mov eax, dword [ebp + 4]
inc esi
cmp esi, eax
jb 0x408bae
mov eax, dword [esp + 0x84]
inc edi
cmp edi, eax
jb 0x408ba5
mov edi, dword [esp + 0x90]
mov esi, dword [esp + 0x80]
mov edx, dword [esp + 0x18]
jmp 0x408c45
mov esi, dword [esp + 0x80]
mov edi, dword [esp + 0x90]
mov ecx, dword [esp + 0x7c]
push edx
push ecx
lea ecx, [esp + 0x64]
call fcn.00426ce8
mov ecx, dword [esp + 0x8c]
mov eax, dword [ebp + 8]
add ecx, 0x64
cmp ecx, eax
mov dword [esp + 0x8c], ecx
jb 0x408b37
mov edx, dword [ebx]
push 0
add edx, 0xe
lea ecx, [esp + 0x60]
push edx
call fcn.00426d33
mov eax, dword [esp + 0x1c]
lea ecx, [ebx + 0x28]
push eax
push ecx
lea ecx, [esp + 0x64]
call fcn.00426ce8
mov edx, dword [esp + 0x7c]
push edx
call fcn.0042532c
mov eax, dword [esp + 0x14]
push eax
call fcn.0042532c
push ebp
call fcn.0042532c
push ebx
call fcn.0042532c
add esp, 0x10
lea ecx, [esp + 0x5c]
call fcn.00426dac
lea ecx, [esp + 0x4c]
call fcn.00426dac
lea ecx, [esp + 0x5c]
mov byte [esp + 0x74], 0
call fcn.00426ad4
lea ecx, [esp + 0x4c]
mov dword [esp + 0x74], 0xffffffff
call fcn.00426ad4
mov ecx, dword [esp + 0x6c]
pop edi
pop ebx
pop esi
mov al, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x68
ret 0x18