Function at 0x56ddd0
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5aeb68
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x614040]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x614040]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x40], ebx
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
dec eax
mov dword [esp + 0x44], esi
cmp eax, 4
ja case.0x56de20.1
jmp dword [eax*4 + 0x56e2bc]
mov dword [esp + 0x10], 4
jmp 0x56de58
mov ecx, 1
mov dword [esp + 0x10], 3
jmp 0x56de5a
xor ecx, ecx
mov dword [esp + 0x18], 0x22
mov dword [esp + 0x10], ecx
jmp 0x56de62
mov dword [esp + 0x10], 1
xor ecx, ecx
mov dword [esp + 0x18], 2
mov eax, dword [ebx + 0x8c]
mov edi, dword [sym.imp.USER32.dll_GetClientRect]
neg eax
mov dword [esp + 0x58], 0
sbb eax, eax
mov dword [esp + 0x5c], 0
not eax
mov dword [esp + 0x60], 0
and eax, ecx
mov dword [esp + 0x64], 0
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x58]
push eax
push dword [ebx + 0x20]
call edi
lea ecx, [esp + 0x1c]
call fcn.00415538
mov dword [esp + 0x88], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], vtable.CBitmap.0
mov byte [esp + 0x88], 1
test esi, esi
jne 0x56ded8
xor eax, eax
jmp 0x56dedb
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x20]
call fcn.00415d6f
mov ecx, dword [esp + 0x64]
sub ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
sub eax, dword [esp + 0x58]
push ecx
push eax
push dword [esi + 4]
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
lea ecx, [esp + 0x3c]
call fcn.00415da5
push dword [esp + 0x3c]
push dword [esp + 0x24]
call fcn.004163ab
mov dword [esp + 0x48], eax
lea eax, [esp + 0x68]
push eax
push dword [ebx + 0x20]
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
call edi
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], vtable.CBrush.0
mov byte [esp + 0x88], 2
mov edi, dword [ebx + 0x20]
mov esi, dword [esp + 0x20]
push edi
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.0040fe0e
push edi
push esi
push 0x138
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
push eax
lea ecx, [esp + 0x34]
call fcn.00415da5
push dword [esp + 0x34]
lea eax, [esp + 0x5c]
push eax
push dword [esp + 0x28]
call dword [sym.imp.USER32.dll_FillRect]
lea ecx, [esp + 0x30]
call fcn.00415ea4
call fcn.00414eab
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x56dfca
push 0x80004005
call fcn.00402740
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
mov byte [esp + 0x88], 3
push eax
mov ecx, ebx
call fcn.004102e3
mov edi, dword [sym.imp.USER32.dll_InflateRect]
or esi, 0xffffffff
cmp dword [ebx + 0x7c], 0
je 0x56e15a
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], 0
je 0x56e15a
lea eax, [esp + 0x58]
push eax
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_GetClientRect]
push 0xfffffffffffffffb
push 0
lea eax, [esp + 0x60]
push eax
call edi
push 0
push 0
push 0x31
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
push eax
call fcn.00415fa2
push eax
lea ecx, [esp + 0x20]
call fcn.0041640a
cmp dword [ebx + 0x8c], 0
mov dword [esp + 0x4c], eax
je 0x56e0c0
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff0
push ecx
call fcn.00403660
add esp, 4
lea edi, [eax + 0x10]
mov dword [esp + 0x40], edi
mov byte [esp + 0x88], 4
mov eax, dword [0x61fd5c]
test eax, eax
je 0x56e096
lea ecx, [esp + 0x58]
push ecx
push 0
push 0x29
push esi
push edi
push dword [ebp + 0xc]
push 1
push dword [esp + 0x3c]
push dword [ebx + 0x8c]
call eax
lea edx, [edi - 0x10]
mov byte [esp + 0x88], 3
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x56e147
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x56e147
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x50]
push ecx
push dword [eax - 0xc]
push eax
push dword [esp + 0x30]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
mov eax, dword [esp + 0x2c]
push eax
push eax
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [esp + 0x60]
add eax, dword [esp + 0x58]
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x64]
mov edi, dword [esp + 0x54]
sub ebx, edi
cdq
sub eax, edx
mov ecx, eax
mov eax, esi
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
sub ecx, eax
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x1c]
push 1
call fcn.004164e9
mov eax, dword [esp + 0x18]
or eax, 2
push eax
push edi
push esi
push ebx
push dword [esp + 0x3c]
push 0
push dword [esp + 0x2c]
push 0
push 0
push dword [esp + 0x44]
call dword [sym.imp.USER32.dll_DrawStateW]
mov ebx, dword [esp + 0x40]
or esi, 0xffffffff
push dword [esp + 0x4c]
lea ecx, [esp + 0x20]
call fcn.0041640a
mov edi, dword [sym.imp.USER32.dll_InflateRect]
push 0xfffffffffffffffb
push 0xfffffffffffffffb
lea eax, [esp + 0x60]
push eax
call edi
cmp dword [ebx + 0x7c], 0
je 0x56e184
mov eax, dword [esp + 0x58]
sub eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x64]
add eax, ecx
sub ecx, 0xa
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
push dword [ebx + 0x74]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x5c]
push 0
push eax
lea ecx, [esp + 0x28]
mov edx, dword [ebx + edx*4 + 0xb4]
call fcn.00586f10
add esp, 0xc
cmp dword [ebx + 0x9c], 0
je 0x56e1ca
mov eax, dword [ebp + 0x10]
and eax, 0x210
cmp eax, 0x10
jne 0x56e1ca
lea eax, [esp + 0x68]
push eax
push dword [esp + 0x24]
call dword [sym.imp.USER32.dll_DrawFocusRect]
lea eax, [esp + 0x58]
push eax
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [esp + 0x64]
sub ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
sub eax, dword [esp + 0x58]
push 0xcc0020
push 0
push 0
push dword [esp + 0x2c]
push ecx
push eax
mov eax, dword [esp + 0x5c]
push 0
push 0
push dword [eax + 4]
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x48]
test eax, eax
je 0x56e213
mov eax, dword [eax + 4]
push eax
push dword [esp + 0x24]
call fcn.004163ab
lea ecx, [esp + 0x38]
call fcn.00415e5d
lea ecx, [esp + 0x1c]
call fcn.00415e47
mov byte [esp + 0x88], 2
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x56e252
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [esp + 0x88], 1
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], vtable.CBrush.0
call fcn.004027b0
mov byte [esp + 0x88], 0
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], vtable.CBitmap.0
call fcn.004027b0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x88], 0xffffffff
call fcn.00415678
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.00527e2c
mov esp, ebp
pop ebp
ret 0xc