Function at 0x40a3f0
Capabilities:
Accept command line arguments
Connect pipe
Copy file
Get common file path
Identify system language via api
Print debug messages
Terminate thread

Disassembly:
mov eax, 0x1510
call fcn.0040b1f0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
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 [0x2e913d4], 0x16
jne 0x40a466
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 + 0x128]
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 [0x2e913d4], 0x9e
jne 0x40a4ef
push 0
push 0
push 0
call edi
push 0
lea edx, [esp + 0x524]
push edx
call ebx
push 0
lea eax, [esp + 0xd24]
push eax
call ebp
lea ecx, [esp + 0x120]
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 + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
push 0
push 0
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapValidate]
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x10]
cmp eax, 0x3775ee
jg 0x40a50a
inc eax
cmp eax, 0x332beaf6
mov dword [esp + 0x10], eax
jl 0x40a420
mov eax, dword [0x2e913d4]
mov ecx, dword [0x2e74830]
push 0x42f010
push eax
push ecx
call fcn.00409fd0
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFix]
xor esi, esi
lea esp, [esp]
cmp dword [0x2e913d4], 0x10
jne 0x40a540
lea edx, [esp + 0x20]
push edx
call edi
cmp esi, 0x1e673
jne 0x40a552
add dword [0x2e74830], 0
inc esi
cmp esi, 0x3e79e
jl 0x40a530
mov esi, dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edi, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ebp, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov dword [esp + 0x10], 0xdd9a7
jmp 0x40a580
cmp dword [0x2e913d4], 0xc01
jne 0x40a5a4
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 0x40a580
call fcn.00408ee0
cmp dword [0x2e913d4], 0x1144
pop edi
pop esi
pop ebp
pop ebx
jne 0x40a673
push 0x401464
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
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_ReleaseActCtx]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [esp + 0xc]
push eax
push 0
lea ecx, [esp + 0x118]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoA]
push 0
push 0
push 0x401474
call dword [sym.imp.KERNEL32.dll_FindFirstChangeNotificationW]
lea edx, [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push 0
lea eax, [esp + 0xd14]
push eax
push 0x401488
call dword [sym.imp.KERNEL32.dll_GetProfileSectionW]
push 0
call dword [sym.imp.KERNEL32.dll_GlobalWire]
push 0
push 0
push 0
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
xor eax, eax
add esp, 0x1510
ret