Function at 0x40cc00
Capabilities:
Query or enumerate registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c268
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4b4
push ebx
push esi
push edi
call fcn.004044f0
mov edi, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x48]
push edi
push str.Adding_path__s
push eax
call edx
add esp, 0xc
lea ecx, [ebp - 0x30]
xor bl, bl
call fcn.0040cb00
mov eax, dword [ebp - 0x2c]
xor esi, esi
cmp eax, esi
mov dword [ebp - 4], esi
je 0x40cc58
mov esi, dword [ebp - 0x28]
sub esi, eax
sar esi, 3
push edi
lea ecx, [ebp - 0x30]
call fcn.004065f0
test al, al
je 0x40cc67
mov bl, 1
lea eax, [ebp - 0x30]
push eax
mov ecx, eax
mov dword [ebp - 4], 0xffffffff
call fcn.004091e0
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40cc89
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
call fcn.00407c30
test al, al
jne 0x40cca0
cmp esi, 1
jbe 0x40cca0
push edi
call fcn.00407ce0
add esp, 4
test bl, bl
je 0x40ccb7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push str.LastSent
push str.SoftwareBentleyLicensing1.1
push 0x41f248
lea ecx, [ebp - 0x2c0]
push 0x105
push ecx
mov dword [ebp - 0x10], 0
call dword [sym.imp.MSVCR80.dll__snwprintf]
add esp, 0x14
call fcn.00407c30
test al, al
je 0x40cd1a
mov eax, dword [0x42ece0]
push 0
lea edx, [ebp - 0x10]
push edx
push 0
or eax, 0xf003f
push eax
push 0
push 0
push 0
lea ecx, [ebp - 0x2c0]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x40cd89
mov eax, dword [0x42ece0]
push 0
lea edx, [ebp - 0x10]
push edx
push 0
or eax, 0xf003f
push eax
push 0
push 0
push 0
lea ecx, [ebp - 0x2c0]
push ecx
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test edi, edi
je 0x40cd89
call fcn.004044f0
mov ebx, eax
mov esi, dword [ebx]
add esi, 0x28
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esi]
push edi
lea edx, [ebp - 0x2c0]
push edx
push str.AddPath:_Unable_to_open_registry_key__s_for_write_returned__d__GLE_d_
push ebx
call eax
add esp, 0x14
pop edi
pop esi
mov eax, 0x8000
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
xor edi, edi
cmp eax, edi
jne 0x40cdbd
call fcn.004044f0
mov ecx, dword [eax]
mov edx, dword [ecx + 0x28]
push str.AddPath:_Unable_to_open_registry_for_write__unknown_error_
push eax
call edx
add esp, 8
pop edi
pop esi
mov eax, 0x8000
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0x18]
push edx
push 0
push 0
push 0
push eax
mov dword [ebp - 0x1c], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x40ce3f
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
jbe 0x40ce3f
lea esp, [esp]
mov edx, dword [ebp - 0x10]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x4c0]
push ecx
push ebx
push edx
mov dword [ebp - 0x20], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
test esi, esi
jne 0x40cee5
push eax
push eax
lea eax, [ebp - 0x4c0]
push eax
call dword [sym.imp.MSVCR80.dll_wcstol]
add esp, 0xc
cmp eax, edi
jle 0x40ce37
mov edi, eax
add ebx, 1
cmp ebx, dword [ebp - 0x18]
jb 0x40cdf0
add edi, 1
push edi
push 0x41e56c
lea eax, [ebp - 0xb4]
push 0x40
push eax
call dword [sym.imp.MSVCR80.dll__snwprintf]
mov edx, dword [0x42ece0]
add esp, 0x10
push 0
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x10]
push 0
or edx, 0xf003f
push edx
push 0
push 0
push 0
lea eax, [ebp - 0xb4]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
test esi, esi
jne 0x40cf26
mov edx, dword [ebp + 8]
mov eax, edx
lea esi, [eax + 2]
jmp 0x40cea0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40cea0
mov ecx, dword [ebp - 0x14]
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push edx
push 1
push 0
push str.Location
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebp - 0x14]
push 1
push edx
call fcn.00404d60
mov eax, dword [ebp - 0x14]
add esp, 8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x1c]
jmp 0x40cf53
call fcn.004044f0
mov ebx, eax
mov edi, dword [ebx]
add edi, 0x28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi]
push eax
push esi
push str.Unable_to_enumerate_registry_keys_returned__d__GLE__d_
push ebx
call ecx
mov edx, dword [ebp - 0x10]
add esp, 0x10
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, 0x8000
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call fcn.004044f0
mov ebx, eax
mov edi, dword [ebx]
add edi, 0x28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
push eax
push esi
lea ecx, [ebp - 0xb4]
push ecx
push str.Unable_to_create_LastSent_registry_key__s_returned__d__GLE__d_
push ebx
call edx
add esp, 0x14
mov esi, 0x8000
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret