Function at 0x416710
Capabilities:
Get file version info
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
mov eax, dword [0x44cba0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
xor ecx, ecx
xor edi, edi
push 0x22
mov word [ebp - 0x430], cx
mov ebx, 0x104
push str.SYSTEMCurrentControlSetServices_
lea ecx, [ebp - 0x430]
mov dword [ebp - 0x448], eax
mov dword [ebp - 0x438], ebx
mov dword [ebp - 0x440], edi
mov dword [ebp - 0x41c], 7
mov dword [ebp - 0x420], edi
call fcn.00404eb0
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x416775
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp - 0x430]
call fcn.00406f00
mov eax, dword [ebp - 0x430]
mov esi, 8
cmp dword [ebp - 0x41c], esi
jae 0x4167aa
lea eax, [ebp - 0x430]
lea edx, [ebp - 0x434]
push edx
push 1
push edi
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x416937
mov eax, dword [ebp - 0x434]
lea ecx, [ebp - 0x438]
push ecx
lea edx, [ebp - 0x20c]
push edx
push edi
push edi
push str.ImagePath
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x41692a
cmp dword [ebp - 0x438], ebx
ja 0x41692a
mov ecx, dword [ebp - 0x434]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp word [ebp - 0x20c], 0x22
jne 0x416834
lea ebx, [ebp - 0x20a]
mov edx, ebx
push 0x22
push edx
call dword [sym.imp.MSVCR100.dll_wcschr]
add esp, 8
cmp eax, edi
je 0x41683a
xor ecx, ecx
mov word [eax], cx
jmp 0x41683a
lea ebx, [ebp - 0x20c]
lea edx, [ebp - 0x440]
push edx
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
test edi, edi
je 0x41686f
push edi
call fcn.00429303
add esp, 4
mov esi, eax
push esi
push edi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
jne 0x41687f
push esi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [ebp - 0x430]
call fcn.00404350
jmp 0x41694e
lea eax, [ebp - 0x444]
push eax
lea ecx, [ebp - 0x43c]
push ecx
push 0x436bd4
push esi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x416866
cmp dword [ebp - 0x444], 0
je 0x416866
mov eax, dword [ebp - 0x43c]
movzx edx, word [eax + 0x14]
movzx ecx, word [eax + 0x16]
push edx
movzx edx, word [eax + 0x10]
movzx eax, word [eax + 0x12]
push ecx
push edx
push eax
push 0x434628
lea ecx, [ebp - 0x414]
push 0x104
push ecx
call dword [sym.imp.MSVCR100.dll_swprintf_s]
push esi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
add esp, 0x20
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
test eax, eax
jne 0x4168fa
push 0x8007000e
call fcn.00402660
mov ecx, dword [ebp - 0x448]
push 0
mov dword [ecx], eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea ecx, [ebp - 0x430]
call fcn.00404350
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00429468
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp - 0x434]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x41c], esi
jb 0x41694e
mov eax, dword [ebp - 0x430]
push eax
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 0x80004005
pop ebx
call fcn.00429468
mov esp, ebp
pop ebp
ret 0xc