Function at 0x40cc70
Capabilities:
Accept command line arguments
Create mailslot
Delete file
Get common file path
Get disk information
Get file attributes
Get hostname
Identify system language via api
Manipulate console buffer
Move file
Read .ini file
Resolve function by parsing pe exports
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4114b6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x2ee8
call fcn.0040c570
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_CharUpperA]
xor ebp, ebp
xor esi, esi
lea ebx, [ebx]
cmp esi, 0x1f03c
jge 0x40ccbd
push ebp
call edi
call ebx
cmp esi, 0x1e970b36
jle 0x40ccd9
cmp dword [esp + 0x10], 0xbd844c
je 0x40ccd9
cmp dword [esp + 0x44], 0x8910cb0
jne 0x40cce2
inc esi
cmp esi, 0x95c3c0e2
jb 0x40ccb0
cmp dword [0x22de4cc], 0x520
jne 0x40ce2f
push ebp
call fcn.00404b61
add esp, 4
push ebp
call fcn.00404b91
add esp, 4
push ebp
call fcn.00404ba7
add esp, 4
push ebp
call fcn.00404b61
add esp, 4
lea eax, [esp + 0x38]
push eax
call fcn.00404320
mov esi, 0x403314
push ebp
mov dword [esp + 0x3c], esi
mov dword [esp + 0x78], ebp
mov dword [esp + 0x7c], ebp
call fcn.00404a27
add esp, 4
push ebp
push ebp
call fcn.00404a8d
push ebp
call fcn.00404acd
add esp, 0xc
push ebp
call fcn.00404acd
add esp, 4
push ebp
push ebp
call fcn.00404a8d
push ebp
call fcn.00404a53
add esp, 0xc
push ebp
call fcn.00404a3d
add esp, 4
test byte [esp + 0x78], 1
mov dword [esp + 0x38], esi
je 0x40cd86
mov ecx, dword [esp + 0x48]
mov eax, dword [ecx]
push eax
call fcn.00404b9c
add esp, 4
mov edx, dword [esp + 0x48]
mov dword [edx], ebp
mov eax, dword [esp + 0x58]
mov dword [eax], ebp
mov ecx, dword [esp + 0x68]
mov dword [ecx], ebp
mov edx, dword [esp + 0x4c]
mov dword [edx], ebp
mov eax, dword [esp + 0x5c]
mov dword [eax], ebp
mov ecx, dword [esp + 0x6c]
mov dword [ecx], ebp
and dword [esp + 0x78], 0xfffffffe
mov dword [esp + 0x74], ebp
mov dword [esp + 0x38], 0x4032d4
mov dword [esp + 0x2f04], 1
mov eax, dword [esp + 0x70]
mov ebx, eax
cmp eax, ebp
je 0x40ce1b
mov edi, dword [eax]
cmp edi, ebp
je 0x40ce12
push ebp
lea ecx, [esp + 0x14]
call fcn.004044c3
mov eax, dword [edi + 4]
cmp eax, ebp
jbe 0x40cdf0
cmp eax, 0xffffffff
jae 0x40cdf0
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.004044eb
cmp esi, ebp
je 0x40ce12
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
push ebx
call fcn.00404b9c
add esp, 4
lea ecx, [esp + 0x3c]
mov dword [esp + 0x2f04], 0xffffffff
call fcn.0040451c
mov eax, 0x5d1
add dword [0x22de4cc], eax
mov ecx, dword [0x22de4cc]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterW]
mov edi, dword [sym.imp.KERNEL32.dll_BuildCommDCBAndTimeoutsW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileType]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateMailslotW]
mov dword [0x22d4474], eax
mov eax, dword [0x22de4cc]
mov dword [esp + 0x10], 0x9682ab
cmp eax, 3
jne 0x40ce88
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [0x22de4cc]
cmp eax, 0xdf
jne 0x40d08b
xor edx, edx
lea ecx, [esp + 0x80]
push ecx
push edx
push edx
lea eax, [esp + 0x1304]
push eax
push edx
mov dword [esp + 0x28], edx
call esi
xor eax, eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x3c]
push edx
push eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
call edi
push 0
call ebp
push 0
push 0
push 0
push 0x403234
call ebx
push 0
push 0
lea eax, [esp + 0x2b00]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStructA]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push 0
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x84]
push ecx
push 0
lea edx, [esp + 0x9c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [esp + 0x88]
push ecx
push 0
lea edx, [esp + 0x2300]
push edx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumDateFormatsW]
push 0
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
push 0
lea eax, [esp + 0x2fc]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeA]
push 0
call dword [sym.imp.KERNEL32.dll_DeleteVolumeMountPointA]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0
lea ecx, [esp + 0xefc]
push ecx
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetNumberFormatA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapSize]
push 0x403250
push 0
call dword [sym.imp.KERNEL32.dll_SetFileShortNameA]
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0x34]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessAffinityMask]
lea ecx, [esp + 0xa8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
push 0x40326c
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
push 0
call dword [sym.imp.KERNEL32.dll_SetComputerNameA]
push 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionW]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x1afc]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
push 0
lea ecx, [esp + 0x6fc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov eax, dword [0x22de4cc]
dec dword [esp + 0x10]
jne 0x40ce72
xor esi, esi
test eax, eax
je 0x40d0ba
jmp 0x40d0a0
cmp eax, 0xfe
je 0x40d371
call fcn.0040c9f0
mov eax, dword [0x22de4cc]
inc esi
cmp esi, eax
jb 0x40d0a0
cmp eax, 0x70
jne 0x40d18b
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLCID]
push 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea eax, [esp + 0x6f8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0
lea ecx, [esp + 0xefc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesA]
mov edx, dword [esp + 0x18]
push 0
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_SetInformationJobObject]
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumSystemLocalesW]
mov esi, dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
push 0
call esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MoveFileA]
push 0
call esi
lea eax, [esp + 0x30]
push eax
push 0
lea ecx, [esp + 0x9c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
xor eax, eax
push eax
xor edx, edx
mov dword [esp + 0x22], eax
mov dword [esp + 0x26], eax
mov dword [esp + 0x2a], eax
mov word [esp + 0x2e], ax
lea eax, [esp + 0x2fc]
push eax
push edx
lea ecx, [esp + 0x28]
push ecx
push edx
push edx
mov word [esp + 0x34], dx
call dword [sym.imp.KERNEL32.dll_GetTimeFormatA]
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, 0x8dc
push 0
call edi
dec esi
jne 0x40d196
mov esi, dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
mov edi, dword [sym.imp.KERNEL32.dll_OpenMutexA]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadConsoleOutputA]
mov ebp, 0x25887
cmp dword [0x22de4cc], 0x222
jne 0x40d1f2
push 0
lea edx, [esp + 0x6fc]
push edx
call esi
push 0x4032a4
push 0
push 0
call edi
xor edx, edx
lea ecx, [esp + 0x30]
push ecx
push edx
xor eax, eax
push eax
lea ecx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], edx
call ebx
dec ebp
jne 0x40d1b4
mov byte [0x43ae40], 0
call fcn.0040c910
call fcn.0040cc40
mov edi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov ebx, dword [sym.imp.KERNEL32.dll_AddAtomW]
xor esi, esi
cmp dword [0x22de4cc], 0xba
jne 0x40d22c
push 0
push 0
push 0
call edi
push 0
call ebx
cmp esi, 0x2f64
jne 0x40d23e
add dword [0x22d4474], 0x2a22
inc esi
cmp esi, 0x46d9a
jl 0x40d214
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, 0xf2b8b
cmp dword [0x22de4cc], 0x21
jne 0x40d25f
push 0
call esi
dec edi
jne 0x40d252
mov edx, 0x73
mov eax, 0x6d
mov word [0x22d450a], dx
mov word [0x22d450e], ax
xor eax, eax
mov ecx, 0x33
mov edx, 0x67
mov word [0x22d4512], cx
mov word [0x22d451e], ax
mov word [0x22d4510], dx
mov eax, 0x69
mov ecx, 0x6d
mov edx, 0x6c
push 0x22d4508
mov dword [0x22d4518], 0x6c0064
mov word [0x22d450c], ax
mov word [0x22d4508], cx
mov word [0x22d451c], dx
mov dword [0x22d4514], 0x2e0032
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp dword [0x22de4cc], 0xc30
jne 0x40d359
mov edx, dword [esp + 0x18]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleCursorInfo]
push edi
call dword [sym.imp.KERNEL32.dll_LocalSize]
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
lea eax, [esp + 0xa8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
push edi
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push edi
call dword [sym.imp.KERNEL32.dll_ConvertThreadToFiber]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push edi
call esi
push 0x4032c8
call esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
lea edx, [esp + 0x30]
push edx
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputA]
push edi
lea eax, [esp + 0x6fc]
push eax
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetProfileStringW]
mov ecx, dword [esp + 0x2efc]
pop edi
xor eax, eax
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 0
call dword [sym.imp.KERNEL32.dll__lclose]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll__hread]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]