Function at 0x406710
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x120
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push ebp
push esi
push edi
lea eax, [esp + 0x10]
push eax
push 1
push 0
push str.SoftwareL0phtL0phtCrack
push 0x80000001
call ebx
test eax, eax
jne 0x406796
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
push eax
mov eax, dword [esp + 0x20]
push str.AdminGroupName
push eax
mov dword [esp + 0x30], pe_nt_image_headers32
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4067c8
mov ecx, dword [str.Administrators]
mov edx, dword [0x449290]
mov eax, dword [0x449294]
mov dword [esp + 0x30], ecx
mov cx, word [0x449298]
mov dword [esp + 0x34], edx
mov dl, byte [0x44929a]
mov dword [esp + 0x38], eax
mov word [esp + 0x3c], cx
mov byte [esp + 0x3e], dl
jmp 0x4067c8
mov eax, dword [str.Administrators]
mov ecx, dword [0x449290]
mov edx, dword [0x449294]
mov dword [esp + 0x30], eax
mov ax, word [0x449298]
mov dword [esp + 0x34], ecx
mov cl, byte [0x44929a]
mov dword [esp + 0x38], edx
mov word [esp + 0x3c], ax
mov byte [esp + 0x3e], cl
push 0x60000
lea edx, [esp + 0x34]
push edx
push 0x10000000
push str.SYSTEM
lea eax, [esp + 0x2c]
push 2
push eax
call fcn.004060d0
add esp, 0x18
test eax, eax
jne 0x4067fd
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret
mov ecx, 8
mov esi, str.SECURITYSAMDomainsAccountUsers
lea edi, [esp + 0xb0]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0xb8]
movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x13c]
push edx
push edi
call fcn.004064c0
add esp, 0x10
test eax, eax
je 0x406844
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret
lea eax, [esp + 0x10]
push eax
push 0x40000
push 0
lea ecx, [esp + 0xbc]
push ecx
push edi
call ebx
mov esi, eax
test esi, esi
jne 0x4068cb
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push edx
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
mov esi, eax
test esi, esi
jne 0x406931
mov ecx, dword [esp + 0x10]
push ecx
call ebp
lea edx, [esp + 0xb0]
push 0x5c
push edx
call fcn.0040eff0
add esp, 8
test eax, eax
je 0x40699e
test eax, eax
mov byte [eax], 0
je 0x40699e
lea eax, [esp + 0x10]
push eax
push 0x40000
push esi
lea ecx, [esp + 0xbc]
push ecx
push edi
call ebx
mov esi, eax
test esi, esi
je 0x406867
mov eax, dword [0x44e674]
test eax, eax
je 0x4068db
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
push 0
lea edx, [esp + 0x1c]
push edx
push 0x400
push esi
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ebp, dword [esp + 0x14]
mov ecx, dword [0x550b80]
neg eax
sbb eax, eax
and eax, ebp
push eax
mov dword [0x44e674], eax
lea eax, [esp + 0xb4]
push eax
push str.restore_sam_tree_access:Failed_to_open_key__s_to_set_security._Error_was__s._n
push ecx
call fcn.0040d480
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret
mov eax, dword [0x44e674]
test eax, eax
je 0x406941
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
push 0
lea edx, [esp + 0x1c]
push edx
push 0x400
push esi
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [esp + 0x14]
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [0x550b80]
push eax
mov dword [0x44e674], eax
lea eax, [esp + 0xb4]
push eax
push str.restore_sam_tree_access:_Failed_to_set_security_on_key__s._Error_was__s._n
push ecx
call fcn.0040d480
mov edx, dword [esp + 0x20]
add esp, 0x10
push edx
call ebp
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret