Function at 0x407840
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1c14
call fcn.00414550
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x1c10], ecx
xor edx, edx
mov byte [ebp - 0x1c09], 1
nop dword [eax]
mov al, byte [edx + 0x41fd00]
lea edx, [edx + 1]
mov byte [ebp + edx - 0xc09], al
test al, al
jne 0x407870
lea eax, [ebp - 0xc08]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push str.Documentkit.txt
lea eax, [ebp - 0xc08]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0xc08]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
lea eax, [ebp - 0xc08]
jne 0x40790b
push eax
lea eax, [ebp - 0x808]
push str.The_file___s__does_not_exist_for_program_version_comparison._n
push eax
call fcn.004010e0
lea edi, [ebp - 0x808]
add esp, 0xc
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4078d6
mov ecx, 8
mov esi, str.The_comparison_will_not_continue._n
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x808]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call fcn.00408370
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
push 0x418e38
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov esi, eax
add esp, 8
mov dword [ebp - 0x1c14], esi
test esi, esi
jne 0x40795f
lea eax, [ebp - 0xc08]
push eax
lea eax, [ebp - 0x808]
push str.Unable_to_open_file___s_____GetProgramVersions___aborting
push eax
call fcn.004010e0
add esp, 0xc
lea ecx, [ebp - 0x808]
call fcn.00408370
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
push esi
lea eax, [ebp - 0x408]
push 0x400
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
je 0x407c75
mov edi, dword [sym.imp.VCRUNTIME140.dll_strchr]
lea eax, [ebp - 0x408]
push 0x41a0f4
push eax
mov byte [ebp - 0x1c08], 0
mov byte [ebp - 0x1008], 0
mov byte [ebp - 0x808], 0
mov byte [ebp - 0x1808], 0
mov byte [ebp - 0x1408], 0
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
lea eax, [ebp - 0x408]
push 0x2c
push eax
call edi
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x407c05
lea ecx, [ebp - 0x408]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4079e0
sub ecx, edx
mov edx, ebx
lea esi, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x4079f0
sub edx, esi
lea eax, [ebp - 0x408]
sub ecx, edx
push ecx
push eax
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
lea ecx, [ebp - 0x408]
add esp, 0xc
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407a20
sub ecx, edx
mov edx, ebx
lea esi, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x407a30
sub edx, esi
sub ecx, edx
cmp ecx, 0x400
jae 0x407c92
inc ebx
mov byte [ebp + ecx - 0x808], al
push 0x2c
push ebx
call edi
mov edi, eax
add esp, 8
test edi, edi
je 0x407b1d
mov eax, dword [ebp - 0x1c10]
mov esi, edi
sub esi, ebx
push esi
push ebx
cmp dword [eax], 1
jne 0x407a99
lea eax, [ebp - 0x1008]
push eax
mov eax, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
call eax
add esp, 0xc
cmp esi, 0x400
jae 0x407c92
mov byte [ebp + esi - 0x1008], 0
jmp 0x407b01
lea eax, [ebp - 0x1408]
push eax
mov eax, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
call eax
add esp, 0xc
cmp esi, 0x400
jae 0x407c92
lea ebx, [edi + 1]
mov byte [ebp + esi - 0x1408], 0
push 0x2c
push ebx
call dword [sym.imp.VCRUNTIME140.dll_strchr]
mov edi, eax
add esp, 8
test edi, edi
je 0x407c6a
mov esi, edi
lea eax, [ebp - 0x1808]
sub esi, ebx
push esi
push ebx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
cmp esi, 0x400
jae 0x407c92
mov byte [ebp + esi - 0x1808], 0
lea eax, [edi + 1]
lea edx, [ebp - 0x1c08]
sub edx, eax
nop dword [eax]
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x407b10
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x18
call ebx
mov esi, eax
lea ecx, [ebp - 0x808]
add esp, 4
lea edx, [ecx + 1]
mov dword [esi], 0
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407b40
sub ecx, edx
lea eax, [ecx + 1]
push eax
call ebx
add esp, 4
mov dword [esi + 4], eax
lea edx, [ebp - 0x808]
nop dword [eax + eax]
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [eax], cl
lea eax, [eax + 1]
test cl, cl
jne 0x407b60
lea ecx, [ebp - 0x1008]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407b77
sub ecx, edx
lea eax, [ecx + 1]
push eax
call ebx
add esp, 4
mov dword [esi + 8], eax
lea edx, [ebp - 0x1008]
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [eax], cl
lea eax, [eax + 1]
test cl, cl
jne 0x407b92
mov ebx, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__atoi64]
lea eax, [ebp - 0x1c08]
push eax
call ebx
add esp, 4
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x1408]
push eax
call ebx
add esp, 4
mov dword [esi + 0x10], eax
lea eax, [ebp - 0x1808]
push eax
call ebx
mov dword [esi + 0x14], eax
add esp, 4
mov eax, dword [0x420108]
test eax, eax
cmove eax, esi
mov dword [0x420108], eax
mov eax, dword [0x420104]
test eax, eax
je 0x407bed
mov dword [eax], esi
mov dword [0x420104], esi
mov esi, dword [ebp - 0x1c14]
mov byte [ebp - 0x1c09], 0
jmp 0x40795f
cmp byte [ebp - 0x1c09], 0
je 0x407c5e
lea ecx, [ebp - 0x408]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407c17
sub ecx, edx
cmp byte [ebp - 0x408], 0x7c
jne 0x407c5e
cmp byte [ebp - 0x407], 0x7c
jne 0x407c5e
cmp byte [ebp + ecx - 0x409], 0x7c
jne 0x407c5e
cmp byte [ebp + ecx - 0x40a], 0x7c
jne 0x407c5e
lea eax, [ebp - 0x406]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ecx, dword [ebp - 0x1c10]
add esp, 4
mov dword [ecx], eax
mov byte [ebp - 0x1c09], 0
jmp 0x40795f
mov esi, dword [ebp - 0x1c14]
jmp 0x40795f
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov al, 1
pop edi
pop esi
pop ebx
call fcn.00412814
mov esp, ebp
pop ebp
ret
call fcn.0041294b
int3