Function at 0x421250
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x470b90
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
push ebx
push esi
push edi
lea ecx, [esp + 0x30]
call fcn.00462958
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 4]
lea eax, [esp + 0x60]
push eax
push 0x18
xor esi, esi
push ecx
mov dword [esp + 0x90], esi
call dword [sym.imp.gdi32.dll_GetObjectA]
mov ebx, dword [sym.imp.gdi32.dll_CreateCompatibleDC]
push esi
call ebx
push eax
lea ecx, [esp + 0x34]
call fcn.00462e40
mov edi, dword [edi + 4]
mov edx, dword [esp + 0x34]
push edi
push edx
call fcn.004631c6
lea ecx, [esp + 0x40]
mov dword [esp + 0x1c], eax
call fcn.00462958
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], 0x4802b8
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], 0x4802c8
push esi
mov byte [esp + 0x88], 3
call ebx
push eax
lea ecx, [esp + 0x44]
call fcn.00462e40
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x34]
push eax
push ecx
push edx
call dword [sym.imp.gdi32.dll_CreateCompatibleBitmap]
push eax
lea ecx, [esp + 0x2c]
call fcn.0046313d
mov ebx, dword [sym.imp.user32.dll_GetSysColor]
push 0xf
call ebx
push eax
call dword [sym.imp.gdi32.dll_CreateSolidBrush]
push eax
lea ecx, [esp + 0x24]
call fcn.0046313d
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x44]
push eax
push ecx
call fcn.004631c6
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x24]
mov edi, eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x58], edx
push ecx
lea edx, [esp + 0x54]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x48]
push edx
push eax
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
call dword [sym.imp.user32.dll_FillRect]
push 1
push 1
mov ecx, dword [esp + 0x4c]
push ecx
call dword [sym.imp.gdi32.dll_GetPixel]
lea ecx, [esp + 0x20]
mov dword [esp + 0x10], eax
call fcn.00463194
cmp edi, esi
jne 0x42138e
xor edi, edi
jmp 0x421391
mov edi, dword [edi + 4]
mov edx, dword [esp + 0x44]
push edi
push edx
call fcn.004631c6
push 0x10
call ebx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x64]
xor edi, edi
cmp eax, esi
jle 0x42144b
mov ebx, dword [sym.imp.gdi32.dll_SetPixel]
mov eax, dword [esp + 0x68]
lea esp, [esp]
test eax, eax
jle 0x42143c
mov eax, dword [esp + 0x34]
push esi
push edi
push eax
call dword [sym.imp.gdi32.dll_GetPixel]
cmp eax, dword [esp + 0x10]
je 0x421422
mov ecx, eax
shr ecx, 0x10
movzx ecx, cl
movzx edx, ah
add ecx, edx
movzx eax, al
add ecx, eax
mov eax, 0x55555556
imul ecx
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x14], ecx
sub esp, 8
fild dword [esp + 0x1c]
fmul qword [0x477cf8]
fstp qword [esp]
push edx
call fcn.00420550
add esp, 0xc
push eax
mov eax, dword [esp + 0x38]
push esi
push edi
push eax
jmp 0x421431
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x421433
mov ecx, dword [esp + 0x34]
push eax
push esi
push edi
push ecx
call ebx
mov eax, dword [esp + 0x68]
inc esi
cmp esi, eax
jl 0x4213c4
mov ecx, dword [esp + 0x64]
inc edi
xor esi, esi
cmp edi, ecx
jl 0x4213c0
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x421456
mov esi, dword [eax + 4]
mov edx, dword [esp + 0x34]
push esi
push edx
call fcn.004631c6
mov esi, 0x47fd9c
lea ecx, [esp + 0x28]
mov byte [esp + 0x84], 2
mov dword [esp + 0x28], esi
call fcn.00463194
lea ecx, [esp + 0x20]
mov byte [esp + 0x84], 1
mov dword [esp + 0x20], esi
call fcn.00463194
lea ecx, [esp + 0x40]
mov byte [esp + 0x84], 0
call fcn.00462ebe
lea ecx, [esp + 0x30]
mov dword [esp + 0x84], 0xffffffff
call fcn.00462ebe
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8