Function at 0x401400
Capabilities:
Create directory
Delete file

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x150
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x401458
mov esi, dword [esp + 0x164]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push esi
call dword [sym.imp.MSVCRT.dll__mbsrchr]
mov byte [eax + 1], 0
mov eax, dword [esp + 0x174]
push 0x104
push eax
push esi
call dword [sym.imp.MSVCRT.dll__mbsnbcat]
add esp, 0x14
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x150
ret
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.Shell32.dll
xor edi, edi
call ebx
mov ebp, eax
test ebp, ebp
je 0x40149f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SHGetFolderPathA
push ebp
call esi
mov edi, eax
test edi, edi
jne 0x40149f
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.SHFolder.dll
call ebx
mov ebp, eax
test ebp, ebp
je 0x40149f
push str.SHGetFolderPathA
push ebp
call esi
mov edi, eax
mov esi, dword [esp + 0x164]
mov dword [esp + 0x10], 1
test edi, edi
je 0x4015db
push esi
push 1
push 0
push 0x23
push 0
call edi
test eax, eax
jl 0x4015db
push 0x104
push str.Rising
push esi
call dword [sym.imp.MSVCRT.dll__mbsnbcat]
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
push esi
call ebx
mov edi, eax
mov al, byte [esp + 0x20]
cmp edi, 0xffffffff
je 0x4014fa
test al, 0x10
jne 0x401520
test al, 0x10
jne 0x401513
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call sub.MFC42.DLL_AfxTryCleanup
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov dword [esp + 0x10], eax
cmp edi, 0xffffffff
je 0x40152c
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4015db
push 0x104
push str._rfw
push esi
call dword [sym.imp.MSVCRT.dll__mbsnbcat]
add esp, 0xc
lea edx, [esp + 0x20]
push edx
push esi
call ebx
mov edi, eax
mov al, byte [esp + 0x20]
cmp edi, 0xffffffff
je 0x401563
test al, 0x10
jne 0x401589
test al, 0x10
jne 0x40157c
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call sub.MFC42.DLL_AfxTryCleanup
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebx, eax
jmp 0x40158d
mov ebx, dword [esp + 0x10]
cmp edi, 0xffffffff
je 0x401599
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
je 0x4015db
test ebp, ebp
je 0x4015a8
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, dword [sym.imp.MSVCRT.dll__mbsnbcat]
push 0x104
push 0x42307c
push esi
call edi
mov eax, dword [esp + 0x178]
push 0x104
push eax
push esi
call edi
add esp, 0x18
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x150
ret
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push esi
call dword [sym.imp.MSVCRT.dll__mbsrchr]
mov ecx, dword [esp + 0x174]
push 0x104
push ecx
push esi
mov byte [eax + 1], 0
call dword [sym.imp.MSVCRT.dll__mbsnbcat]
add esp, 0x14
test ebp, ebp
je 0x401618
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x150
ret