Function at 0x4037e0
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push 0xffffffffffffffff
push 0x441400
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x4530e4]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4530e4]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x94]
mov esi, ecx
lea eax, [esp + 0x20]
xor ebx, ebx
mov dword [esp + 0x8c], ebx
push eax
mov dword [esp + 0x20], vtable.htmlayout::selected_cb.0
call fcn.00408450
push str._id_
lea edi, [esp + 0x20]
mov dword [esp + 0x90], 1
call fcn.00402f90
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov eax, edx
sub eax, ecx
sar eax, 2
add esp, 4
xor edi, edi
cmp eax, ebx
jbe 0x4039cf
cmp edi, eax
jb 0x40387b
call fcn.0042bcc3
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + edi*4]
lea edx, [esp + 0x18]
lea ecx, [ecx + edi*4]
push edx
push 0x44415c
push eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x24], ebx
call dword [sym.imp.MxUI.dll_HTMLayoutGetAttributeByName]
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x4039b5
xor ecx, ecx
mov word [esp + 0x64], cx
mov ecx, eax
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], ebx
lea esi, [ecx + 2]
mov edi, edi
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x4038c0
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x64]
call fcn.00408320
mov eax, esi
mov byte [esp + 0x8c], 2
mov edx, dword [ebp + 0x18]
mov ebx, dword [ebp]
push eax
lea ecx, [esp + 0x48]
push ecx
mov esi, ebp
mov dword [esp + 0x48], edx
call fcn.00401b90
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x403906
cmp eax, ebx
je 0x40390b
call fcn.0042bcc3
mov edx, dword [esp + 0x40]
cmp dword [esi + 4], edx
jne 0x403999
mov edx, dword [esp + 0x38]
mov eax, dword [edx]
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esp + 0x20], 0
call dword [sym.imp.MxUI.dll_HTMLayoutControlGetType]
cmp dword [esp + 0x18], 0
jne 0x40394f
mov byte [esp + 0x8c], 1
cmp dword [esp + 0x78], 8
jb 0x4039b5
mov ecx, dword [esp + 0x64]
push ecx
jmp 0x4039ad
mov edx, dword [esp + 0x30]
sub edx, dword [esp + 0x2c]
sar edx, 2
cmp edi, edx
jb 0x403963
call fcn.0042bcc3
mov eax, dword [esp + 0x2c]
lea ecx, [eax + edi*4]
lea ebx, [esp + 0x4c]
call fcn.00403600
mov esi, eax
lea ecx, [esp + 0x60]
push ecx
push ebp
mov byte [esp + 0x94], 3
call fcn.004023e0
push esi
push eax
call dword [sym.imp.MxUI.dll_ValueCopy]
mov edx, ebx
push edx
call dword [sym.imp.MxUI.dll_ValueClear]
mov byte [esp + 0x8c], 1
cmp dword [esp + 0x78], 8
jb 0x4039b5
mov eax, dword [esp + 0x64]
push eax
call fcn.0042bb4c
add esp, 4
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov eax, edx
sub eax, ecx
inc edi
sar eax, 2
xor ebx, ebx
cmp edi, eax
jb 0x40387b
xor eax, eax
cmp dword [ebp + 0x1c], ebx
setne al
mov ebp, eax
cmp ecx, ebx
je 0x403a15
mov edi, edx
mov esi, ecx
cmp ecx, edx
je 0x403a0a
mov ebx, dword [sym.imp.MxUI.dll_HTMLayout_UnuseElement]
jmp 0x4039f0
mov eax, dword [esi]
test eax, eax
je 0x4039f9
push eax
call ebx
mov dword [esi], 0
add esi, 4
cmp esi, edi
jne 0x4039f0
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.0042bb4c
add esp, 4
xor ebx, ebx
mov ecx, dword [esp + 0x20]
push ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.0042bb4c
add esp, 4
mov eax, ebp
mov ecx, dword [esp + 0x84]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0042bb57
add esp, 0x7c
ret