Function at 0x405160
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e4
mov eax, dword [0x493afc]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x90], 0xffffffff
push 0x46edbc
lea eax, [ebp - 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.SAMDomainsAccountUsers
lea ecx, [ebp - 0x88]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [ebp - 0x8c]
push edx
push 8
push 0
lea eax, [ebp - 0x88]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4051d1
or eax, 0xffffffff
jmp 0x405453
mov dword [ebp - 0x2dc], 0x80
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x2e4], ecx
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x2dc]
push edx
lea eax, [ebp - 0x118]
push eax
mov ecx, dword [ebp - 0x2e4]
push ecx
mov edx, dword [ebp - 0x8c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 0x94], 0
jne 0x40540f
push str.Names
lea ecx, [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x405245
jmp 0x405433
push 0x13c
push 0
lea edx, [ebp - 0x258]
push edx
call fcn.0045ba40
add esp, 0xc
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x2d8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x46edec
lea edx, [ebp - 0x2d8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x2d8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [ebp - 0x14c]
push edx
push 0
push 0
push 0
push 0x46edf0
lea eax, [ebp - 0x2d8]
push eax
push 0x80000002
call fcn.00405c20
add esp, 0x1c
test eax, eax
jne 0x4052ce
mov dword [ebp - 0x90], 0xffffffff
jmp 0x405440
push 4
push 0x3000
mov ecx, dword [ebp - 0x14c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x150], eax
cmp dword [ebp - 0x150], 0
jne 0x405302
mov dword [ebp - 0x90], 0xfffffffd
jmp 0x405440
push 0
mov edx, dword [ebp - 0x14c]
push edx
mov eax, dword [ebp - 0x150]
push eax
push 0
push 0x46edf4
lea ecx, [ebp - 0x2d8]
push ecx
push 0x80000002
call fcn.00405c20
add esp, 0x1c
test eax, eax
jne 0x405340
mov dword [ebp - 0x90], 0xffffffff
jmp 0x405440
mov edx, dword [ebp - 0x150]
mov dword [ebp - 0x2e0], edx
mov eax, dword [ebp - 0x2e0]
movzx eax, word [eax + 0xc4]
sub eax, 4
cdq
and edx, 0xf
add eax, edx
sar eax, 4
add eax, 1
mov dword [ebp - 0x148], eax
cmp dword [ebp + 0xc], 0
je 0x40539c
cmp dword [ebp - 0x148], 0
je 0x40539c
push 4
push 0x3000
mov ecx, dword [ebp - 0x148]
imul ecx, ecx, 0x24
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x120], eax
push 0x10
push 0
lea edx, [ebp - 0x118]
push edx
call fcn.0045c191
add esp, 0xc
mov dword [ebp - 0x154], eax
lea eax, [ebp - 0x258]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call fcn.00404fc0
add esp, 8
test eax, eax
jne 0x405401
lea edx, [ebp - 0x258]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00405dd0
add esp, 8
test eax, eax
jne 0x4053ff
push 0x46edf8
call fcn.0045baba
add esp, 4
mov dword [ebp - 0x90], 0xfffffffd
jmp 0x405440
jmp 0x40540d
mov dword [ebp - 0x90], 0xffffffff
jmp 0x405440
jmp 0x405433
cmp dword [ebp - 0x94], 0x103
jne 0x405429
mov dword [ebp - 0x90], 0
jmp 0x405440
mov dword [ebp - 0x90], 0xffffffff
cmp dword [ebp - 0x94], 0
je 0x4051d1
mov ecx, dword [ebp - 0x8c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x90]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045b6bb
mov esp, ebp
pop ebp
ret