Function at 0x409f10
Capabilities:
Check if file exists
Create directory
Get common file path
Terminate process

Disassembly:
sub esp, 0x114
mov eax, dword [0x483390]
xor eax, esp
mov dword [esp + 0x110], eax
push ebx
push ebp
push esi
push edi
push str.CRsWork::Init
push 0x473ab0
push 0x80
mov esi, ecx
call fcn.00431310
add esp, 0xc
push esi
call fcn.0040a150
test eax, eax
jne 0x409f53
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.0040a740
push 0x103
lea eax, [esp + 0x19]
push 0
push eax
mov byte [esp + 0x20], 0
call fcn.00446e10
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebp, eax
push ebp
lea eax, [esp + 0x18]
push eax
lea ebx, [esi + 0xa0]
push str._sRsdSfxTmp_d
mov edi, ebx
call fcn.004035e0
mov eax, dword [ebx]
add esp, 0xc
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x409fe0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebx]
push eax
push 0
push ecx
push str.CreateDirectory____s_return_d_LastError_d
push 0x80
call fcn.00431310
add esp, 0x14
push ebp
lea edx, [esp + 0x18]
push edx
add esi, 0xa4
push str._sRsdSfxTmpALL_d
mov edi, esi
call fcn.004035e0
mov eax, dword [esi]
add esp, 0xc
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, eax
test edi, edi
jne 0x40a02d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi]
push eax
mov eax, dword [esp + 0x14]
push eax
push ecx
push str.CreateDirectory____s_return_d_LastError_d
push 0x80
call fcn.00431310
add esp, 0x14
cmp dword [esp + 0x10], 0
je 0x40a03c
test edi, edi
jne 0x40a115
push 0x104
lea edx, [esp + 0x18]
push 0
push edx
call fcn.00446e10
add esp, 0xc
push 0
push 0x1c
lea eax, [esp + 0x1c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jne 0x40a076
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SHGetSpecialFolderPath_lasterror_d
jmp 0x40a11f
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
push ebp
lea edx, [esp + 0x18]
push edx
push str._sRapTempRsdSfxTmp_d_
mov edi, ebx
call fcn.004035e0
mov ecx, dword [ebx]
add esp, 0xc
call fcn.00406780
mov eax, dword [ebx]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40a0cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebx]
push eax
mov eax, dword [esp + 0x14]
push eax
push ecx
push str.CreateNeedDir____s_return_d_LastError_d
push 0x80
call fcn.00431310
add esp, 0x14
push ebp
lea edx, [esp + 0x18]
push edx
push str._sRapTempRsdSfxTmpALL_d_
mov edi, esi
call fcn.004035e0
mov ecx, dword [esi]
add esp, 0xc
call fcn.00406780
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40a115
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi]
push eax
mov eax, dword [esp + 0x14]
push eax
push ecx
push str.CreateNeedDir____s_return_d_LastError_d
push 0x80
call fcn.00431310
add esp, 0x14
push str.CRsWork::Init
push str._s_______end
push 0x80
call fcn.00431310
mov ecx, dword [esp + 0x12c]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004426a0
add esp, 0x114
ret