Function at 0x4241c4
Capabilities:
Resolve function by parsing pe exports

Disassembly:
test dword [0x4b63ec], 0xffffff80
jne 0x4241ec
test dword [0x4b63ec], 0xffffffff
jne 0x4246d4
call fcn.00490ee4
jmp fcn.004241c4
push edi
push esi
push ebp
push ebx
sub esp, 0x8a4
mov ebp, ecx
cmp dword [ebp + 0xdbfc], 0
jne 0x4243a8
cmp dword [ebp + 0xe078], 0
je 0x4244cc
lea eax, [esp + 0x78]
push eax
push 0x100
push 0
push dword [ebp + 0xdbcc]
call dword [sym.imp.GDI32.dll_GetSystemPaletteEntries]
mov ebx, eax
mov dword [esp + 0x898], 0
mov ecx, 0x4a3b98
mov dword [esp + 0x894], ecx
mov dword [esp + 0x89c], 0x4be320
mov dword [esp + 0x8a0], ebx
cmp dword [0x4a3ba4], 0
jl 0x424272
lea edx, [esp + 0x8a0]
push edx
push dword [esp + 0x8a0]
call fcn.0045763c
test ebx, ebx
jbe 0x4242a9
xor edx, edx
mov byte [esp + edx*4 + 0x47b], 0
movzx ecx, byte [esp + edx*4 + 0x78]
mov byte [esp + edx*4 + 0x47a], cl
movzx ecx, byte [esp + edx*4 + 0x79]
mov byte [esp + edx*4 + 0x479], cl
movzx ecx, byte [esp + edx*4 + 0x7a]
mov byte [esp + edx*4 + 0x478], cl
inc edx
cmp edx, ebx
jb 0x424278
cmp ebx, 0x100
jae 0x4242fc
mov esi, ebx
and esi, 1
mov eax, 0xff
mov edx, 0
mov ecx, edx
mov edi, ebx
cmovne ecx, eax
and edi, 2
mov byte [esp + ebx*4 + 0x47a], cl
mov ecx, edx
cmovne ecx, eax
mov byte [esp + ebx*4 + 0x479], cl
mov ecx, ebx
and ecx, 4
cmove eax, edx
mov byte [esp + ebx*4 + 0x478], al
mov byte [esp + ebx*4 + 0x47b], dl
inc ebx
cmp ebx, 0x100
jb 0x4242b1
push dword [ebp + 0xdbcc]
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebx, eax
test ebx, ebx
je 0x424485
push dword [ebp + 0xdbd0]
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov ebp, eax
test ebp, ebp
je 0x42443e
lea edx, [esp + 0x478]
push edx
push 0x100
push 0
push ebx
call dword [sym.imp.GDI32.dll_SetDIBColorTable]
test eax, eax
jne 0x42439c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x87c], 0
mov ecx, 0x4a3b98
mov dword [esp + 0x878], ecx
mov dword [esp + 0x880], 0x4be4a0
mov dword [esp + 0x884], eax
cmp dword [0x4a3ba4], 0
jl 0x42438f
lea eax, [esp + 0x884]
push eax
push dword [esp + 0x884]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
push ebp
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
test eax, eax
je 0x4243f7
mov dword [esp + 0x88c], 0
mov ecx, 0x4a3b98
mov dword [esp + 0x888], ecx
mov dword [esp + 0x890], 0x4be5a0
cmp dword [0x4a3ba4], 0
jl 0x4243e7
lea eax, [esp + 0x894]
push eax
push dword [esp + 0x894]
call fcn.0045763c
mov eax, 1
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x34], 0
mov ecx, 0x4a3b98
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], 0x4be520
mov dword [esp + 0x3c], eax
cmp dword [0x4a3ba4], 0
jl 0x424431
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x3c]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x5c], 0
mov ecx, 0x4a3b98
mov dword [esp + 0x58], ecx
mov dword [esp + 0x60], 0x4be420
mov dword [esp + 0x64], eax
cmp dword [0x4a3ba4], 0
jl 0x424478
lea eax, [esp + 0x64]
push eax
push dword [esp + 0x64]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x6c], 0
mov ecx, 0x4a3b98
mov dword [esp + 0x68], ecx
mov dword [esp + 0x70], 0x4be3a0
mov dword [esp + 0x74], eax
cmp dword [0x4a3ba4], 0
jl 0x4244bf
lea eax, [esp + 0x74]
push eax
push dword [esp + 0x74]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
push 0x408
call fcn.00485d1c
pop ecx
mov edi, eax
test edi, edi
je 0x424695
mov edx, 0x300
mov esi, 0x100
lea ebx, [edi + 4]
mov word [edi], dx
mov word [edi + 2], si
push ebx
push esi
push 0
push dword [ebp + 0xdbcc]
call dword [sym.imp.GDI32.dll_GetSystemPaletteEntries]
test eax, eax
jne 0x42454c
mov dword [esp + 0x50], 0
mov ecx, 0x4a3b98
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x54], 0x4be0e0
cmp dword [0x4a3ba4], 0
jl 0x424539
lea edx, [esp + 0x58]
push edx
push dword [esp + 0x58]
call fcn.0045763c
push edi
call fcn.00485bcc
xor eax, eax
add esp, 0x8a8
pop ebx
pop ebp
pop esi
pop edi
ret
push edi
call dword [sym.imp.GDI32.dll_CreatePalette]
mov ebx, eax
test ebx, ebx
je 0x424652
push 0
push ebx
push dword [ebp + 0xdbc8]
call dword [sym.imp.GDI32.dll_SelectPalette]
mov esi, eax
test esi, esi
je 0x424608
push dword [ebp + 0xdbc8]
call dword [sym.imp.GDI32.dll_RealizePalette]
cmp eax, 0xffffffff
jne 0x4245b9
mov dword [esp + 0x1c], 8
mov ecx, 0x4a3b98
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], 0x4be240
mov edx, dword [0x4a3ba4]
cmp edx, 8
jl 0x4245b9
lea edx, [esp + 0x24]
push edx
push dword [esp + 0x24]
call fcn.0045763c
push edi
call fcn.00485bcc
pop ecx
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [esp + 0x44], 9
mov ecx, 0x4a3b98
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], 0x4be2c0
mov eax, dword [0x4a3ba4]
cmp eax, 9
jl 0x4245f8
lea eax, [esp + 0x4c]
push eax
push dword [esp + 0x4c]
call fcn.0045763c
mov eax, 1
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 4], 0
mov ecx, 0x4a3b98
mov dword [esp], ecx
mov dword [esp + 8], 0x4be1c0
cmp dword [0x4a3ba4], 0
jl 0x424637
lea edx, [esp + 0xc]
push edx
push dword [esp + 0xc]
call fcn.0045763c
push edi
call fcn.00485bcc
pop ecx
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 0x10], 0
mov ecx, 0x4a3b98
mov dword [esp + 0xc], ecx
mov dword [esp + 0x14], 0x4be160
cmp dword [0x4a3ba4], 0
jl 0x424682
lea edx, [esp + 0x18]
push edx
push dword [esp + 0x18]
call fcn.0045763c
push edi
call fcn.00485bcc
xor eax, eax
add esp, 0x8a8
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 0x28], 0
mov ecx, 0x4a3b98
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], 0x4be060
cmp dword [0x4a3ba4], 0
jl 0x4246c5
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x30]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
push edi
push esi
push ebp
push ebx
sub esp, 0x8a4
mov ebx, ecx
cmp dword [ebx + 0xdbfc], 0
jne 0x4248a1
cmp dword [ebx + 0xe078], 0
je 0x4249c5
lea eax, [esp + 0x78]
push eax
push 0x100
push 0
push dword [ebx + 0xdbcc]
call dword [sym.imp.GDI32.dll_GetSystemPaletteEntries]
mov ebp, eax
mov ecx, 0x4a3b98
mov dword [esp + 0x894], ecx
mov dword [esp + 0x898], 0
mov dword [esp + 0x89c], 0x4be320
mov dword [esp + 0x8a0], ebp
cmp dword [0x4a3ba4], 0
jl 0x42475a
lea edx, [esp + 0x8a0]
push edx
push dword [esp + 0x8a0]
call fcn.0045763c
test ebp, ebp
jbe 0x424791
xor edx, edx
movzx ecx, byte [esp + edx*4 + 0x78]
mov byte [esp + edx*4 + 0x47a], cl
movzx ecx, byte [esp + edx*4 + 0x79]
mov byte [esp + edx*4 + 0x479], cl
movzx ecx, byte [esp + edx*4 + 0x7a]
mov byte [esp + edx*4 + 0x478], cl
mov byte [esp + edx*4 + 0x47b], 0
inc edx
cmp edx, ebp
jb 0x424760
cmp ebp, 0x100
jae 0x4247f5
test ebp, 1
je 0x4247a8
mov edx, 0xff
jmp 0x4247aa
xor edx, edx
mov byte [esp + ebp*4 + 0x47a], dl
mov edx, ebp
shr edx, 1
test dl, 1
je 0x4247c1
mov edx, 0xff
jmp 0x4247c3
xor edx, edx
mov byte [esp + ebp*4 + 0x479], dl
mov edx, ebp
shr edx, 2
test dl, 1
je 0x4247db
mov edx, 0xff
jmp 0x4247dd
xor edx, edx
mov byte [esp + ebp*4 + 0x478], dl
mov byte [esp + ebp*4 + 0x47b], 0
inc ebp
cmp ebp, 0x100
jb 0x424799
push dword [ebx + 0xdbcc]
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebp, eax
test ebp, ebp
je 0x42497e
push dword [ebx + 0xdbd0]
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov ebx, eax
test ebx, ebx
je 0x424937
lea edx, [esp + 0x478]
push edx
push 0x100
push 0
push ebp
call dword [sym.imp.GDI32.dll_SetDIBColorTable]
test eax, eax
jne 0x424895
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4a3b98
mov dword [esp + 0x878], ecx
mov dword [esp + 0x87c], 0
mov dword [esp + 0x880], 0x4be4a0
mov dword [esp + 0x884], eax
cmp dword [0x4a3ba4], 0
jl 0x424888
lea eax, [esp + 0x884]
push eax
push dword [esp + 0x884]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
push ebx
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
test eax, eax
je 0x4248f0
mov ecx, 0x4a3b98
mov dword [esp + 0x888], ecx
mov dword [esp + 0x88c], 0
mov dword [esp + 0x890], 0x4be5a0
cmp dword [0x4a3ba4], 0
jl 0x4248e0
lea eax, [esp + 0x894]
push eax
push dword [esp + 0x894]
call fcn.0045763c
mov eax, 1
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4a3b98
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0x4be520
mov dword [esp + 0x3c], eax
cmp dword [0x4a3ba4], 0
jl 0x42492a
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x3c]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4a3b98
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0x4be420
mov dword [esp + 0x64], eax
cmp dword [0x4a3ba4], 0
jl 0x424971
lea eax, [esp + 0x64]
push eax
push dword [esp + 0x64]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4a3b98
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0x4be3a0
mov dword [esp + 0x74], eax
cmp dword [0x4a3ba4], 0
jl 0x4249b8
lea eax, [esp + 0x74]
push eax
push dword [esp + 0x74]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
push 0x408
call fcn.00485d1c
pop ecx
mov edi, eax
test edi, edi
je 0x424b8e
mov edx, 0x300
mov word [edi], dx
mov esi, 0x100
mov word [edi + 2], si
lea ebp, [edi + 4]
push ebp
push esi
push 0
push dword [ebx + 0xdbcc]
call dword [sym.imp.GDI32.dll_GetSystemPaletteEntries]
test eax, eax
jne 0x424a45
mov ecx, 0x4a3b98
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0x4be0e0
cmp dword [0x4a3ba4], 0
jl 0x424a32
lea edx, [esp + 0x58]
push edx
push dword [esp + 0x58]
call fcn.0045763c
push edi
call fcn.00485bcc
xor eax, eax
add esp, 0x8a8
pop ebx
pop ebp
pop esi
pop edi
ret
push edi
call dword [sym.imp.GDI32.dll_CreatePalette]
mov ebp, eax
test ebp, ebp
je 0x424b4b
push 0
push ebp
push dword [ebx + 0xdbc8]
call dword [sym.imp.GDI32.dll_SelectPalette]
mov esi, eax
test esi, esi
je 0x424b01
push dword [ebx + 0xdbc8]
call dword [sym.imp.GDI32.dll_RealizePalette]
cmp eax, 0xffffffff
jne 0x424ab2
mov ecx, 0x4a3b98
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], 8
mov dword [esp + 0x20], 0x4be240
mov edx, dword [0x4a3ba4]
cmp edx, 8
jl 0x424ab2
lea edx, [esp + 0x24]
push edx
push dword [esp + 0x24]
call fcn.0045763c
push edi
call fcn.00485bcc
pop ecx
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, 0x4a3b98
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 9
mov dword [esp + 0x48], 0x4be2c0
mov eax, dword [0x4a3ba4]
cmp eax, 9
jl 0x424af1
lea eax, [esp + 0x4c]
push eax
push dword [esp + 0x4c]
call fcn.0045763c
mov eax, 1
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
mov ecx, 0x4a3b98
mov dword [esp], ecx
mov dword [esp + 4], 0
mov dword [esp + 8], 0x4be1c0
cmp dword [0x4a3ba4], 0
jl 0x424b30
lea edx, [esp + 0xc]
push edx
push dword [esp + 0xc]
call fcn.0045763c
push edi
call fcn.00485bcc
pop ecx
push ebp
call dword [sym.imp.GDI32.dll_DeleteObject]
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret
mov ecx, 0x4a3b98
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0x4be160
cmp dword [0x4a3ba4], 0
jl 0x424b7b
lea edx, [esp + 0x18]
push edx
push dword [esp + 0x18]
call fcn.0045763c
push edi
call fcn.00485bcc
xor eax, eax
add esp, 0x8a8
pop ebx
pop ebp
pop esi
pop edi
ret
mov ecx, 0x4a3b98
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0x4be060
cmp dword [0x4a3ba4], 0
jl 0x424bbe
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x30]
call fcn.0045763c
xor eax, eax
add esp, 0x8a4
pop ebx
pop ebp
pop esi
pop edi
ret