Function at 0x404a50
Capabilities:
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x78
mov eax, dword [ecx]
mov dword [esp], 0
mov dword [ebp - 0x64], eax
call sym._CoInitialize_4
mov esi, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [ebp - 0x5c], eax
mov eax, dword [0x41b290]
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x42000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x100001
mov dword [esp], eax
call esi
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x404dbc
mov ebx, eax
mov eax, dword [0x41b28c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x42000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x100001
mov dword [esp], eax
call esi
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
je 0x404db0
mov dword [esp + 0xc], 0
mov edi, dword [sym.imp.kernel32.dll_CreateEventW]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call edi
mov dword [ebp - 0x48], eax
sub esp, 0x10
mov dword [ebp - 0x30], eax
test eax, eax
je 0x404d00
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call edi
mov dword [ebp - 0x44], eax
sub esp, 0x10
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x404d00
mov dword [esp + 8], 0x1000
mov edx, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 4], 0
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x60], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edx
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x404d00
mov ecx, dword [ebp - 0x68]
mov edx, dword [ebp - 0x60]
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 0
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edx
mov dword [ebp - 0x60], eax
sub esp, 0xc
test eax, eax
je 0x404e48
lea eax, [ebp - 0x40]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1000
mov dword [esp + 4], edi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadDirectoryChangesW]
sub esp, 0x20
test eax, eax
je 0x404e58
lea eax, [ebp - 0x2c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x60]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_ReadDirectoryChangesW]
sub esp, 0x20
test eax, eax
je 0x404e58
lea eax, [ebp - 0x48]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 2
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
mov edx, eax
test eax, eax
je 0x404dd8
cmp eax, 1
jne 0x404d0e
lea eax, [ebp - 0x4c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
je 0x404be5
mov edx, dword [ebp - 0x4c]
test edx, edx
je 0x404be5
mov edx, dword [ebp - 0x60]
mov eax, dword [0x41b28c]
call dbg.process_changes
test eax, eax
jne 0x404e21
jmp 0x404be5
mov dword [ebp - 0x60], 0
mov edx, 0xe
xor edi, edi
mov dword [ebp - 0x64], edx
mov dword [esp], ebx
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
call ebx
sub esp, 4
mov dword [esp], esi
call ebx
mov eax, dword [ebp - 0x48]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x44]
sub esp, 4
mov dword [esp], eax
call ebx
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 4
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x60]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x64]
sub esp, 0xc
test eax, eax
js 0x404d96
mov dword [ebp - 0x5c], edx
call sym._CoUninitialize_0
mov edx, dword [ebp - 0x5c]
lea esp, [ebp - 0x10]
mov eax, edx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 4
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
mov eax, edx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 4
lea eax, [ebp - 0x4c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x40]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
je 0x404be5
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
je 0x404be5
mov eax, dword [0x41b290]
mov edx, edi
call dbg.process_changes
test eax, eax
je 0x404be5
mov eax, dword [ebp - 0x64]
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._InvalidateRect_12
sub esp, 0xc
jmp 0x404be5
mov edx, 0xe
jmp 0x404d0e
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
jmp 0x404d0e