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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x407c
call fcn.00405100
push ebx
push esi
xor ebx, ebx
push edi
xor esi, esi
cmp esi, 0x13e6
jne 0x4039e9
mov eax, 0x38d6
add dword [0x81b894], eax
cmp dword [0x81b894], 0xbc4
jne 0x403a00
push 0x401328
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
inc esi
cmp esi, 0x31a4c2
jl 0x4039d6
call fcn.004039ae
xor esi, esi
cmp dword [0x81b894], ebx
jbe 0x403a47
push esi
call fcn.00403749
cmp dword [0x81b894], 0x29
jne 0x403a3e
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CallNamedPipeA]
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
inc esi
cmp esi, dword [0x81b894]
jb 0x403a18
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileW]
mov dword [ebp - 4], 0x91973a
cmp dword [0x81b894], 0x465
jne 0x403c49
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthA]
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnumCalendarInfoA]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnumCalendarInfoW]
push ebx
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push ebx
push ebx
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
push ebx
call dword [sym.imp.KERNEL32.dll_ConvertThreadToFiber]
push ebx
push ebx
lea eax, [ebp - 0x207c]
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_GetOverlappedResult]
lea eax, [ebp - 0x54]
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_DeleteAtom]
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetCommState]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnfix]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalLock]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
push ebx
push ebx
call esi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_LocalShrink]
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x387c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
push 0x401348
push 0x401364
call esi
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [ebp - 0x107c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push ebx
lea eax, [ebp - 0x1c7c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x287c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x147c]
push eax
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SearchPathA]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ActivateActCtx]
xor eax, eax
mov dword [ebp - 0x44], ebx
lea edi, [ebp - 0x40]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
lea eax, [ebp - 0x2c7c]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push ebx
push ebx
lea eax, [ebp - 0x347c]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesW]
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetStringTypeExW]
push ebx
push ebx
lea eax, [ebp - 0x87c]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStructA]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionW]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedFlushSList]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnumSystemLocalesW]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x407c]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push ebx
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push ebx
push ebx
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_BackupSeek]
dec dword [ebp - 4]
jne 0x403a54
xor esi, esi
cmp esi, 0x1c860
jge 0x403c6b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebx
push ebx
push ebx
call dword [sym.imp.GDI32.dll_GetBoundsRect]
cmp esi, 0x1e97427b
jle 0x403c85
cmp dword [ebp - 0xc], 0xace7c8
je 0x403c85
cmp dword [ebp - 0x70], 0xad642ec
jne 0x403c8e
inc esi
cmp esi, 0x8e2a6250
jb 0x403c54
xor esi, esi
cmp dword [0x81b894], 0x92
jne 0x403ca9
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
cmp esi, 0xa9a9
jne 0x403cc1
push 0x802648
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x81b890], eax
inc esi
cmp esi, 0x25563
jl 0x403c90
mov byte [0x802648], bl
xor esi, esi
cmp esi, 0x148
jne 0x403cdf
call fcn.004038b0
inc esi
cmp esi, 0x427fa7
jl 0x403cd2
push 0x418010
push dword [0x81b894]
push dword [0x81b440]
call fcn.004036e2
xor esi, esi
cmp dword [0x81b894], 0xba
jne 0x403d13
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp esi, 0x2f7e4
jne 0x403d20
call fcn.004038a2
inc esi
cmp esi, 0x48122
jl 0x403d00
call fcn.004034e7
cmp dword [0x81b894], 0x58c
jne 0x403dab
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFlags]
push ebx
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeA]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleFontSize]
xor eax, eax
mov word [ebp - 4], ax
lea edi, [ebp - 2]
stosw word es:[edi], ax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
lea eax, [ebp - 8]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputAttribute]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateJobObjectW]
push 0x401378
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 - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CancelTimerQueueTimer]
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
call fcn.0040389c
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret