Function at 0x40c758
Capabilities:
Get common file path
Get file size

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe88
push ebx
push esi
push edi
mov ebx, eax
mov eax, 0x4ab37c
call fcn.00499b88
mov word [ebp - 0x5c], 0x14
mov edx, dword [ebx + 0x330]
lea eax, [ebp - 4]
add edx, 0x468
call fcn.004a4af0
inc dword [ebp - 0x50]
xor edx, edx
mov word [ebp - 0x5c], 8
mov word [ebp - 0x5c], 0x20
mov dword [ebp - 8], edx
lea edx, [ebp - 8]
inc dword [ebp - 0x50]
lea eax, [ebp - 4]
call fcn.004a4e60
lea edx, [ebp - 8]
lea eax, [ebp - 4]
call fcn.004a4c04
dec dword [ebp - 0x50]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004a4bd4
mov word [ebp - 0x5c], 0x2c
mov edx, 0x4a7ffa
lea eax, [ebp - 0xc]
call fcn.004a4ab8
inc dword [ebp - 0x50]
lea edx, [ebp - 0xc]
mov eax, dword [ebx + 0x330]
add eax, 0x44c
call fcn.004a4cb8
test al, al
je 0x40c82d
mov edx, str.autoupdate.exe.bak
lea eax, [ebp - 0x10]
call fcn.004a4ab8
inc dword [ebp - 0x50]
lea edx, [ebp - 0x10]
lea eax, [ebp - 4]
call fcn.004a4e3c
test eax, eax
lea eax, [ebp - 0x10]
setne cl
and ecx, 1
mov edx, 2
push ecx
dec dword [ebp - 0x50]
call fcn.004a4bd4
pop ecx
test ecx, ecx
jne 0x40c831
xor eax, eax
jmp 0x40c836
mov eax, 1
push eax
dec dword [ebp - 0x50]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004a4bd4
pop ecx
test cl, cl
je 0x40cba4
lea eax, [ebp - 0x178]
push eax
push 0x104
call sub.KERNEL32.DLL_GetCurrentDirectoryA
mov word [ebp - 0x5c], 0x44
lea edx, [ebp - 0x178]
lea eax, [ebp - 0x14]
call fcn.004a4ab8
inc dword [ebp - 0x50]
mov edx, 0x4a8016
mov word [ebp - 0x5c], 0x38
mov word [ebp - 0x5c], 0x50
lea eax, [ebp - 0x18]
call fcn.004a4ab8
inc dword [ebp - 0x50]
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x14]
call fcn.004a4c18
dec dword [ebp - 0x50]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004a4bd4
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea edx, [ebp - 0x24]
inc dword [ebp - 0x50]
mov eax, dword [ebp - 4]
call fcn.00485314
lea eax, [ebp - 0x24]
xor edx, edx
mov dword [ebp - 0x28], edx
lea edx, [ebp - 0x28]
inc dword [ebp - 0x50]
call fcn.004a4e60
lea eax, [ebp - 0x28]
xor ecx, ecx
push eax
lea edx, [ebp - 0x1c]
mov word [ebp - 0x5c], 0x5c
mov dword [ebp - 0x1c], ecx
inc dword [ebp - 0x50]
mov eax, dword [ebp - 0x14]
call fcn.00485314
lea eax, [ebp - 0x1c]
xor edx, edx
mov dword [ebp - 0x20], edx
lea edx, [ebp - 0x20]
inc dword [ebp - 0x50]
call fcn.004a4e60
lea eax, [ebp - 0x20]
pop edx
call fcn.004a4cb8
push eax
dec dword [ebp - 0x50]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004a4bd4
dec dword [ebp - 0x50]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004a4bd4
dec dword [ebp - 0x50]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004a4bd4
dec dword [ebp - 0x50]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004a4bd4
pop eax
test al, al
je 0x40cb8e
push 0x4a8026
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 0x70], eax
mov word [ebp - 0x5c], 0x38
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocStringLen
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40c989
mov eax, dword [ebp - 0x14]
jmp 0x40c98e
mov eax, 0x4a8035
push eax
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
push 0
push esi
call sub.KERNEL32.DLL_GetFileSize
mov edi, eax
push esi
call sub.KERNEL32.DLL_CloseHandle
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
mov eax, dword [ebp - 4]
test eax, eax
je 0x40c9c4
mov edx, dword [ebp - 4]
jmp 0x40c9c9
mov edx, 0x4a8036
push edx
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
push 0
push esi
call sub.KERNEL32.DLL_GetFileSize
mov dword [ebp - 0x74], eax
push esi
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0x74]
cmp edi, eax
je 0x40cb8e
mov edx, dword [ebx + 0x344]
test edx, edx
jne 0x40cb6c
mov word [ebp - 0x5c], 0x74
mov edx, 0x4a8055
lea eax, [ebp - 0x3c]
call fcn.004a4ab8
inc dword [ebp - 0x50]
lea edx, [ebp - 0x2c]
mov ecx, dword [eax]
xor eax, eax
push ecx
push 0
mov dword [ebp - 0x2c], eax
push edx
inc dword [ebp - 0x50]
mov edx, str.INFO_RESTARTUPDATE
lea eax, [ebp - 0x38]
call fcn.004a4ab8
inc dword [ebp - 0x50]
mov edx, 0x4a8037
mov ecx, dword [eax]
lea eax, [ebp - 0x34]
push ecx
call fcn.004a4ab8
inc dword [ebp - 0x50]
mov ecx, dword [eax]
push ecx
call fcn.00401818
pop edx
pop ecx
call fcn.00405408
dec dword [ebp - 0x50]
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.004a4bd4
dec dword [ebp - 0x50]
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.004a4bd4
dec dword [ebp - 0x50]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.004a4bd4
mov word [ebp - 0x5c], 0x68
mov word [ebp - 0x5c], 0x80
mov edx, 0x4a80a6
lea eax, [ebp - 0x48]
call fcn.004a4ab8
inc dword [ebp - 0x50]
lea edx, [ebp - 0x30]
mov ecx, dword [eax]
xor eax, eax
push ecx
push 0
mov dword [ebp - 0x30], eax
push edx
inc dword [ebp - 0x50]
mov edx, str.INFO_RESTARTUPDATETITLE
lea eax, [ebp - 0x44]
call fcn.004a4ab8
inc dword [ebp - 0x50]
mov edx, 0x4a8083
mov ecx, dword [eax]
lea eax, [ebp - 0x40]
push ecx
call fcn.004a4ab8
inc dword [ebp - 0x50]
mov ecx, dword [eax]
push ecx
call fcn.00401818
pop edx
pop ecx
call fcn.00405408
dec dword [ebp - 0x50]
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.004a4bd4
dec dword [ebp - 0x50]
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.004a4bd4
dec dword [ebp - 0x50]
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.004a4bd4
mov word [ebp - 0x5c], 0x68
push 0x40
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40cb27
mov ecx, dword [ebp - 0x30]
jmp 0x40cb2c
mov ecx, 0x4a80ac
push ecx
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40cb39
mov edx, dword [ebp - 0x2c]
jmp 0x40cb3e
mov edx, 0x4a80ab
push edx
push 0
call sub.USER32.DLL_MessageBoxA
dec dword [ebp - 0x50]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.004a4bd4
dec dword [ebp - 0x50]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.004a4bd4
mov word [ebp - 0x5c], 0x38
mov eax, dword [ebx + 0x344]
test eax, eax
sete cl
and ecx, 1
push ecx
mov eax, dword [ebp - 0x70]
push eax
call fcn.004191dc
add esp, 8
mov eax, ebx
call fcn.0044262c
dec dword [ebp - 0x50]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004a4bd4
mov word [ebp - 0x5c], 8
dec dword [ebp - 0x50]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004a4bd4
mov ecx, dword [ebp - 0x6c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret