Function at 0x405680
Capabilities:
Copy file
Create process on windows
Delete file
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
cmp byte [eax], 0x2f
push ebx
push esi
push edi
jne 0x40573e
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x52
je 0x405747
cmp cl, 0x72
je 0x405747
cmp cl, 0x78
jne 0x40573e
push 0x2f
push eax
call fcn.0040fe7a
mov edi, eax
add esp, 8
test edi, edi
je 0x405708
inc edi
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push eax
push 0x420878
call esi
push edi
push 0x420980
call esi
push 0x420980
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push 0x420878
mov eax, 0x420980
call fcn.00406620
add esp, 4
mov dword [0x41afc0], eax
call fcn.00402960
test eax, eax
jne 0x40572d
push eax
push 0x10
mov edx, 0x394
call fcn.004066f0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00405940
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x41afc0]
test eax, eax
jne 0x405755
mov eax, dword [0x41ae60]
push 0x104
push 0x420980
push 0x398
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
mov eax, dword [0x41b390]
xor esi, esi
test eax, eax
je 0x40577a
mov esi, eax
jmp 0x405790
mov eax, dword [0x41ae64]
push eax
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x405790
mov esi, dword [0x41ae64]
mov ecx, dword [0x41ae64]
mov edi, dword [0x41b390]
push 0x41
push 0x416b2c
push 0x420980
push esi
mov dword [0x41b390], ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 1
mov dword [0x41b390], edi
jne 0x405929
push 0x420980
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0x420770
push 0
push 0x4163dc
push 0x420980
call edi
push 0x420770
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..exe
push 0x420770
call esi
push 0x104
push 0x420878
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
push 0x420770
push 0x420878
call ebx
mov al, byte [0x41ab50]
test al, al
je 0x405872
push 0x420878
push 0
push 0x4163dc
push 0x420980
call edi
push 0
push 0x420878
push 0x41ab50
call ebx
push 0x4163d0
push 0x419900
call esi
push 0x420878
push 0x419900
call esi
push 0x420980
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 1
push 0x420980
push 0x419900
push 0x420770
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
test eax, eax
ja 0x405929
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x4a
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x41afc0]
test eax, eax
jne 0x4058c3
mov eax, dword [0x41ae60]
push 0x12c
lea edx, [esp + 0x14]
push edx
push 0x393
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
mov eax, dword [0x41b390]
xor esi, esi
test eax, eax
je 0x4058e8
mov esi, eax
jmp 0x4058fe
mov eax, dword [0x41ae64]
push eax
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x4058fe
mov esi, dword [0x41ae64]
mov ecx, dword [0x41ae64]
mov edi, dword [0x41b390]
push 0x10
push 0x416b2c
lea edx, [esp + 0x18]
push edx
push esi
mov dword [0x41b390], ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [0x41b390], edi
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret