Function at 0x406c10
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x45d074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x274], eax
xor eax, eax
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x268], esi
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x25c], ebx
mov dword [ebp - 0x260], edi
mov dword [ebp - 0x258], eax
mov dword [ebp - 0x27c], eax
cmp dword [esi + 4], eax
jne 0x406c67
call fcn.00406630
xor eax, eax
push 0x26de0
add esi, 0x310
push eax
push esi
mov dword [ebp - 0x280], esi
call sub.MSVCR100.dll_memset
add esp, 0xc
push 0x1c
lea ecx, [ebp - 0x29c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
cmp eax, 0x1c
jne 0x4070c1
lea esp, [esp]
cmp dword [ebp - 0x28c], 0x10000
jne 0x406cba
mov eax, dword [ebp - 0x29c]
mov dword [ebp - 0x298], eax
jmp 0x406ccc
mov eax, dword [ebp - 0x298]
cmp eax, dword [ebp - 0x29c]
jne 0x407096
test eax, eax
je 0x407096
push 0x104
lea edx, [ebp - 0x108]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jle 0x407096
cmp ebx, 0xc8
jge 0x407096
mov eax, dword [ebp - 0x298]
mov dword [esi + 0x104], eax
lea eax, [ebp - 0x108]
mov dword [ebp - 0x264], 0
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406d20
sub eax, edx
cmp eax, 0x103
jbe 0x406d35
mov eax, 0x103
push eax
lea ecx, [ebp - 0x108]
push ecx
push 0x104
push esi
call dword [sym.imp.MSVCR100.dll__mbsnbcpy_s]
add esp, 0x10
xor edx, edx
mov eax, 0x103
mov cl, byte [esi + eax]
cmp cl, 0x5c
jne 0x406d5f
test edx, edx
jne 0x406d6e
test cl, cl
jne 0x406d69
test edx, edx
jne 0x406d69
mov edx, eax
dec eax
jns 0x406d53
jmp 0x406dc7
lea ecx, [eax + 1]
test ecx, ecx
je 0x406dc7
cmp ecx, edx
jg 0x406da1
sub edx, ecx
lea eax, [esi + 0x1d8]
lea edi, [edx + 1]
jmp 0x406d90
mov dl, byte [ecx + eax - 0x1d8]
mov byte [eax], dl
mov byte [eax + 1], 0
inc eax
dec edi
jne 0x406d90
xor eax, eax
test ecx, ecx
jle 0x406dc7
jmp 0x406db0
mov dl, byte [esi + eax]
mov byte [esi + eax + 0x218], dl
mov byte [esi + eax + 0x219], 0
inc eax
cmp eax, ecx
jl 0x406db0
lea eax, [ebp - 0x278]
push eax
lea ecx, [ebp - 0x108]
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
test edi, edi
je 0x4070de
push edi
call dword [sym.imp.MSVCR100.dll_malloc]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x250], ebx
test ebx, ebx
je 0x4071a4
mov edx, dword [ebp - 0x278]
push ebx
push edi
push edx
lea eax, [ebp - 0x108]
push eax
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x406f55
lea ecx, [ebp - 0x27c]
push ecx
lea edx, [ebp - 0x258]
push edx
push 0x434e30
push ebx
call sub.VERSION.dll_VerQueryValueA
mov dword [ebp - 0x26c], eax
test eax, eax
jne 0x406f0c
push 0x434ea0
lea eax, [esi + 0x108]
push 0x40
push eax
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
mov ecx, 0x45c5f8
xor eax, eax
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x406e63
sub ecx, edi
je 0x406ed1
mov edi, 0x45c5f8
test eax, eax
jne 0x406ed1
push edi
push str.StringFileInfo_sProductVersion
lea edx, [ebp - 0x208]
push 0x100
push edx
call dword [sym.imp.MSVCR100.dll_sprintf_s]
add esp, 0x10
lea eax, [ebp - 0x254]
push eax
lea ecx, [ebp - 0x264]
push ecx
lea edx, [ebp - 0x208]
push edx
push ebx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x406eb7
mov dword [ebp - 0x254], eax
add edi, 0x20
mov ecx, edi
lea ebx, [ecx + 1]
nop
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x406ec0
sub ecx, ebx
mov ebx, dword [ebp - 0x250]
jne 0x406e73
cmp dword [ebp - 0x254], 0
je 0x407122
mov edi, dword [ebp - 0x264]
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406ef0
sub eax, edx
cmp eax, 0x3f
jbe 0x4070f1
mov eax, 0x3f
jmp 0x4070ff
mov eax, dword [ebp - 0x258]
movzx ecx, word [eax + 0xe]
movzx edx, word [eax + 0xa]
movzx edi, word [eax + 8]
mov ebx, dword [ebp - 0x268]
mov word [ebx + 0x30c], cx
movzx eax, word [eax + 0xc]
push eax
push ecx
push edi
push edx
push str._u._u._u._u
lea edx, [esi + 0x108]
push 0x40
push edx
call dword [sym.imp.MSVCR100.dll_sprintf_s]
mov ebx, dword [ebp - 0x250]
add esp, 0x1c
jmp 0x406e59
push 0x434ea0
push 0x40
lea eax, [esi + 0x108]
push eax
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
push 0x434e9c
lea eax, [esi + 0x148]
push 0x40
push eax
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push 0
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
test edi, edi
je 0x40707d
lea edx, [ebp - 0x24c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
lea eax, [ebp - 0x2a4]
push eax
lea ecx, [ebp - 0x238]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x2a4]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx ecx, word [ebp - 0x20e]
movzx edx, word [ebp - 0x210]
movzx eax, word [ebp - 0x218]
mov ebx, dword [sym.imp.MSVCR100.dll_sprintf_s]
push ecx
movzx ecx, word [ebp - 0x216]
push edx
movzx edx, word [ebp - 0x212]
push eax
mov eax, dword [ebp - 0x228]
push ecx
push edx
push eax
push str.__9d___2d._2d._4d___2d:_02d
lea ecx, [esi + 0x188]
push 0x28
push ecx
call ebx
mov edx, dword [ebp - 0x228]
push edx
push 0x434e7c
lea eax, [esi + 0x1b0]
push 0xa
push eax
call ebx
movzx ecx, word [ebp - 0x20e]
movzx edx, word [ebp - 0x210]
movzx eax, word [ebp - 0x218]
push ecx
movzx ecx, word [ebp - 0x216]
push edx
movzx edx, word [ebp - 0x212]
push eax
push ecx
push edx
push str._02.2d._02.2d._4.4d___2.2d:_02.2d
lea eax, [esi + 0x1ba]
push 0x1e
push eax
call ebx
add esp, 0x54
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x25c]
mov edi, dword [ebp - 0x260]
inc ebx
mov dword [ebp - 0x25c], ebx
add esi, 0x31c
add edi, dword [ebp - 0x290]
push 0x1c
lea ecx, [ebp - 0x29c]
push ecx
push edi
mov dword [ebp - 0x260], edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
cmp eax, 0x1c
je 0x406ca0
mov esi, dword [ebp - 0x280]
mov edx, dword [ebp - 0x274]
pop edi
mov eax, esi
pop esi
mov dword [edx], ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040981a
mov esp, ebp
pop ebp
ret 4
push 0x434ea0
push 0x40
lea ecx, [esi + 0x108]
push ecx
jmp 0x406f63
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4070f6
sub eax, edx
push eax
push edi
lea eax, [esi + 0x148]
push 0x40
push eax
call dword [sym.imp.MSVCR100.dll__mbsnbcpy_s]
add esp, 0x10
push ebx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
jmp 0x406f83
cmp dword [ebp - 0x26c], 0
jne 0x407151
push 0x434ea0
lea ecx, [esi + 0x148]
push 0x40
push ecx
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
push ebx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
jmp 0x406f83
mov eax, dword [ebp - 0x258]
movzx ecx, word [eax + 0x16]
movzx edx, word [eax + 0x12]
movzx edi, word [eax + 0x10]
mov ebx, dword [ebp - 0x268]
mov word [ebx + 0x30c], cx
movzx eax, word [eax + 0x14]
push eax
push ecx
push edi
push edx
push str._u._u._u._u
lea edx, [esi + 0x148]
push 0x40
push edx
call dword [sym.imp.MSVCR100.dll_sprintf_s]
mov ebx, dword [ebp - 0x250]
add esp, 0x1c
push ebx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
jmp 0x406f83
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0040981a
mov esp, ebp
pop ebp
ret 4