Function at 0x401400
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41cc18
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x426168]
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
xor esi, esi
xor edi, edi
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], edi
lea eax, [ebp - 0x1c]
push eax
push 0x20019
push esi
push str.SOFTWARE
mov dword [ebp - 4], esi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x1c], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x401471
mov ecx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0x20], ecx
mov edi, ecx
jmp 0x401482
jg 0x401478
mov edi, dword [ebp - 0x20]
jmp 0x401482
and eax, 0xffff
or eax, 0x80070000
cmp eax, esi
jl 0x40179b
mov ebx, dword [sym.imp.ADVAPI32.dll_RegGetKeySecurity]
lea edx, [ebp - 0x34]
push edx
push esi
push 4
push edi
mov dword [ebp - 0x34], esi
call ebx
cmp eax, 0x7a
je 0x4014a8
cmp eax, esi
jle 0x4014e8
jmp 0x4014de
mov eax, dword [ebp - 0x34]
push eax
call fcn.0040cdcc
mov esi, eax
add esp, 4
test esi, esi
mov dword [ebp - 0x38], esi
je 0x40179b
mov ecx, dword [ebp - 0x34]
push ecx
push 0
push esi
call fcn.0040e580
add esp, 0xc
lea edx, [ebp - 0x34]
push edx
push esi
push 4
push edi
call ebx
test eax, eax
jle 0x4014ea
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x401768
lea eax, [ebp - 0x1c]
push eax
push str.SECURITYSAMDomainsAccount
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jle 0x40151b
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x401768
test edi, edi
je 0x40152c
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x1c]
lea ecx, [ebp - 0x1c]
push ecx
push 0
push 4
push edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], 0
call ebx
cmp eax, 0x7a
jne 0x40157c
mov edx, dword [ebp - 0x1c]
push edx
call fcn.0040cdcc
add esp, 4
test eax, eax
mov dword [ebp - 0x30], eax
je 0x401768
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x30]
push eax
push 0
push esi
call fcn.0040e580
add esp, 0xc
lea ecx, [ebp - 0x1c]
push ecx
push esi
push 4
push edi
call ebx
test eax, eax
jle 0x40158c
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x401768
mov edx, dword [ebp - 0x38]
push edx
push 4
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
jle 0x4015af
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x401768
lea eax, [ebp - 0x2c]
push eax
push str.SECURITYSAMDomainsAccount
xor ebx, ebx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, ebx
jle 0x4015dc
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
cmp esi, ebx
jl 0x401675
cmp edi, ebx
je 0x4015f1
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x2c]
lea ecx, [ebp - 0x28]
push ecx
push ebx
lea edx, [ebp - 0x2c]
push edx
push ebx
push 0x420bec
mov dword [ebp - 0x2c], ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov dword [ebp - 0x20], edi
call ebx
test eax, eax
jle 0x401620
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x401675
mov eax, dword [ebp - 0x28]
push eax
call fcn.0040cdcc
add esp, 4
test eax, eax
mov dword [ebp - 0x24], eax
jne 0x401640
mov esi, 0x8007000e
jmp 0x401675
mov ecx, dword [ebp - 0x28]
push ecx
push 0
push eax
call fcn.0040e580
mov eax, dword [ebp - 0x24]
add esp, 0xc
lea edx, [ebp - 0x28]
push edx
push eax
lea ecx, [ebp - 0x2c]
push ecx
push 0
push 0x420bec
push edi
call ebx
test eax, eax
jle 0x401673
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x20]
push edx
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test esi, esi
jl 0x401768
mov ecx, dword [ebp - 0x28]
test cl, 3
jne 0x401768
mov eax, dword [ebp - 0x24]
lea edi, [ecx + eax - 0x14]
cmp edi, eax
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x17], 0
mov byte [ebp - 0x16], 0
mov byte [ebp - 0x15], 0
mov byte [ebp - 0x14], 0
mov byte [ebp - 0x13], 5
jb 0x401768
cmp dword [edi + 8], 0x15
jne 0x401750
mov eax, 6
lea ecx, [ebp - 0x18]
lea edx, [edi + 2]
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x4016ed
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x4016d5
test eax, eax
je 0x40174a
movzx esi, byte [edx]
movzx ebx, byte [ecx]
sub esi, ebx
jne 0x40173c
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x40174a
movzx esi, byte [edx]
movzx ebx, byte [ecx]
sub esi, ebx
jne 0x40173c
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x40174a
movzx esi, byte [edx]
movzx ebx, byte [ecx]
sub esi, ebx
jne 0x40173c
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x40174a
movzx esi, byte [edx]
movzx ecx, byte [ecx]
sub esi, ecx
je 0x40174a
test esi, esi
mov eax, 1
jg 0x40174c
or eax, 0xffffffff
jmp 0x40174c
xor eax, eax
test eax, eax
je 0x40175e
sub edi, 4
cmp edi, dword [ebp - 0x24]
jae 0x4016c0
jmp 0x401768
mov edx, dword [ebp - 0x3c]
push edx
push edi
call sub.ADVAPI32.dll_ConvertSidToStringSidW
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x401778
push eax
call fcn.0040d2a5
add esp, 4
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x401788
push eax
call fcn.0040d2a5
add esp, 4
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x401798
push eax
call fcn.0040d2a5
add esp, 4
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x4017a6
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
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.0040d2aa
mov esp, ebp
pop ebp
ret