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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x484
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov word [ebp - 0x434], 0
mov ecx, 0x103
xor eax, eax
lea edi, [ebp - 0x432]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x438], 1
mov dword [ebp - 0x43c], 0x410
cmp dword [ebp + 8], 0
je 0x40a941
cmp dword [ebp + 0x14], 0
je 0x40a941
push str.HKEY_CLASSES_ROOT
mov eax, dword [ebp + 8]
push eax
call fcn.004154f2
add esp, 8
test eax, eax
jne 0x40a672
mov dword [ebp - 0x1c], 0x80000000
jmp 0x40a6f1
push str.HKEY_CURRENT_CONFIG
mov ecx, dword [ebp + 8]
push ecx
call fcn.004154f2
add esp, 8
test eax, eax
jne 0x40a690
mov dword [ebp - 0x1c], 0x80000005
jmp 0x40a6f1
push str.HKEY_CURRENT_USER
mov edx, dword [ebp + 8]
push edx
call fcn.004154f2
add esp, 8
test eax, eax
jne 0x40a6ae
mov dword [ebp - 0x1c], 0x80000001
jmp 0x40a6f1
push str.HKEY_LOCAL_MACHINE
mov eax, dword [ebp + 8]
push eax
call fcn.004154f2
add esp, 8
test eax, eax
jne 0x40a6cc
mov dword [ebp - 0x1c], 0x80000002
jmp 0x40a6f1
push str.HKEY_USERS
mov ecx, dword [ebp + 8]
push ecx
call fcn.004154f2
add esp, 8
test eax, eax
jne 0x40a6ea
mov dword [ebp - 0x1c], 0x80000003
jmp 0x40a6f1
mov dword [ebp - 0x18], 1
cmp dword [ebp - 0x1c], 0
je 0x40a941
cmp dword [ebp - 0x18], 0
jne 0x40a941
lea edx, [ebp - 0x20]
push edx
push 0xf003f
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [0x424010]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x440], 1
cmp dword [ebp - 0x24], 0
jne 0x40a859
lea edx, [ebp - 0x43c]
push edx
lea eax, [ebp - 0x434]
push eax
lea ecx, [ebp - 0x438]
push ecx
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [section..rdata]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x40a78d
call dword [0x4240bc]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push str.Open_Reg__s__s__s_fail_GetLastError__d
mov ecx, dword [ebp - 4]
add ecx, 0x624
push ecx
call fcn.0040c2d0
add esp, 0x18
cmp dword [ebp - 0x24], 0
jne 0x40a7c4
mov edx, dword [ebp + 0x14]
push edx
lea eax, [ebp - 0x434]
push eax
call fcn.00415640
add esp, 8
test eax, eax
jne 0x40a7c4
cmp dword [ebp - 0x438], 1
jne 0x40a7c4
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x18], 0
cmp dword [ebp - 0x440], 0
je 0x40a84a
mov dword [ebp - 0x438], 1
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00413d17
add esp, 4
lea edx, [eax + eax + 2]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x438]
push ecx
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [0x424004]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x40a843
call dword [0x4240bc]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.RegSetValueEx__s__s__s__s_fail_GetLastError__d
mov edx, dword [ebp - 4]
add edx, 0x624
push edx
call fcn.0040c2d0
add esp, 0x1c
mov dword [ebp - 0x18], 2
jmp 0x40a84a
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x20]
push eax
call dword [0x424008]
jmp 0x40a941
mov dword [ebp - 0x444], 0
lea ecx, [ebp - 0x444]
push ecx
lea edx, [ebp - 0x20]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [0x42400c]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40a910
mov edx, dword [ebp + 0x14]
push edx
call fcn.00413d17
add esp, 4
lea eax, [eax + eax + 2]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp - 0x438]
push edx
push 0
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [0x424004]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x40a8fd
call dword [0x4240bc]
push eax
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.RegSetValueEx__s__s__s__s_fail_GetLastError__d
mov eax, dword [ebp - 4]
add eax, 0x624
push eax
call fcn.0040c2d0
add esp, 0x1c
mov dword [ebp - 0x18], 3
jmp 0x40a904
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x20]
push ecx
call dword [0x424008]
jmp 0x40a941
call dword [0x4240bc]
push eax
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str._CMain__CheckAndRestoryRegistryEntry__RegCreateKeyEx__s__s__s_fail_GetLastError__d
mov edx, dword [ebp - 4]
add edx, 0x624
push edx
call fcn.0040c2d0
add esp, 0x18
mov dword [ebp - 0x18], 4
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10