Function at 0x401690
Capabilities:
Get file version info

Disassembly:
mov eax, 0x1b3c
call fcn.00401ae0
mov eax, dword [str._unknown_]
mov ecx, dword [0x406acc]
mov dx, word [0x406ad0]
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x2c], ecx
push 0x104
lea ecx, [esp + 0x248]
mov word [esp + 0x34], dx
mov edx, dword [esp + 0x1b54]
mov dword [esp + 0x36], eax
push ecx
mov dword [esp + 0x3e], eax
push edx
mov word [esp + 0x46], ax
call edi
lea ecx, [eax - 1]
mov eax, ecx
test eax, eax
jl 0x4016ff
mov dl, 0x5c
cmp byte [esp + eax + 0x244], dl
je 0x4016ff
dec eax
jns 0x4016f3
cmp ecx, eax
jl 0x401713
mov dl, 0x2e
cmp byte [esp + ecx + 0x244], dl
je 0x401713
dec ecx
cmp ecx, eax
jge 0x401705
mov esi, ecx
sub esi, eax
lea ecx, [esi - 1]
push ecx
lea edx, [esp + eax + 0x249]
push edx
lea eax, [esp + 0x148]
push eax
call fcn.004019b0
mov eax, dword [esp + 0x1b60]
add esp, 0xc
test eax, eax
mov byte [esp + esi + 0x13f], 0
je 0x40180b
push 0x104
lea ecx, [esp + 0x40]
push ecx
push eax
call edi
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x40]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
test esi, esi
je 0x40187d
push 4
push 0x1000
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x40187d
push edi
push esi
push 0
lea ecx, [esp + 0x48]
push ecx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x4017fc
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x18]
push eax
push str.StringFileInfo040904e4ProductVersion
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x4017ce
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x18]
push edx
push str.StringFileInfo040904b0ProductVersion
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x4017fc
mov eax, dword [esp + 0xc]
cmp eax, 0x13
jle 0x4017e0
mov eax, 0x13
mov dword [esp + 0xc], eax
push eax
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.004019b0
mov edx, dword [esp + 0x18]
add esp, 0xc
mov byte [esp + edx + 0x28], 0
push 0x8000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x40187d
mov edi, dword [esp + 0x1b58]
mov esi, 0x406291
mov eax, edi
lea esp, [esp]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401844
test cl, cl
je 0x401840
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401844
add eax, 2
add esi, 2
test cl, cl
jne 0x401820
xor eax, eax
jmp 0x401849
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40186b
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x40]
push ecx
push 0x104
push 0
push edi
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathA]
test eax, eax
jne 0x40187d
lea edx, [esp + 0x3c]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401873
lea edi, [esp + 0xb48]
mov esi, 1
call fcn.004015e0
mov ebp, dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea edx, [esp + 0x140]
mov eax, edx
mov dword [esp + 0x18], edx
lea edx, [esp + 0x10]
push edx
push 0x7ff
mov dword [esp + 0x28], eax
lea eax, [esp + 0x350]
push eax
push 0
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], ecx
push 0
mov ecx, edi
push ecx
push 0x400
mov dword [esp + 0x38], str.8.2.1
call ebp
mov esi, dword [esp + 0x1b4c]
call fcn.004015e0
mov eax, esi
sub eax, 3
je 0x401920
dec eax
je 0x4018f8
lea edx, [esp + 0x348]
mov dword [esp + 0x18], edx
jmp 0x40193e
lea eax, [esp + 0x28]
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x140]
lea eax, [esp + 0x348]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
jmp 0x40193e
mov ecx, dword [esp + 0x1b5c]
lea edx, [esp + 0x3c]
lea eax, [esp + 0x348]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
lea edx, [esp + 0x10]
push edx
push 0x7ff
lea eax, [esp + 0x1350]
push eax
push 0
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], ecx
push 0
lea ecx, [esp + 0xb5c]
push ecx
push 0x400
call ebp
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 0x10
push 0x406a68
lea edx, [esp + 0x1350]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x1b3c
ret