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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58a618
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x5f31c0]
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.004089f0
test eax, eax
jne 0x40855c
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 0x408539
test eax, eax
mov eax, dword [ebp - 0x230]
jne 0x408095
mov byte [ebp - 4], 4
call fcn.0042b4c7
mov byte [ebp - 4], 3
test eax, eax
je 0x4086b5
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.00403ed0
test al, al
jne 0x408142
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408120
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x218]
call fcn.00409f30
mov esi, dword [esi + 8]
mov byte [ebp - 4], 6
test esi, esi
js 0x4086b0
mov ecx, dword [ebp - 0x228]
lea eax, [esi + 1]
push 0xffffffffffffffff
push eax
call fcn.004099c0
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 0x408198
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 0x4081e9
test edi, edi
je 0x4081d3
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 0x4084fa
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 0x408241
test edi, edi
je 0x40822b
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 0x408517
mov byte [ebp - 4], 0xa
call fcn.0042b4c7
mov byte [ebp - 4], 9
test eax, eax
je 0x4086b5
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 0x4084dc
mov eax, dword [ebp - 0x234]
cmp eax, 1
je 0x4082b9
cmp eax, 2
jne 0x4084dc
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 0x4082e4
push ebx
lea ecx, [ebp - 0x218]
call fcn.00408b40
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 0x408358
mov eax, dword [ebp - 0x238]
cmp eax, 1
je 0x408328
cmp eax, 2
jne 0x408358
mov ecx, dword [ebp - 0x220]
test esi, esi
je 0x40834e
test ecx, ecx
je 0x408349
test cl, 1
jne 0x408358
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x40834e
jmp 0x408358
xor eax, eax
mov word [esi], ax
mov ebx, ecx
shr ebx, 1
mov dword [ebp - 0x214], ebx
test esi, esi
jne 0x408360
xor eax, eax
jmp 0x408374
push dword [esi - 8]
push esi
call fcn.00566c08
add esp, 8
test eax, eax
js 0x4086bf
cmp eax, dword [esi - 8]
jg 0x4086bf
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.00403930
mov ebx, dword [ebp - 0x21c]
test ebx, ebx
js 0x4086b0
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
lea ecx, [ebp - 0x26c]
call fcn.004099c0
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.0042b4c7
mov byte [ebp - 4], 0xb
test eax, eax
je 0x4086b5
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.00403ed0
test al, al
jne 0x408442
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408420
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.00409f30
mov ebx, dword [ebp - 0x224]
mov byte [ebp - 4], 0xe
test ebx, ebx
js 0x4086b0
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
lea ecx, [ebp - 0x280]
call fcn.004099c0
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 0x4084b8
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 0x4084d0
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 0x408517
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x408517
test edi, edi
je 0x40850d
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 0x408095
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x408552
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.004088f0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x408662
push 1
push str.SeBackupPrivilege
call fcn.004088f0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x408662
mov ecx, dword [ebp - 0x224]
xor esi, esi
test ecx, ecx
jle 0x408662
mov edx, dword [ebp - 0x220]
mov eax, dword [ebp - 0x22c]
sub edx, eax
mov dword [ebp - 0x220], edx
test esi, esi
js 0x4086b0
cmp esi, dword [ebp - 0x21c]
jge 0x4086b0
cmp esi, ecx
jge 0x4086b0
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 0x40863e
mov eax, dword [ebp - 0x228]
cmp esi, dword [eax + 8]
jge 0x4086b0
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 0x4086b0
push 0xffffffffffffffff
lea eax, [ebx + 1]
push eax
call fcn.004099c0
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 0x4085b2
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 0x408685
push edi
call esi
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x408692
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.0055e0c1
mov esp, ebp
pop ebp
ret
call fcn.0042a442
push 0x80004005
call fcn.00403c70
push 0x80070057
call fcn.00403c70
int3