Function at 0x413670
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x440c39
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x455440]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x18], 0
mov eax, dword [ebx]
cmp dword [eax], 0
jne 0x413706
call fcn.004015a0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4136d3
push 0x80004005
push 0xcd
mov edx, str.ATL::CSimpleStringT_wchar_t_0_::CSimpleStringT
mov ecx, str.C:Program_FilesMicrosoft_Visual_Studio_12.0VC_atlmfcinclude_atlsimpstr.h
call fcn.0040bca0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
mov ecx, dword [ebp + 8]
add eax, 0x10
mov dword [ecx], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 1
mov eax, ecx
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
call fcn.004015a0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x413731
push 0x80004005
push 0xcd
mov edx, str.ATL::CSimpleStringT_wchar_t_0_::CSimpleStringT
mov ecx, str.C:Program_FilesMicrosoft_Visual_Studio_12.0VC_atlmfcinclude_atlsimpstr.h
call fcn.0040bca0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x1c]
mov eax, dword [ebx]
xor edi, edi
push ecx
push edi
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x1c], 0
push ecx
push edi
push dword [ebx + 8]
mov dword [ebp - 0x10], edi
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x413788
mov eax, dword [ebp - 0x20]
cmp eax, 1
je 0x41377e
cmp eax, 2
je 0x41377e
lea eax, [edi + 0xd]
jmp 0x413788
mov edi, dword [ebp - 0x1c]
shr edi, 1
xor eax, eax
mov dword [ebp - 0x10], edi
mov ecx, eax
sub ecx, 2
je 0x413857
sub ecx, 0xe8
je 0x4137bb
test eax, eax
je 0x4137bb
jle 0x4137a9
movzx eax, ax
or eax, 0x80070000
push eax
push 0x2f
mov edx, str.RegKey::operator_class_ATL::CStringT_wchar_t_class_ATL::StrTraitATL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____
mov ecx, str.reg_key.cpp
call fcn.0040bca0
test edi, edi
jns 0x4137d8
push 0x80070057
push 0x325
mov edx, str.ATL::CSimpleStringT_wchar_t_0_::PrepareWrite
mov ecx, str.C:Program_FilesMicrosoft_Visual_Studio_12.0VC_atlmfcinclude_atlsimpstr.h
call fcn.0040bca0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x4137f5
push edi
lea ecx, [ebp - 0x14]
call fcn.00405ed0
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebx]
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebx + 8]
call fcn.00413970
test eax, eax
je 0x413824
jle 0x413812
movzx eax, ax
or eax, 0x80070000
push eax
push 0x33
mov edx, str.RegKey::operator_class_ATL::CStringT_wchar_t_class_ATL::StrTraitATL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____
mov ecx, str.reg_key.cpp
call fcn.0040bca0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
dec eax
push eax
call fcn.0040b630
add esi, 0xfffffff0
mov ecx, esi
call fcn.00405c60
mov edi, dword [ebp + 8]
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x18], 1
mov dword [ebp - 4], 0
jmp 0x413872
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.00405030
mov dword [ebp - 0x18], 1
mov dword [ebp - 4], 0
add esi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x413889
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
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