Function at 0x408400
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5389f0
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x58d140]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push str.IsWow64Process
xor ebx, ebx
push str.kernel32
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, ebx
je 0x40845d
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
mov edi, dword [ebp - 0x24]
neg edi
sbb edi, edi
and edi, 0xffffff00
push esi
lea ecx, [ebp - 0x38]
add edi, 0x200
call fcn.00405f00
push esi
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], ebx
call fcn.00405f00
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x14]
mov eax, dword [esi - 0xc]
mov ebx, SysReAllocStringLen
mov dword [ebp - 0x18], ebx
test eax, eax
js 0x4084b9
push str.HKEY_CURRENT_USER
push esi
call fcn.0050eae8
add esp, 8
test eax, eax
je 0x4084b9
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jle 0x4084b9
mov dword [ebp - 0x18], ebx
cmp dword [esi - 0xc], 0
jl 0x40855d
push str.HKEY_LOCAL_MACHINE
push esi
call fcn.0050eae8
add esp, 8
test eax, eax
je 0x4084e5
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jle 0x4084e5
mov dword [ebp - 0x18], reloc.OLEAUT32.dll_SysReAllocString
cmp dword [esi - 0xc], 0
jl 0x40855d
push str.HKEY_USERS
push esi
call fcn.0050eae8
add esp, 8
test eax, eax
je 0x40850d
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x40850d
mov dword [ebp - 0x18], SysReAllocStringLen
cmp dword [esi - 0xc], 0
jl 0x40855d
push str.HKEY_CURRENT_CONFIG
push esi
call fcn.0050eae8
add esp, 8
test eax, eax
je 0x408535
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x408535
mov dword [ebp - 0x18], VariantCopyInd
cmp dword [esi - 0xc], 0
jl 0x40855d
push str.HKEY_CLASSES_ROOT
push esi
call fcn.0050eae8
add esp, 8
test eax, eax
je 0x40855d
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x40855d
mov dword [ebp - 0x18], SysReAllocStringLen
push 0x567edc
push 0x568298
lea ecx, [ebp - 0x14]
call fcn.00402bd0
push 0x567edc
push 0x567ee0
lea ecx, [ebp - 0x14]
call fcn.00402bd0
push 0x56802c
push str.HKEY_CURRENT_USER_
lea ecx, [ebp - 0x14]
call fcn.00402bd0
push 0x56802c
push str.HKEY_LOCAL_MACHINE_
lea ecx, [ebp - 0x14]
call fcn.00402bd0
push 0x56802c
push str.HKEY_USERS_
lea ecx, [ebp - 0x14]
call fcn.00402bd0
push 0x56802c
push str.HKEY_CURRENT_CONFIG_
lea ecx, [ebp - 0x14]
call fcn.00402bd0
push 0x56802c
push str.HKEY_CLASSES_ROOT_
lea ecx, [ebp - 0x14]
call fcn.00402bd0
mov ebx, dword [ebp - 0x14]
push 0x5c
push ebx
call fcn.0050eb48
add esp, 8
test eax, eax
jne 0x4085f2
or esi, 0xffffffff
jmp 0x4085f8
sub eax, ebx
sar eax, 1
mov esi, eax
mov eax, dword [ebx - 0xc]
sub eax, esi
dec eax
push eax
lea ecx, [esi + 1]
push ecx
lea edx, [ebp - 0x24]
push edx
lea ecx, [ebp - 0x14]
call fcn.00405a10
push esi
xor esi, esi
push esi
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.00405a10
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x34]
mov eax, dword [ecx - 0xc]
push eax
push ecx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
cmp eax, esi
jne 0x408647
call fcn.00401580
mov ecx, dword [ebp - 0x18]
or edi, 0x20019
push edi
push eax
push ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x30], edi
call fcn.00409960
cmp eax, esi
jne 0x4087e2
call fcn.0040e25e
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x408680
push 0x80004005
call fcn.00401670
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x20], esi
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx - 0xc]
push eax
push ecx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
test eax, eax
jne 0x4086aa
call fcn.00401580
push eax
lea ecx, [ebp - 0x2c]
call fcn.00405e40
lea ecx, [ebp - 0x1c]
push ecx
xor edi, edi
push edi
lea edx, [ebp - 0x28]
push edx
mov bl, 6
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x48]
push edi
push eax
push ecx
mov dword [ebp - 0x1c], 0x104
mov dword [ebp - 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, edi
jne 0x408785
mov edx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x2c]
test edx, edx
jns 0x4086f8
push 0x80070057
call fcn.00401670
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x408715
push edx
lea ecx, [ebp - 0x20]
call fcn.00401400
mov esi, dword [ebp - 0x20]
push edi
lea edx, [ebp - 0x48]
push edx
lea edi, [ebp - 0x1c]
call fcn.00409840
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0050eaa7
add esp, 8
test eax, eax
js 0x4086ee
cmp eax, dword [esi - 8]
jg 0x4086ee
xor ecx, ecx
mov dword [esi - 0xc], eax
lea edx, [ebp - 0x20]
mov word [esi + eax*2], cx
push edx
lea ecx, [ebp - 0x28]
call fcn.00405f00
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 7
call fcn.00401600
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40877f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 0xd], 1
xor edi, edi
mov eax, dword [ebp - 0x48]
cmp eax, edi
je 0x408796
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x48], edi
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
mov dword [ebp - 0x44], edi
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4087bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4087dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebx - 0xc]
push eax
push ebx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
test eax, eax
jne 0x4087f6
call fcn.00401580
mov edx, dword [ebp - 0x18]
lea ecx, [ebp - 0x3c]
push ecx
push edi
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408810
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40881e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408841
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408864
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408884
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4088aa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4