Function at 0x140001f00
Capabilities:
Create process on windows
Get common file path
Print debug messages

Disassembly:
mov r11, rsp
push rbp
lea rbp, [r11 - 0x6d8]
sub rsp, 0x7d0
mov rax, qword [0x14004e038]
xor rax, rsp
mov qword [rbp + 0x6b0], rax
mov rax, qword [rcx + 0x2b0]
mov qword [r11 + 0x10], rbx
mov rbx, rcx
mov qword [rbp + 0xa0], rax
mov rax, qword [rcx + 0x280]
mov byte [rcx + 0x2c0], 0
xor ecx, ecx
mov qword [rbp + 0xa8], rax
mov qword [r11 + 0x18], rsi
call qword [sym.imp.ole32.dll_CoInitialize]
lea r8, [rbx + 0x364]
mov rcx, rbx
lea rdx, str.samsfpa.dat
call fcn.1400030d0
test al, al
jne 0x140001f7d
mov dword [rbx + 0x364], 0xff
movzx eax, byte [rbx + 0x2c0]
test al, al
jne 0x140002469
mov qword [rsp + 0x7c8], r14
xor r14d, r14d
mov qword [rsp + 0x7c0], r15
mov r15d, 1
mov qword [rsp + 0x7f8], rdi
nop dword [rax]
cmp byte [0x140050d6a], r14b
jne 0x140002451
xor r8d, r8d
lea rdx, [rbp + 0xa0]
mov r9d, 0xffffffff
lea ecx, [r8 + 2]
call qword [sym.imp.api_ms_win_core_synch_l1_2_1.dll_WaitForMultipleObjects]
cmp eax, 0x102
cmove eax, r15d
test eax, eax
je 0x14000241c
cmp eax, r15d
jne 0x140002442
lea rcx, [rbx + 0x308]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
cmp qword [rbx + 0x2a0], r14
je 0x14000240d
mov edx, 0x100
lea rcx, [rbp + 0xb0]
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetSystemDirectoryW]
mov rax, qword [rbx + 0x2a0]
mov ecx, dword [rax + 0x14]
test ecx, ecx
jne 0x1400023d8
mov ecx, dword [rbx + 0x378]
bt ecx, 8
jae 0x140002055
lea rcx, str.Signal_FMAPOCTL_event_0_r_n
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
mov rax, qword [rbx + 0x2a0]
mov ecx, dword [rbx + 0x378]
cmp byte [rax], r14b
jne 0x140002195
cmp byte [rax + 1], r14b
jne 0x140002195
cmp byte [rax + 2], r14b
jne 0x140002195
cmp byte [rax + 3], r14b
jne 0x140002195
cmp byte [rax + 4], r14b
jne 0x140002195
lea r9, [rbp + 0xb0]
mov edx, 0x200
lea r8, str._s_fmapp.exe__STOP
lea rcx, [rbp + 0xb0]
call fcn.140001140
test byte [rbx + 0x378], 8
je 0x1400020bb
lea rcx, str.Stop_FMAPP_r_n
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
xor edx, edx
lea rcx, [rbp + 0x34]
lea r8d, [rdx + 0x64]
call fcn.140011520
xor eax, eax
mov dword [rbp + 0x30], 0x68
mov qword [rsp + 0x78], rax
lea rdx, [rbp + 0xb0]
mov qword [rbp - 0x80], rax
xor r9d, r9d
mov qword [rbp - 0x78], rax
xor r8d, r8d
lea rax, [rsp + 0x78]
xor ecx, ecx
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x30]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_CreateProcessW]
test eax, eax
je 0x140002169
mov rcx, qword [rsp + 0x78]
mov edx, 0xffffffff
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rax, qword [rbx + 0x2a0]
lea rcx, [rbx + 0x308]
mov byte [rax + 0x10], r14b
mov byte [rbx + 0x350], r14b
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
jmp 0x140002442
test byte [rbx + 0x378], r15b
je 0x14000240d
lea rcx, str.Stop_FMAPP_Fail_r_n
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
lea rcx, [rbx + 0x308]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
jmp 0x140002442
cmp byte [rbx + 0x350], r14b
je 0x1400021c2
test cl, 8
je 0x1400021b0
lea rcx, str.FMAPP_running_r_n
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
lea rcx, [rbx + 0x308]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
jmp 0x140002442
lea r9, [rbp + 0xb0]
mov edx, 0x200
lea r8, str._s_fmapp.exe
lea rcx, [rbp + 0xb0]
call fcn.140001140
test byte [rbx + 0x378], 8
je 0x1400021f7
lea rcx, str.Run_FMAPP_r_n
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
xor edx, edx
lea rcx, [rbp - 0x3c]
lea r8d, [rdx + 0x64]
call fcn.140011520
xor eax, eax
mov dword [rbp - 0x40], 0x68
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
call qword [sym.imp.api_ms_win_core_kernel32_legacy_l1_1_0.dll_WTSGetActiveConsoleSessionId]
mov ecx, eax
lea rdx, [rsp + 0x60]
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
mov rcx, qword [rsp + 0x60]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x28], rax
mov r9d, r15d
xor r8d, r8d
mov dword [rsp + 0x20], r15d
mov edx, 0x2000000
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_DuplicateTokenEx]
test eax, eax
je 0x14000240d
mov rcx, qword [rsp + 0x60]
lea rax, [rbp - 0x68]
mov r9d, 8
mov qword [rsp + 0x68], r14
lea r8, [rsp + 0x68]
mov dword [rbp - 0x68], 8
mov qword [rsp + 0x20], rax
lea edx, [r9 + 0xb]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetTokenInformation]
test eax, eax
je 0x140002340
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], r15d
mov edx, 0x2000000
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_DuplicateTokenEx]
test eax, eax
je 0x1400023bf
mov rcx, qword [rsp + 0x70]
lea rax, [rbp - 0x60]
mov qword [rsp + 0x50], rax
lea r8, [rbp + 0xb0]
lea rax, [rbp - 0x40]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor edx, edx
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_CreateProcessAsUserW]
test eax, eax
je 0x140002319
mov rax, qword [rbx + 0x2a0]
mov byte [rbx + 0x350], r15b
mov byte [rax + 0x10], r15b
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
lea rcx, [rbx + 0x308]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
jmp 0x140002442
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
lea r8, str.GetTokenInformation_fail:__d_r_n
mov edx, 0x400
mov r9d, eax
lea rcx, [rbp + 0x2b0]
call fcn.140001140
lea rcx, [rbp + 0x2b0]
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
lea rax, [rbp - 0x60]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rdx, [rbp + 0xb0]
lea rax, [rbp - 0x40]
xor r8d, r8d
mov qword [rsp + 0x40], rax
xor ecx, ecx
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_CreateProcessW]
test eax, eax
je 0x1400023bf
mov rax, qword [rbx + 0x2a0]
mov byte [rbx + 0x350], r15b
mov byte [rax + 0x10], r15b
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
lea rcx, [rbx + 0x308]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
jmp 0x140002442
cmp ecx, r15d
jne 0x14000240d
mov byte [rax + 0x18], r14b
mov rax, qword [rbx + 0x2a0]
mov byte [rax + 0x19], r14b
mov rax, qword [rbx + 0x2a0]
mov byte [rax + 0x1a], r14b
mov rax, qword [rbx + 0x2a0]
mov byte [rax + 0x1b], r14b
mov rax, qword [rbx + 0x2a0]
mov byte [rax + 0x1c], r14b
lea rcx, [rbx + 0x308]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
jmp 0x140002442
test dword [rbx + 0x364], 0x8000
jne 0x140002430
mov rcx, rbx
call fcn.140003570
mov rcx, qword [rbx + 0x290]
test rcx, rcx
je 0x140002442
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
movzx eax, byte [rbx + 0x2c0]
test al, al
je 0x140001fb0
mov rdi, qword [rsp + 0x7f8]
mov r14, qword [rsp + 0x7c8]
mov r15, qword [rsp + 0x7c0]
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoUninitialize]
test byte [rbx + 0x378], 4
mov rbx, qword [rsp + 0x7e8]
mov rsi, qword [rsp + 0x7f0]
je 0x140002495
lea rcx, str.Out_Start_r_n
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
mov rcx, qword [rbp + 0x6b0]
xor rcx, rsp
call fcn.14000c610
add rsp, 0x7d0
pop rbp
ret