Function at 0x404f40
Capabilities:
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
mov edi, 3
push esi
xor esi, esi
push ebx
mov ebx, 3
push ecx
sub esp, 0x78
mov eax, dword [ecx]
mov dword [esp], 0
mov dword [ebp - 0x64], eax
call sym._CoInitialize_4
xor edx, edx
mov ecx, 0x42000000
mov dword [ebp - 0x5c], eax
sub esp, 4
mov eax, 0x100001
mov dword [esp + 4], eax
mov eax, dword [0x41d290]
mov dword [esp + 0xc], esi
mov esi, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 8], edi
mov dword [esp], eax
call esi
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x40528c
mov ebx, eax
mov eax, 0x42000000
mov dword [esp + 0x14], eax
mov eax, 3
xor edi, edi
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, 3
mov dword [esp + 8], eax
mov eax, 0x100001
mov dword [esp + 4], eax
mov eax, dword [0x41d28c]
mov dword [esp + 0x18], edi
mov dword [esp], eax
call esi
sub esp, 0x1c
cmp eax, 0xffffffff
mov esi, eax
je 0x405280
xor eax, eax
xor edx, edx
mov edi, dword [sym.imp.kernel32.dll_CreateEventW]
mov dword [esp + 0xc], eax
xor ecx, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], 0
call edi
mov dword [ebp - 0x48], eax
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x30], eax
je 0x4051d8
mov dword [esp], 0
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
call edi
mov dword [ebp - 0x44], eax
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x4051d8
xor eax, eax
mov edi, 0x1000
mov edx, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov ecx, dword fs:[0x18]
mov dword [ebp - 0x60], edx
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x68], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edx
sub esp, 0xc
test eax, eax
mov edi, eax
je 0x4051d8
mov ecx, dword [ebp - 0x68]
xor edx, edx
mov eax, 0x1000
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x60]
mov dword [esp + 8], eax
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 0x405318
mov dword [esp + 4], edi
lea eax, [ebp - 0x40]
xor ecx, ecx
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, 1
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, 0x1000
mov dword [esp + 0x1c], ecx
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadDirectoryChangesW]
sub esp, 0x20
test eax, eax
je 0x405328
mov dword [esp], esi
xor eax, eax
mov edx, 0x1000
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, 1
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x60]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_ReadDirectoryChangesW]
sub esp, 0x20
test eax, eax
je 0x405328
mov dword [esp], 2
xor eax, eax
mov ecx, 0xffffffff
mov dword [esp + 8], eax
lea eax, [ebp - 0x48]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
mov edx, eax
je 0x4052a8
cmp eax, 1
jne 0x4051e6
mov dword [esp], esi
xor eax, eax
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x4c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
je 0x4050c7
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4050c7
mov edx, dword [ebp - 0x60]
mov eax, dword [0x41d28c]
call sym._process_changes
test eax, eax
jne 0x4052ef
jmp 0x4050c7
mov dword [ebp - 0x60], 0
mov edx, 0xe
xor edi, edi
mov dword [esp], ebx
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [ebp - 0x64], edx
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
xor eax, eax
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov ebx, dword fs:[0x18]
sub esp, 4
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x60]
xor edx, edx
sub esp, 0xc
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x64]
sub esp, 0xc
test ecx, ecx
js 0x40526a
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
mov dword [esp], ebx
lea eax, [ebp - 0x4c]
xor edx, edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x40]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
je 0x4050c7
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4050c7
mov eax, dword [0x41d290]
mov edx, edi
call sym._process_changes
test eax, eax
je 0x4050c7
mov eax, 1
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x64]
mov dword [esp], eax
call sym._InvalidateRect_12
sub esp, 0xc
jmp 0x4050c7
mov edx, 0xe
jmp 0x4051e6
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
jmp 0x4051e6