Function at 0x401240
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x534
mov eax, dword [0x40d0f8]
mov edx, dword [0x40a258]
push ebx
mov dword [esp + 0x534], eax
push esi
push edi
xor eax, eax
xor ebx, ebx
mov byte [esp + 0x118], bl
mov ecx, 0x40
lea edi, [esp + 0x119]
rep stosd dword es:[edi], eax
mov ecx, dword [0x40a254]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [str.KKLVASensor]
mov dword [esp + 0x220], eax
mov dword [esp + 0x224], ecx
xor eax, eax
mov dword [esp + 0x228], edx
mov ecx, 0x3e
lea edi, [esp + 0x22c]
rep stosd dword es:[edi], eax
push 0x104
lea eax, [esp + 0x11c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x118]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
xor eax, eax
mov byte [esp + 0x328], bl
mov ecx, 0x40
lea edi, [esp + 0x329]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x430], bl
mov ecx, 0x40
lea edi, [esp + 0x431]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x10], bl
mov ecx, 0x40
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x220]
push edx
stosb byte es:[edi], al
lea eax, [esp + 0x11c]
push eax
push str._s_s_Now.dll
lea ecx, [esp + 0x334]
push 0x104
push ecx
call fcn.00403ab2
lea edx, [esp + 0x234]
push edx
lea eax, [esp + 0x130]
push eax
push str._s_s.dll
lea ecx, [esp + 0x450]
push 0x104
push ecx
call fcn.00403ab2
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
add esp, 0x28
xor esi, esi
push esi
lea edx, [esp + 0x224]
push edx
lea eax, [esp + 0x120]
push eax
push str._s_s_Old__d.dll
lea ecx, [esp + 0x20]
push 0x104
push ecx
call fcn.00403ab2
add esp, 0x18
lea edx, [esp + 0x10]
push edx
call edi
test eax, eax
je 0x4013ae
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
inc esi
cmp esi, 0xa
jl 0x401370
xor esi, esi
push esi
lea ecx, [esp + 0x224]
push ecx
lea edx, [esp + 0x120]
push edx
push str._s_s_Old__d.dll
lea eax, [esp + 0x20]
push 0x104
push eax
call fcn.00403ab2
add esp, 0x18
lea ecx, [esp + 0x10]
push ecx
call edi
test eax, eax
je 0x4013f1
inc esi
cmp esi, 0xa
jl 0x4013b6
jmp 0x401416
lea edx, [esp + 0x328]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x401416
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x32c]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
xor esi, esi
jmp 0x401420
push esi
lea edx, [esp + 0x224]
push edx
lea eax, [esp + 0x120]
push eax
push str._s_s_Old__d.dll
lea ecx, [esp + 0x20]
push 0x104
push ecx
call fcn.00403ab2
add esp, 0x18
lea edx, [esp + 0x10]
push edx
call edi
test eax, eax
je 0x40146c
inc esi
cmp esi, 0xa
jl 0x401420
mov ecx, dword [esp + 0x53c]
call fcn.0040322e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x401491
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x434]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov ecx, dword [esp + 0x53c]
call fcn.0040322e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret