Function at 0x40c530
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5bf9d6
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
push ebx
push esi
push edi
mov eax, dword [0x62ece4]
xor eax, esp
push eax
lea eax, [esp + 0x100]
mov dword fs:[0], eax
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
cmp esi, 0x7ed
je 0x40c722
cmp dword [edi + 0x64], 0xfffffffe
jne 0x40c71a
mov eax, dword [edi + 0xc4]
push edi
push 0x102
push eax
lea ecx, [esp + 0x70]
mov dword [edi + 0x140], 1
call fcn.0048fb30
xor ebx, ebx
mov dword [esp + 0x108], ebx
call fcn.0047b8ad
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40c5c7
push 0x80004005
call fcn.004072a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x108], 1
mov esi, dword [edi + 0x164]
mov dword [esp + 0x1c], 4
cmp dword [esi - 0xc], 0
je 0x40c605
call fcn.004840f7
mov eax, dword [eax + 4]
push esi
mov ecx, eax
call fcn.0048fc42
mov ebx, eax
xor esi, esi
test ebx, ebx
je 0x40c649
push esi
lea ecx, [esp + 0x18]
push str.CUSTOM_COLOR__d
push ecx
call fcn.00407370
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x28]
push ecx
push 0
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40c649
mov eax, dword [esp + 0x18]
mov dword [esp + esi*4 + 0x24], eax
jmp 0x40c651
mov dword [esp + esi*4 + 0x24], 0xffffff
inc esi
cmp esi, 0x10
jl 0x40c607
lea ecx, [esp + 0x24]
mov dword [esp + 0xe8], ecx
lea ecx, [esp + 0x64]
call fcn.0048fae6
cmp eax, 1
jne 0x40c67f
mov edx, dword [esp + 0xe4]
mov dword [edi + 0xc8], edx
jmp 0x40c686
mov dword [ebp + 0xc], 0x7ed
test ebx, ebx
je 0x40c6c9
xor esi, esi
lea edi, [esp + 0x24]
push esi
lea eax, [esp + 0x18]
push str.CUSTOM_COLOR__d
push eax
call fcn.00407370
mov ecx, dword [esp + 0x20]
add esp, 0xc
push 4
push edi
push 4
push 0
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
inc esi
add edi, 4
cmp esi, 0x10
jl 0x40c690
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp + 8]
mov byte [esp + 0x108], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [edi + 0x140], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c6fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x108], 0xffffffff
lea ecx, [esp + 0x64]
mov dword [esp + 0x64], vtable.CCommonDialog.0
call fcn.0047bcc4
mov esi, dword [ebp + 0xc]
cmp esi, 0x7ed
jne 0x40c72e
mov ecx, dword [edi + 0xc4]
mov dword [edi + 0xc8], ecx
cmp dword [edi + 0x64], 0xfffffffd
jne 0x40c74a
mov ecx, dword [edi + 0x13c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x150]
call eax
mov dword [edi + 0xc8], eax
mov ecx, dword [edi + 0xc8]
mov edx, dword [edi + 0x13c]
mov eax, dword [edx + 0x20]
push 0
push ecx
push esi
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [edi + 0x140], 0
jne 0x40c776
mov edx, dword [edi]
mov eax, dword [edx + 0x60]
mov ecx, edi
call eax
mov ecx, dword [esp + 0x100]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8