Function at 0x140008140
Capabilities:
Create process on windows
Print debug messages

Disassembly:
mov r11, rsp
push rbp
lea rbp, [r11 - 0xd68]
sub rsp, 0xe60
mov rax, qword [0x14007d038]
xor rax, rsp
mov qword [rbp + 0xd30], rax
mov rax, qword [rcx + 0x590]
xor edx, edx
mov qword [r11 + 0x10], rbx
mov r8d, 0x100
mov qword [rbp + 0x120], rax
mov rbx, rcx
mov rax, qword [rcx + 0x568]
lea rcx, [rsp + 0x70]
mov qword [rbp + 0x128], rax
mov qword [r11 - 0x28], r15
call fcn.140028230
xor ecx, ecx
mov byte [rbx + 0x448], 0
call qword [sym.imp.ole32.dll_CoInitialize]
lea r8, [rbx + 0x644]
mov rcx, rbx
lea rdx, str.samsfpacx.dat
call fcn.14001b3e0
test al, al
jne 0x1400081e9
lea r8, [rbx + 0x644]
mov rcx, rbx
lea rdx, str.samsfpa.dat
call fcn.14001b3e0
test al, al
jne 0x1400081e9
mov dword [rbx + 0x644], 0xff
movzx eax, byte [rbx + 0x448]
test al, al
jne 0x140008855
mov qword [rsp + 0xe58], r12
xor r12d, r12d
mov qword [rsp + 0xe50], r13
mov r13d, 1
mov qword [rsp + 0xe80], rsi
mov qword [rsp + 0xe88], rdi
mov qword [rsp + 0xe48], r14
nop dword [rax]
cmp byte [0x14007ff2a], r12b
jne 0x14000882d
xor r8d, r8d
lea rdx, [rbp + 0x120]
mov r9d, 0xffffffff
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0x102
cmove eax, r13d
test eax, eax
je 0x140008751
cmp eax, r13d
jne 0x14000881e
lea rcx, [rbx + 0x5f0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp qword [rbx + 0x550], r12
je 0x140008738
lea r8, str.c:windows_system32
mov edx, 0x400
lea rcx, [rbp + 0x130]
call fcn.140002050
mov ecx, dword [rbx + 0x64c]
test cl, 8
je 0x1400082e0
lea r9, [rbp + 0x130]
mov edx, 0x400
lea r8, str.FMapp_loc_path:__s_n
lea rcx, [rbp + 0x530]
call fcn.140002050
lea rcx, [rbp + 0x530]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [rbx + 0x64c]
mov rax, qword [rbx + 0x550]
mov edx, dword [rax + 0x14]
test edx, edx
jne 0x140008703
test cl, 0x10
je 0x140008311
lea rcx, str.Signal_FMAPOCTL_event_1__APO_instance_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rax, qword [rbx + 0x550]
mov ecx, dword [rbx + 0x64c]
cmp byte [rax], r12b
jne 0x140008483
cmp byte [rax + 1], r12b
jne 0x140008483
cmp byte [rax + 2], r12b
jne 0x140008483
cmp byte [rax + 3], r12b
jne 0x140008483
cmp byte [rax + 4], r12b
jne 0x140008483
lea r9, [rbp + 0x130]
mov edx, 0x200
lea r8, str._s_fmapp.exe__STOP
lea rcx, [rbp + 0x130]
call fcn.140002050
test byte [rbx + 0x64c], 8
je 0x140008377
lea rcx, str.Stop_FMAPP_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edx, edx
lea rcx, [rbp + 0xb4]
lea r8d, [rdx + 0x64]
call fcn.140028230
xor eax, eax
mov dword [rbp + 0xb0], 0x68
mov qword [rbp + 0x90], rax
lea rdx, [rbp + 0x130]
mov qword [rbp + 0x98], rax
xor r9d, r9d
mov qword [rbp + 0xa0], rax
xor r8d, r8d
lea rax, [rbp + 0x90]
xor ecx, ecx
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x14000845f
mov rcx, qword [rbp + 0x90]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbp + 0x90]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x98]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbx + 0x550]
mov byte [rax + 0x10], r12b
mov rcx, qword [rbx + 0x6b8]
mov byte [rbx + 0x640], r12b
test rcx, rcx
je 0x14000843f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x6c0]
test rcx, rcx
je 0x140008475
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r12d
mov dword [0x140080434], eax
jmp 0x140008738
test byte [rbx + 0x64c], r13b
je 0x140008475
lea rcx, str.Stop_FMAPP_Fail_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, r12d
mov dword [0x140080434], eax
jmp 0x140008738
mov qword [rbp + 0x70], r12
mov qword [rbp + 0x88], r12
mov qword [rbp + 0x78], r12
cmp byte [rbx + 0x640], r12b
je 0x1400084bf
test cl, 8
je 0x1400084ad
lea rcx, str.FMAPP_running_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rcx, [rbx + 0x5f0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14000881e
lea r9, [rbp + 0x130]
mov edx, 0x400
lea r8, str._s_fmapp.exe
lea rcx, [rbp + 0x130]
call fcn.140002050
test byte [rbx + 0x64c], 8
je 0x140008513
lea r9, [rbp + 0x130]
mov edx, 0x400
lea r8, str.Run_FMAPP:__s:_n
lea rcx, [rbp + 0x530]
call fcn.140002050
lea rcx, [rbp + 0x530]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edx, edx
lea rcx, [rbx + 0x654]
lea rsi, [rbx + 0x650]
lea r8d, [rdx + 0x64]
call fcn.140028230
xor eax, eax
mov dword [rsi], 0x68
lea rdi, [rbx + 0x6b8]
mov qword [rdi], rax
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], rax
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov ecx, eax
lea rdx, [rbp + 0x70]
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
mov rcx, qword [rbp + 0x70]
lea rax, [rbp + 0x88]
mov qword [rsp + 0x28], rax
mov r9d, r13d
xor r8d, r8d
mov dword [rsp + 0x20], r13d
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x1400086f8
mov rcx, qword [rbp + 0x70]
lea rax, [rbp + 0xa8]
mov r9d, 8
mov qword [rbp + 0x80], r12
lea r8, [rbp + 0x80]
mov dword [rbp + 0xa8], 8
mov qword [rsp + 0x20], rax
lea edx, [r9 + 0xb]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x14000866f
mov rcx, qword [rbp + 0x80]
lea rax, [rbp + 0x78]
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], r13d
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14000864c
mov rcx, qword [rbp + 0x78]
lea r8, [rbp + 0x130]
mov qword [rsp + 0x50], rdi
xor r9d, r9d
mov qword [rsp + 0x48], rsi
xor edx, edx
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x140008642
mov rax, qword [rbx + 0x550]
mov byte [rbx + 0x640], r13b
mov byte [rax + 0x10], r13b
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x80]
test rcx, rcx
je 0x14000865e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x70]
test rcx, rcx
je 0x1400086e6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400086e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.GetTokenInformation_fail:__d_r_n
mov edx, 0x400
mov r9d, eax
lea rcx, [rbp + 0x930]
call fcn.140002050
lea rcx, [rbp + 0x930]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov qword [rsp + 0x48], rdi
lea rdx, [rbp + 0x130]
mov qword [rsp + 0x40], rsi
xor r9d, r9d
mov qword [rsp + 0x38], r12
xor r8d, r8d
mov qword [rsp + 0x30], r12
xor ecx, ecx
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1400086e6
mov rax, qword [rbx + 0x550]
mov byte [rbx + 0x640], r13b
mov byte [rax + 0x10], r13b
mov rcx, qword [rbp + 0x88]
test rcx, rcx
je 0x1400086f8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r13d
mov dword [0x140080434], eax
jmp 0x140008738
cmp edx, r13d
jne 0x140008738
mov byte [rax + 0x18], r12b
mov rax, qword [rbx + 0x550]
mov byte [rax + 0x19], r12b
mov rax, qword [rbx + 0x550]
mov byte [rax + 0x1a], r12b
mov rax, qword [rbx + 0x550]
mov byte [rax + 0x1b], r12b
mov rax, qword [rbx + 0x550]
mov byte [rax + 0x1c], r12b
lea rcx, [rbx + 0x5f0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbx + 0x5a8]
jmp 0x140008813
test byte [rbx + 0x64c], 0x10
je 0x140008767
lea rcx, str.event_0__OnDefaultDeviceChanged_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp byte [rbx + 0x2a0], r12b
je 0x1400087f8
cmp dword [rbx + 0x280], r12d
je 0x1400087f8
xor r9d, r9d
mov dword [rsp + 0x60], r12d
lea r8, [rsp + 0x60]
mov dword [rsp + 0x64], r12d
lea rdx, [0x140080540]
mov rcx, rbx
call fcn.14001ac30
test al, al
je 0x1400087e2
mov edi, dword [rsp + 0x60]
lea r8, [rsp + 0x64]
xor r9d, r9d
lea rdx, [0x140080440]
mov rcx, rbx
and edi, 0x10
call fcn.14001ac30
test al, al
je 0x1400087e2
mov r8d, dword [rsp + 0x64]
lea rdx, [0x140080440]
and r8d, 0xffffffef
xor r9d, r9d
or r8d, edi
mov rcx, rbx
call fcn.14001ab50
xor r9d, r9d
lea rdx, [0x140080440]
mov rcx, rbx
lea r8d, [r9 + 3]
call fcn.14001a5b0
test dword [rbx + 0x644], 0x8000
jne 0x14000880c
mov rcx, rbx
call fcn.140009610
mov rcx, qword [rbx + 0x578]
test rcx, rcx
je 0x14000881e
call qword [sym.imp.KERNEL32.dll_SetEvent]
movzx eax, byte [rbx + 0x448]
test al, al
je 0x140008230
mov rsi, qword [rsp + 0xe80]
mov rdi, qword [rsp + 0xe88]
mov r14, qword [rsp + 0xe48]
mov r12, qword [rsp + 0xe58]
mov r13, qword [rsp + 0xe50]
call qword [sym.imp.ole32.dll_CoUninitialize]
test byte [rbx + 0x64c], 4
mov rbx, qword [rsp + 0xe78]
mov r15, qword [rsp + 0xe40]
je 0x140008881
lea rcx, str.Out_Start_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [rbp + 0xd30]
xor rcx, rsp
call fcn.140024cf0
add rsp, 0xe60
pop rbp
ret