Function at 0x407590
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x584de8
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x5eb1c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x24c], eax
mov dword [ebp - 0x228], esi
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
xor edi, edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x254], edi
mov dword [ebp - 0x250], edi
xor eax, eax
mov dword [ebp - 0x230], edi
xor ebx, ebx
mov dword [ebp - 0x248], 0xff
mov dword [ebp - method.CArray_class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t_____class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t____const__.virtual_0], vtable.CArray_class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t_____class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t____const__.0
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x27c], eax
mov dword [ebp - 0x270], eax
mov dword [ebp - 0x274], eax
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x278], ebx
mov dword [ebp - method.CArray_class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t_____class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t____const__.virtual_0], vtable.CArray_class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t_____class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t____const__.0
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x268], eax
mov dword [ebp - 0x25c], eax
mov dword [ebp - 0x260], eax
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x264], ebx
push 0x20019
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x244]
mov byte [ebp - 4], 3
call fcn.00408000
test eax, eax
jne 0x407b6c
mov ebx, dword [ebp - 0x214]
lea ecx, [ebp - 0x288]
push ecx
push 0
push 0
push 0
lea ecx, [ebp - 0x248]
push ecx
lea ecx, [ebp - 0x210]
push ecx
push eax
push dword [ebp - 0x244]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
je 0x407b49
test eax, eax
mov eax, dword [ebp - 0x230]
jne 0x4076a5
mov byte [ebp - 4], 4
call fcn.0042613a
mov byte [ebp - 4], 3
test eax, eax
je 0x407cc5
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x210]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x218]
call fcn.004038f0
test al, al
jne 0x407752
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407730
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x218]
call fcn.00409540
mov esi, dword [esi + 8]
mov byte [ebp - 4], 6
test esi, esi
js 0x407cc0
mov ecx, dword [ebp - 0x228]
lea eax, [esi + 1]
push 0xffffffffffffffff
push eax
call fcn.00408fd0
lea eax, [ebp - 0x218]
push eax
mov eax, dword [ebp - 0x228]
mov eax, dword [eax + 4]
lea ecx, [eax + esi*4]
call fcn.00402490
mov edx, dword [ebp - 0x218]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4077a8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x214]
push eax
push 0x2001f
push 0
lea eax, [ebp - 0x210]
mov dword [ebp - 0x214], 0
push eax
push SysStringLen
call esi
test eax, eax
jne 0x4077f9
test edi, edi
je 0x4077e3
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x214]
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x254], 0
mov byte [ebp - 4], 3
test eax, eax
je 0x407b0a
lea eax, [ebp - 0x214]
mov dword [ebp - 0x214], 0
push eax
push 0x20019
push 0
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x244]
call esi
test eax, eax
jne 0x407851
test edi, edi
je 0x40783b
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x214]
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x254], 0
mov byte [ebp - 4], 3
test eax, eax
jne 0x407b27
mov byte [ebp - 4], 0xa
call fcn.0042613a
mov byte [ebp - 4], 9
test eax, eax
je 0x407cc5
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x218], esi
lea eax, [ebx + ebx]
mov byte [ebp - 4], 0xb
mov dword [ebp - 0x214], eax
xor ebx, ebx
lea eax, [ebp - 0x214]
push eax
push ebx
lea eax, [ebp - 0x234]
push eax
push ebx
push str.ProfileImagePath
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407aec
mov eax, dword [ebp - 0x234]
cmp eax, 1
je 0x4078c9
cmp eax, 2
jne 0x407aec
mov ebx, dword [ebp - 0x214]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
shr ebx, 1
sub eax, ebx
or eax, ecx
jge 0x4078f4
push ebx
lea ecx, [ebp - 0x218]
call fcn.00408150
mov esi, dword [ebp - 0x218]
lea eax, [ebx + ebx]
mov dword [ebp - 0x214], 0
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
push eax
push esi
lea eax, [ebp - 0x238]
push eax
push 0
push str.ProfileImagePath
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407968
mov eax, dword [ebp - 0x238]
cmp eax, 1
je 0x407938
cmp eax, 2
jne 0x407968
mov ecx, dword [ebp - 0x220]
test esi, esi
je 0x40795e
test ecx, ecx
je 0x407959
test cl, 1
jne 0x407968
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x40795e
jmp 0x407968
xor eax, eax
mov word [esi], ax
mov ebx, ecx
shr ebx, 1
mov dword [ebp - 0x214], ebx
test esi, esi
jne 0x407970
xor eax, eax
jmp 0x407984
push dword [esi - 8]
push esi
call fcn.00561908
add esp, 8
test eax, eax
js 0x407ccf
cmp eax, dword [esi - 8]
jg 0x407ccf
xor ecx, ecx
mov dword [esi - 0xc], eax
push 0xb
mov word [esi + eax*2], cx
lea ecx, [ebp - 0x218]
push str.NTUSER.DAT
call fcn.00403350
mov ebx, dword [ebp - 0x21c]
test ebx, ebx
js 0x407cc0
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
lea ecx, [ebp - 0x26c]
call fcn.00408fd0
lea eax, [ebp - 0x218]
push eax
mov eax, dword [ebp - 0x268]
mov dword [ebp - 0x220], eax
lea ecx, [eax + ebx*4]
call fcn.00402490
mov byte [ebp - 4], 0xc
call fcn.0042613a
mov byte [ebp - 4], 0xb
test eax, eax
je 0x407cc5
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x210]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x21c]
call fcn.004038f0
test al, al
jne 0x407a52
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407a30
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.00409540
mov ebx, dword [ebp - 0x224]
mov byte [ebp - 4], 0xe
test ebx, ebx
js 0x407cc0
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
lea ecx, [ebp - 0x280]
call fcn.00408fd0
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 0x22c], eax
lea ecx, [eax + ebx*4]
call fcn.00402490
mov edx, dword [ebp - 0x21c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407ac8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x278]
mov dword [ebp - 0x224], ecx
mov ecx, dword [ebp - 0x264]
mov dword [ebp - 0x21c], ecx
jmp 0x407ae0
mov eax, dword [ebp - 0x278]
mov dword [ebp - 0x224], eax
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x21c], eax
mov ebx, dword [ebp - 0x214]
mov esi, dword [ebp - 0x218]
mov byte [ebp - 4], 3
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x407b27
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x407b27
test edi, edi
je 0x407b1d
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x254], 0
mov eax, dword [ebp - 0x230]
mov esi, dword [ebp - 0x228]
inc eax
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x248], 0xff
jmp 0x4076a5
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x407b62
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x240], 0
push 1
push str.SeRestorePrivilege
call fcn.00407f00
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x407c72
push 1
push str.SeBackupPrivilege
call fcn.00407f00
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x407c72
mov ecx, dword [ebp - 0x224]
xor esi, esi
test ecx, ecx
jle 0x407c72
mov edx, dword [ebp - 0x220]
mov eax, dword [ebp - 0x22c]
sub edx, eax
mov dword [ebp - 0x220], edx
test esi, esi
js 0x407cc0
cmp esi, dword [ebp - 0x21c]
jge 0x407cc0
cmp esi, ecx
jge 0x407cc0
push dword [edx + eax]
push dword [eax]
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
mov ebx, eax
mov dword [ebp - 0x234], ebx
test ebx, ebx
jne 0x407c4e
mov eax, dword [ebp - 0x228]
cmp esi, dword [eax + 8]
jge 0x407cc0
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x24c]
lea eax, [eax + esi*4]
mov ebx, dword [ecx + 8]
mov dword [ebp - 0x238], eax
test ebx, ebx
js 0x407cc0
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
call fcn.00408fd0
mov eax, dword [ebp - 0x24c]
push dword [ebp - 0x238]
mov eax, dword [eax + 4]
lea ecx, [eax + ebx*4]
call fcn.00402490
mov ebx, dword [ebp - 0x234]
mov eax, dword [ebp - 0x22c]
inc esi
mov ecx, dword [ebp - 0x224]
add eax, 4
mov edx, dword [ebp - 0x220]
mov dword [ebp - 0x22c], eax
cmp esi, ecx
jl 0x407bc2
lea ecx, [ebp - 0x26c]
call fcn.00402390
lea ecx, [ebp - 0x280]
call fcn.00402390
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x407c95
push edi
call esi
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x407ca2
push eax
call esi
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00558ddd
mov esp, ebp
pop ebp
ret
call fcn.004250b5
push 0x80004005
call fcn.00403690
push 0x80070057
call fcn.00403690
int3