joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18000c3e0
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0xb0]
sub rsp, 0x1b0
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rsp + 0x1e0], rbx
mov rax, qword [0x1801003f0]
xor rax, rsp
mov qword [rbp + 0xa0], rax
mov rsi, rdx
mov rbx, rcx
test rcx, rcx
je 0x18000c5d2
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x18000c5d2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x18000c5d2
test al, 0x10
je 0x18000c5d2
mov rdx, rbx
lea rcx, [rsp + 0x20]
call fcn.180020a90
nop
mov dl, 0x5c
lea rcx, [rsp + 0x20]
call fcn.18001e540
mov dword [rsp + 0x60], 0
xor edx, edx
mov r8d, 0x13c
lea rcx, [rsp + 0x64]
call fcn.1800369b0
lea r8, [0x1800c3f4c]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x48]
call fcn.180020e20
lea rdx, [rsp + 0x60]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdi, rax
lea rcx, [rsp + 0x48]
call fcn.18001d340
cmp rdi, 0xffffffffffffffff
je 0x18000c5c1
lea rdx, [0x1800c42cc]
lea rcx, [rbp - 0x74]
call qword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x18000c5a1
lea rdx, [0x1800c42c8]
lea rcx, [rbp - 0x74]
call qword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x18000c5a1
lea rdx, [rbp - 0x74]
lea rcx, [rsp + 0x28]
call fcn.180020a90
nop
lea r8, [0x1800c38f0]
lea rdx, [rsp + 0x20]
test byte [rsp + 0x60], 0x10
je 0x18000c554
lea rcx, [rsp + 0x30]
call fcn.180020e20
nop
lea r8, [rsp + 0x28]
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.180020dc0
nop
mov rdx, rsi
mov rcx, qword [rax]
call fcn.18000c3e0
nop
lea rcx, [rsp + 0x50]
call fcn.18001d340
nop
lea rcx, [rsp + 0x30]
jmp 0x18000c591
lea rcx, [rsp + 0x40]
call fcn.180020e20
nop
lea r8, [rsp + 0x28]
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.180020dc0
nop
mov r8, rax
mov edx, dword [rsi + 8]
mov rcx, rsi
call fcn.180022630
nop
lea rcx, [rsp + 0x38]
call fcn.18001d340
nop
lea rcx, [rsp + 0x40]
call fcn.18001d340
nop
lea rcx, [rsp + 0x28]
call fcn.18001d340
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x18000c4c4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
nop
lea rcx, [rsp + 0x20]
call fcn.18001d340
mov eax, 1
jmp 0x18000c5d4
xor eax, eax
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.180036980
mov rbx, qword [rsp + 0x1e0]
add rsp, 0x1b0
pop rdi
pop rsi
pop rbp
ret
Function at 0x18000c600
Capabilities:
Get graphical window text

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x20
movsxd rsi, r8d
mov rdi, rdx
mov rbp, rcx
call fcn.18002c390
test eax, eax
je 0x18000c631
mov r8d, esi
mov rdx, rdi
mov rcx, rbp
add rsp, 0x20
pop rdi
pop rsi
pop rbp
jmp qword [sym.imp.USER32.dll_GetWindowTextW]
mov qword [rsp + 0x40], rbx
xor ebx, ebx
test rdi, rdi
je 0x18000c6bc
test esi, esi
je 0x18000c6bc
lea r8, [rsi + rsi]
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r13
call fcn.1800369b0
mov rcx, rsi
call fcn.18003783c
mov r12, rax
test rax, rax
je 0x18000c6b2
mov r8, rsi
xor edx, edx
mov rcx, rax
call fcn.1800369b0
mov r8d, esi
mov rdx, r12
mov rcx, rbp
call qword [sym.imp.USER32.dll_GetWindowTextA]
mov ebx, eax
test eax, eax
je 0x18000c6b2
mov r9d, esi
mov r8, rdi
or edx, 0xffffffff
mov rcx, r12
xor ebx, ebx
call fcn.180010320
test eax, eax
je 0x18000c6b2
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasw ax, word [rdi]
not rcx
lea rbx, [rcx - 1]
mov r12, qword [rsp + 0x48]
mov r13, qword [rsp + 0x50]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret

Function at 0x18000c740
Capabilities:
Read file on windows

Disassembly:
push rbx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
mov rax, qword [0x1801003f0]
xor rax, rsp
mov qword [rsp + 0x60], rax
xor r15d, r15d
mov qword [rsp + 0xc8], rbp
mov r14, r8
mov r12, rdx
mov r13, rcx
mov edi, 0x200
mov dword [rsp + 0x40], r15d
mov ebx, r15d
mov qword [rsp + 0x70], rsi
cmp ebx, 1
jne 0x18000c790
mov edi, 0x400
jmp 0x18000c7f8
cmp ebx, 2
jne 0x18000c7f8
xor eax, eax
mov qword [rsp + 0x38], r15
xor r9d, r9d
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x48]
xor r8d, r8d
mov edx, 0x70000
mov rcx, r13
mov dword [rsp + 0x28], 0x18
mov qword [rsp + 0x48], r15
mov dword [rsp + 0x44], r15d
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x18000c896
mov edi, dword [rsp + 0x5c]
cmp edi, 0x200
jb 0x18000c896
mov ecx, edi
mov ebp, edi
call fcn.18003783c
mov rsi, rax
test rax, rax
je 0x18000c818
mov r8d, ebp
xor edx, edx
mov rcx, rax
call fcn.1800369b0
jmp 0x18000c81b
mov rsi, r15
mov r8, rbp
xor edx, edx
mov rcx, rsi
mov qword [r12], rsi
call fcn.1800369b0
mov rdx, qword [r12]
lea r9, [rsp + 0x40]
mov r8d, edi
mov rcx, r13
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
test eax, eax
jne 0x18000c864
mov rcx, qword [r12]
call fcn.180038270
inc ebx
mov qword [r12], r15
cmp ebx, 3
jl 0x18000c784
mov eax, dword [rsp + 0x40]
mov dword [r14], eax
mov eax, esi
mov rsi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.180036980
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret
xor eax, eax
jmp 0x18000c86d
Function at 0x18000d9a0
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x1a0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x1d8], rbx
mov rax, qword [0x1801003f0]
xor rax, rsp
mov qword [rsp + 0x190], rax
mov esi, r8d
mov rbx, rdx
mov rbp, rcx
test rcx, rcx
je 0x18000db67
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbp
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x18000db67
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x18000db67
test al, 0x10
je 0x18000db67
mov rdx, rbp
lea rcx, [rsp + 0x20]
call fcn.180020a90
nop
mov dl, 0x5c
lea rcx, [rsp + 0x20]
call fcn.18001e540
mov dword [rsp + 0x50], 0
xor edx, edx
mov r8d, 0x13c
lea rcx, [rsp + 0x54]
call fcn.1800369b0
lea r8, [0x1800c3f4c]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.180020e20
lea rdx, [rsp + 0x50]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdi, rax
lea rcx, [rsp + 0x40]
call fcn.18001d340
cmp rdi, 0xffffffffffffffff
je 0x18000db56
lea rdx, [0x1800c42cc]
lea rcx, [rsp + 0x7c]
call qword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x18000db2b
lea rdx, [0x1800c42c8]
lea rcx, [rsp + 0x7c]
call qword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x18000db2b
lea rdx, [rsp + 0x7c]
lea rcx, [rsp + 0x28]
call fcn.180020a90
nop
test byte [rsp + 0x50], 0x10
je 0x18000db17
lea r8, [0x1800c38f0]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x38]
call fcn.180020e20
nop
lea r8, [rsp + 0x28]
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.180020dc0
nop
mov r8d, esi
mov rdx, rbx
mov rcx, qword [rax]
call fcn.18000d9a0
nop
lea rcx, [rsp + 0x30]
call fcn.18001d340
nop
lea rcx, [rsp + 0x38]
call fcn.18001d340
jmp 0x18000db19
inc dword [rbx]
test esi, esi
je 0x18000db21
cmp esi, dword [rbx]
jbe 0x18000db42
lea rcx, [rsp + 0x28]
call fcn.18001d340
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x18000db4c
jmp 0x18000da80
lea rcx, [rsp + 0x28]
call fcn.18001d340
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
nop
lea rcx, [rsp + 0x20]
call fcn.18001d340
mov eax, 1
jmp 0x18000db69
xor eax, eax
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.180036980
mov rbx, qword [rsp + 0x1d8]
add rsp, 0x1a0
pop rdi
pop rsi
pop rbp
ret
Function at 0x18000dbd0
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
sub rsp, 0x20
mov rbx, rdx
mov rsi, rcx
test rcx, rcx
je 0x18000dc92
test rdx, rdx
je 0x18000dc92
mov rax, qword [0x180116a48]
mov qword [rsp + 0x30], rbp
mov ebp, dword [rdx]
test rax, rax
jne 0x18000dc3c
lea rcx, str.Kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
je 0x18000dc30
lea rdx, str.GetComputerNameExW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180116a48], rax
jmp 0x18000dc37
mov rax, qword [0x180116a48]
test rax, rax
je 0x18000dc6e
mov r8, rbx
mov rdx, rsi
mov ecx, 5
call rax
mov r11d, eax
test eax, eax
je 0x18000dc6e
mov qword [rsp + 0x38], rdi
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rsi
repne scasw ax, word [rdi]
mov rdi, qword [rsp + 0x38]
not rcx
dec rcx
jne 0x18000dc7f
mov rdx, rbx
mov rcx, rsi
mov dword [rbx], ebp
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
mov r11d, eax
mov eax, r11d
mov rbp, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop rsi
ret
xor eax, eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop rsi
ret

Function at 0x18000e830
Capabilities:
Check for time delay via gettickcount
Check if file exists
Copy file
Get file attributes
Move file
Set file attributes

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
sub rsp, 0x230
mov rax, qword [0x1801003f0]
xor rax, rsp
mov qword [rsp + 0x220], rax
mov rsi, rcx
mov rcx, rdx
mov ebp, r8d
mov rdi, rdx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp eax, 0xffffffff
je 0x18000e91d
test al, 1
je 0x18000e880
and ebx, 0xfffffffe
mov rcx, rdi
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test bl, 0x10
je 0x18000e91d
lea rcx, [rsp + 0x21]
xor edx, edx
mov r8d, 0x1ff
mov byte [rsp + 0x20], 0
call fcn.1800369b0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea rdx, str._s.bak_08X
lea rcx, [rsp + 0x20]
mov r9d, eax
mov r8, rdi
call fcn.18003756c
lea rcx, [rsp + 0x20]
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x18000e90f
nop
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea rdx, str._s.bak_08X
lea rcx, [rsp + 0x20]
mov r9d, eax
mov r8, rdi
call fcn.18003756c
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
inc ebx
cmp ebx, 0xa
jge 0x18000e95b
cmp eax, 0xffffffff
jne 0x18000e8d0
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_MoveFileA]
mov r8d, ebp
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CopyFileA]
mov rcx, rdi
mov ebx, eax
call fcn.18000d740
mov eax, ebx
mov rcx, qword [rsp + 0x220]
xor rcx, rsp
call fcn.180036980
mov rbx, qword [rsp + 0x268]
add rsp, 0x230
pop rdi
pop rsi
pop rbp
ret
xor eax, eax
jmp 0x18000e938
Function at 0x18000ec40
Capabilities:
Get user security identifier

Disassembly:
push rbx
push rsi
push rdi
push r12
sub rsp, 0x48
mov qword [rsp + 0x40], r13
xor r13d, r13d
mov rsi, rdx
mov r12, rcx
mov ebx, r13d
mov edi, r13d
mov qword [rdx], r13
test rcx, rcx
jne 0x18000ec6e
lea edi, [rcx + 1]
jmp 0x18000ed89
lea rax, [rsp + 0x80]
mov rdx, rcx
lea r9, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x70]
xor r8d, r8d
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov dword [rsp + 0x78], r13d
mov qword [rsp + 0x20], r13
mov dword [rsp + 0x70], r13d
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x18000ecc0
cmp eax, 0x7a
je 0x18000ecc0
lea edi, [rbx + 2]
jmp 0x18000ed79
mov ecx, dword [rsp + 0x78]
mov qword [rsp + 0x88], rbp
call fcn.18003783c
mov ecx, dword [rsp + 0x70]
mov qword [rsi], rax
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.18003783c
mov rcx, qword [rsi]
mov rbp, rax
test rcx, rcx
je 0x18000ed5b
test rax, rax
je 0x18000ed5b
mov r8d, dword [rsp + 0x78]
xor edx, edx
call fcn.1800369b0
mov r8d, dword [rsp + 0x70]
xor edx, edx
add r8, r8
mov rcx, rbp
call fcn.1800369b0
mov r8, qword [rsi]
lea r11, [rsp + 0x80]
mov qword [rsp + 0x30], r11
lea rax, [rsp + 0x70]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov rdx, r12
xor ecx, ecx
mov qword [rsp + 0x20], rbp
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ebx, eax
test eax, eax
jne 0x18000ed60
lea edi, [rax + 4]
jmp 0x18000ed60
mov edi, 3
test rbp, rbp
je 0x18000ed6d
mov rcx, rbp
call fcn.180038270
mov rbp, qword [rsp + 0x88]
test ebx, ebx
jne 0x18000ed89
mov rcx, qword [rsi]
test rcx, rcx
je 0x18000ed89
call fcn.180038270
mov qword [rsi], r13
cmp dword [0x1801161a0], 0
mov r13, qword [rsp + 0x40]
je 0x18000edd9
mov rax, qword [rsi]
test r12, r12
lea rcx, str.NULL
mov qword [rsp + 0x38], rax
cmovne rcx, r12
lea r9, str.CKSecurity::GetSid_____ret:__d___myerror:__d___Name:__s___Sid:__08x_
mov qword [rsp + 0x30], rcx
lea r8, [0x1800c48d8]
lea rcx, [0x1801160e8]
mov edx, 0xf
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], ebx
call fcn.180011c50
mov eax, ebx
add rsp, 0x48
pop r12
pop rdi
pop rsi
pop rbx
ret
Function at 0x18000f660
Capabilities:
Compare security identifiers

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x70
mov rax, qword [0x1801003f0]
xor rax, rsp
mov qword [rsp + 0x68], rax
xor r14d, r14d
mov r13d, r8d
mov r12, rdx
mov rbp, rcx
mov esi, r14d
mov edi, r14d
mov ebx, r14d
test rcx, rcx
jne 0x18000f6a0
lea edi, [rcx + 1]
jmp 0x18000f75c
xor eax, eax
lea rdx, [rsp + 0x58]
mov dword [rsp + 0x58], r14d
mov qword [rsp + 0x5c], rax
lea r9d, [rax + 2]
lea r8d, [rax + 0xc]
mov qword [rsp + 0x5c], 8
call qword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x18000f6d4
lea edi, [rax + 2]
jmp 0x18000f75c
mov eax, dword [rsp + 0x58]
test eax, eax
je 0x18000f75c
lea r8, [rsp + 0x50]
mov edx, ebx
mov rcx, rbp
mov qword [rsp + 0x50], r14
call qword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x18000f757
mov rdx, qword [rsp + 0x50]
test byte [rdx + 1], 0x10
jne 0x18000f750
add rdx, 8
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x18000f71f
inc ebx
cmp ebx, dword [rsp + 0x58]
jb 0x18000f6e0
jmp 0x18000f75c
mov esi, 1
cmp r13d, 0x10000000
jne 0x18000f75c
mov rax, qword [rsp + 0x50]
cmp byte [rax], dil
jne 0x18000f746
mov eax, dword [rax + 4]
and eax, 0x1f0000
cmp eax, 0x1f0000
je 0x18000f75c
mov edi, 5
mov esi, r14d
jmp 0x18000f75c
mov edi, 4
jmp 0x18000f75c
mov edi, 3
cmp dword [0x1801161a0], r14d
je 0x18000f79f
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], rbp
lea r9, str.CKSecurity::IsInAcl_____Inner___ret:__d___myerror:__d___Acl:__08x___Sid:__08x___Mask:__08x___Index:__d_
lea r8, [0x1800c48d8]
lea rcx, [0x1801160e8]
mov edx, 0xf
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], esi
call fcn.180011c50
mov eax, esi
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.180036980
add rsp, 0x70
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x180010f90
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0x50
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rsi
mov rsi, rdx
mov rbx, rcx
lea rdx, [rcx + 8]
mov r8d, 1
lea rcx, [rsp + 0x38]
call fcn.1800267f0
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x18]
test eax, eax
je 0x18001101f
test rsi, rsi
je 0x18001101f
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
xor r11d, r11d
mov dword [rsp + 0x60], r11d
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx + rcx - 2]
mov qword [rsp + 0x20], r11
lea r9, [rsp + 0x60]
mov rdx, rsi
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop
lea rcx, [rsp + 0x38]
call fcn.180026870
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x180013130
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push rbx
push rbp
push r12
mov eax, 0x2870
call fcn.180039720
sub rsp, rax
mov rax, qword [0x1801003f0]
xor rax, rsp
mov qword [rsp + 0x2850], rax
mov rbx, r8
mov r12, rdx
mov rbp, rcx
test rcx, rcx
jne 0x180013169
xor eax, eax
jmp 0x180013290
mov qword [rsp + 0x28a8], rsi
mov qword [rsp + 0x2868], rdi
xor edi, edi
mov dword [r8], edi
mov qword [rsp + 0x30], rdi
lea r8d, [rdi + 3]
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x18001326d
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x2860], r13
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r13d, eax
test eax, eax
jne 0x1800131d0
mov dword [rbx], 2
jmp 0x180013235
lea rcx, [rsp + 0x51]
xor edx, edx
mov r8d, 0x27ff
mov byte [rsp + 0x50], dil
call fcn.1800369b0
mov r8d, 0x2800
cmp r13d, r8d
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x50]
mov rcx, rsi
cmovb r8d, r13d
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18001322f
lea rcx, [rsp + 0x50]
mov edx, 0x2800
call fcn.180012f10
test eax, eax
jne 0x180013235
mov dword [rbx], 3
jmp 0x180013235
mov dword [rbx], 5
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [rsp + 0x2860]
cmp dword [rbx], edi
jne 0x18001327e
test r12, r12
je 0x180013266
mov rdx, r12
mov rcx, rbp
call fcn.180012f70
test eax, eax
jne 0x180013266
mov dword [rbx], 4
jmp 0x18001327e
mov edi, 1
jmp 0x18001327e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x18001327e
mov dword [rbx], 1
mov rsi, qword [rsp + 0x28a8]
mov eax, edi
mov rdi, qword [rsp + 0x2868]
mov rcx, qword [rsp + 0x2850]
xor rcx, rsp
call fcn.180036980
add rsp, 0x2870
pop r12
pop rbp
pop rbx
ret
Function at 0x180013a70
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push rdi
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x40], rbx
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x180013aa0
movzx eax, al
shr eax, 4
and eax, 1
jmp 0x180013bd2
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.180020a90
nop
mov r8d, 1
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x48]
call fcn.1800210b0
lea rdx, [0x1800c38f0]
mov rcx, qword [rax]
call fcn.18003987c
test eax, eax
sete bl
lea rcx, [rsp + 0x50]
call fcn.18001d340
test bl, bl
je 0x180013b19
mov rax, qword [rsp + 0x48]
mov r8d, dword [rax - 8]
dec r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x48]
call fcn.180021140
nop
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.18001d450
nop
lea rcx, [rsp + 0x50]
call fcn.18001d340
mov dl, 0x5c
lea rcx, [rsp + 0x48]
call fcn.18001d880
cmp eax, 2
jge 0x180013b3b
lea rcx, [rsp + 0x48]
call fcn.18001d340
xor eax, eax
jmp 0x180013bd2
mov r8d, eax
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x48]
call fcn.180021140
nop
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.18001d450
nop
lea rcx, [rsp + 0x50]
call fcn.18001d340
mov rcx, qword [rsp + 0x48]
cmp dword [rcx - 8], 2
jg 0x180013b82
mov dl, 0x5c
lea rcx, [rsp + 0x48]
call fcn.18001d650
mov rcx, qword [rsp + 0x48]
call fcn.180013a70
test eax, eax
jne 0x180013b99
lea rcx, [rsp + 0x48]
call fcn.18001d340
xor eax, eax
jmp 0x180013bd2
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x180013bc3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x180013bc3
lea rcx, [rsp + 0x48]
call fcn.18001d340
xor eax, eax
jmp 0x180013bd2
lea rcx, [rsp + 0x48]
call fcn.18001d340
mov eax, 1
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x180018460
Capabilities:
Check mutex on windows

Disassembly:
sub rsp, 0x148
mov rax, qword [0x1801003f0]
xor rax, rsp
mov qword [rsp + 0x130], rax
lea rcx, [rsp + 0x21]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0x20], 0
call fcn.1800369b0
lea rdx, [rsp + 0x20]
lea rcx, str.TEC_OCULAR__AGENT_V3_MUTEX_AGENT
mov r8d, 0x104
call fcn.180008920
lea r8, [rsp + 0x20]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenMutexA]
test rax, rax
jne 0x1800184e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 5
sete cl
mov eax, ecx
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.180036980
add rsp, 0x148
ret
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.180036980
add rsp, 0x148
ret

Function at 0x180018510
Capabilities:
Check mutex on windows

Disassembly:
sub rsp, 0x148
mov rax, qword [0x1801003f0]
xor rax, rsp
mov qword [rsp + 0x130], rax
lea rcx, [rsp + 0x21]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0x20], 0
call fcn.1800369b0
lea rdx, [rsp + 0x20]
lea rcx, str.TEC_OCULAR__AGENT_V3_MUTEX_WINWDGSVR
mov r8d, 0x104
call fcn.180008920
lea r8, [rsp + 0x20]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenMutexA]
test rax, rax
jne 0x180018596
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 5
sete cl
mov eax, ecx
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.180036980
add rsp, 0x148
ret
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.180036980
add rsp, 0x148
ret
Function at 0x1800185c0
Capabilities:
Start service

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x20
cmp dword [0x1801161a0], 0
je 0x1800185f2
lea r9, str.CMonitorThread::StartService2_1
lea r8, str.WatchDog
lea rcx, [0x1801160e8]
mov edx, 0xf
call fcn.180011c50
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
xor ebx, ebx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rsi, rax
test rax, rax
je 0x1800186f6
cmp dword [0x1801161a0], ebx
mov qword [rsp + 0x30], rdi
je 0x18001863a
lea r9, str.CMonitorThread::StartService2_2
lea r8, str.WatchDog
lea edx, [rbx + 0xf]
lea rcx, [0x1801160e8]
call fcn.180011c50
lea rdx, str..Winhlpsvr
mov r8d, 0xf01ff
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
test rax, rax
je 0x1800186b7
cmp dword [0x1801161a0], ebx
je 0x18001867f
lea r9, str.CMonitorThread::StartService2_3
lea r8, str.WatchDog
lea rcx, [0x1801160e8]
mov edx, 0xf
call fcn.180011c50
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
cmp dword [0x1801161a0], 0
mov ebx, eax
je 0x1800186b7
lea r9, str.CMonitorThread::StartService2_4
lea r8, str.WatchDog
lea rcx, [0x1801160e8]
mov edx, 0xf
call fcn.180011c50
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [0x1801161a0], 0
mov rdi, qword [rsp + 0x30]
je 0x18001871e
lea r9, str.CMonitorThread::StartService2_5
lea r8, str.WatchDog
lea rcx, [0x1801160e8]
mov edx, 0xf
call fcn.180011c50
cmp dword [0x1801161a0], 0
je 0x18001871e
lea r9, str.CMonitorThread::StartService2_6
lea r8, str.WatchDog
lea rcx, [0x1801160e8]
mov edx, 0xf
call fcn.180011c50
mov eax, ebx
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rsi
ret