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

Disassembly:
sub esp, 0xd14
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCPInfoExW]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
mov dword [esp + 0x10], 0
lea ebx, [ebx]
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [0x4e86a4], 0x16
jne 0x40b009
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetCalendarInfoW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteProfileSectionA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x4e86a4], 0x9e
jne 0x40b080
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
lea eax, [esp + 0x528]
push eax
call edi
lea ecx, [esp + 0x124]
push ecx
push 0
push 0
call ebx
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], 0
call ebp
lea eax, [esp + 0x44]
push eax
call esi
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 + 0x88]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x10]
cmp eax, 0x3775ee
jg 0x40b09b
inc eax
cmp eax, 0x332beaf6
mov dword [esp + 0x10], eax
jl 0x40afd0
mov eax, dword [0x4e86a4]
mov ecx, dword [0x4cbb00]
push 0x432010
push eax
push ecx
call fcn.0040abe0
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFix]
xor esi, esi
lea ebx, [ebx]
cmp dword [0x4e86a4], 0x10
jne 0x40b0d0
lea edx, [esp + 0x24]
push edx
call edi
cmp esi, 0x1e673
jne 0x40b0dd
call fcn.0040aea0
inc esi
cmp esi, 0x3e79e
jl 0x40b0c0
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_GetNamedPipeHandleStateW]
mov dword [esp + 0x10], 0xdd9a7
jmp 0x40b110
cmp dword [0x4e86a4], 0xc01
jne 0x40b150
push 0
push 0
call esi
call edi
push 0
push 0
push 0
push 0
call ebx
push 0
lea eax, [esp + 0x528]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0
call ebp
sub dword [esp + 0x10], 1
jne 0x40b110
call fcn.00409ae0
cmp dword [0x4e86a4], 0x1144
pop edi
pop esi
pop ebp
pop ebx
jne 0x40b221
push 0x401488
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 edx, [esp + 8]
push edx
push 0
lea eax, [esp + 0x11c]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoA]
push 0
push 0
push 0x401498
call dword [sym.imp.KERNEL32.dll_FindFirstChangeNotificationW]
push 0
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push 0
lea edx, [esp + 0x518]
push edx
push 0x4014ac
call dword [sym.imp.KERNEL32.dll_GetProfileSectionW]
push 0
call dword [sym.imp.KERNEL32.dll_GlobalUnfix]
push 0
push 0
push 0
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
xor eax, eax
add esp, 0xd14
ret