Function at 0x409660
Capabilities:
Copy file
Create mailslot
Enumerate gui resources
Get file size
Manipulate console buffer
Move file
Print debug messages
Read .ini file
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov ecx, dword [0x478164]
sub esp, 0xc60
push ebx
push ebp
push esi
push edi
cmp ecx, 0x177
jne 0x4096a1
push 0
call fcn.0040a790
push 0
push 0
call fcn.0040a540
push 0
push 0
call fcn.0040a4f0
add esp, 0x14
push 0
call fcn.00409f40
mov esi, dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
mov edi, dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesA]
mov ebx, dword [sym.imp.KERNEL32.dll_BuildCommDCBAndTimeoutsW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetNumberFormatA]
xor eax, eax
mov dword [esp + 0x14], eax
cmp ecx, 0x47
jne 0x4097be
lea eax, [esp + 0x2c]
push eax
push 0
call esi
push 0
lea ecx, [esp + 0x474]
push ecx
call edi
xor eax, eax
lea edx, [esp + 0x30]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
push edx
lea eax, [esp + 0x54]
push eax
push 0x4013ac
call ebx
push 0
lea ecx, [esp + 0x874]
push ecx
push 0
push 0
push 0
push 0
call ebp
xor eax, eax
xor edx, edx
lea ecx, [esp + 0x28]
push ecx
mov word [esp + 0x28], dx
mov word [esp + 0x2a], ax
mov edx, dword [esp + 0x28]
push edx
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterA]
push 0
lea eax, [esp + 0x74]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindNextVolumeMountPointA]
xor edx, edx
xor ecx, ecx
lea eax, [esp + 0x18]
push eax
mov word [esp + 0x24], cx
mov word [esp + 0x26], dx
mov ecx, dword [esp + 0x24]
push ecx
push edx
push edx
push edx
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetNamedPipeHandleStateA]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetProcessShutdownParameters]
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthW]
lea edx, [esp + 0x48]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenWaitableTimerW]
mov ecx, dword [0x478164]
mov eax, dword [esp + 0x14]
cmp eax, 0x6a1
je 0x409ac9
cmp ecx, 0xf
je 0x409ad8
inc eax
cmp eax, 0x53f9406
mov dword [esp + 0x14], eax
jl 0x4096bf
mov edi, dword [sym.imp.USER32.dll_CharUpperW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
cmp esi, 0x7423
jge 0x4097fe
push 0
call edi
call ebx
inc esi
cmp esi, 0x180bc451
mov dword [0x4777f0], 0
jl 0x4097f0
mov esi, dword [sym.imp.KERNEL32.dll_EnumSystemLocalesA]
mov edi, dword [sym.imp.KERNEL32.dll_GetSystemTimeAdjustment]
mov ebx, dword [sym.imp.KERNEL32.dll_MoveFileWithProgressW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetCommState]
xor ecx, ecx
mov dword [esp + 0x14], ecx
nop
cmp ecx, 0x40d
jne 0x409842
push 0x478164
call fcn.00409300
cmp dword [0x478164], 0x78
jne 0x4098f0
push 0
push 0
call esi
push 0
push 0
push 0
call edi
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push 0
push 0
push 0
push 0x4013d8
push 0x401424
call ebx
push 0
push 0
call ebp
mov edx, dword [esp + 0x18]
push 0
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateMailslotW]
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputA]
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthA]
push 0x401444
call dword [sym.imp.KERNEL32.dll_SetComputerNameA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GlobalGetAtomNameW]
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
push 0
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_LockFile]
mov ecx, dword [esp + 0x14]
inc ecx
cmp ecx, 0x40bd22
mov dword [esp + 0x14], ecx
jl 0x409830
call fcn.004093d0
mov edi, dword [sym.imp.KERNEL32.dll_SetProcessPriorityBoost]
xor ebp, ebp
xor esi, esi
cmp dword [0x478164], 0x15
jne 0x40991d
push ebp
push ebp
call edi
cmp esi, 0x1550
jne 0x409931
mov ecx, dword [0x426008]
mov dword [0x478168], ecx
inc esi
cmp esi, 0x56a453
jl 0x409910
mov esi, dword [sym.imp.KERNEL32.dll_ConvertFiberToThread]
mov edi, dword [sym.imp.KERNEL32.dll_QueryDepthSList]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [esp + 0x14], 0x7015e7
cmp dword [0x478164], 0xfd
jne 0x409967
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
cmp dword [0x478164], 0x23
jne 0x409988
call esi
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
call edi
lea eax, [esp + 0x30]
push eax
call ebx
sub dword [esp + 0x14], 1
jne 0x409954
xor esi, esi
cmp dword [0x478164], ebp
jbe 0x4099af
lea esp, [esp]
push esi
call fcn.004091d0
inc esi
cmp esi, dword [0x478164]
jb 0x4099a0
mov esi, dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov edi, dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov ebx, 0x1756bb
cmp dword [0x478164], 0x15a
jne 0x4099d9
push ebp
push ebp
call esi
push 0x40145c
push ebp
push ebp
call edi
sub ebx, 1
jne 0x4099c0
call fcn.00409310
call fcn.004093f0
cmp dword [0x478164], 0x1d
jne 0x409ab8
push ebp
lea ecx, [esp + 0x1c]
push ecx
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push 0x40148c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_EnumResourceTypesW]
push ebp
call dword [sym.imp.KERNEL32.dll_FlushConsoleInputBuffer]
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
push ebp
call dword [sym.imp.KERNEL32.dll_SetEvent]
push ebp
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea edx, [esp + 0x28]
push edx
push ebp
lea eax, [esp + 0x38]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
push ebp
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateActCtxA]
push ebp
push ebp
push ebp
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
call dword [sym.imp.KERNEL32.dll_GetOEMCP]
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push ebp
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_WaitForDebugEvent]
xor eax, eax
xor ecx, ecx
mov word [esp + 0x14], ax
mov word [esp + 0x16], cx
mov edx, dword [esp + 0x14]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthA]
call fcn.004092e0
pop edi
xor eax, eax
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [0x427100]
mov dword [0x478164], eax
jmp 0x4097e2
push 0
lea ecx, [esp + 0x74]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FreeLibraryAndExitThread]