Function at 0x401f40
Capabilities:
Create process on windows
Create process suspended
Create thread
Extract resource via kernel32 functions
Inject thread
Print debug messages
Resume thread
Set environment variable
Terminate process
Use process replacement

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x98
mov eax, dword [0x434014]
xor eax, esp
mov dword [esp + 0x94], eax
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.main:_Starting_classic.bin.
call edi
mov eax, dword [0x430814]
xorps xmm0, xmm0
movlpd qword [esp + 0x4c], xmm0
movlpd qword [esp + 0x54], xmm0
movlpd qword [esp + 0x5c], xmm0
movlpd qword [esp + 0x64], xmm0
movlpd qword [esp + 0x6c], xmm0
movlpd qword [esp + 0x74], xmm0
movlpd qword [esp + 0x7c], xmm0
movlpd qword [esp + 0x84], xmm0
movaps xmmword [esp + 0x20], xmm0
movq xmm0, qword [str.classic.bin]
push str.QH4Jn1Zc8NMIfRbHwWqJUDPNanMkX4HFdN8EOfWLdtCzfN2EXG
push str.ZKTUYS23V9JMGsjGXGdb
mov dword [esp + 0x50], 0x44
movq qword [esp + 0x98], xmm0
mov dword [esp + 0xa0], eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x402012
push str.ExtractEmbeddedCertificate:_GetModuleHandle_failed
call edi
push str.main:_Failed_to_extract_embedded_certificate.
jmp 0x4021a6
push 0xa
push 0x66
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x402034
push str.ExtractEmbeddedCertificate:_FindResource_failed
call edi
push str.main:_Failed_to_extract_embedded_certificate.
jmp 0x4021a6
push esi
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x402058
push str.ExtractEmbeddedCertificate:_LoadResource_failed
call edi
push str.main:_Failed_to_extract_embedded_certificate.
jmp 0x4021a6
push esi
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x40207e
push str.ExtractEmbeddedCertificate:_SizeofResource_returned_0
call edi
push str.main:_Failed_to_extract_embedded_certificate.
jmp 0x4021a6
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4020a1
push str.ExtractEmbeddedCertificate:_LockResource_failed
call edi
push str.main:_Failed_to_extract_embedded_certificate.
jmp 0x4021a6
mov eax, dword [esp + 0x40]
mov edx, eax
mov ecx, dword [esp + 0x3c]
sub edx, ecx
mov dword [esp + 0x14], eax
cmp esi, edx
jae 0x4020ba
lea eax, [ecx + esi]
jmp 0x4020f6
jbe 0x4020fa
mov eax, dword [esp + 0x44]
sub eax, ecx
cmp esi, eax
jbe 0x4020d7
push ecx
push esi
lea ecx, [esp + 0x44]
call fcn.004051d0
mov ecx, dword [esp + 0x3c]
jmp 0x4020fa
sub esi, edx
push esi
push 0
push dword [esp + 0x1c]
call fcn.00408d20
mov eax, dword [esp + 0x20]
add esp, 0xc
mov ecx, dword [esp + 0x3c]
add eax, esi
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x40], eax
push esi
push dword [esp + 0x1c]
push ecx
call fcn.004087a0
add esp, 0xc
push str.ExtractEmbeddedCertificate:_Certificate_extracted_successfully
call edi
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
sub ecx, eax
push ecx
push eax
push 0x10001
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateContext]
mov esi, eax
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x402137
push str.InstallCertificate:_CertCreateCertificateContext_failed
jmp 0x40219f
push str.ROOT
push 0x20000
push 0
push 0
push 0xa
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x402163
push esi
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
push str.InstallCertificate:_CertOpenStore_failed
jmp 0x40219f
push 0
push 4
push esi
push eax
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
push dword [esp + 0x1c]
mov esi, eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
push 0
push dword [esp + 0x1c]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
cmp esi, 1
jne 0x40219a
push str.InstallCertificate:_Certificate_installed_successfully
call edi
push str.main:_Certificate_installed_successfully.
jmp 0x4021a6
push str.InstallCertificate:_CertAddCertificateContextToStore_failed
call edi
push str.main:_Failed_to_install_certificate.
call edi
push str.main:_Attempting_to_start_classic.bin.
call edi
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
lea eax, [esp + 0xb0]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40220d
push str.main:_Failed_to_start_classic.bin.
call edi
mov edx, str.Failed_to_start_process:
call fcn.004044a0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.004023d0
push eax
call fcn.00404770
add esp, 4
mov esi, 1
jmp 0x402372
push str.main:_Attempting_to_inject_patch.dll.
call edi
push dword [esp + 0x28]
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [esp + 0x14], esi
test esi, esi
jne 0x40225a
mov edx, str.OpenProcess_failed:
call fcn.004044a0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.004023d0
push eax
call fcn.00404770
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
jmp 0x4022d1
push 4
push 0x3000
push 0x14
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0
push 0x14
push str.patch.dll
push eax
push esi
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push 0
push dword [esp + 0x20]
push dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40230a
mov edx, str.CreateRemoteThread_failed:
call fcn.004044a0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.004023d0
push eax
call fcn.00404770
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push dword [esp + 0x14]
call esi
push str.main:_Failed_to_inject_DLL.
call edi
mov edx, str.Failed_to_inject_DLL.
call fcn.004044a0
push eax
call fcn.00404770
add esp, 4
push 1
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [esp + 0x20]
call esi
push dword [esp + 0x24]
call esi
mov esi, 1
jmp 0x402372
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xffffffffffffffff
push eax
call esi
push dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push 0x8000
push 0
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push dword [esp + 0x14]
call edi
push str.main:_Resuming_the_main_thread_of_classic.bin.
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0xffffffffffffffff
push dword [esp + 0x24]
call esi
push dword [esp + 0x20]
call edi
push dword [esp + 0x24]
call edi
push str.main:_StartGame.exe_finished.
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor esi, esi
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x4023a4
mov edx, dword [esp + 0x44]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40239a
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4023bc
push edx
push ecx
call fcn.004072eb
add esp, 8
mov ecx, dword [esp + 0x9c]
mov eax, esi
pop edi
pop esi
xor ecx, esp
call fcn.004072a3
mov esp, ebp
pop ebp
ret 0x10
call fcn.0040df86
int3