Function at 0x403040
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x41c17b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x530
push ebp
mov ebp, dword [esp + 0x548]
mov dword [esp + 0x53c], 0
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x403091
lea ecx, [esp + 0x544]
mov dword [esp + 0x53c], 0xffffffff
call sub.MFC42.DLL_CString::CString
jmp 0x4033e2
push esi
push edi
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x34]
mov byte [esp + 0x544], 1
call sub.MFC42.DLL_CString::CString_2
mov ax, word [0x42a43c]
mov ecx, 0x13f
mov word [esp + 0x3c], ax
xor eax, eax
lea edi, [esp + 0x3e]
push str.Path
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x548], 2
stosw word es:[edi], ax
mov dword [esp + 0x28], 0x500
call sub.MFC42.DLL_CString::CString_1
push 0x42a438
lea ecx, [esp + 0x30]
mov byte [esp + 0x548], 3
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [esp + 0x54c]
mov esi, dword [sym.imp.MSVCRT.dll__mbscmp]
push str.user
push ecx
mov byte [esp + 0x54c], 4
call esi
add esp, 8
test eax, eax
jne 0x40312e
mov dword [esp + 0x20], 0x80000001
push str.Environment
jmp 0x403151
mov edx, dword [esp + 0x54c]
push 0x4290c4
push edx
call esi
add esp, 8
test eax, eax
jne 0x40315a
mov dword [esp + 0x20], 0x80000002
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
lea ecx, [esp + 0x1c]
call fcn.0041b81e
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x1c]
push eax
push 0xf003f
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403385
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x24]
lea ecx, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x20]
push ecx
push 0
push 0
push edx
push eax
mov byte [esp + 0x55c], 5
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403369
lea ecx, [esp + 0x3c]
push ebx
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
mov esi, dword [ebp + 4]
mov bl, 6
test esi, esi
mov byte [esp + 0x548], bl
je 0x4032e7
mov eax, esi
mov esi, dword [esi]
add eax, 8
lea ecx, [esp + 0x14]
push eax
call fcn.0041b82a
lea edx, [esp + 0x14]
push 0x4290d0
lea eax, [esp + 0x40]
push edx
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x550], 7
call sub.MFC42.DLL_CString::Find_3
lea ecx, [esp + 0x3c]
mov edi, eax
mov byte [esp + 0x548], bl
call sub.MFC42.DLL_CString::CString
cmp edi, 0xffffffff
jle 0x403264
lea ecx, [esp + 0x14]
push 0x4290d0
lea edx, [esp + 0x38]
push ecx
push edx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0x42a438
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x550], 8
call sub.MFC42.DLL_CString::Replace
mov byte [esp + 0x548], bl
lea ecx, [esp + 0x34]
jmp 0x4032da
mov eax, dword [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Find_3
cmp eax, 0xffffffff
jle 0x4032df
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ecx, dword [edi - 8]
mov edx, dword [edx - 8]
add ecx, eax
cmp ecx, edx
jne 0x4032df
test eax, eax
jne 0x4032a2
push 0x42a438
push edi
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Replace
jmp 0x4032df
lea eax, [esp + 0x14]
lea ecx, [esp + 0x2c]
push eax
push 0x4290d0
push ecx
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
push 0x42a438
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x550], 9
call sub.MFC42.DLL_CString::Replace
mov byte [esp + 0x548], bl
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CString::CString
test esi, esi
jne 0x4031d8
mov edx, dword [esp + 0x10]
pop ebx
mov eax, dword [edx - 8]
test eax, eax
jne 0x403305
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x403358
push 0
push 0x4290d4
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Find_3
mov edx, dword [esp + 0xc]
cmp eax, 0xffffffff
mov edi, edx
jne 0x40333a
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
mov edx, dword [esp + 0x1c]
push 1
push eax
mov eax, dword [esp + 0x2c]
push edx
push eax
jmp 0x403352
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x24]
push 2
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [esp + 0xc]
mov byte [esp + 0x544], 5
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x10]
mov byte [esp + 0x544], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0x544], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x544], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov byte [esp + 0x544], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x544], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x54c]
mov dword [esp + 0x544], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
mov ecx, dword [esp + 0x534]
pop ebp
mov dword fs:[0], ecx
add esp, 0x53c
ret 8