Function at 0x40f330
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5456cb
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x5ec938]
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 edi, dword [ebp + 0x10]
mov dword [ebp - 0x430], eax
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x424], eax
cmp edi, ebx
je 0x40f40f
cmp eax, ebx
je 0x40f40f
push ebx
push 0x556794
mov ecx, edi
call fcn.004026f0
mov ecx, dword [ebp - 0x424]
push ebx
push 0x556794
call fcn.004026f0
call fcn.00436219
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40f3bf
push 0x80004005
call fcn.00401ed0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x418], eax
lea ecx, [ebp - 0x418]
push ecx
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.0040d5b0
test eax, eax
jne 0x40f42f
mov eax, dword [ebp - 0x418]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f40f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
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.0052c2ec
mov esp, ebp
pop ebp
ret 0x10
mov ecx, 1
mov dword [ebp - 0x420], ecx
cmp dword [ebp + 0xc], ebx
je 0x40f480
mov eax, dword [esi + 0xdb38]
mov dword [ebp - 0x428], ebx
cmp eax, 5
ja 0x40f45a
jne 0x40f480
cmp dword [esi + 0xdb3c], ecx
jb 0x40f480
lea ecx, [ebp - 0x428]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
cmp dword [ebp - 0x428], ebx
je 0x40f480
mov dword [ebp - 0x420], 0x101
mov eax, dword [ebp - 0x420]
mov esi, dword [ebp - 0x418]
mov ecx, dword [ebp - 0x430]
lea edx, [ebp - 0x414]
push edx
push eax
push ebx
push esi
push ecx
mov dword [ebp - 0x414], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40f4b5
lea eax, [esi - 0x10]
jmp 0x40f3ef
push 0x3fe
lea edx, [ebp - 0x40e]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0x410], cx
call fcn.0052c850
add esp, 0xc
lea eax, [ebp - 0x42c]
push eax
mov eax, dword [ebp - 0x414]
lea ecx, [ebp - 0x410]
push ecx
lea edx, [ebp - 0x41c]
push edx
push ebx
push str.RESIDENCE
push eax
mov dword [ebp - 0x41c], ebx
mov dword [ebp - 0x42c], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40f51d
lea ecx, [ebp - 0x410]
push ecx
mov ecx, edi
call fcn.00402bd0
push 0x400
lea edx, [ebp - 0x410]
push ebx
push edx
mov dword [ebp - 0x41c], ebx
call fcn.0052c850
add esp, 0xc
lea eax, [ebp - 0x42c]
push eax
mov eax, dword [ebp - 0x414]
lea ecx, [ebp - 0x410]
push ecx
lea edx, [ebp - 0x41c]
push edx
push ebx
push str.AREA
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40f576
lea ecx, [ebp - 0x410]
push ecx
mov ecx, dword [ebp - 0x424]
call fcn.00402bd0
mov edx, dword [ebp - 0x414]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f5a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40f411