Function at 0x402d3c
Capabilities:
Connect pipe
Copy file
Create directory
Get common file path
Get disk information
Get file attributes
Manipulate console buffer
Move file
Read .ini file
Read pipe
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc44
push ebx
push esi
xor ebx, ebx
push edi
xor esi, esi
cmp esi, 0x13e6
jne 0x402d5f
mov eax, 0x38d6
add dword [0x872174], eax
cmp dword [0x872174], 0xbc4
jne 0x402d72
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
inc esi
cmp esi, 0x31a652
jl 0x402d4c
call fcn.00402d28
xor esi, esi
cmp dword [0x872174], ebx
jbe 0x402db9
push esi
call fcn.00402b17
cmp dword [0x872174], 0x29
jne 0x402db0
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CallNamedPipeW]
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
inc esi
cmp esi, dword [0x872174]
jb 0x402d8a
mov esi, dword [sym.imp.KERNEL32.dll_EnumCalendarInfoW]
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileA]
mov dword [ebp - 4], 0x91973a
cmp dword [0x872174], 0x465
jne 0x402f0e
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthA]
push ebx
push ebx
push ebx
push ebx
call esi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push ebx
push ebx
push ebx
push ebx
call esi
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push ebx
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push ebx
call dword [sym.imp.KERNEL32.dll_ConvertThreadToFiber]
push ebx
push ebx
lea eax, [ebp - 0xc44]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStructA]
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleSelectionInfo]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push ebx
call dword [sym.imp.KERNEL32.dll_InitAtomTable]
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputA]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetCommState]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalCompact]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
push ebx
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_LocalCompact]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea eax, [ebp - 0x844]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
push 0x4012f8
push 0x401304
call edi
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_DeactivateActCtx]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetStringTypeExW]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionA]
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_InterlockedFlushSList]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnumSystemLocalesA]
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push ebx
lea eax, [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
dec dword [ebp - 4]
jne 0x402dcc
cmp dword [0x872174], 0xc
jne 0x402fc6
push ebx
push 0x401318
lea eax, [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_TerminateJobObject]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomW]
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x40135c
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetVolumeMountPointW]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleTitleW]
push ebx
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push ebx
call dword [sym.imp.KERNEL32.dll_AddAtomA]
push ebx
push ebx
call edi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push ebx
call dword [sym.imp.KERNEL32.dll_ZombifyActCtx]
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor esi, esi
cmp dword [0x872174], 0x92
jne 0x402fdb
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 0xa9a9
jne 0x402ff3
push 0x858f28
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x872170], eax
inc esi
cmp esi, 0x25563
jl 0x402fc8
mov byte [0x858f28], bl
xor esi, esi
cmp esi, 0x148
jne 0x403011
call fcn.00402c2a
inc esi
cmp esi, 0x427fa7
jl 0x403004
push 0x413010
push dword [0x872174]
push dword [0x871d20]
call fcn.00402ab0
mov esi, dword [sym.imp.KERNEL32.dll_LocalFlags]
xor edi, edi
cmp dword [0x872174], 0xba
jne 0x40304b
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push ebx
call esi
cmp edi, 0x2f7e4
jne 0x40305b
call fcn.00402c1c
inc edi
cmp edi, 0x48122
jl 0x403038
call fcn.004028bc
cmp dword [0x872174], 0x58c
jne 0x4030e3
push ebx
call esi
push ebx
lea eax, [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeA]
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleSelectionInfo]
xor eax, eax
mov word [ebp - 4], ax
lea edi, [ebp - 2]
stosw word es:[edi], ax
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0xc]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputAttribute]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateJobObjectA]
push 0x401370
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push ebx
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ChangeTimerQueueTimer]
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
call fcn.00402c16
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret