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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4627e8
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x47e700]
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.004080a0
test eax, eax
jne 0x407bfc
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 0x407bd9
test eax, eax
mov eax, dword [ebp - 0x230]
jne 0x407735
mov byte [ebp - 4], 4
call fcn.0042a268
mov byte [ebp - 4], 3
test eax, eax
je 0x407d55
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.00403570
test al, al
jne 0x4077e2
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4077c0
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x218]
call fcn.004095e0
mov esi, dword [esi + 8]
mov byte [ebp - 4], 6
test esi, esi
js 0x407d50
mov ecx, dword [ebp - 0x228]
lea eax, [esi + 1]
push 0xffffffffffffffff
push eax
call fcn.00409070
lea eax, [ebp - 0x218]
push eax
mov eax, dword [ebp - 0x228]
mov eax, dword [eax + 4]
lea ecx, [eax + esi*4]
call fcn.00401b30
mov edx, dword [ebp - 0x218]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407838
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 reloc.WS2_32.dll_closesocket
call esi
test eax, eax
jne 0x407889
test edi, edi
je 0x407873
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 0x407b9a
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 0x4078e1
test edi, edi
je 0x4078cb
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 0x407bb7
mov byte [ebp - 4], 0xa
call fcn.0042a268
mov byte [ebp - 4], 9
test eax, eax
je 0x407d55
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 0x407b7c
mov eax, dword [ebp - 0x234]
cmp eax, 1
je 0x407959
cmp eax, 2
jne 0x407b7c
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 0x407984
push ebx
lea ecx, [ebp - 0x218]
call fcn.004081f0
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 0x4079f8
mov eax, dword [ebp - 0x238]
cmp eax, 1
je 0x4079c8
cmp eax, 2
jne 0x4079f8
mov ecx, dword [ebp - 0x220]
test esi, esi
je 0x4079ee
test ecx, ecx
je 0x4079e9
test cl, 1
jne 0x4079f8
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x4079ee
jmp 0x4079f8
xor eax, eax
mov word [esi], ax
mov ebx, ecx
shr ebx, 1
mov dword [ebp - 0x214], ebx
test esi, esi
jne 0x407a00
xor eax, eax
jmp 0x407a14
push dword [esi - 8]
push esi
call fcn.00440963
add esp, 8
test eax, eax
js 0x407d5f
cmp eax, dword [esi - 8]
jg 0x407d5f
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.00402fd0
mov ebx, dword [ebp - 0x21c]
test ebx, ebx
js 0x407d50
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
lea ecx, [ebp - 0x26c]
call fcn.00409070
lea eax, [ebp - 0x218]
push eax
mov eax, dword [ebp - 0x268]
mov dword [ebp - 0x220], eax
lea ecx, [eax + ebx*4]
call fcn.00401b30
mov byte [ebp - 4], 0xc
call fcn.0042a268
mov byte [ebp - 4], 0xb
test eax, eax
je 0x407d55
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.00403570
test al, al
jne 0x407ae2
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407ac0
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.004095e0
mov ebx, dword [ebp - 0x224]
mov byte [ebp - 4], 0xe
test ebx, ebx
js 0x407d50
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
lea ecx, [ebp - 0x280]
call fcn.00409070
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 0x22c], eax
lea ecx, [eax + ebx*4]
call fcn.00401b30
mov edx, dword [ebp - 0x21c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407b58
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 0x407b70
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 0x407bb7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x407bb7
test edi, edi
je 0x407bad
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 0x407735
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x407bf2
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.00407fa0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x407d02
push 1
push str.SeBackupPrivilege
call fcn.00407fa0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x407d02
mov ecx, dword [ebp - 0x224]
xor esi, esi
test ecx, ecx
jle 0x407d02
mov edx, dword [ebp - 0x220]
mov eax, dword [ebp - 0x22c]
sub edx, eax
mov dword [ebp - 0x220], edx
test esi, esi
js 0x407d50
cmp esi, dword [ebp - 0x21c]
jge 0x407d50
cmp esi, ecx
jge 0x407d50
push dword [edx + eax]
push dword [eax]
push reloc.WS2_32.dll_closesocket
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
mov ebx, eax
mov dword [ebp - 0x234], ebx
test ebx, ebx
jne 0x407cde
mov eax, dword [ebp - 0x228]
cmp esi, dword [eax + 8]
jge 0x407d50
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 0x407d50
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
call fcn.00409070
mov eax, dword [ebp - 0x24c]
push dword [ebp - 0x238]
mov eax, dword [eax + 4]
lea ecx, [eax + ebx*4]
call fcn.00401b30
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 0x407c52
lea ecx, [ebp - 0x26c]
call fcn.00401a30
lea ecx, [ebp - 0x280]
call fcn.00401a30
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x407d25
push edi
call esi
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x407d32
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.00438287
mov esp, ebp
pop ebp
ret
call fcn.00429c0d
push 0x80004005
call fcn.00403310
push 0x80070057
call fcn.00403310
int3