Function at 0x40a230
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, 0x190c
call fcn.0040b020
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCPInfoExW]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [esp + 0x10], 0
mov edi, edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [0x5628d4], 0x16
jne 0x40a2a6
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
lea eax, [esp + 0x18]
push eax
push 0
lea ecx, [esp + 0x524]
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_WriteProfileSectionA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x5628d4], 0x9e
jne 0x40a330
push 0
push 0
push 0
call edi
push 0
lea edx, [esp + 0x920]
push edx
call ebx
push 0
lea eax, [esp + 0x120]
push eax
call ebp
lea ecx, [esp + 0x51c]
push ecx
push 0
push 0
call esi
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 + 0x1120]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
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 0x40a34b
inc eax
cmp eax, 0x332beaf6
mov dword [esp + 0x10], eax
jl 0x40a260
mov eax, dword [0x5628d4]
mov ecx, dword [0x545d30]
push 0x42f010
push eax
push ecx
call fcn.00409e50
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFix]
xor esi, esi
lea ebx, [ebx]
cmp dword [0x5628d4], 0x10
jne 0x40a380
lea edx, [esp + 0x1c]
push edx
call edi
cmp esi, 0x1e673
jne 0x40a392
add dword [0x545d30], 0
inc esi
cmp esi, 0x3e79e
jl 0x40a370
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_SetPriorityClass]
mov dword [esp + 0x10], 0xdd9a7
jmp 0x40a3c0
cmp dword [0x5628d4], 0xc01
jne 0x40a3e4
push 0
push 0
call esi
call edi
push 0
push 0
push 0
push 0
call ebx
push 0
push 0
call ebp
sub dword [esp + 0x10], 1
jne 0x40a3c0
call fcn.00408d60
cmp dword [0x5628d4], 0x1144
pop edi
pop esi
pop ebp
pop ebx
jne 0x40a49d
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 + 0x114]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoA]
push 0
push 0
push 0x40144c
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_GetCommandLineA]
push 0
lea eax, [esp + 0x1110]
push eax
push 0x401458
call dword [sym.imp.KERNEL32.dll_GetProfileSectionW]
push 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0
push 0
push 0
lea ecx, [esp + 0x7c]
push ecx
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
xor eax, eax
add esp, 0x190c
ret