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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x42b0c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x230], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x224], eax
mov eax, dword [ebp + 0x14]
push 0x103
mov dword [ebp - 0x22c], eax
lea eax, [ebp - 0x107]
push 0
push eax
mov dword [ebp - 0x210], 0
mov byte [ebp - 0x108], 0
call fcn.00409860
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push 0xf003f
push 0
push 0x416840
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405073
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0x104
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push 0
push 0x416834
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405073
lea ecx, [ebp - 0x108]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404e80
mov eax, dword [0x416c50]
mov dword [ecx], eax
mov eax, dword [0x416c54]
mov dword [ecx + 4], eax
mov eax, dword [0x416c58]
mov dword [ecx + 8], eax
mov ax, word [0x416c5c]
mov word [ecx + 0xc], ax
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.004021f0
add esp, 4
mov ebx, eax
mov dword [ebp - 0x234], ebx
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x405062
push esi
push edi
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x108]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
push esi
push 0x40
call fcn.00405c20
add esp, 8
mov edi, eax
lea eax, [ebp - 0x108]
push edi
push esi
push 0
push eax
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x405046
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x218]
push eax
push str.VarFileInfoTranslation
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x405046
mov esi, dword [ebp - 0x220]
shr esi, 2
test esi, esi
je 0x405046
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0x409
mov edx, 0x4b0
nop word [eax + eax]
mov eax, dword [ebp - 0x218]
cmp word [eax], cx
jne 0x405037
cmp word [eax + 2], dx
jne 0x405037
push 0x4b0
push 0x409
lea eax, [ebp - 0x20c]
push str.StringFileInfo_04x_04xProductName
push eax
call ebx
add esp, 0x10
lea eax, [ebp - 0x214]
push dword [ebp - 0x224]
push eax
lea eax, [ebp - 0x20c]
push eax
push edi
call sub.VERSION.dll_VerQueryValueA
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x404fcf
mov ecx, dword [ebp - 0x214]
mov edx, eax
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x404fc2
mov ecx, dword [ebp - 0x218]
movzx eax, word [ecx + 2]
push eax
movzx eax, word [ecx]
push eax
lea eax, [ebp - 0x20c]
push str.StringFileInfo_04x_04xProductVersion
push eax
call ebx
add esp, 0x10
lea eax, [ebp - 0x214]
push dword [ebp - 0x22c]
push eax
lea eax, [ebp - 0x20c]
push eax
push edi
call sub.VERSION.dll_VerQueryValueA
mov ecx, dword [ebp - 0x230]
test ecx, ecx
je 0x40502d
mov eax, dword [ebp - 0x214]
mov edx, ecx
sub edx, eax
nop dword [eax]
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x405020
mov edx, 0x4b0
mov ecx, 0x409
sub esi, 1
jne 0x404f60
mov ebx, dword [ebp - 0x234]
push edi
call fcn.00405c70
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408060
mov esp, ebp
pop ebp
ret
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408060
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.00408060
mov esp, ebp
pop ebp
ret