Function at 0x40a410
Capabilities:
Create thread
Terminate thread

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4175c0
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.004090a0
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40a656
push eax
lea ecx, [esp + 0x14]
call fcn.00415abc
lea eax, [esp + 0x10]
mov dword [esp + 0x24], 0
push eax
call fcn.00414330
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
push edx
call fcn.00415840
add esp, 0xc
lea ebx, [ebp + 0x358]
push eax
mov ecx, ebx
mov byte [esp + 0x28], 1
mov dword [esp + 0x30], ebx
call sub.MFC42.DLL_CString::operator_2
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], 0
call sub.MFC42.DLL_CString::CString
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
test esi, esi
mov dword [ebp + 0x354], eax
je 0x40a4d3
mov ebx, dword [esp + 0x3c]
push ebx
call sub.MFC42.DLL_operatornew
mov ecx, ebx
mov edi, eax
mov edx, ecx
mov dword [ebp + 0x374], eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 0x378], ebx
mov ebx, dword [esp + 0x2c]
lea eax, [esp + 0x18]
push eax
push 0
push ebp
push 0x40a670
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
mov eax, dword [esp + 0x34]
cmp eax, 0xffffffff
jne 0x40a51c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edi, [ebp + 0x3b4]
push edi
push esi
mov dword [edi], 0
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x40a577
xor esi, esi
jmp 0x40a622
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push eax
push esi
call edi
cmp eax, 0x102
jne 0x40a4fd
push 1
push esi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push 0x7d0
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebp
call fcn.0040a980
mov ecx, ebp
call fcn.00409040
mov ecx, ebx
call sub.MFC42.DLL_CString::Empty
or eax, 0xffffffff
lea ecx, [esp + 0x10]
mov dword [ebp + 0x3b4], eax
mov dword [esp + 0x24], eax
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x40a656
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [edi], 0
je 0x40a58a
xor esi, esi
jmp 0x40a622
mov esi, dword [esp + 0x44]
mov ecx, dword [ebp + 0x390]
mov ebx, dword [esp + 0x50]
mov dword [esi], ecx
mov edx, dword [ebp + 0x394]
mov dword [ebx], edx
mov eax, dword [esi]
inc eax
push eax
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x44]
mov edi, eax
xor eax, eax
mov dword [ecx], edi
mov ecx, dword [esi]
inc ecx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x44]
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi]
mov ecx, dword [ebp + 0x35c]
mov esi, dword [sym.imp.MSVCRT.dll_memmove]
push eax
mov eax, dword [edx]
push ecx
push eax
call esi
mov ecx, dword [ebx]
inc ecx
push ecx
call sub.MFC42.DLL_operatornew
mov edx, dword [esp + 0x60]
mov edi, eax
xor eax, eax
mov dword [edx], edi
mov ecx, dword [ebx]
inc ecx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x60]
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx]
mov ecx, dword [ebp + 0x360]
push eax
mov eax, dword [edx]
push ecx
push eax
call esi
mov ebx, dword [esp + 0x4c]
add esp, 0x20
mov esi, 1
mov ecx, ebp
call fcn.00409040
mov ecx, ebp
call fcn.0040a980
mov edx, dword [esp + 0x48]
mov ecx, dword [ebp + 0x398]
mov dword [edx], ecx
mov ecx, ebx
call sub.MFC42.DLL_CString::Empty
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, esi
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret 0x28