Function at 0x40a1d0
Capabilities:
Accept command line arguments
Connect pipe
Copy file
Get common file path
Get thread local storage value
Print debug messages
Terminate thread

Disassembly:
mov eax, 0x1228
call fcn.0040afa0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetCPInfoExA]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileExW]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
mov dword [esp + 0x10], 0
mov edi, edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [0x562ad4], 0x16
jne 0x40a246
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
lea eax, [esp + 0x18]
push eax
push 0
lea ecx, [esp + 0x240]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoA]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteProfileSectionW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x562ad4], 0x9e
jne 0x40a2e0
push 0
push 0
push 0
push 0
push 0x4013f4
push 0x401434
call esi
push 0
lea edx, [esp + 0xa3c]
push edx
call edi
push 0
lea eax, [esp + 0x23c]
push eax
call ebx
lea ecx, [esp + 0x11c]
push ecx
push 0
push 0
call ebp
push 0
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
push 0
lea ecx, [esp + 0x63c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapValidate]
lea edx, [esp + 0x80]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x10]
cmp eax, 0x3775ee
jg 0x40a2fb
inc eax
cmp eax, 0x332beaf6
mov dword [esp + 0x10], eax
jl 0x40a200
mov eax, dword [0x562ad4]
mov ecx, dword [0x545f30]
push 0x42f010
push eax
push ecx
call fcn.00409df0
mov edi, dword [sym.imp.KERNEL32.dll_GlobalWire]
xor esi, esi
lea ebx, [ebx]
cmp dword [0x562ad4], 0x10
jne 0x40a330
lea edx, [esp + 0x1c]
push edx
call edi
cmp esi, 0x1e673
jne 0x40a342
add dword [0x545f30], 0
inc esi
cmp esi, 0x3e79e
jl 0x40a320
mov esi, dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edi, dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPriorityClass]
mov dword [esp + 0x10], 0xdd9a7
jmp 0x40a370
cmp dword [0x562ad4], 0xc01
jne 0x40a392
push 0
push 0
call esi
call edi
push 0
push 0
push 0
push 0
call ebx
push 0
call ebp
sub dword [esp + 0x10], 1
jne 0x40a370
call fcn.00408cf0
cmp dword [0x562ad4], 0x1144
pop edi
pop esi
pop ebp
pop ebx
jne 0x40a436
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0
call dword [sym.imp.KERNEL32.dll_AddRefActCtx]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [esp + 8]
push eax
push 0
lea ecx, [esp + 0x630]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoA]
push 0
push 0
push 0x401440
call dword [sym.imp.KERNEL32.dll_FindFirstChangeNotificationA]
lea edx, [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0
push 0
push 0
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
xor eax, eax
add esp, 0x1228
ret