Function at 0x402341
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x65de64]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
push 0x62db03
push 0x3e8
push edi
call fcn.005d306f
add esp, 0xc
push 0
push ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeA]
push eax
mov dword [ebp - 0x410], eax
call fcn.005d8973
mov esi, eax
pop ecx
test esi, esi
je 0x4023ba
push esi
push dword [ebp - 0x410]
push 0
push ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoA]
test eax, eax
jne 0x4023cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.GetFileVersionInfo_failed_for__s__Error0x_.8x
call fcn.00401e12
push esi
call fcn.005d31db
add esp, 0x10
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005c8b52
leave
ret
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x414]
push eax
push str.VarFileInfoTranslation
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
jne 0x402405
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VerQueryValue_1_failed__Error0x_.8x
call fcn.00401e12
push esi
call fcn.005d31db
add esp, 0xc
jmp 0x4023ba
mov ecx, dword [ebp - 0x414]
push 0x631160
movzx eax, word [ecx + 2]
push eax
movzx eax, word [ecx]
push eax
push str.StringFileInfo_04x_04x_s
lea eax, [ebp - 0x404]
push 0x400
push eax
call fcn.00401bca
add esp, 0x18
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x404]
push eax
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
jne 0x4024e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x404]
push eax
push ebx
push str.VerQueryValue_1st_try__failed_for_file__s__strblock_s__Error0x_.8x
call fcn.00401e12
push 0x631160
push str.StringFileInfo040904e4_s
lea eax, [ebp - 0x404]
push 0x400
push eax
call fcn.00401bca
add esp, 0x20
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x404]
push eax
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
jne 0x4024d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x404]
push eax
push ebx
push str.VerQueryValue_2nd_try__failed_for_file__s__strblock_s__Error0x_.8x
call fcn.00401e12
push esi
call fcn.005d31db
add esp, 0x14
jmp 0x4023ba
push ebx
push str.VerQueryValue_with_standard_code_page_SUCCEEDED_for_file__s
call fcn.00401e12
pop ecx
pop ecx
mov ecx, dword [ebp - 0x408]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4024ea
sub ecx, edx
cmp ecx, 2
jb 0x4023ba
push dword [ebp - 0x408]
push 0x3e8
push edi
call fcn.005d306f
mov ecx, edi
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402515
sub ecx, edx
mov edx, edi
lea ebx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x402523
movsx eax, byte [ecx + edi - 1]
sub edx, ebx
push eax
push edx
push dword [ebp - 0x408]
push str.VerQueryValue_returned_value__s__length_is___d__last_char_is__d
call fcn.00401e12
mov ecx, edi
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40254b
sub ecx, edx
cmp byte [ecx + edi - 1], 0xae
jne 0x40256d
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402560
sub ecx, edx
mov byte [ecx + edi - 1], al
push esi
call fcn.005d31db
xor eax, eax
pop ecx
inc eax
jmp 0x4023bc