Function at 0x408950
Capabilities:
Check if file exists
Create thread
Get common file path
Set current directory
Terminate thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46f187
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x483390]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push esi
push edi
mov eax, dword [0x483390]
xor eax, esp
push eax
lea eax, [esp + 0x158]
mov dword fs:[0], eax
push str.CRsWork::DoWork
mov esi, ecx
push 0x473ab0
push 0x80
mov dword [esp + 0x2c], esi
call fcn.00431310
add esp, 0xc
mov ecx, esi
call fcn.00409f10
xor ebx, ebx
cmp dword [esi + 0x24], ebx
je 0x408a12
mov eax, dword [esi + 0x44]
cmp eax, ebx
je 0x4089e0
cmp eax, 1
je 0x4089e0
push str.RapInstall.exe_end__Silence_install__but_not_FirstInstall_or_INSTALL_TYPE_UPDATE
push 0x80
call fcn.00431310
add esp, 8
xor eax, eax
jmp 0x408e67
push ebx
push ebx
push esi
push 0x409150
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, esi
mov dword [esi + 0x14], eax
call fcn.00409180
push eax
push str.DoInstall_return__d.
push 0x80
call fcn.00431310
add esp, 0xc
jmp 0x408e50
mov eax, dword [esi + 0xa0]
sub eax, 0x10
call fcn.00403350
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
push edi
mov dword [esp + 0x164], ebx
call fcn.0040b540
test eax, eax
jne 0x408a78
push str.ReleaseDui_failed.
push 0x80
call fcn.00431310
add esp, 8
lea eax, [edi - 0x10]
mov dword [esp + 0x160], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408a71
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x408e67
lea ecx, [esp + 0x1c]
push 0x473148
push ecx
lea ecx, [esp + 0x20]
call fcn.0040bfc0
lea edx, [esi + 0xb0]
push edx
lea ecx, [esp + 0x20]
push ecx
mov ecx, eax
mov byte [esp + 0x170], 1
call fcn.0040bf00
add esp, 0x10
mov byte [esp + 0x160], 3
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408ad1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x103
lea ecx, [esp + 0x49]
push ebx
push ecx
mov byte [esp + 0x50], bl
call fcn.00446e10
add esp, 0xc
lea edx, [esp + 0x44]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push ebx
push edi
push str.CRsWork::SwitchLoadDLLDir
push str._s...DIr_s_BAlreadyWitch__d
push 0x80
call fcn.00431310
add esp, 0x14
push str.SetDllDirectoryA
push 0x473a1c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
cmp eax, ebx
je 0x408b31
call eax
jmp 0x408b37
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push eax
push str.CRsWork::SwitchLoadDLLDir
push str._s...return__d
push 0x80
call fcn.00431310
mov eax, dword [esp + 0x24]
add esp, 0x10
push eax
push esi
call fcn.0040b8a0
test eax, eax
jne 0x408ba0
push str.InitUIInterface_failed.
push 0x80
call fcn.00431310
mov byte [esp + 0x168], bl
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408a4a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x408a4a
mov edi, 1
lea eax, [esp + 0x44]
call fcn.00409a10
mov ecx, dword [esi + 0x2c]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
push esi
call eax
lea ecx, [esp + 0x10]
push str._v17conflict.xml
push ecx
lea ecx, [esp + 0x20]
call fcn.0040bfc0
add esp, 8
lea edi, [esi + 0x9c]
mov ebx, edi
mov byte [esp + 0x160], 4
call fcn.00403260
mov byte [esp + 0x160], 3
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408c0c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x408d14
lea ecx, [esp + 0x28]
push ecx
call fcn.00426d20
mov byte [esp + 0x160], 5
mov edx, dword [edi]
mov dword [esp + 0x10], edx
call fcn.004251b0
mov ecx, dword [esp + 0x10]
push eax
mov dword [esp + 0x28], eax
call fcn.00425230
test eax, eax
je 0x408c61
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.00425b00
cmp dword [esp + 0x40], 0
jbe 0x408cf2
push 0
push 0
push esi
push 0x409110
push 0
push 0
call ebx
mov esi, eax
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [esp + 0x28]
call fcn.0040c0c0
mov edi, dword [edi]
call fcn.004251b0
mov esi, eax
push esi
mov ecx, edi
call fcn.00425230
test eax, eax
je 0x408cb7
lea edx, [esp + 0x28]
push edx
push esi
call fcn.00425b00
cmp dword [esp + 0x40], 0
jbe 0x408cf2
push str.RapInstall.exe_end__Still_have_some_conflicts.
push 0x80
call fcn.00431310
add esp, 8
lea eax, [esp + 0x28]
call fcn.0043a5a0
lea ecx, [esp + 0x14]
call fcn.004031d0
lea ecx, [esp + 0x18]
call fcn.004031d0
xor eax, eax
jmp 0x408e67
lea esi, [esp + 0x28]
mov byte [esp + 0x160], 3
call fcn.0043a680
mov eax, dword [esp + 0x28]
push eax
call fcn.0044423f
mov esi, dword [esp + 0x24]
add esp, 4
mov eax, dword [esi + 0x44]
xor edi, edi
cmp eax, edi
je 0x408d22
cmp eax, 1
jne 0x408d50
push edi
push edi
push esi
push 0x409150
push edi
push edi
call ebx
mov dword [esi + 0x14], eax
cmp eax, edi
jne 0x408d50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ThreadCompress_error.lasterror___d
push 0x80
call fcn.00431310
add esp, 0xc
jmp 0x408cd9
push edi
push edi
push esi
push 0x409130
push edi
push edi
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xffffffffffffffff
push eax
mov dword [esi + 0x1c], eax
call ebx
mov ecx, dword [esi + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 0x2c]
mov dword [esi + 0x1c], edi
mov edx, dword [ecx]
mov eax, dword [edx + 0x18]
call eax
mov eax, dword [esi + 0x14]
cmp eax, edi
je 0x408ddf
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x14], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push eax
call edi
cmp dword [esp + 0x10], 0x103
jne 0x408ddf
mov edx, dword [esi + 0x14]
push 0x7d0
push edx
mov dword [esi + 0x20], 1
call ebx
mov ecx, dword [esi + 0x14]
lea eax, [esp + 0x10]
push eax
push ecx
mov dword [esp + 0x18], 0
call edi
cmp dword [esp + 0x10], 0x103
jne 0x408ddf
mov edx, dword [esi + 0x14]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0xa0]
push eax
call fcn.004065d0
mov esi, dword [esi + 0xa4]
add esp, 4
push esi
call fcn.004065d0
mov byte [esp + 0x164], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408e25
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x160], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408e50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.Dowork...end
push 0x80
call fcn.00431310
add esp, 8
mov eax, 1
mov ecx, dword [esp + 0x158]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.004426a0
mov esp, ebp
pop ebp
ret