Function at 0x4049e4
Capabilities:
Compare security identifiers

Disassembly:
push 0x40
mov eax, 0x40839c
call fcn.004077f4
xor edi, edi
push edi
push dword [ebp + 0xc]
mov byte [ebp - 0x11], 0
call dword [sym.imp.GrooveUtil.DLL_public:_static_bool___stdcall_GCFileInterface::Exists_wchar_t_const___bool__]
test al, al
je 0x404c9a
mov word [ebp - 0x30], di
call fcn.0040630e
lea ecx, [ebp - 0x24]
push ecx
push dword [ebp - 0x30]
mov esi, eax
push dword [ebp + 0xc]
mov eax, dword [esi]
push esi
call dword [eax + 0x28]
cmp eax, edi
jge 0x404a33
push 0x40b4e0
push esi
push eax
call fcn.00406237
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], 2
push 0x17
push 0x40b500
push 0x40b4f0
lea ecx, [ebp - 0x1c]
call dword [sym.imp.GrooveUtil.DLL_protected:_void___thiscall_GCIPtrBase::CreateInstanceNoRelease_struct__GUID_const___struct__GUID_const___unsigned_long_int_]
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x1c]
push dword [ebp - 0x2c]
mov ecx, dword [eax]
push eax
mov esi, eax
call dword [ecx + 0x6c]
cmp eax, edi
jge 0x404a72
push eax
push esi
call fcn.00405edf
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
lea edx, [ebp - 0x30]
push edx
push edi
push eax
mov esi, eax
call dword [ecx + 0x50]
cmp eax, edi
jge 0x404a8d
push eax
push esi
call fcn.00405edf
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
lea edx, [ebp - 0x30]
push edx
push eax
mov esi, eax
call dword [ecx + 0x58]
cmp eax, edi
jge 0x404ab1
push eax
push esi
call fcn.00405edf
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 0xb
mov edi, dword [sym.imp.GrooveUtil.DLL_public:_void___thiscall_GCSafeArray::destructor_void_]
mov ebx, dword [sym.imp.GrooveUtil.DLL_public:_void___thiscall_GCSafeArray::Set_struct_tagSAFEARRAY_const__]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push eax
mov esi, eax
call dword [ecx + 0x1c]
test eax, eax
jge 0x404ae6
push 0x40b510
push esi
push eax
call fcn.00406237
cmp word [ebp - 0x14], 0
je 0x404c54
cmp byte [ebp - 0x11], 0
jne 0x404c54
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
lea edx, [ebp - 0x38]
push edx
push eax
mov esi, eax
call dword [ecx + 0x20]
test eax, eax
jge 0x404b1a
push 0x40b510
push esi
push eax
call fcn.00406237
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 0xe
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
lea edx, [ebp - 0x3c]
push edx
push str.DeviceGUID
push eax
mov esi, eax
call dword [ecx + 0x78]
test eax, eax
jge 0x404b43
push eax
push esi
call fcn.00405edf
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 0xf
mov esi, dword [ebp - 0x24]
push 0x40a800
lea eax, [ebp - 0x30]
push eax
call fcn.004060a2
mov byte [ebp - 4], 0x10
and dword [ebp - 0x18], 0
mov byte [ebp - 4], 0x11
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00406152
mov byte [ebp - 4], 0x12
push dword [eax + 4]
lea esi, [ebp - 0x18]
call fcn.004056d1
mov byte [ebp - 4], 0x11
xor esi, esi
cmp dword [ebp - 0x4c], esi
je 0x404b9f
cmp dword [ebp - 0x48], esi
je 0x404b9f
push dword [ebp - 0x4c]
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
push dword [ebp + 0x10]
push dword [ebp - 0x20]
call dword [sym.imp.GrooveUtil.DLL_public:_static_long_int___stdcall_raw_GCStr::CompareNoCase_wchar_t_const___wchar_t_const__]
test eax, eax
jne 0x404c12
mov eax, dword [ebp + 8]
push dword [eax + 0x38]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x404c12
mov esi, dword [ebp - 0x1c]
push str.MasterKey
lea eax, [ebp - 0x40]
push eax
call fcn.004060a2
mov byte [ebp - 4], 0x13
push dword [eax]
mov ecx, dword [ebp + 0x14]
call ebx
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x40]
call edi
mov esi, dword [ebp - 0x1c]
push str.EncryptedKey
lea eax, [ebp - 0x44]
push eax
call fcn.004060a2
mov byte [ebp - 4], 0x14
push dword [eax]
mov ecx, dword [ebp + 0x18]
call ebx
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x44]
call edi
mov byte [ebp - 0x11], 1
xor esi, esi
mov byte [ebp - 4], 0x10
cmp dword [ebp - 0x18], esi
je 0x404c27
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x30]
call edi
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x20], esi
je 0x404c42
lea ecx, [ebp - 0x20]
call dword [sym.imp.GrooveUtil.DLL_private:_void___thiscall_GCStr::_Release_void_]
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x24]
push eax
call fcn.00402697
jmp 0x404ac7
lea ecx, [ebp - 0x2c]
call dword [sym.imp.GrooveUtil.DLL_public:_void___thiscall_GCIPtrBase::Empty_void_]
push dword [ebp + 0xc]
call dword [sym.imp.GrooveUtil.DLL_public:_static_void___stdcall_GCFileInterface::Remove_wchar_t_const__]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x28]
call dword [sym.imp.GrooveUtil.DLL_public:_void___thiscall_GCAnyIPtr::destructor_void_]
mov byte [ebp - 4], 5
lea eax, [ebp - 0x34]
push eax
call fcn.00402697
mov byte [ebp - 4], 2
lea eax, [ebp - 0x1c]
push eax
call fcn.00402697
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x2c]
push eax
call fcn.00402697
mov al, byte [ebp - 0x11]
call fcn.004078cc
ret 0x14