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

Disassembly:
push 0x440
mov eax, 0x4344c7
call fcn.0041c5c3
mov byte [ebp - 0x42d], dl
mov ebx, ecx
mov dword [ebp - 0x43c], ebx
and dword [ebp - 4], 0
and dword [ebp - 0x41c], 0
xor eax, eax
mov edi, 0x3f2
mov dword [ebp - 0x418], 7
mov word [ebp - 0x42c], ax
mov byte [ebp - 4], 3
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.004028c8
lea esi, [eax + 0x10]
mov dword [ebp - 0x434], esi
mov byte [ebp - 4], 4
mov eax, dword [esi - 0xc]
add eax, eax
cmp dword [esi - 4], 1
mov dword [ebp - 0x444], eax
jle 0x403a16
push dword [esi - 0xc]
lea ecx, [ebp - 0x434]
call fcn.004024d2
mov esi, dword [ebp - 0x434]
push esi
call fcn.00401140
pop ecx
push eax
push esi
lea ecx, [ebp - 0x42c]
call fcn.004026f1
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 3
call fcn.004045c1
cmp dword [ebp - 0x418], 8
lea eax, [ebp - 0x42c]
cmovae eax, dword [ebp - 0x42c]
xor esi, esi
cmp ebx, 1
mov dword [ebp - 0x440], eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x44c], esi
je 0x403b89
sub esp, 0x18
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
call fcn.00402305
mov ecx, esi
call fcn.004163ba
mov esi, eax
add esp, 0x18
test esi, esi
je 0x403a8e
cmp esi, 2
jne 0x403c98
xor eax, eax
xor esi, esi
push 0x3fe
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push esi
push eax
call fcn.0041bd90
add esp, 0xc
mov dword [ebp - 0x448], 0x400
xor edi, edi
inc edi
mov dword [ebp - 0x438], edi
call fcn.004160cf
lea ecx, [ebp - 0x434]
cmp eax, edi
push ecx
lea eax, [ebp + 0xc]
jne 0x403adb
push 0x2021f
jmp 0x403ae0
push 0x2001f
cmp dword [ebp + 0x20], 8
push esi
cmovae eax, dword [ebp + 0xc]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
jne 0x403b80
cmp dword [ebp + 0x38], 8
lea ecx, [ebp - 0x448]
push ecx
lea ecx, [ebp - 0x414]
push ecx
lea ecx, [ebp - 0x438]
push ecx
lea eax, [ebp + 0x24]
cmovae eax, dword [ebp + 0x24]
push esi
push eax
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp byte [ebp - 0x42d], 0
jne 0x403b3f
test eax, eax
jne 0x403b3f
push 0x50
pop edi
jmp 0x403b78
push dword [ebp - 0x444]
cmp dword [ebp + 0x38], 8
lea eax, [ebp + 0x24]
push dword [ebp - 0x440]
cmovae eax, dword [ebp + 0x24]
push 1
push esi
push eax
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test edi, edi
je 0x403c96
push dword [ebp - 0x434]
call ebx
test edi, edi
je 0x403c96
cmp edi, 0x50
je 0x403c96
cmp dword [ebp - 0x43c], 0
je 0x403c96
sub esp, 0x18
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
call fcn.00402305
xor ecx, ecx
inc ecx
call fcn.004163ba
mov esi, eax
add esp, 0x18
test esi, esi
je 0x403bbe
cmp esi, 2
jne 0x403c98
xor eax, eax
push 0x3fe
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.0041bd90
add esp, 0xc
mov dword [ebp - 0x43c], 0x400
cmp dword [ebp + 0x20], 8
lea ecx, [ebp - 0x434]
lea eax, [ebp + 0xc]
mov dword [ebp - 0x438], 1
cmovae eax, dword [ebp + 0xc]
push ecx
push 0x2021f
push 0
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x403c91
cmp dword [ebp + 0x38], 8
lea ecx, [ebp - 0x43c]
push ecx
lea ecx, [ebp - 0x414]
push ecx
lea ecx, [ebp - 0x438]
push ecx
lea eax, [ebp + 0x24]
cmovae eax, dword [ebp + 0x24]
push esi
push eax
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp byte [ebp - 0x42d], 0
jne 0x403c5b
test eax, eax
jne 0x403c5b
push 0x50
pop esi
jmp 0x403c91
push dword [ebp - 0x444]
cmp dword [ebp + 0x38], 8
lea eax, [ebp + 0x24]
push dword [ebp - 0x440]
cmovae eax, dword [ebp + 0x24]
push 1
push 0
push eax
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
test esi, esi
je 0x403c91
push dword [ebp - 0x434]
call ebx
test edi, edi
cmovne edi, esi
mov esi, edi
xor ebx, ebx
lea ecx, [ebp - 0x42c]
push ebx
push 1
call fcn.0040276a
push ebx
push 1
lea ecx, [ebp + 0xc]
call fcn.0040276a
push ebx
push 1
lea ecx, [ebp + 0x24]
call fcn.0040276a
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004045c1
mov eax, esi
call fcn.0041c572
ret