Function at 0x401b86
Capabilities:
Move file
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x54
cmp dword [ebp + 8], 5
jle 0x401f43
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
add eax, 0xc
mov eax, dword [eax]
mov dword [esp], eax
call sym._atoi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
add eax, 0x10
mov eax, dword [eax]
mov dword [esp], eax
call sym._atoi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x14]
mov dword [0x40601c], eax
mov dword [0x406020], 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], 1
je 0x401bff
mov dword [esp], 0
call sym.unk_8
mov dword [esp], 0x405144
call sym.unk_8
mov dword [esp], str._______________________
call sym.unk_8
mov dword [esp], str.STARTING
call sym.unk_8
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], str.Arguments:__d_n
call sym.unk_8
mov dword [ebp - 0xc], 0
jmp 0x401c6b
mov eax, dword [ebp - 0xc]
lea edx, [eax*4]
mov eax, dword [ebp + 0xc]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.Argument__d:__s
call sym.unk_8
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 8]
jl 0x401c3f
mov dword [0x4063e4], 0x30
mov dword [0x4063e8], 4
mov dword [0x4063ec], 5
mov dword [0x4063f0], 0
mov dword [0x4063f4], 0
mov dword [0x4063f8], 0
mov dword [0x4063fc], 0
mov dword [esp + 4], sym.unk_12
mov dword [esp], 0x405144
mov eax, dword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerA]
call eax
sub esp, 8
mov dword [0x4063e0], eax
mov eax, dword [0x4063e0]
mov dword [esp + 4], 0x4063e4
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
call eax
sub esp, 8
mov eax, dword [0x4063e0]
test eax, eax
jne 0x401d17
mov dword [esp], str.Service_failed_to_start
call sym.unk_8
mov dword [esp], 0xffffffff
call sym._die
jmp 0x401f44
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call eax
sub esp, 4
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], str.Opening_temporary_output_file:__s
call sym.unk_8
mov dword [esp + 8], 0x4051c2
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], 0x406400
mov eax, dword [sym.imp.msvcrt.dll_fopen_s]
call eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x401d84
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov dword [esp], str.Couldnt_open_output_file:__d
call sym.unk_8
mov dword [esp], 0xffffffff
call sym._die
jmp 0x401f44
mov dword [ebp - 0xc], 0
jmp 0x401e74
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 2
lea edx, [eax + 0x1c]
mov eax, dword [ebp + 0xc]
add eax, edx
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 2
lea edx, [eax + 0x20]
mov eax, dword [ebp + 0xc]
add eax, edx
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 2
lea edx, [eax + 0x24]
mov eax, dword [ebp + 0xc]
add eax, edx
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 2
lea edx, [eax + 0x28]
mov eax, dword [ebp + 0xc]
add eax, edx
mov eax, dword [eax]
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 2
lea edx, [eax + 0x2c]
mov eax, dword [ebp + 0xc]
add eax, edx
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
mov dword [esp + 4], str.true
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._strcmp
test eax, eax
sete al
movzx ebx, al
mov dword [esp + 4], str.true
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._strcmp
test eax, eax
sete al
movzx eax, al
mov edx, dword [ebp - 0x38]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._go
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jl 0x401d90
mov eax, dword [0x406400]
mov dword [esp], eax
call sym._fclose
test eax, eax
je 0x401eaa
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.Couldnt_close_the_file:__d
call sym.unk_8
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], str.Renaming_file__s____s
call sym.unk_8
mov dword [ebp - 0xc], 0
jmp 0x401f2f
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._rename
test eax, eax
je 0x401f0c
mov eax, 9
sub eax, dword [ebp - 0xc]
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], str.Couldnt_rename_file:__d__will_try__d_more_times_
call sym.unk_8
jmp 0x401f1a
mov dword [esp], str.File_successfully_renamed_
call sym.unk_8
jmp 0x401f35
mov dword [esp], 0x3e8
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
add dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 9
jle 0x401ecd
mov dword [esp], 0
call sym._die
jmp 0x401f44
nop
mov ebx, dword [ebp - 4]
leave
ret