Function at 0x4029c0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x40981f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
push edi
xor edi, edi
push edi
mov dword [esp + 0x1c], edi
call ebp
mov dword [esp + 0x14], edi
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x14]
mov dword [esp + 0x30], 1
push eax
push 0x20019
push edi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
je 0x402a29
push eax
call ebp
mov esi, dword [esp + 0x38]
mov ecx, esi
call sub.MFC42.DLL_CString::CString_2
jmp 0x402b77
lea ecx, [esp + 0x10]
mov esi, 0x100
mov dword [esp + 0x1c], edi
call sub.MFC42.DLL_CString::CString_2
mov ebx, dword [esp + 0x44]
mov byte [esp + 0x30], 2
lea eax, [esp + 0x10]
push esi
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], eax
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], eax
cmp dword [ecx - 8], edi
jne 0x402a70
cmp esi, edi
jne 0x402a70
mov eax, dword [0x40c05c]
mov dword [esp + 0x24], eax
cmp eax, edi
mov byte [esp + 0x30], 3
je 0x402ac3
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x40]
push edx
push eax
lea eax, [esp + 0x24]
inc esi
push eax
push edi
push ebx
push ecx
mov dword [esp + 0x58], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
je 0x402aec
cmp eax, 0xea
jne 0x402b81
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x40]
cmp ecx, edi
mov byte [esp + 0x30], 2
je 0x402a44
push 0xffffffffffffffff
call sub.MFC42.DLL_CString::ReleaseBuffer
mov dword [esp + 0x24], edi
jmp 0x402a44
push 0xe
call ebp
mov esi, dword [esp + 0x38]
mov ecx, esi
call sub.MFC42.DLL_CString::CString_2
push 0xffffffffffffffff
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], 1
mov byte [esp + 0x34], 2
call fcn.00402bf0
jmp 0x402b69
mov eax, dword [esp + 0x1c]
mov ebx, 1
cmp eax, ebx
je 0x402b2f
cmp eax, 2
je 0x402b2f
push 0xd
call ebp
mov esi, dword [esp + 0x38]
mov ecx, esi
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x18], ebx
cmp ecx, edi
mov byte [esp + 0x30], 2
je 0x402b69
push 0xffffffffffffffff
call sub.MFC42.DLL_CString::ReleaseBuffer
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
jmp 0x402b69
mov ecx, dword [esp + 0x20]
mov byte [esp + 0x30], 2
cmp ecx, edi
je 0x402b47
push 0xffffffffffffffff
call sub.MFC42.DLL_CString::ReleaseBuffer
mov eax, dword [esp + 0x1c]
dec eax
mov esi, dword [esp + 0x38]
neg eax
sbb eax, eax
lea edx, [esp + 0x10]
and eax, 0x200
mov ecx, esi
add eax, 0x1f
push eax
push edx
call fcn.00401930
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 1
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x402bd0
jmp 0x402bc9
push eax
call ebp
mov esi, dword [esp + 0x38]
mov ecx, esi
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x18], 1
cmp ecx, edi
mov byte [esp + 0x30], 2
je 0x402bb3
push 0xffffffffffffffff
call sub.MFC42.DLL_CString::ReleaseBuffer
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 1
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x402bd0
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x28]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret