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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58ef58
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x5fb1a0]
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.00408a00
test eax, eax
jne 0x40856c
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 0x408549
test eax, eax
mov eax, dword [ebp - 0x230]
jne 0x4080a5
mov byte [ebp - 4], 4
call fcn.0042b730
mov byte [ebp - 4], 3
test eax, eax
je 0x4086c5
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.00403f20
test al, al
jne 0x408152
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408130
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x218]
call fcn.00409f20
mov esi, dword [esi + 8]
mov byte [ebp - 4], 6
test esi, esi
js 0x4086c0
mov ecx, dword [ebp - 0x228]
lea eax, [esi + 1]
push 0xffffffffffffffff
push eax
call fcn.004099d0
lea eax, [ebp - 0x218]
push eax
mov eax, dword [ebp - 0x228]
mov eax, dword [eax + 4]
lea ecx, [eax + esi*4]
call fcn.004024c0
mov edx, dword [ebp - 0x218]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4081a8
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 0x4081f9
test edi, edi
je 0x4081e3
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 0x40850a
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 0x408251
test edi, edi
je 0x40823b
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 0x408527
mov byte [ebp - 4], 0xa
call fcn.0042b730
mov byte [ebp - 4], 9
test eax, eax
je 0x4086c5
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 0x4084ec
mov eax, dword [ebp - 0x234]
cmp eax, 1
je 0x4082c9
cmp eax, 2
jne 0x4084ec
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 0x4082f4
push ebx
lea ecx, [ebp - 0x218]
call fcn.00408b50
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 0x408368
mov eax, dword [ebp - 0x238]
cmp eax, 1
je 0x408338
cmp eax, 2
jne 0x408368
mov ecx, dword [ebp - 0x220]
test esi, esi
je 0x40835e
test ecx, ecx
je 0x408359
test cl, 1
jne 0x408368
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x40835e
jmp 0x408368
xor eax, eax
mov word [esi], ax
mov ebx, ecx
shr ebx, 1
mov dword [ebp - 0x214], ebx
test esi, esi
jne 0x408370
xor eax, eax
jmp 0x408384
push dword [esi - 8]
push esi
call fcn.0056712f
add esp, 8
test eax, eax
js 0x4086cf
cmp eax, dword [esi - 8]
jg 0x4086cf
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.00403980
mov ebx, dword [ebp - 0x21c]
test ebx, ebx
js 0x4086c0
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
lea ecx, [ebp - 0x26c]
call fcn.004099d0
lea eax, [ebp - 0x218]
push eax
mov eax, dword [ebp - 0x268]
mov dword [ebp - 0x220], eax
lea ecx, [eax + ebx*4]
call fcn.004024c0
mov byte [ebp - 4], 0xc
call fcn.0042b730
mov byte [ebp - 4], 0xb
test eax, eax
je 0x4086c5
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.00403f20
test al, al
jne 0x408452
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408430
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.00409f20
mov ebx, dword [ebp - 0x224]
mov byte [ebp - 4], 0xe
test ebx, ebx
js 0x4086c0
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
lea ecx, [ebp - 0x280]
call fcn.004099d0
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 0x22c], eax
lea ecx, [eax + ebx*4]
call fcn.004024c0
mov edx, dword [ebp - 0x21c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4084c8
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 0x4084e0
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 0x408527
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x408527
test edi, edi
je 0x40851d
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 0x4080a5
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x408562
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.00408900
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x408672
push 1
push str.SeBackupPrivilege
call fcn.00408900
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x408672
mov ecx, dword [ebp - 0x224]
xor esi, esi
test ecx, ecx
jle 0x408672
mov edx, dword [ebp - 0x220]
mov eax, dword [ebp - 0x22c]
sub edx, eax
mov dword [ebp - 0x220], edx
test esi, esi
js 0x4086c0
cmp esi, dword [ebp - 0x21c]
jge 0x4086c0
cmp esi, ecx
jge 0x4086c0
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 0x40864e
mov eax, dword [ebp - 0x228]
cmp esi, dword [eax + 8]
jge 0x4086c0
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 0x4086c0
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
call fcn.004099d0
mov eax, dword [ebp - 0x24c]
push dword [ebp - 0x238]
mov eax, dword [eax + 4]
lea ecx, [eax + ebx*4]
call fcn.004024c0
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 0x4085c2
lea ecx, [ebp - 0x26c]
call fcn.004023c0
lea ecx, [ebp - 0x280]
call fcn.004023c0
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x408695
push edi
call esi
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x4086a2
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.0055e52e
mov esp, ebp
pop ebp
ret
call fcn.0042a6ab
push 0x80004005
call fcn.00403cc0
push 0x80070057
call fcn.00403cc0
int3