Function at 0x40c8e3
Capabilities:
Check if file exists
Create process on windows
Get common file path
Get file attributes

Disassembly:
push 0x49c
mov eax, 0x5f2686
call fcn.005c5e27
mov eax, dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 0x4a0], esi
mov dword [ebp - 0x4a4], eax
xor ebx, ebx
lea eax, [ebp - 0x42c]
push 0x8b
inc ebx
push eax
mov dword [ebp - 4], ebx
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 0x10
jb 0x40c928
mov eax, dword [eax]
mov edi, dword [esi + 0x58]
push eax
push 0x6278a4
call fcn.00414eb6
pop ecx
pop ecx
push 0
push ebx
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], bl
call fcn.00402696
cmp dword [ebp + 0x3c], 0x10
mov ecx, dword [ebp + 0x28]
jae 0x40c955
lea ecx, [ebp + 0x28]
cmp dword [ebp + 0x20], 0x10
mov eax, dword [ebp + 0xc]
jae 0x40c961
lea eax, [ebp + 0xc]
push ecx
push eax
push dword [ebp - 0x4a4]
mov esi, str.CUpdateThread::SelfUpdate
push str.szPath_s_szNewLauncherName_s_szOldPath_s
push 0x148
push 2
push dword [0x6686d0]
mov ebx, esi
mov edi, str.UpdateThread.cpp
call fcn.004169e0
add esp, 0x1c
push pe_nt_image_headers32
lea eax, [ebp - 0x110]
push eax
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40c9d9
push str.GetModuleFileName_Failed
push 0x14d
push 4
push dword [0x6686d0]
mov ebx, esi
call fcn.004169e0
add esp, 0x10
push 0
push 1
lea ecx, [ebp + 0xc]
call fcn.00402696
push 0
push 1
jmp 0x40d06f
push 0xf
pop eax
mov dword [ebp - 0x46c], eax
mov dword [ebp - 0x470], ebx
mov byte [ebp - 0x480], bl
mov dword [ebp - 0x450], eax
mov dword [ebp - 0x454], ebx
mov byte [ebp - 0x464], 0
mov byte [ebp - 4], 4
mov dword [ebp - 0x434], eax
lea eax, [ebp - 0x110]
mov dword [ebp - 0x438], ebx
mov byte [ebp - 0x448], 0
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40ca21
sub eax, ecx
push eax
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x448]
call fcn.004022cd
lea eax, [ebp - 0x464]
push eax
lea edx, [ebp - 0x480]
lea ecx, [ebp - 0x448]
mov byte [ebp - 4], 5
call fcn.0047a050
pop ecx
mov bl, al
push 0
neg bl
push 1
lea ecx, [ebp - 0x448]
sbb bl, bl
mov byte [ebp - 4], 4
call fcn.00402696
inc bl
je 0x40caf6
cmp dword [ebp - 0x450], 0x10
mov ecx, dword [ebp - 0x464]
jae 0x40ca8c
lea ecx, [ebp - 0x464]
cmp dword [ebp - 0x46c], 0x10
mov eax, dword [ebp - 0x480]
jae 0x40caa1
lea eax, [ebp - 0x480]
push ecx
push eax
lea eax, [ebp - 0x110]
push eax
push str.SplitExeDirFile_Failed_szBakPath_s_strBakDir_s_strBakName_s
push 0x155
push 4
push dword [0x6686d0]
mov ebx, esi
call fcn.004169e0
add esp, 0x1c
xor edi, edi
xor esi, esi
push edi
inc esi
push esi
lea ecx, [ebp - 0x464]
call fcn.00402696
push edi
push esi
lea ecx, [ebp - 0x480]
call fcn.00402696
push edi
push esi
lea ecx, [ebp + 0xc]
call fcn.00402696
push edi
push esi
jmp 0x40d06f
mov eax, dword [ebp - 0x454]
dec eax
push eax
push 2
lea eax, [ebp - 0x464]
push eax
lea esi, [ebp - 0x49c]
call fcn.004042ca
mov byte [ebp - 4], 6
cmp dword [ebp + 0x20], 0x10
mov eax, dword [ebp + 0xc]
jae 0x40cb22
lea eax, [ebp + 0xc]
push eax
call fcn.0040ae81
push eax
push str._sdlcache_s.dl
lea eax, [ebp - 0x310]
push pe_nt_image_headers32
push eax
call fcn.005be145
push dword [ebp - 0x4a4]
lea eax, [ebp - 0x310]
push eax
push 0xa
pop eax
call fcn.0047a960
add esp, 0x1c
test al, al
lea eax, [ebp - 0x42c]
je 0x40cfa8
mov ebx, 0x90
push ebx
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 7
cmp dword [eax + 0x14], 0x10
jb 0x40cb7f
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0x4a0]
mov edi, dword [eax + 0x58]
mov esi, 0x6278a4
push esi
call fcn.00414eb6
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 6
call fcn.00402696
lea eax, [ebp - 0x42c]
push ebx
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 8
cmp dword [eax + 0x14], 0x10
jb 0x40cbc4
mov eax, dword [eax]
push eax
push esi
push 0x15e
push 2
push dword [0x6686d0]
mov ebx, str.CUpdateThread::SelfUpdate
mov edi, str.UpdateThread.cpp
call fcn.004169e0
add esp, 0x14
push 0
push 1
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 6
call fcn.00402696
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40cd18
lea eax, [ebp - 0x310]
push eax
call fcn.0047a9b0
test al, al
pop ecx
lea eax, [ebp - 0x42c]
je 0x40cc8a
mov ebx, 0x92
push ebx
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 9
cmp dword [eax + 0x14], 0x10
jb 0x40cc3f
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0x4a0]
mov edi, dword [eax + 0x58]
push esi
call fcn.00414eb6
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 6
call fcn.00402696
lea eax, [ebp - 0x42c]
push ebx
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 0xa
cmp dword [eax + 0x14], 0x10
jb 0x40cc7f
mov eax, dword [eax]
push eax
push esi
push 0x164
push 2
jmp 0x40cced
mov ebx, 0x93
push ebx
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 0xb
cmp dword [eax + 0x14], 0x10
jb 0x40cca4
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0x4a0]
mov edi, dword [eax + 0x58]
push esi
call fcn.00414eb6
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 6
call fcn.00402696
lea eax, [ebp - 0x42c]
push ebx
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 0xc
cmp dword [eax + 0x14], 0x10
jb 0x40cce4
mov eax, dword [eax]
push eax
push esi
push 0x169
push 4
push dword [0x6686d0]
mov ebx, str.CUpdateThread::SelfUpdate
mov edi, str.UpdateThread.cpp
call fcn.004169e0
add esp, 0x14
push 0
push 1
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 6
call fcn.00402696
push 0x5c
lea eax, [ebp + 0x28]
call fcn.0041338b
mov ecx, dword [ebp + 0x38]
sub ecx, eax
add ecx, 0xfffffffb
push ecx
inc eax
push eax
lea eax, [ebp + 0x28]
push eax
lea esi, [ebp - 0x448]
call fcn.004042ca
mov byte [ebp - 4], 0xd
cmp dword [ebp - 0x434], 0x10
mov eax, dword [ebp - 0x448]
jae 0x40cd51
mov eax, esi
push dword [ebp - 0x438]
lea edx, [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x1c]
call fcn.0040516c
test eax, eax
je 0x40cea0
push 0
push 0x10
lea eax, [ebp - 0x410]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
sub esp, 0x1c
lea eax, [ebp + 0x28]
mov esi, esp
mov dword [ebp - 0x4a8], esp
push eax
call fcn.004020db
lea ebx, [ebp - 0x42c]
call fcn.0040c7a6
add esp, 0x1c
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x418], 0x10
mov eax, dword [ebp - 0x42c]
jae 0x40cdb5
mov eax, ebx
push eax
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push str._s_s.lnk
push eax
call fcn.005be0c1
lea eax, [ebp - 0x210]
push eax
call fcn.0047a9b0
add esp, 0x14
test al, al
lea eax, [ebp - 0x210]
mov ebx, str.CUpdateThread::SelfUpdate
push eax
je 0x40ce0d
push 0x62a034
push 0x178
push 2
push dword [0x6686d0]
mov esi, str.UpdateThread.cpp
mov edi, esi
call fcn.004169e0
jmp 0x40ce30
push 0x62a060
push 0x17c
push 4
push dword [0x6686d0]
mov edi, str.UpdateThread.cpp
call fcn.004169e0
mov ebx, str.CUpdateThread::SelfUpdate
mov esi, edi
mov eax, dword [ebp + 0x28]
add esp, 0x14
cmp dword [ebp + 0x3c], 0x10
jae 0x40ce3f
lea eax, [ebp + 0x28]
push eax
call fcn.0047a9b0
test al, al
mov eax, dword [ebp + 0x28]
pop ecx
je 0x40ce65
cmp dword [ebp + 0x3c], 0x10
jae 0x40ce56
lea eax, [ebp + 0x28]
push eax
push 0x62a08c
push 0x180
push 2
jmp 0x40ce7b
cmp dword [ebp + 0x3c], 0x10
jae 0x40ce6e
lea eax, [ebp + 0x28]
push eax
push 0x62a0ac
push 0x184
push 4
push dword [0x6686d0]
mov edi, esi
call fcn.004169e0
add esp, 0x14
push 0
push 1
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 0xd
call fcn.00402696
jmp 0x40ceaa
mov ebx, str.CUpdateThread::SelfUpdate
mov esi, str.UpdateThread.cpp
push 5
push 0
push 0x627ca0
push dword [ebp - 0x4a4]
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea eax, [ebp - 0x42c]
push 0x94
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 0xf
cmp dword [eax + 0x14], 0x10
jb 0x40cee5
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0x4a0]
mov edi, dword [eax + 0x58]
push 0x6278a4
call fcn.00414eb6
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 0xd
call fcn.00402696
lea eax, [ebp - 0x42c]
push 0x94
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 0x10
cmp dword [eax + 0x14], 0x10
jb 0x40cf2d
mov eax, dword [eax]
push dword [ebp - 0x4a4]
mov edi, esi
push eax
push str._s_szPath_s
push 0x189
push 2
push dword [0x6686d0]
call fcn.004169e0
add esp, 0x18
xor edi, edi
push edi
push 1
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 0xd
call fcn.00402696
mov eax, dword [ebp - 0x4a0]
push edi
push edi
push 0x10
push dword [eax + 0x58]
call dword [sym.imp.USER32.dll_PostMessageA]
push str.__UpdateThread_WM_CLOSE
push 0x18b
push 2
push dword [0x6686d0]
mov edi, esi
call fcn.004169e0
add esp, 0x10
xor esi, esi
push esi
push 1
lea ecx, [ebp - 0x448]
call fcn.00402696
jmp 0x40d039
mov ebx, 0x91
push ebx
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 0x11
cmp dword [eax + 0x14], 0x10
jb 0x40cfc2
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0x4a0]
mov edi, dword [eax + 0x58]
mov esi, 0x6278a4
push esi
call fcn.00414eb6
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 6
call fcn.00402696
lea eax, [ebp - 0x42c]
push ebx
push eax
call fcn.00414e4b
pop ecx
pop ecx
mov byte [ebp - 4], 0x12
cmp dword [eax + 0x14], 0x10
jb 0x40d007
mov eax, dword [eax]
push eax
push esi
push 0x190
push 4
push dword [0x6686d0]
mov ebx, str.CUpdateThread::SelfUpdate
mov edi, str.UpdateThread.cpp
call fcn.004169e0
add esp, 0x14
push 0
push 1
lea ecx, [ebp - 0x42c]
call fcn.00402696
xor esi, esi
xor edi, edi
push esi
inc edi
push edi
lea ecx, [ebp - 0x49c]
call fcn.00402696
push esi
push edi
lea ecx, [ebp - 0x464]
call fcn.00402696
push esi
push edi
lea ecx, [ebp - 0x480]
call fcn.00402696
push esi
push edi
lea ecx, [ebp + 0xc]
call fcn.00402696
push esi
push edi
lea ecx, [ebp + 0x28]
call fcn.00402696
call fcn.005c5eaa
ret 0x3c