Function at 0x5aded0
Capabilities:
Check if file exists
Enumerate files on windows
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d56e9
mov eax, dword fs:[0]
push eax
sub esp, 0x324
mov eax, dword [0x638fe4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x300], edx
mov eax, ecx
mov dword [ebp - 0x2fc], eax
mov dword [ebp - 0x310], eax
mov dword [ebp - 0x328], eax
mov dword [ebp - 0x32c], 0
push 0x60ab98
push str._Network
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0
call fcn.004045b0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
lea eax, [ebp - 0x2ec]
push eax
push str.SOFTWARECanonScanGearDevices
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x2ec], 0
call ebx
xor edi, edi
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x30c]
mov dword [ebp - 0x30c], 0x40
push eax
lea eax, [ebp - 0x94]
push eax
push edi
push dword [ebp - 0x2ec]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x5ae192
mov dword [ebp - 0x2f0], eax
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x94]
push eax
push dword [ebp - 0x2ec]
call ebx
call fcn.00418413
mov ecx, eax
test ecx, ecx
je 0x5ae1a9
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5adfd8
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x5adfda
call edx
add eax, 0x10
mov dword [ebp - 0x2f4], eax
lea eax, [ebp - 0x2f4]
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x2f0]
mov edx, 0x6102a8
push eax
call fcn.005b0e00
add esp, 4
push dword [ebp - 0x2f0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 8]
test eax, eax
je 0x5ae1a9
mov esi, dword [ebp - 0x2f4]
mov ecx, esi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x5ae046
test dx, dx
je 0x5ae042
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x5ae046
add ecx, 4
add eax, 4
test dx, dx
jne 0x5ae020
xor eax, eax
jmp 0x5ae04b
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x5ae0a6
mov byte [ebp - 4], al
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x5ae094
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae092
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5ae092
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5ae094
call edx
inc edi
cmp edi, 0x100
jb 0x5adf63
jmp 0x5ae192
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x308]
call fcn.00403280
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov ebx, dword [ebp + 8]
add ebx, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x5ae0fd
cmp dword [ebx + 0xc], 0
jl 0x5ae0f1
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x5ae0f1
push edx
call fcn.004035b0
add esp, 4
mov ecx, ebx
mov edi, eax
call fcn.00402670
lea eax, [edi + 0x10]
mov dword [ebp + 8], eax
jmp 0x5ae0fd
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp + 8]
call fcn.00403620
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x308]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5ae14a
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae146
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5ae146
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [edx + 4]
call edi
jmp 0x5ae150
mov ecx, edx
call edi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x5ae18c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae18a
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5ae18a
push 0
push dword [ecx + 4]
call edi
jmp 0x5ae18c
call edx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
push dword [ebp - 0x2ec]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x5ae1b3
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae1c8
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x5ae1ca
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x2e8], esi
mov byte [ebp - 4], 3
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
jne 0x5ae257
mov ecx, dword [esi - 0x10]
add esi, 0xfffffff0
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x5ae1f4
call dword [eax + 0x10]
mov ecx, eax
cmp dword [esi + 0xc], 0
lea eax, [esi + 0xc]
jl 0x5ae211
cmp ecx, dword [esi]
jne 0x5ae211
mov edi, esi
lock inc dword [eax]
lea eax, [edi + 0x10]
or ebx, 0xffffffff
jmp 0x5aea52
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x5ae225
call fcn.00402e60
mov eax, dword [esi + 4]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [esi + 4]
lea eax, [edx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
lea edx, [edx*2 + 2]
call fcn.0056c4f0
add esp, 8
lea eax, [edi + 0x10]
or ebx, 0xffffffff
jmp 0x5aea52
mov dword [ebp - 0x304], 0
mov dword [ebp - 0x2f8], 0
mov byte [ebp - 4], 4
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x5ae284
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae29c
lock inc dword [ecx + 0x14]
add ecx, 8
mov dword [ebp - 0x30c], ecx
jmp 0x5ae2a7
call dword [eax + 0xc]
mov ecx, eax
mov dword [ebp - 0x30c], eax
add ecx, 0x10
mov dword [ebp - 0x330], ecx
lea eax, [ebp - 0x304]
mov byte [ebp - 4], 5
push eax
push str.SOFTWARECanonScanGearDevices
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
je 0x5ae2e6
push 0x62e4b0
lea eax, [ebp - 0x314]
mov dword [ebp - 0x314], 0
push eax
call fcn.005479aa
lea eax, [ebp - 0x2f8]
push eax
push dword [ebp + 8]
push dword [ebp - 0x304]
call ebx
test eax, eax
je 0x5ae317
push 0x62e4b0
lea eax, [ebp - 0x318]
mov dword [ebp - 0x318], 0
push eax
call fcn.005479aa
call fcn.00418413
cmp dword [ebp - 0x300], 0
mov ecx, eax
jne 0x5ae413
test ecx, ecx
jne 0x5ae339
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae34e
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x5ae350
call edx
add eax, 0x10
mov dword [ebp - 0x2f0], eax
lea eax, [ebp - 0x2f0]
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x2f8]
mov edx, str.CaddisLLDPath
push eax
call fcn.005b0e00
mov edi, dword [ebp - 0x2f0]
add esp, 4
cmp dword [edi - 0xc], 0
jne 0x5ae39e
push 0x62e4b0
lea eax, [ebp - 0x31c]
mov dword [ebp - 0x31c], 0
push eax
call fcn.005479aa
lea edx, [ebp - 0x2e8]
mov ecx, 0x603ec0
call fcn.005aba10
mov esi, dword [ebp - 0x2e8]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5ae3de
push 0x104
lea ecx, [ebp - 0x2e8]
call fcn.00402cf0
mov esi, dword [ebp - 0x2e8]
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5ae409
cmp eax, dword [esi - 8]
jg 0x5ae409
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
jmp 0x5ae98e
push 0x80070057
call fcn.00402650
test ecx, ecx
jne 0x5ae421
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae436
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x5ae438
call edx
add eax, 0x10
mov dword [ebp - 0x2f0], eax
lea eax, [ebp - 0x2f0]
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x2f8]
mov edx, str.CaddisUIPath
push eax
call fcn.005b0e00
mov edi, dword [ebp - 0x2f0]
add esp, 4
cmp dword [edi - 0xc], 0
jne 0x5ae486
push 0x62e4b0
lea eax, [ebp - 0x320]
mov dword [ebp - 0x320], 0
push eax
call fcn.005479aa
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5ae4b0
push 0x104
lea ecx, [ebp - 0x2e8]
call fcn.00402cf0
mov esi, dword [ebp - 0x2e8]
call fcn.004196a0
push 0x104
push esi
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5ae409
cmp eax, dword [esi - 8]
jg 0x5ae409
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5ae514
push 0x104
lea ecx, [ebp - 0x2e8]
call fcn.00402cf0
mov esi, dword [ebp - 0x2e8]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5ae409
cmp eax, dword [esi - 8]
jg 0x5ae409
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5ae56b
push 0x104
lea ecx, [ebp - 0x2e8]
call fcn.00402cf0
mov esi, dword [ebp - 0x2e8]
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5ae409
cmp eax, dword [esi - 8]
jg 0x5ae409
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call ebx
test eax, eax
jne 0x5ae674
lea edx, [ebp - 0x2e8]
mov ecx, 0x603ee0
call fcn.005aba10
mov esi, dword [ebp - 0x2e8]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5ae5ea
push 0x104
lea ecx, [ebp - 0x2e8]
call fcn.00402cf0
mov esi, dword [ebp - 0x2e8]
push str.CanonIJ_Scan_Utility
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5ae409
cmp eax, dword [esi - 8]
jg 0x5ae409
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5ae646
push 0x104
lea ecx, [ebp - 0x2e8]
call fcn.00402cf0
mov esi, dword [ebp - 0x2e8]
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5ae409
cmp eax, dword [esi - 8]
jg 0x5ae409
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
push esi
call ebx
test eax, eax
jne 0x5ae98e
push 3
push 4
lea eax, [ebp - 0x300]
push eax
lea ecx, [ebp - 0x2f0]
call fcn.00405f50
push dword [eax]
call fcn.0054ea10
add esp, 4
mov dword [ebp - 0x324], eax
lea ecx, [ebp - 0x300]
call fcn.00402b90
lea ecx, [ebp - 0x2ec]
call fcn.00402be0
lea edx, [ebp - 0x2ec]
mov byte [ebp - 4], 8
mov ecx, 0x603ee0
call fcn.005aba10
mov edi, dword [ebp - 0x2ec]
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5ae6ff
push 0x104
lea ecx, [ebp - 0x2ec]
call fcn.00402cf0
mov edi, dword [ebp - 0x2ec]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str.CanonIJ_Scan_Utility
push edi
call ebx
push dword [edi - 8]
push edi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5ae409
cmp eax, dword [edi - 8]
jg 0x5ae409
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5ae75d
push 0x104
lea ecx, [ebp - 0x2ec]
call fcn.00402cf0
mov edi, dword [ebp - 0x2ec]
push str.CNUI.TBL
push edi
call ebx
push 0x250
lea eax, [ebp - 0x2e4]
mov dword [ebp - 0x308], SysStringLen
push 0
push eax
call fcn.00547850
add esp, 0xc
lea eax, [ebp - 0x2e4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
mov dword [ebp - 0x310], edi
cmp edi, 0xffffffff
je 0x5ae983
jmp 0x5ae7b0
lea eax, [ebp - 0x2b8]
push eax
lea ecx, [ebp - 0x2f4]
call fcn.00403280
push 3
push 4
lea eax, [ebp - 0x300]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x2f4]
call fcn.00405f50
push dword [eax]
call fcn.0054ea10
mov edx, dword [ebp - 0x300]
add esp, 4
mov edi, eax
add edx, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x5ae831
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae829
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5ae829
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5ae82b
call ebx
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp dword [ebp - 0x324], edi
jge 0x5ae917
cmp edi, dword [ebp - 0x308]
jge 0x5ae917
lea edx, [ebp - 0x2e8]
mov dword [ebp - 0x308], edi
mov ecx, 0x603ee0
call fcn.005aba10
mov esi, dword [ebp - 0x2e8]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or ecx, eax
jge 0x5ae88f
push 0x104
lea ecx, [ebp - 0x2e8]
call fcn.00402cf0
mov esi, dword [ebp - 0x2e8]
push str.CanonIJ_Scan_Utility
push esi
call ebx
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5ae409
cmp eax, dword [esi - 8]
jg 0x5ae409
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
mov edi, dword [ebp - 0x2f4]
jge 0x5ae8ed
push 0x104
lea ecx, [ebp - 0x2e8]
call fcn.00402cf0
mov esi, dword [ebp - 0x2e8]
push edi
push esi
call ebx
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5ae409
cmp eax, dword [esi - 8]
jg 0x5ae409
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov byte [ebp - 4], 8
or eax, 0xffffffff
mov ecx, dword [ebp - 0x2f4]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5ae960
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae95c
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5ae95c
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5ae960
mov ecx, edx
call edi
mov edi, dword [ebp - 0x310]
lea eax, [ebp - 0x2e4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x5ae7b0
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [ebp - 0x2ec]
call fcn.00402b90
lea ecx, [ebp - 0x2f0]
call fcn.00402b90
mov byte [ebp - 4], 4
or eax, 0xffffffff
mov ebx, dword [ebp - 0x30c]
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x5ae9e4
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5ae9e2
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5ae9e2
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 3
jmp 0x5aea0c
call edx
mov dword [ebp - 4], 3
jmp 0x5aea0c
mov eax, dword [ebp - 0x2f8]
or ebx, 0xffffffff
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x5aea2c
push eax
call edi
mov dword [ebp - 0x2f8], 0
mov eax, dword [ebp - 0x304]
test eax, eax
je 0x5aea43
push eax
call edi
mov dword [ebp - 0x304], 0
add esi, 0xfffffff0
push esi
call fcn.004035b0
add esp, 4
add eax, 0x10
mov ecx, dword [ebp - 0x2fc]
mov byte [ebp - 4], 0
mov dword [ecx], eax
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x5aea99
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5aea97
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5aea97
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call edi
jmp 0x5aea9f
call edx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x5aeae1
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5aeadd
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5aeadd
push 0
push dword [edx + 4]
call edi
jmp 0x5aeae1
mov ecx, edx
call esi
mov eax, dword [ebp - 0x2fc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00544774
mov esp, ebp
pop ebp
ret