Function at 0x402d79
Capabilities:
Get common file path
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov ecx, dword [0x40aa48]
push ebx
push esi
push edi
xor esi, esi
cmp word [0x40b3d8], si
mov dword [0x40bd5c], esi
jbe 0x402db4
movzx eax, word [0x40b3d8]
test byte [ecx + 2], 1
jne 0x402dac
inc dword [0x40bd5c]
movzx edx, word [ecx]
add ecx, edx
dec eax
jne 0x402da0
cmp dword [0x40bd5c], 0
jne 0x402dc4
xor eax, eax
jmp 0x403221
xor edi, edi
mov eax, dword [0x40aa18]
push edi
mov dword [0x40b164], edi
push 0x40198a
push eax
push 0x19a
push dword [0x40aa2c]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [0x40aa54], eax
cmp eax, edi
jne 0x402dfc
mov eax, 0x20
jmp 0x403221
mov dword [0x40bd6c], 0
push 0
call fcn.00401a7a
add esp, 4
push 0x104
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp word [0x40b3d8], 0
mov edi, dword [0x40aa48]
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0
jbe 0x403068
test esi, esi
jne 0x403068
mov eax, dword [0x40aa54]
push eax
call fcn.004013ab
add esp, 4
test eax, eax
jne 0x403068
mov ax, word [edi + 2]
test al, 1
jne 0x403050
test al, 6
je 0x403050
lea ebx, [edi + 6]
mov eax, dword [0x40aa54]
push ebx
push 0x65
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push 0x104
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
xor esi, esi
push 0x104
push 0x40
mov byte [eax], 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x104
mov dword [ebp - 0xc], eax
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x34]
lea edx, [ebp - 0x30]
mov dword [ebp - 0x34], 0x104
mov dword [ebp - 0x30], 0x104
push eax
push dword [ebp - 4]
push edx
push dword [ebp - 8]
push 0x40af50
push dword [ebp - 0xc]
push ebx
push 1
call sub.VERSION.dll_VerFindFileA
push dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], 1
cmp byte [eax], 0
je 0x402fac
push eax
call fcn.00401164
add esp, 4
push ebx
push dword [ebp - 8]
call fcn.004042d0
add esp, 8
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 8]
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0x14], eax
cmp eax, esi
je 0x402fac
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x14]
call fcn.00401411
add esp, 8
mov dword [ebp - 0x10], eax
cmp eax, esi
je 0x402fac
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x2c]
push dword [ebp - 8]
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x402fa0
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x1c]
push eax
push ecx
push 0x409304
push dword [ebp - 0x10]
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x402fa0
mov eax, dword [ebp - 0x1c]
push ebx
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x10], edx
call fcn.004043b0
add esp, 4
lea eax, [edi + eax + 8]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
cmp ecx, dword [ebp - 0x28]
jb 0x402f99
jne 0x402fa0
cmp eax, dword [ebp - 0x10]
jae 0x402fa0
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x24]
push eax
call fcn.00401445
add esp, 4
cmp dword [ebp - 0xc], 0
je 0x402fd0
cmp dword [ebp - 0x20], 2
jne 0x402fd0
push ebx
mov eax, dword [0x40aa54]
push 0x27
mov esi, 2
push eax
call fcn.00401629
add esp, 0xc
jmp 0x402fd2
xor eax, eax
cmp eax, 4
je 0x402e8f
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
cmp byte [eax], 0
jne 0x402ffc
push 0x40af50
push eax
call fcn.004042c0
add esp, 8
jmp 0x403007
push dword [ebp - 4]
call fcn.00401164
add esp, 4
cmp dword [ebp - 0xc], 0
je 0x403031
test esi, esi
jne 0x403031
push str.dva.386
push ebx
call fcn.00404e50
add esp, 8
test eax, eax
je 0x403031
push dword [ebp - 4]
push edi
call fcn.004026b5
add esp, 8
mov esi, eax
sub edx, edx
inc dword [0x40bd6c]
mov eax, dword [0x40bd6c]
imul eax, eax, 0x64
div dword [0x40bd5c]
push eax
call fcn.00401a7a
add esp, 4
movzx eax, word [edi]
movzx ecx, word [0x40b3d8]
add edi, eax
inc dword [ebp - 0x18]
cmp ecx, dword [ebp - 0x18]
jg 0x402e3b
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
mov ebx, dword [0x40aa48]
cmp word [0x40b3d8], di
jbe 0x4030f0
test esi, esi
jne 0x4030f0
mov eax, dword [0x40aa54]
push eax
call fcn.004013ab
add esp, 4
test eax, eax
jne 0x4030f0
test byte [ebx + 2], 7
jne 0x4030df
lea eax, [ebx + 6]
push eax
push 0x65
push dword [0x40aa54]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push 0x40af50
push ebx
call fcn.004026b5
add esp, 8
mov esi, eax
sub edx, edx
inc dword [0x40bd6c]
mov eax, dword [0x40bd6c]
imul eax, eax, 0x64
div dword [0x40bd5c]
push eax
call fcn.00401a7a
add esp, 4
movzx eax, word [ebx]
movzx ecx, word [0x40b3d8]
inc edi
add ebx, eax
cmp ecx, edi
jg 0x403082
cmp dword [0x40bd68], 0xffffffff
je 0x40310f
mov eax, dword [0x40bd68]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
mov dword [0x40bd68], 0xffffffff
push 0x40bd60
call fcn.00401445
add esp, 4
cmp byte [0x40b170], 0
je 0x403200
test esi, esi
jne 0x403200
push str..bin
mov edi, 0x40b170
push edi
call fcn.004016ba
add esp, 8
mov eax, dword [0x40aa54]
xor ebx, ebx
push edi
push 0x65
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
cmp word [0x40aa4c], 1
je 0x4031d4
mov word [0x40aa4c], 1
mov eax, dword [0x40aa54]
push eax
call fcn.00401c9f
add esp, 4
mov ebx, eax
test ebx, ebx
jne 0x4031d4
push 0x104
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4031ca
push 0x40b4f0
push edi
call fcn.004042c0
add esp, 8
push 0x40b060
push edi
call fcn.004042d0
add esp, 8
push 0
push edi
call dword [sym.imp.KERNEL32.dll__lopen]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x4031c3
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0xffffffff
jne 0x4031d4
test ebx, ebx
je 0x403168
test ebx, ebx
jne 0x403200
push 0x40af50
mov edi, 0x40b170
push 0x40b060
push edi
call fcn.00402af9
add esp, 0xc
mov esi, eax
push str..exe
push edi
call fcn.004016ba
add esp, 8
mov eax, dword [0x40aa54]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
cmp dword [0x40b164], 0
je 0x40321f
test esi, esi
jne 0x40321f
mov esi, dword [0x40b164]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret