Function at 0x140003970
Capabilities:
Acquire debug privileges
Check for time delay via gettickcount
Get common file path
Query environment variable
Read file via mapping

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x130
mov edx, 2
mov rdi, rcx
lea rcx, str.SeDebugPrivilege
lea r8d, [rdx + 2]
call fcn.140018d60
mov eax, dword [rsp + 0x1c0]
mov r14d, 0x80
mov ecx, eax
mov r13d, eax
mov edx, eax
and ecx, 8
mov ebx, eax
mov ebp, eax
mov dword [rsp + 0x64], ecx
mov ecx, eax
and edx, 0x20
and ecx, 0x18
and ebp, 0x100
xor esi, esi
mov dword [rsp + 0xa8], ecx
mov ecx, eax
and eax, 0x200
and ecx, 0x40
mov dword [rsp + 0x1c0], eax
mov rax, qword [rsp + 0x1b0]
and r13d, 4
and ebx, r14d
mov dword [rsp + 0xcc], edx
mov dword [rsp + 0x74], ecx
mov dword [rsp + 0x70], ebp
lea r8d, [r14 - 0x7f]
cmp rax, rsi
je 0x140003a20
bt dword [rax + 0x3c], 0x1b
cmovb r13d, r8d
cmp edx, esi
cmovne r13d, esi
cmp rax, rsi
je 0x140003a3a
test byte [rax + 0x3c], r8b
je 0x140003a3a
mov ecx, r8d
cmp word [rax + 0x40], si
je 0x140003a3c
mov ecx, esi
cmp rax, rsi
je 0x140003a4f
test byte [rax + 0x3c], r8b
je 0x140003a4f
cmp word [rax + 0x40], si
cmove r13d, r8d
cmp ecx, esi
lea rdx, [0x1400e9748]
lea rax, [0x1400e94a4]
cmovne rax, rdx
lea rcx, [rsp + 0x68]
mov qword [rsp + 0xa0], rax
call fcn.140055fcc
cmp rdi, rsi
je 0x140003aa9
lea rdx, [0x1400e9730]
lea rcx, [rsp + 0x68]
call fcn.140060284
lea rcx, [rsp + 0x68]
mov rdx, rdi
call fcn.140056108
lea rdx, [0x1400e972c]
lea rcx, [rsp + 0x68]
call fcn.140056108
cmp ebx, esi
je 0x140003ab8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov r15, rax
jmp 0x140003abb
mov r15, rsi
mov qword [rsp + 0xb0], r15
mov r12, r15
cmp r15, rsi
je 0x140003aeb
cmp word [r15], si
je 0x140003ae7
add r12, 2
cmp word [r12], si
jne 0x140003ad1
add r12, 2
cmp word [r12], si
jne 0x140003ad1
add r12, 2
lea rcx, [rsp + 0x40]
sub r12, r15
call fcn.140055fcc
or rax, 0xffffffffffffffff
lea rdx, str._nfb__incmd_PECMD_EXEC__InstallService
lea rcx, [rsp + 0x40]
mov r9, rax
mov r8, rax
call fcn.140056188
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x40]
mov edx, 0xa000
mov dword [rsp + 0x7c], eax
call fcn.1400560cc
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rcx, [rsp + 0x58]
mov dword [rsp + 0xb8], eax
call fcn.140055fcc
mov byte [rsp + 0x48], sil
mov dword [rsp + 0xe8], esi
call qword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
lea rcx, [rsp + 0x109]
lea r8d, [rdx + 0x27]
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0x80], rsi
mov dword [rsp + 0xc8], eax
mov rdi, rsi
mov ebx, esi
mov byte [rsp + 0x108], sil
call fcn.1400cc8d0
lea rax, [rsp + 0x108]
lea rcx, [rsp + 0xf8]
mov qword [rsp + 0xf8], rax
mov dword [rsp + 0xf0], 0x18
mov dword [rsp + 0x100], esi
call fcn.140051bbc
movsxd rbp, ebp
mov qword [rsp + 0x50], rbp
jmp 0x140003bce
mov ebx, dword [rsp + 0x4c]
inc ebx
mov dword [rsp + 0x4c], ebx
test bl, 1
je 0x140003c16
movsxd rax, dword [rsp + 0x7c]
mov rcx, qword [rsp + 0x40]
lea rdx, str.PECMD2012.EXESVC
lea rbp, [rax + rax]
mov dword [rsp + 0x60], 1
add rcx, rbp
mov qword [rsp + 0xd8], rbp
call qword [sym.imp.USER32.dll_wsprintfW]
mov ebx, 0x100000
mov qword [rsp + 0xe0], rbx
jmp 0x140003c74
mov rbx, qword [rsp + 0x40]
lea rax, [r12 + 0x210]
mov dword [rsp + 0x60], esi
mov qword [rsp + 0xe0], rax
movsxd rax, dword [rsp + 0x7c]
lea rbp, [rax + rax]
mov qword [rsp + 0xd8], rbp
add rbx, rbp
call fcn.1400512e8
mov r9d, dword [rsp + 0xb8]
lea r8, str.EXEC.SYS
lea rdx, str.__PECMD._s._u._I64u
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.USER32.dll_wsprintfW]
lea rbx, [r12 + 0x210]
cmp qword [rsp + 0x50], rsi
jne 0x140003c89
mov byte [rsp + 0x1b0], sil
cmp dword [rsp + 0x60], esi
je 0x140003c91
mov byte [rsp + 0x1b0], 1
or rax, 0xffffffffffffffff
lea rdx, str.Globalpecmd2012.shm.
lea rcx, [rsp + 0x58]
mov r9, rax
mov r8, rax
call fcn.140056188
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x58]
add rdx, rbp
mov dword [rsp + 0xd0], eax
call fcn.140056108
add ebx, 0x88
mov dword [rsp + 0x78], ebx
mov r8, qword [rsp + 0x58]
xor edx, edx
lea ecx, [rdx + 6]
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov rbp, rax
mov qword [rsp + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp rbp, rsi
jne 0x140003d4f
cmp qword [rsp + 0x50], rsi
jne 0x140003d5d
movsxd rcx, dword [rsp + 0x60]
cmp rcx, rsi
je 0x140003d5d
mov rbp, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rsp + 0xc8]
cmp eax, 0x7530
jae 0x1400043f3
xor r9d, r9d
lea rcx, [0x140106ec0]
xor r8d, r8d
lea edx, [r9 + 5]
call fcn.14001bbe8
cmp rbp, rsi
je 0x140003bca
jmp 0x140003cda
cmp byte [rsp + 0x1b0], sil
je 0x140003f24
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [rsp + 0x1b0], sil
je 0x140003e74
mov rax, qword [rsp + 0x88]
cmp rax, rsi
jne 0x140003df6
lea rdx, str.Globalpecmd2012.lock.
lea rcx, [rsp + 0x98]
or r8, 0xffffffffffffffff
call fcn.1400601ac
mov r11, qword [rsp + 0x40]
mov rdx, qword [rsp + 0xd8]
lea rcx, [rsp + 0x98]
add rdx, r11
call fcn.140056108
mov r8, qword [rsp + 0x98]
lea rcx, [rsp + 0xf0]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
lea rcx, [rsp + 0x98]
mov qword [rsp + 0x88], rax
call fcn.14004ea6c
mov rax, qword [rsp + 0x88]
cmp rax, rsi
je 0x140003d11
cmp qword [rsp + 0x80], rsi
jne 0x140003e74
lea rdx, str.Globalpecmd2012.event.
lea rcx, [rsp + 0x90]
or r8, 0xffffffffffffffff
call fcn.1400601ac
mov r11, qword [rsp + 0x40]
mov rdx, qword [rsp + 0xd8]
lea rcx, [rsp + 0x90]
add rdx, r11
call fcn.140056108
mov r9, qword [rsp + 0x90]
lea rcx, [rsp + 0xf0]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
lea rcx, [rsp + 0x90]
mov qword [rsp + 0x80], rax
cmp rax, rsi
jne 0x140003e6f
call fcn.14004ea6c
jmp 0x140003d11
call fcn.14004ea6c
cmp rbp, rsi
jne 0x140003ef7
mov rax, qword [rsp + 0x58]
xor r9d, r9d
lea rdx, [rsp + 0xf0]
mov qword [rsp + 0x28], rax
lea r8d, [r9 + 4]
or rcx, 0xffffffffffffffff
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rbp, rax
mov qword [rsp + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp rbp, rsi
jne 0x140003ee9
mov rbp, qword [rsp + 0x50]
cmp rbp, rsi
je 0x140003ece
cmp eax, 5
je 0x140004406
jmp 0x140003d16
xor r9d, r9d
lea rcx, [0x140106ec0]
xor r8d, r8d
lea edx, [r9 + 5]
call fcn.14001bbe8
jmp 0x140003bca
cmp qword [rsp + 0x50], rsi
jne 0x140003ef7
cmp eax, 0xb7
je 0x140003f24
xor r9d, r9d
movsxd rax, ebx
xor r8d, r8d
lea edx, [r9 + 6]
mov rcx, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbp, rax
cmp rax, rsi
jne 0x140003f32
mov rcx, qword [rsp + 0xc0]
jmp 0x140003f27
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140003bca
mov r8, r14
xor edx, edx
mov rcx, rax
call fcn.1400cc8d0
cmp byte [rsp + 0x1b0], sil
je 0x140003fe6
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsp + 0x178]
mov ebx, eax
add ebx, ebx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r15d, [rax + rax + 2]
lea eax, [r15 + rbx]
movsxd r14, eax
mov rax, qword [rsp + 0xe0]
cmp r14, rax
cmovg r14, rax
cmp dword [rsp + 0x64], esi
je 0x140003f99
cmp dword [rsp + 0x70], esi
jne 0x140003f99
or qword [rbp + 0x28], 1
mov rdx, qword [rsp + 0xa0]
movsxd rbx, ebx
lea rcx, [rbp + 0x80]
lea r8, [rbx + 2]
call fcn.14001a4c0
mov rdx, qword [rsp + 0x178]
lea rcx, [rbx + rbp + 0x80]
movsxd r8, r15d
call fcn.14001a4c0
mov r15, qword [rsp + 0xb0]
mov ebx, dword [rsp + 0x78]
mov dword [rbp + 0x18], r14d
mov word [r14 + rbp + 0x7e], si
sub r14, 0xffffffffffffff80
cmp dword [rsp + 0x1c0], esi
je 0x140004064
lea rcx, [rsp + 0x50]
mov edx, 0x20a
call fcn.140056040
mov rax, qword [rsp + 0x50]
mov ecx, 0x208
mov word [rax], si
mov rdx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov rcx, qword [rsp + 0x50]
sub ebx, r14d
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
movsxd rax, ebx
lea rdi, [rcx + rcx + 2]
cmp rdi, rax
cmovg rdi, rax
cmp rdi, rsi
jle 0x14000405a
mov rdx, qword [rsp + 0x50]
lea rbx, [r14 + rbp]
mov r8, rdi
mov rcx, rbx
call fcn.14001a4c0
mov dword [rbp + 0x1c], edi
mov word [rbx + rdi - 2], si
add r14, rdi
lea rcx, [rsp + 0x50]
call fcn.14004ea6c
mov ebx, dword [rsp + 0x78]
mov eax, ebx
sub eax, r14d
movsxd rcx, eax
cmp r12, rcx
cmovg r12, rcx
cmp r15, rsi
je 0x14000409d
cmp r12, 4
jbe 0x14000409d
lea rcx, [r14 + rbp]
mov r8, r12
mov rdx, r15
call fcn.14001a4c0
add r14, r12
mov dword [r14 + rbp - 4], esi
mov dword [rbp + 0x20], r12d
mov r12, qword [rsp + 0x170]
cmp r12, rsi
je 0x1400040e1
mov rcx, r12
sub ebx, r14d
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [rax + rax + 2]
cmp edi, ebx
cmovg edi, ebx
cmp edi, esi
jle 0x1400040e1
movsxd rbx, edi
lea rcx, [r14 + rbp]
mov rdx, r12
mov r8, rbx
call fcn.14001a4c0
lea rax, [rbx + r14]
mov dword [rbp + 0x24], edi
mov word [rax + rbp - 2], si
mov qword [rbp], 0xffffffffffffffff
cmp byte [rsp + 0x1b0], sil
je 0x140004109
mov rax, qword [rsp + 0x80]
cmp rax, rsi
je 0x140004109
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd r15, dword [rsp + 0xd0]
mov edi, dword [rsp + 0x70]
mov ebx, dword [rsp + 0x60]
movsxd r11, eax
mov rax, qword [rsp + 0x58]
lea rdx, [rax + r15*2]
lea r8, [0x1400e94a4]
lea rax, [0x1400e9640]
mov r9, r8
cmp edi, esi
cmovne r9, rax
lea rax, [0x1400e9630]
cmp ebx, esi
cmovne r8, rax
mov rax, qword [rsp + 0x40]
lea rcx, [rax + r11*2]
mov rax, qword [rsp + 0x178]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
lea rdx, str.___desk__s__s___ack:_s__s_s__s
call qword [sym.imp.USER32.dll_wsprintfW]
mov rdx, qword [rsp + 0x40]
lea r12, [0x140106ec0]
mov qword [rsp + 0x30], rsi
lea r9, [rsp + 0x4c]
mov r8, r12
mov rcx, r12
mov qword [rsp + 0x28], rsi
mov word [rsp + 0x4c], si
mov dword [rsp + 0x20], esi
call fcn.14000c478
mov byte [rsp + 0x48], 1
mov qword [rsp + 0xe8], rax
cmp ebx, esi
jne 0x1400041dc
cmp edi, esi
jne 0x1400041dc
mov r14d, esi
jmp 0x14000420a
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
lea rdx, str._wait__s
lea r8, [rax + r15*2]
mov r14d, 1
call qword [sym.imp.USER32.dll_wsprintfW]
mov rdx, qword [rsp + 0x40]
mov rcx, r12
call fcn.14001c060
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
jmp 0x140004239
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x7530
jae 0x140004243
xor r9d, r9d
lea rcx, [0x140106ec0]
xor r8d, r8d
lea edx, [r9 + 1]
call fcn.14001bbe8
mov r12, qword [rbp]
cmp r12, 0xffffffffffffffff
je 0x140004214
mov rcx, qword [rsp + 0xb0]
cmp rcx, rsi
je 0x140004256
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rdi, qword [rbp + 0x10]
mov rbp, qword [rbp + 8]
cmp rdi, rsi
jle 0x140004309
mov r8d, edi
xor edx, edx
mov ecx, 0x100400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp rbx, rsi
jne 0x140004298
mov r8d, edi
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [rsp + 0x64], esi
je 0x1400042b7
mov rax, qword [rsp + 0x1b8]
cmp rax, rsi
je 0x1400042b7
mov dword [rax + 0x10], edi
mov qword [rax], rbx
mov eax, dword [rsp + 0x74]
cmp eax, esi
jne 0x1400042cd
cmp r13d, esi
je 0x1400042cd
cmp dword [rsp + 0xcc], esi
je 0x1400042e3
mov edx, 0x1388
mov rcx, rbx
call qword [sym.imp.USER32.dll_WaitForInputIdle]
mov eax, dword [rsp + 0x74]
cmp eax, esi
jne 0x1400042e8
cmp r13d, esi
jne 0x140004309
or eax, dword [rsp + 0xa8]
mov rcx, rdi
neg eax
sbb rdx, rdx
and edx, 0x1220
add rdx, 0x168
call fcn.14000388c
mov ebx, dword [rsp + 0x64]
lea r13, [0x1400e95c8]
cmp ebx, esi
jne 0x14000433f
cmp rdi, rsi
jle 0x14000433f
mov rcx, qword [rsp + 0x40]
mov r8d, edi
mov rdx, r13
call qword [sym.imp.USER32.dll_wsprintfW]
mov rdx, qword [rsp + 0x40]
lea rcx, [0x140106ec0]
call fcn.140035780
cmp r14d, esi
jne 0x14000436b
cmp r12d, esi
jle 0x14000436b
mov rcx, qword [rsp + 0x40]
mov r8d, ebp
mov rdx, r13
call qword [sym.imp.USER32.dll_wsprintfW]
mov rdx, qword [rsp + 0x40]
lea rcx, [0x140106ec0]
call fcn.14001fb38
cmp ebx, esi
jne 0x140004396
cmp rdi, rsi
jle 0x140004396
mov rcx, qword [rsp + 0x40]
mov r8d, edi
mov rdx, r13
call qword [sym.imp.USER32.dll_wsprintfW]
mov rdx, qword [rsp + 0x40]
lea rcx, [0x140106ec0]
call fcn.14001fb38
cmp r14d, esi
jne 0x1400043f3
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
lea rdx, str._wait___s
lea r8, [rax + r15*2]
call qword [sym.imp.USER32.dll_wsprintfW]
mov rdx, qword [rsp + 0x40]
lea rcx, [0x140106ec0]
call fcn.14001c060
mov r11, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
lea r8, [r11 + r15*2]
lea rdx, str._delete__s
call qword [sym.imp.USER32.dll_wsprintfW]
mov rdx, qword [rsp + 0x40]
lea rcx, [0x140106ec0]
call fcn.14001c060
mov rcx, qword [rsp + 0xc0]
cmp rcx, rsi
je 0x140004406
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x80]
cmp rax, rsi
je 0x14000441c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x88]
cmp rbx, rsi
je 0x14000443b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rdi, rsi
jg 0x140004454
cmp byte [rsp + 0x48], sil
je 0x140004454
mov ecx, dword [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, [rsp + 0x58]
call fcn.14004ea6c
lea rcx, [rsp + 0x40]
call fcn.14004ea6c
lea rcx, [rsp + 0x68]
call fcn.14004ea6c
mov rbx, qword [rsp + 0x180]
cmp rdi, rsi
setg sil
mov eax, esi
add rsp, 0x130
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret