Function at 0x401f12
Capabilities:
Check if file exists
Create process on windows
Get common file path
Read file via mapping

Disassembly:
push ebp
lea ebp, [esp - 0x12c8]
mov eax, 0x1348
call fcn.00405cf0
mov eax, dword [0x41a0d0]
xor eax, ebp
mov dword [ebp + 0x12c4], eax
push ebx
xor eax, eax
push 0x40e
mov word [ebp + 0xa64], ax
xor ebx, ebx
lea eax, [ebp + 0xa66]
push ebx
push eax
call fcn.00405b00
xor eax, eax
push 0x206
mov word [ebp + 0x10bc], ax
lea eax, [ebp + 0x10be]
push ebx
push eax
call fcn.00405b00
push str.LaunchASKernel_begin_to_check_API
mov dword [ebp - 0x2c], ebx
call fcn.00404898
add esp, 0x1c
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, ebx
jne 0x401f90
xor eax, eax
jmp 0x402457
push str.WTSGetActiveConsoleSessionId
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x401fa5
call eax
mov dword [ebp - 0x2c], eax
push esi
push 0x1000
push ebx
push ebx
push 4
push dword [0x41b184]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
jne 0x401fce
push str.MapViewOfFile:_FAILED
call fcn.00404898
pop ecx
jmp 0x401fd6
cmp dword [esi], 0x218
jae 0x401fdd
xor eax, eax
jmp 0x402456
mov eax, dword [esi + 4]
push edi
mov edi, 0x104
cmp eax, edi
ja 0x402453
cmp word [esi + eax*2 + 8], bx
jne 0x402453
lea ebx, [esi + 0x214]
push dword [ebx]
lea eax, [ebp + 0x107c]
push 0x414fd8
push 0x20
push eax
call fcn.00401ebb
mov ebx, dword [ebx]
add esp, 0x10
test ebx, ebx
je 0x402028
lea eax, [ebp - 0x2c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
lea eax, [esi + 8]
push eax
push edi
lea eax, [ebp + 0x654]
push eax
call fcn.00401e4f
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
lea eax, [ebp + 0xe74]
push eax
lea eax, [ebp + 0x654]
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push 0x414fd4
push edi
lea eax, [ebp + 0xe74]
push eax
call fcn.00401e81
lea eax, [ebp + 0xe74]
push eax
push edi
lea eax, [ebp + 0x10bc]
push eax
call fcn.00401e4f
push dword [0x41b184]
push str.call_LaunchSCKernel:__x
call fcn.00404898
pop ecx
pop ecx
call fcn.00401b9f
test eax, eax
je 0x4022df
push str.atasctrl.dll
push edi
lea eax, [ebp + 0xe74]
push eax
call fcn.00401e81
lea eax, [ebp + 0xe74]
push eax
push str.Is_Terminal_Services:_YES__s_
call fcn.00404898
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
pop ecx
pop ecx
lea eax, [ebp + 0xe74]
push eax
call esi
test eax, eax
jne 0x402109
lea eax, [ebp + 0x10bc]
push eax
push edi
lea eax, [ebp + 0xe74]
push eax
call fcn.00401e4f
push str.atasctrl_lite.dll
push edi
lea eax, [ebp + 0xe74]
push eax
call fcn.00401e81
lea eax, [ebp + 0xe74]
push eax
call esi
test eax, eax
je 0x402453
lea eax, [ebp + 0xe74]
push eax
call fcn.004015eb
pop ecx
test eax, eax
je 0x402453
lea eax, [ebp + 0xe74]
push eax
push str.sharing_dll:__s
call fcn.00404898
pop ecx
pop ecx
push str.atasnt40.dll
push edi
lea eax, [ebp + 0x10bc]
push eax
call fcn.00401e81
lea eax, [ebp + 0x10bc]
push eax
call esi
test eax, eax
je 0x402453
lea eax, [ebp + 0x10bc]
push eax
call fcn.004015eb
pop ecx
test eax, eax
je 0x402453
xor eax, eax
push 0x67a
push eax
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x26]
push eax
call fcn.00405b00
add esp, 0xc
push edi
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x28]
push eax
push edi
lea eax, [ebp + 0x85c]
push eax
call fcn.00401e4f
push str._atsckernel.exe
push edi
lea eax, [ebp + 0x85c]
push eax
call fcn.00401e81
lea eax, [ebp + 0x85c]
push eax
call fcn.004015eb
pop ecx
test eax, eax
je 0x402453
push 0x414eb0
mov edi, 0x33e
push edi
lea eax, [ebp - 0x28]
push eax
call fcn.00401e81
lea eax, [ebp + 0xe74]
push eax
mov esi, 0x208
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
push 0x414eac
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
push str.StartHostLauncher
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
push 0x414e68
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
mov ebx, 0x414e64
push ebx
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
lea eax, [ebp + 0x10bc]
push eax
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
push ebx
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
mov ebx, 0x414e60
push ebx
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
push str._pid:
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
lea eax, [ebp + 0x107c]
push eax
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
push ebx
push edi
lea eax, [ebp - 0x28]
push eax
call fcn.00401e81
lea eax, [ebp + 0xa64]
push eax
push edi
lea eax, [ebp - 0x28]
push eax
call fcn.00401e81
push str.atsckernel
push edi
lea eax, [ebp - 0x28]
push eax
call fcn.00401e81
lea eax, [ebp - 0x28]
push eax
push 0
lea eax, [ebp + 0x654]
push eax
push dword [ebp - 0x2c]
call fcn.00401c45
add esp, 0x10
mov esi, eax
jmp 0x40241c
push str.atasnt40.dll
push edi
lea eax, [ebp + 0x10bc]
push eax
call fcn.00401e81
lea eax, [ebp + 0x10bc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402453
lea eax, [ebp + 0x10bc]
push eax
call fcn.004015eb
pop ecx
test eax, eax
je 0x402453
push 0x414e68
mov esi, 0x208
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e4f
mov ebx, 0x414e64
push ebx
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
lea eax, [ebp + 0x10bc]
push eax
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
push ebx
push esi
lea eax, [ebp + 0xa64]
push eax
call fcn.00401e81
push 0x44
pop ebx
push ebx
xor esi, esi
lea eax, [ebp - 0x80]
push esi
push eax
call fcn.00405b00
add esp, 0xc
push 0xa
pop eax
mov word [ebp - 0x50], ax
push edi
lea eax, [ebp + 0x10bc]
push eax
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x78], str.winsta0default
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x414fd4
push edi
lea eax, [ebp + 0x10bc]
push eax
call fcn.00401e81
push 0x414e24
push edi
lea eax, [ebp + 0x10bc]
push eax
call fcn.00401e81
push str..EXE
push edi
lea eax, [ebp + 0x10bc]
push eax
call fcn.00401e81
lea eax, [ebp + 0xa64]
push eax
lea eax, [ebp + 0x10bc]
push eax
push str.2k_call_CreateProcess__s__s
call fcn.00404898
add esp, 0xc
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x80]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp + 0xa64]
push eax
lea eax, [ebp + 0x10bc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x402453
push dword [ebp - 0x38]
mov esi, dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x402453
push 0xea60
push esi
call dword [sym.imp.USER32.dll_WaitForInputIdle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp + 0xa64]
push eax
lea eax, [ebp + 0x10bc]
push eax
push str.LaunchASKernel__s__s
call fcn.00404898
xor eax, eax
add esp, 0xc
inc eax
jmp 0x402455
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp + 0x12c4]
xor ecx, ebp
pop ebx
call fcn.004058f9
add ebp, 0x12c8
leave
ret