Function at 0x405440
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x407282
mov eax, dword fs:[0]
push eax
sub esp, 0x2e0
mov eax, dword [0x40b01c]
xor eax, esp
mov dword [esp + 0x2d8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x40b01c]
xor eax, esp
push eax
lea eax, [esp + 0x2f4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x304]
mov ebx, ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], eax
xor ebp, ebp
mov eax, dword [ebp + 0x40b048]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [esp + 0x14]
push ecx
lea esi, [esp + 0xe0]
mov edx, esi
push edx
mov edx, dword [ebx]
lea ecx, [esp + 0x2c]
push ecx
push 0
push eax
push edx
mov dword [esp + 0x2c], 0x20a
call edi
test eax, eax
jne 0x405509
mov eax, dword [esp + 0x24]
cmp eax, 1
je 0x4054d4
cmp eax, 2
jne 0x4056d4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4054fa
test al, 1
jne 0x4056d4
shr eax, 1
cmp word [esp + eax*2 + 0xda], 0
je 0x4055a1
jmp 0x4056d4
mov word [esp + 0xdc], 0
jmp 0x4055a1
cmp eax, 0xea
jne 0x405599
xor ecx, ecx
mov eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040662a
add esp, 4
mov esi, eax
mov eax, dword [ebp + 0x40b048]
lea ecx, [esp + 0x14]
push ecx
push esi
lea edx, [esp + 0x20]
push edx
push 0
push eax
mov eax, dword [ebx]
push eax
mov dword [esp + 0x2c], 0
call edi
test eax, eax
jne 0x4056c0
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x40556f
cmp eax, 2
jne 0x4056c0
test esi, esi
je 0x4055a1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x405592
test al, 1
jne 0x4056c0
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x4055a1
jmp 0x4056c0
mov word [esi], 0
jmp 0x4055a1
test eax, eax
jne 0x4056c0
push esi
lea ecx, [esp + 0xc4]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov dword [esp + 0x2fc], 0
mov ecx, dword [ebp + 0x40b048]
push ecx
lea ecx, [esp + 0x70]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
push eax
lea ecx, [esp + 0x8c]
mov byte [esp + 0x300], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea edx, [esp + 0xc0]
push edx
lea ecx, [esp + 0xa8]
mov byte [esp + 0x300], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea ecx, [esp + 0x6c]
mov byte [esp + 0x2fc], 4
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea eax, [esp + 0x88]
push eax
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea ecx, [esp + 0xa4]
push ecx
lea ecx, [esp + 0x48]
mov byte [esp + 0x300], 5
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov ebx, dword [esp + 0x1c]
lea edx, [esp + 0x28]
push edx
lea edi, [esp + 0x64]
mov byte [esp + 0x300], 6
call fcn.00405b50
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 7
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x28]
mov byte [esp + 0x2fc], 4
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0xa4]
mov byte [esp + 0x2fc], 8
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x88]
mov byte [esp + 0x2fc], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0xc0]
mov dword [esp + 0x2fc], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ebx, dword [esp + 0x20]
lea eax, [esp + 0xdc]
cmp esi, eax
je 0x4056d4
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
add ebp, 4
cmp ebp, 0x44
jb 0x40548e
mov al, 1
mov ecx, dword [esp + 0x2f4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2d8]
xor ecx, esp
call fcn.0040694a
add esp, 0x2ec
ret