Function at 0x404888
Capabilities:
Accept command line arguments
Check if file exists
Get common file path
Move file
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push ebx
push esi
push edi
call fcn.00404020
call fcn.00406a63
shr eax, 0x10
cmp ax, 5
push 0x7fff
seta al
push 0x41be90
xor ebx, ebx
push ebx
mov byte [0x40b474], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x104
push 0x41b480
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
call fcn.00406e5f
mov esi, eax
cmp esi, ebx
je 0x4048ee
push ebx
push ebx
push esi
call fcn.00402cc1
push esi
mov dword [0x41b68c], eax
call fcn.0040264c
add esp, 0x10
cmp dword [0x40b0c8], 0x100007f
jne 0x404941
movzx eax, word [0x40b0c6]
push eax
movzx eax, word [0x40b0c4]
push eax
movzx eax, word [0x40b0c2]
push eax
movzx eax, word [0x40b0c0]
push eax
lea eax, [ebp - 0x7c]
push str._d._d._d._d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push eax
call esi
lea eax, [ebp - 0x7c]
push eax
call esi
call fcn.00405ee9
xor edi, edi
inc edi
mov esi, str.shit
test al, al
je 0x404962
push esi
push edi
call fcn.00403ef5
pop ecx
push eax
call fcn.00405a89
pop ecx
pop ecx
mov dword [ebp - 0x18], esi
push edi
mov esi, 0x42be98
push esi
mov dword [ebp - 0x14], 0x405737
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push ebx
push ebx
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp - 0x18]
push eax
mov dword [0x42beac], 0xc
mov dword [0x42beb0], esi
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x404a09
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
call fcn.00406c0e
mov byte [ebp - 4], al
lea eax, [ebp - 8]
push eax
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
cmp dword [ebp - 8], edi
jle 0x404a63
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push 0x408c04
push dword [esi + 4]
call edi
test eax, eax
jne 0x404a0e
push dword [esi + 8]
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov esi, eax
cmp esi, ebx
je 0x404a09
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00404042
push 0x408bfc
push dword [esi + 4]
call edi
test eax, eax
jne 0x404a76
xor edi, edi
push dword [esi + 8]
call fcn.0040652f
pop ecx
test eax, eax
jne 0x404a47
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404a47
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0xa
jl 0x404a1e
push 4
push ebx
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp byte [ebp - 4], bl
je 0x404a76
call fcn.00405be7
test al, al
je 0x404a76
jmp 0x404a09
jne 0x404a76
cmp byte [ebp - 4], bl
jne 0x404a71
call fcn.00406254
jmp 0x404a76
call fcn.00406224
push dword [ebp - 4]
call fcn.00403faf
pop ecx
test al, al
jne 0x404a8f
push ebx
call fcn.004037c1
pop ecx
jmp 0x404a09
cmp byte [ebp - 4], bl
je 0x404aa1
call fcn.00405be7
test al, al
jne 0x404a09
push dword [ebp - 4]
call fcn.0040467e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x404a09