Function at 0x40e7f0
Capabilities:
Accept command line arguments
Create mailslot
Get common file path
Get disk information
Get file attributes
Manipulate console buffer
Move file
Read .ini file
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x412d26
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x2c78
call fcn.0040e210
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push esi
push edi
mov edi, dword [esp + 0x10]
xor ebp, ebp
xor esi, esi
cmp esi, 0x217ed
jge 0x40e834
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp esi, 0x1e98b882
jle 0x40e84c
cmp edi, 0xae547c
je 0x40e84c
cmp ebx, 0x883c640
jne 0x40e855
inc esi
cmp esi, 0x95b2fd0c
jb 0x40e826
cmp dword [0x1f15124], 0x520
jne 0x40e992
push ebp
push ebp
push ebp
push 0x817ab8
call fcn.0040516d
push ebp
call fcn.00405452
add esp, 0x14
lea eax, [esp + 0x28]
push eax
call fcn.004047b0
push ebp
mov esi, 0x40378c
push ebp
mov dword [esp + 0x30], esi
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], ebp
call fcn.004050b0
push ebp
call fcn.0040556e
add esp, 0xc
push ebp
call fcn.00405654
add esp, 4
push ebp
push ebp
push ebp
push ebp
call fcn.00404f58
push ebp
push ebp
push ebp
call fcn.00405427
add esp, 0x1c
push ebp
push ebp
push ebp
push ebp
call fcn.0040553c
add esp, 0x10
test byte [esp + 0x68], 1
mov dword [esp + 0x28], esi
je 0x40e8e9
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx]
push eax
call fcn.00405563
add esp, 4
mov edx, dword [esp + 0x38]
mov dword [edx], ebp
mov eax, dword [esp + 0x48]
mov dword [eax], ebp
mov ecx, dword [esp + 0x58]
mov dword [ecx], ebp
mov edx, dword [esp + 0x3c]
mov dword [edx], ebp
mov eax, dword [esp + 0x4c]
mov dword [eax], ebp
mov ecx, dword [esp + 0x5c]
mov dword [ecx], ebp
and dword [esp + 0x68], 0xfffffffe
mov dword [esp + 0x64], ebp
mov dword [esp + 0x28], 0x40374c
mov dword [esp + 0x2c94], 1
mov eax, dword [esp + 0x60]
mov ebx, eax
cmp eax, ebp
je 0x40e97e
mov edi, dword [eax]
cmp edi, ebp
je 0x40e975
push ebp
lea ecx, [esp + 0x14]
call fcn.00404953
mov eax, dword [edi + 4]
cmp eax, ebp
jbe 0x40e953
cmp eax, 0xffffffff
jae 0x40e953
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
not esi
lea ecx, [esp + 0x10]
and esi, edi
call fcn.0040497b
cmp esi, ebp
je 0x40e975
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
push ebx
call fcn.00405563
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c94], 0xffffffff
call fcn.004049ac
mov eax, 0x39ee
add dword [0x1f15124], eax
mov ecx, dword [0x1f15124]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileW]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileType]
mov esi, dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
mov dword [0x1f0feec], eax
mov eax, dword [0x1f15124]
mov dword [esp + 0x10], 0x9634d1
cmp eax, 3
jne 0x40e9e5
push 0
push 0
call edi
mov eax, dword [0x1f15124]
cmp eax, 0x8a5
jne 0x40eb74
xor edx, edx
lea ecx, [esp + 0x74]
push ecx
push edx
push edx
lea eax, [esp + 0x94]
push eax
push edx
mov dword [esp + 0x28], edx
call ebp
push 0
call ebx
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 0
push 0
push 0
push 0x403424
call dword [sym.imp.KERNEL32.dll_CreateMailslotW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesA]
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCompressedFileSizeW]
push 0x403440
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenJobObjectA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumDateFormatsW]
push 0
push 0x403490
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea eax, [esp + 0x20]
push eax
push 0
lea ecx, [esp + 0xc90]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoW]
push 0
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
push 0
lea ecx, [esp + 0x48c]
push ecx
push 0x4034c0
call esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0
lea edx, [esp + 0x1c8c]
push edx
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetNumberFormatW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapSize]
push 0x403500
push 0
call dword [sym.imp.KERNEL32.dll_SetFileShortNameW]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
push 0
push 0
call edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0
lea eax, [esp + 0x148c]
push eax
push 0
call esi
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x248c]
push edx
push 0
push 0x403520
push 0x403528
push 0x40355c
call dword [sym.imp.KERNEL32.dll_SearchPathW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [0x1f15124]
dec dword [esp + 0x10]
jne 0x40e9d5
xor esi, esi
test eax, eax
je 0x40eb93
call fcn.0040e4d0
mov eax, dword [0x1f15124]
inc esi
cmp esi, eax
jb 0x40eb84
cmp eax, 0x584
jne 0x40ec94
push 0
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push 0x403570
call dword [sym.imp.KERNEL32.dll_AddAtomW]
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0
push 0x4035b0
push 0
call dword [sym.imp.KERNEL32.dll__hread]
push 0
lea edx, [esp + 0x248c]
push edx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesW]
lea eax, [esp + 0x24]
push eax
push 0
lea ecx, [esp + 0x90]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_QueryInformationJobObject]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumSystemLocalesA]
push 0
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 0x403624
lea eax, [esp + 0x1c8c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push 0
lea ecx, [esp + 0x490]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x403664
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetCalendarInfoA]
push 0
lea edx, [esp + 0xc8c]
push edx
push 0x403678
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointA]
push 0
push 0x403698
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
push 0
call dword [sym.imp.KERNEL32.dll_GetPriorityClass]
mov byte [0x817ab8], 0
call fcn.0040e420
call fcn.0040e7c0
add dword [0x1f0feec], 0
call fcn.0040e780
cmp dword [0x1f15124], 0xc30
jne 0x40ed17
lea eax, [esp + 0x88]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0
call dword [sym.imp.KERNEL32.dll_DeleteFiber]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x4036c8
call esi
push 0x403708
call esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetStringTypeW]
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
call dword [sym.imp.KERNEL32.dll_GetACP]
mov ecx, dword [esp + 0x2c8c]
pop edi
xor eax, eax
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret