Function at 0x40d454
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x428a17
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x437084]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
push edi
mov eax, dword [0x437084]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x18]
mov edi, dword [ebp + 8]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x58], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], eax
test ebx, ebx
jne 0x40d4ca
mov eax, 0x80004003
jmp 0x40d912
and dword [ebx], 0
lea esi, [edi - 0x24]
mov ecx, esi
mov dword [esp + 0x18], 1
mov byte [esp + 0x16], 0
mov dword [esp + 0x24], esi
call fcn.0040cd3e
mov eax, dword [edi - 0x20]
test eax, eax
je 0x40d50c
cmp eax, dword [esp + 0x58]
je 0x40d50c
push 0x507
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_RedrawWindow]
mov eax, esi
call fcn.0040f067
push dword [esp + 0x58]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40d90e
mov eax, dword [esp + 0x58]
cmp dword [edi - 0x20], eax
je 0x40d54b
mov ebx, eax
call fcn.00411eb0
mov ebx, dword [esp + 0x1c]
shl eax, 4
mov ecx, esi
xor eax, dword [ecx + 0xc8]
mov byte [esp + 0x16], 1
and eax, 0x10
xor dword [ecx + 0xc8], eax
cmp dword [edi + 0xa8], 0
jne 0x40d598
push dword [edi - 0x20]
call dword [sym.imp.USER32.dll_GetParent]
push 8
lea ecx, [esp + 0x5c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetClassNameA]
test eax, eax
je 0x40d58a
push str.32770
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
neg eax
sbb eax, eax
inc eax
je 0x40d58a
push 0xf
jmp 0x40d58c
push 5
call dword [sym.imp.USER32.dll_GetSysColor]
mov dword [edi + 0xa8], eax
push dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
lea edx, [esp + 0x1b]
mov ecx, ebx
mov byte [esp + 0x1b], 0
call fcn.0040c220
pop ecx
mov dword [esp + 0x18], eax
test eax, eax
js 0x40d5ce
push dword [esp + 0x2c]
push 0
push dword [ebx]
push dword [esp + 0x30]
call fcn.0040ec8c
mov dword [esp + 0x18], eax
mov esi, dword [ebp + 0x1c]
lea eax, [edi + 0x5c]
mov edi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
cmp dword [esp + 0x18], edi
jl 0x40d8d6
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi]
cmp ecx, edi
je 0x40d60b
cmp dword [esp + 0x20], edi
je 0x40d60b
mov ebx, dword [esp + 0x10]
lea edx, [ebx + 0x70]
push edx
push eax
push dword [esp + 0x28]
push ecx
call fcn.0040b423
jmp 0x40d60f
mov ebx, dword [esp + 0x10]
cmp byte [esp + 0x17], 0
je 0x40d7d2
cmp dword [esi], edi
je 0x40d7d2
mov esi, dword [sym.imp.USER32.dll_GetWindowLongA]
push 0xfffffffffffffff0
push dword [ebx - 0x20]
call esi
test eax, 0x300000
jne 0x40d63f
or dword [ebx + 0xbc], 8
jmp 0x40d667
push 0xfffffffffffffff0
push dword [ebx - 0x20]
call esi
and eax, 0xffcfffff
push eax
push 0xfffffffffffffff0
push dword [ebx - 0x20]
call dword [sym.imp.USER32.dll_SetWindowLongA]
push 0x37
push edi
push edi
push edi
push edi
push edi
push dword [ebx - 0x20]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov eax, dword [esp + 0x1c]
mov edi, dword [eax]
mov dword [esp + 0x58], edi
mov dword [esp + 0x2c], edi
test edi, edi
je 0x40d67f
mov eax, dword [edi]
push edi
call dword [eax + 4]
mov dword [esp + 0x70], 1
mov esi, dword [esp + 0x28]
movzx eax, word [esi]
cmp eax, 0x4d
je 0x40d69c
cmp eax, 0x6d
jne 0x40d7f4
movzx eax, word [esi + 2]
cmp eax, 0x53
je 0x40d6ae
cmp eax, 0x73
jne 0x40d7f4
movzx eax, word [esi + 4]
cmp eax, 0x48
je 0x40d6c0
cmp eax, 0x68
jne 0x40d7f4
movzx eax, word [esi + 6]
cmp eax, 0x54
je 0x40d6d2
cmp eax, 0x74
jne 0x40d7f4
movzx eax, word [esi + 8]
cmp eax, 0x4d
je 0x40d6e4
cmp eax, 0x6d
jne 0x40d7f4
movzx eax, word [esi + 0xa]
cmp eax, 0x4c
je 0x40d6f6
cmp eax, 0x6c
jne 0x40d7f4
cmp word [esi + 0xc], 0x3a
jne 0x40d7f4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax - 0xe]
push edi
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x40d7ea
and dword [esp + 0x20], 0
mov byte [esp + 0x70], 3
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push edi
add esi, 0xe
push esi
push edi
push eax
call fcn.004087f6
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea eax, [esp + 0x20]
push eax
push 1
push ebx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov dword [esp + 0x18], eax
test eax, eax
js 0x40d7a6
and dword [esp + 0x1c], 0
mov byte [esp + 0x70], 5
mov eax, dword [esp + 0x58]
mov ecx, dword [eax]
lea edx, [esp + 0x1c]
push edx
push 0x43011c
push eax
call dword [ecx]
mov dword [esp + 0x18], eax
test eax, eax
js 0x40d793
mov eax, dword [esp + 0x1c]
push dword [esp + 0x20]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov dword [esp + 0x18], eax
mov byte [esp + 0x70], 3
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40d7a6
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [esp + 0x70], 1
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40d7b9
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x58]
or dword [esp + 0x70], 0xffffffff
test edi, edi
je 0x40d7d0
mov eax, dword [edi]
push edi
call dword [eax + 8]
xor edi, edi
cmp dword [esp + 0x18], edi
jl 0x40d8da
cmp dword [ebx + 0x3c], edi
jne 0x40d90e
jmp 0x40d8da
mov dword [esp + 0x18], 0x8007000e
jmp 0x40d7b9
and dword [esp + 0x10], 0
mov byte [esp + 0x70], 9
mov eax, dword [edi]
lea ecx, [esp + 0x10]
push ecx
push 0x42a560
push edi
call dword [eax]
cmp dword [esp + 0x10], 0
je 0x40d8ba
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov byte [esp + 0x70], 0xa
mov edi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
xor eax, eax
mov word [esp + 0x34], ax
lea eax, [esp + 0x34]
push eax
call edi
test eax, eax
jns 0x40d846
push eax
call fcn.004011b7
push 8
pop eax
push esi
mov word [esp + 0x38], ax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esp + 0x3c], eax
test eax, eax
jne 0x40d870
push 0xa
pop eax
mov word [esp + 0x34], ax
mov eax, 0x8007000e
mov dword [esp + 0x3c], eax
jmp 0x40d840
mov byte [esp + 0x70], 0xb
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push 0xffffffffffffffff
push eax
call dword [ecx + 0xa4]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x44]
push edx
push edx
push edx
push edx
lea edx, [esp + 0x44]
push edx
push eax
call dword [ecx + 0xd0]
mov byte [esp + 0x70], 0xa
lea eax, [esp + 0x34]
push eax
call edi
mov byte [esp + 0x70], 9
lea eax, [esp + 0x44]
push eax
call edi
mov edi, dword [esp + 0x58]
mov byte [esp + 0x70], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40d7c1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x40d7c1
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
call fcn.0040cd3e
mov ebx, dword [ebx - 0x20]
cmp ebx, edi
je 0x40d90e
push 0x507
push edi
push edi
push ebx
call dword [sym.imp.USER32.dll_RedrawWindow]
cmp dword [esp + 0x18], edi
jge 0x40d90e
cmp byte [esp + 0x16], 0
je 0x40d90e
mov eax, dword [esp + 0x24]
call fcn.0040f067
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.00416782
mov esp, ebp
pop ebp
ret 0x20