Function at 0x4064c0
Capabilities:
Query or enumerate registry key

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x98
push ebx
mov ebx, dword [esp + 0xa4]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
push edi
lea eax, [esp + 0x10]
push eax
push 8
xor edi, edi
push edi
push ebx
push ecx
call ebp
mov esi, eax
test esi, esi
je 0x40654d
mov eax, dword [0x44e674]
test eax, eax
je 0x4064ff
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]
neg eax
sbb eax, eax
and eax, ebp
push eax
push ebx
mov dword [0x44e674], eax
mov eax, dword [0x550b80]
push str.set_userkeys_security:_Failed_to_open_key__s_to_enumerate._Error_was__s._n
push eax
call fcn.0040d480
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret
mov ebx, dword [esp + 0xb4]
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x3c]
push eax
push edi
push ecx
mov dword [esp + 0x3c], pe_nt_image_headers32
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov esi, eax
test esi, esi
jne 0x4066b6
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0x40000
push eax
lea eax, [esp + 0x34]
push eax
push ecx
inc edi
call ebp
mov esi, eax
test esi, esi
jne 0x4065d2
mov edx, dword [esp + 0x14]
push ebx
push 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
mov esi, eax
test esi, esi
jne 0x40663f
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4066b6
jmp 0x406554
mov eax, dword [0x44e674]
test eax, eax
je 0x4065e2
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x400
push esi
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ebp, dword [esp + 0x18]
neg eax
sbb eax, eax
and eax, ebp
push eax
lea edx, [esp + 0x2c]
push edx
mov dword [0x44e674], eax
mov eax, dword [0x550b80]
push str.set_userkeys_security:_Failed_to_open_key__s_to_set_security._Error_was__s._n
push eax
call fcn.0040d480
mov ecx, dword [esp + 0x20]
add esp, 0x10
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret
mov eax, dword [0x44e674]
test eax, eax
je 0x40664f
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
push 0
lea edx, [esp + 0x20]
push edx
push 0x400
push esi
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov esi, dword [esp + 0x18]
mov ecx, dword [0x550b80]
neg eax
sbb eax, eax
and eax, esi
push eax
mov dword [0x44e674], eax
lea eax, [esp + 0x2c]
push eax
push str.set_userkeys_security:_Failed_to_set_security_on_key__s._Error_was__s._n
push ecx
call fcn.0040d480
mov edx, dword [esp + 0x24]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0x10
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret
cmp esi, 0x103
je 0x4066d7
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret
mov eax, dword [esp + 0xb8]
test eax, eax
jne 0x4066fa
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword [eax], ecx
xor eax, eax
pop ebx
add esp, 0x98
ret