Function at 0x513d40
Capabilities:
Get process heap force flags

Disassembly:
push 0xffffffffffffffff
push 0x686542
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
push ebx
mov ebx, dword [esp + 0x3c]
push ebp
push esi
mov esi, ecx
push edi
mov ecx, dword [esp + 0x40]
push ebx
push eax
mov eax, dword [esp + 0x40]
push ecx
push edx
push eax
mov ecx, esi
mov dword [esp + 0x34], esi
call fcn.00503640
xor ebp, ebp
lea ecx, [esi + 0x3900]
mov dword [esp + 0x30], ebp
call fcn.0051a900
add esi, 0x3a40
mov byte [esp + 0x30], 1
mov dword [esp + 0x24], esi
lea edi, [esi + 4]
mov ecx, edi
call fcn.00486040
lea ecx, [esi + 0x20]
mov byte [esp + 0x30], 2
call fcn.004858d0
mov dword [esi + 0x3c], 1
mov dword [esi + 0x40], ebp
mov dword [esi], vtable.TDCCOLEDITVISIBILITY.0
lea ebp, [esi + 0x44]
mov byte [esp + 0x30], 3
mov ecx, ebp
call fcn.004858d0
mov ecx, edi
mov byte [esp + 0x30], 4
mov dword [esi], vtable.TDCCOLEDITFILTERVISIBILITY.0
call fcn.004fcbc0
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x513e30
neg eax
sbb eax, eax
test eax, eax
mov dword [esp + 0x3c], eax
je 0x513e30
lea ecx, [esp + 0x48]
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x40]
push edx
push eax
lea ecx, [ebx + 4]
mov byte [esp + 0x54], 0
call fcn.00406e83
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, edi
call fcn.004fda10
mov byte [eax], 0
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x513dfd
lea edi, [esi + 0x20]
mov ecx, edi
call fcn.00406c84
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x513e80
neg eax
sbb eax, eax
test eax, eax
mov dword [esp + 0x38], eax
je 0x513e80
lea edx, [esp + 0x44]
lea eax, [esp + 0x18]
push edx
lea ecx, [esp + 0x3c]
push eax
push ecx
lea ecx, [ebx + 0x20]
mov byte [esp + 0x50], 0
call fcn.00406e83
mov edx, dword [esp + 0x18]
mov ecx, edi
push edx
call fcn.004fda10
mov byte [eax], 0
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x513e4d
mov eax, dword [ebx + 0x3c]
add ebx, 0x44
mov dword [esi + 0x3c], eax
mov ecx, dword [ebx - 4]
mov dword [esi + 0x40], ecx
mov edx, dword [ebp + 4]
test edx, edx
je 0x513eb3
mov eax, dword [ebp + 8]
test eax, eax
jbe 0x513eb3
mov ecx, edx
mov esi, eax
mov eax, dword [ecx]
test eax, eax
je 0x513ead
mov eax, dword [eax]
test eax, eax
jne 0x513ea7
add ecx, 4
dec esi
jne 0x513ea1
push edx
call sub.MFC42u.DLL_operatordelete
mov ecx, dword [ebp + 0x14]
xor esi, esi
add esp, 4
mov dword [ebp + 4], esi
mov dword [ebp + 0xc], esi
mov dword [ebp + 0x10], esi
call sub.MFC42u.DLL_CPlex::FreeDataChain
mov dword [ebp + 0x14], esi
mov eax, dword [ebx + 0xc]
cmp eax, esi
je 0x513f17
neg eax
sbb eax, eax
cmp eax, esi
mov dword [esp + 0x10], eax
je 0x513f17
lea edx, [esp + 0x40]
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x14]
push eax
push ecx
mov ecx, ebx
mov byte [esp + 0x4c], 0
call fcn.00406e83
mov edx, dword [esp + 0x1c]
mov ecx, ebp
push edx
call fcn.004fda10
mov byte [eax], 0
mov eax, dword [esp + 0x10]
cmp eax, esi
jne 0x513ee5
mov edi, dword [esp + 0x20]
mov byte [esp + 0x30], 5
lea ecx, [edi + 0x3aa0]
call fcn.006089e4
mov ecx, dword [esp + 0x28]
mov dword [edi + 0x3ab4], esi
mov dword [edi + 0x3ab8], esi
mov dword [edi], vtable.CFilteredToDoCtrl.0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret 0x14