Function at 0x14002ba80
Capabilities:
Create process on windows
Read .ini file
Read file via mapping

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x310]
sub rsp, 0x410
mov rax, qword [0x14021b0e0]
xor rax, rsp
mov qword [rbp + 0x300], rax
lea rcx, [rbp - 0x50]
call fcn.140022180
lea r9, [rbp - 0x50]
xor r8d, r8d
lea rdx, str.rdpmode
lea rcx, str.admin
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov edi, eax
mov dword [rsp + 0x34], eax
xor edx, edx
xor ecx, ecx
call fcn.14002b870
mov r13d, Ordinal_102
mov qword [0x14021f510], 0
mov byte [0x14021f2af], 0
xor bl, bl
mov byte [rsp + 0x30], bl
xor r14d, r14d
mov qword [rsp + 0x60], r14
lea r8, str.GlobalSessionEventUltra
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenEventA]
mov qword [0x14021f2d0], rax
test rax, rax
je 0x14002bb5a
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [0x14021f2d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x14021f2af], bl
je 0x14002bb11
lea r9, str.GlobalSessionEventUltra
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rsi, rax
mov qword [rsp + 0x70], rax
lea r9, str.GlobalSessionEventUltraCad
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov r15, rax
mov qword [rsp + 0x50], rax
lea r9, str.GlobalSessionEventUltraPreConnect
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsp + 0x68], rax
lea r9, str.GlobalEndSessionEvent
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [0x14021f528], rax
lea rax, str.GlobalSessionUltraPreConnect
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor edx, edx
lea rcx, [rdx - 1]
lea r8d, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov r12, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x14002bc1a
mov qword [rsp + 0x20], r14
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 6]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r14, rax
mov qword [rsp + 0x60], rax
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x14021f528]
mov qword [rbp + 0xc0], rcx
mov qword [rbp + 0xc8], r15
mov rax, qword [rsp + 0x68]
mov qword [rbp + 0xd0], rax
mov qword [rsp + 0x78], rcx
mov qword [rbp - 0x80], r15
cmp byte [0x14021f2af], bl
jne 0x14002c241
mov r15d, 1
cmp dword [0x14021f3e4], 4
jne 0x14002c237
mov r9d, 0x3e8
xor r8d, r8d
test edi, edi
je 0x14002bc88
lea rdx, [rbp + 0xc0]
lea ecx, [r8 + 3]
jmp 0x14002bc92
lea rdx, [rsp + 0x78]
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x14002c230
sub eax, 1
je 0x14002c114
sub eax, 1
je 0x14002c033
cmp eax, 0x100
jne 0x14002c21d
test edi, edi
je 0x14002bf68
call fcn.14002b6c0
test al, al
je 0x14002bf68
cmp qword [0x14021f510], 0
jne 0x14002bd49
call fcn.14002b6c0
test al, al
je 0x14002bcff
xor r8d, r8d
mov dl, 1
xor ecx, ecx
call fcn.14002c330
xor r13d, r13d
xor bl, bl
mov byte [rsp + 0x30], bl
jmp 0x14002c21d
xor ebx, ebx
mov r13d, 0xffffffff
cmp byte [0x14021f2af], 0
jne 0x14002bd31
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov r13d, eax
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0xa
jg 0x14002bd31
cmp r13d, 0xffffffff
je 0x14002bd07
xor r8d, r8d
xor edx, edx
mov ecx, r13d
call fcn.14002c330
xor bl, bl
mov byte [rsp + 0x30], bl
jmp 0x14002c21d
cmp bl, 1
jne 0x14002bec0
xor ebx, ebx
mov edi, ebx
mov qword [rbp - 0x78], rbx
lea rcx, str.wtsapi32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov r15, rax
mov qword [rbp - 0x70], rax
test rax, rax
je 0x14002bd8a
lea rdx, [0x1401f3cd0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
mov qword [rbp - 0x78], rax
mov r12, rbx
mov qword [rbp - 0x68], rbx
lea rcx, str.wtsapi32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov r14, rax
mov qword [rbp - 0x60], rax
test rax, rax
je 0x14002bdc1
lea rdx, [0x1401f3cf8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r12, rax
mov qword [rbp - 0x68], rax
test rdi, rdi
je 0x14002be8f
test r12, r12
je 0x14002be8f
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0x38], ebx
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call rdi
test eax, eax
je 0x14002be6b
xor esi, esi
mov r8, qword [rsp + 0x48]
cmp dword [rsp + 0x38], esi
jbe 0x14002be60
test ebx, ebx
jne 0x14002be60
lea rcx, [rsi + rsi*2]
lea rdi, [rcx*8]
lea rdx, str.Console
mov rcx, qword [rdi + r8 + 8]
call fcn.14015acf8
mov r8, qword [rsp + 0x48]
test eax, eax
jne 0x14002be3b
cmp dword [rdi + r8], r13d
jne 0x14002be58
lea ebx, [rax + 1]
jmp 0x14002be58
cmp dword [rdi + r8], r13d
jne 0x14002be58
mov eax, dword [rdi + r8 + 0x10]
test eax, 0xfffffffc
jne 0x14002be58
cmp eax, 1
mov eax, 1
cmovne ebx, eax
inc esi
cmp esi, dword [rsp + 0x38]
jb 0x14002be06
mov rcx, r8
call r12
mov rsi, qword [rsp + 0x70]
test r14, r14
je 0x14002be7a
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test r15, r15
je 0x14002be89
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test ebx, ebx
je 0x14002bead
jmp 0x14002beb6
test r14, r14
je 0x14002be9e
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test r15, r15
je 0x14002bead
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov r15d, 1
mov edi, dword [rsp + 0x34]
mov dword [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
mov rcx, qword [0x14021f510]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x14002bf3e
mov rcx, qword [0x14021f510]
test rcx, rcx
je 0x14002bef0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14021f518]
test rcx, rcx
je 0x14002bf02
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
movdqu xmmword [0x14021f510], xmm0
lea r9, [rbp - 0x50]
xor r8d, r8d
lea rdx, str.rdpmode
lea rcx, str.admin
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov edi, eax
mov dword [rsp + 0x34], eax
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14002c218
cmp dword [rsp + 0x40], 0x103
je 0x14002c218
mov rcx, qword [0x14021f510]
test rcx, rcx
je 0x14002bef0
mov edx, 0x3a98
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x14002bede
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov ebx, eax
cmp r13d, eax
je 0x14002bf7e
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
cmp ebx, 0xffffffff
je 0x14002c218
mov dword [rsp + 0x44], 0
mov rcx, qword [0x14021f510]
test rcx, rcx
jne 0x14002bfaf
xor r8d, r8d
xor edx, edx
mov ecx, ebx
call fcn.14002c330
mov r13d, ebx
jmp 0x14002c218
lea rdx, [rsp + 0x44]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x14002bfde
cmp dword [rsp + 0x44], 0x103
je 0x14002c218
mov edx, 0x3a98
mov rcx, qword [0x14021f510]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x14021f510]
test rcx, rcx
je 0x14002bff0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14021f518]
test rcx, rcx
je 0x14002c002
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
movdqu xmmword [0x14021f510], xmm0
lea r9, [rbp - 0x50]
xor r8d, r8d
lea rdx, str.rdpmode
lea rcx, str.admin
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov edi, eax
mov dword [rsp + 0x34], eax
jmp 0x14002c218
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov r13d, dword [r14]
mov dword [rsp + 0x3c], 0x103
nop word [rax + rax]
mov rcx, qword [0x14021f510]
test rcx, rcx
je 0x14002c0c7
cmp byte [0x14021f2af], 0
jne 0x14002c0c7
lea rdx, [rsp + 0x3c]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [rsp + 0x3c], 0x103
je 0x14002c0b2
mov edx, 0x3a98
mov rcx, qword [0x14021f510]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x14021f510]
test rcx, rcx
je 0x14002c09e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14021f518]
test rcx, rcx
je 0x14002c0bd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14002c0bd
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [rsp + 0x3c], 0x103
je 0x14002c050
xor ebx, ebx
nop dword [rax]
cmp byte [0x14021f2af], 0
jne 0x14002c0f8
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov edi, eax
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0xa
jg 0x14002c0f8
cmp edi, 0xffffffff
je 0x14002c0d0
mov r8b, 1
xor edx, edx
mov ecx, r13d
call fcn.14002c330
mov bl, 1
mov byte [rsp + 0x30], bl
mov edi, dword [rsp + 0x34]
jmp 0x14002c21d
lea rcx, str.sas.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
lea rdx, str.SendSAS
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14002c142
xor ecx, ecx
call rax
jmp 0x14002c20a
mov r8d, 0x104
lea rdx, [rbp + 0x1f0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x14002c178
mov edx, 0x5c
lea rcx, [rbp + 0x1f0]
call fcn.140149b38
test rax, rax
je 0x14002c2f4
mov byte [rax], 0
lea r8, [0x1401e9c5c]
mov edx, 0x104
lea rcx, [rbp + 0xe0]
call fcn.140150800
lea r8, [rbp + 0x1f0]
mov edx, 0x104
lea rcx, [rbp + 0xe0]
call fcn.140150860
lea r8, [0x1401ef4f8]
mov edx, 0x104
lea rcx, [rbp + 0xe0]
call fcn.140150860
lea r8, str.cad.exe
mov edx, 0x104
lea rcx, [rbp + 0xe0]
call fcn.140150860
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rcx, rax
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], 0
lea r9, [0x1401e9c5c]
lea r8, [rbp + 0xe0]
lea rdx, str.open
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
test rbx, rbx
je 0x14002c218
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
movzx ebx, byte [rsp + 0x30]
cmp byte [0x14021f2af], 0
jne 0x14002c237
mov r14, qword [rsp + 0x60]
jmp 0x14002bc61
mov byte [0x14021f2af], 1
mov r15, qword [rsp + 0x50]
mov r12, qword [rsp + 0x58]
test rsi, rsi
je 0x14002c24f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [0x14021f510]
test rcx, rcx
je 0x14002c295
mov edx, 0x3a98
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x14021f510]
test rcx, rcx
je 0x14002c278
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14021f518]
test rcx, rcx
je 0x14002c28a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
movdqu xmmword [0x14021f510], xmm0
test rsi, rsi
je 0x14002c2a3
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r15, r15
je 0x14002c2b1
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x14002c2c4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14021f528]
test rcx, rcx
je 0x14002c2d6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x14002c2e6
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test r12, r12
je 0x14002c2f4
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x300]
xor rcx, rsp
call fcn.140147af0
lea r11, [rsp + 0x410]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret