joyce8/EMBER2024-capa huggingface dataset:
Function at 0x7ff7c8e54f40
Capabilities:
Delete file
Extract resource via kernel32 functions
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
push rdi
push r14
sub rsp, 0x50
mov rax, qword [0x7ff7c8ea3088]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rsi, rdx
mov rbx, rcx
xor r14d, r14d
xor r9d, r9d
mov qword [rsp + 0x30], r14
xor r8d, r8d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, rsi
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x7ff7c8e54fa6
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea r8, [0x7ff7c8e98184]
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdi, rax
test rax, rax
je 0x7ff7c8e55062
mov rdx, rdi
mov qword [rsp + 0x80], rbp
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rdx, rdi
xor ecx, ecx
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rcx, rbx
mov ebp, eax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbx, rax
test rax, rax
je 0x7ff7c8e5502a
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x7ff7c8e5502e
xor al, al
jmp 0x7ff7c8e5505a
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], r14d
mov r8d, ebp
mov qword [rsp + 0x20], r14
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, bl
mov rbp, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.7ff7c8e589f0
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r14
pop rdi
pop rsi
ret
Function at 0x7ff7c8e55080
Capabilities:
Get common file path
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x250
mov rax, qword [0x7ff7c8ea3088]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rsi, r8
xor edx, edx
mov r8d, 0x104
movzx ebp, r9w
mov rbx, rcx
call fcn.7ff7c8e5c560
call fcn.7ff7c8e50880
lea rcx, [rsp + 0x30]
mov edx, 0x105
test al, al
je 0x7ff7c8e550d3
call qword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
jmp 0x7ff7c8e550d9
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test rsi, rsi
lea rdi, [0x7ff7c8e98188]
lea r9, [rsp + 0x30]
mov edx, 0x104
cmovne rdi, rsi
lea r8, str._sDrivers_s.sys
mov rcx, rbx
mov qword [rsp + 0x20], rdi
call fcn.7ff7c8e48140
movzx esi, bp
mov rdx, rbx
mov ecx, esi
call fcn.7ff7c8e54f40
test al, al
jne 0x7ff7c8e551b5
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x20a
call fcn.7ff7c8e5c560
mov r9, rdi
lea r8, str.__TEMP___s.sys
mov edx, 0x105
lea rcx, [rsp + 0x30]
call fcn.7ff7c8e48140
mov r8d, 0x104
lea rcx, [rsp + 0x30]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rdx, rbx
mov ecx, esi
call fcn.7ff7c8e54f40
test al, al
jne 0x7ff7c8e551b5
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x20a
call fcn.7ff7c8e5c560
lea rdx, [rsp + 0x30]
mov ecx, 0x105
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rdi
lea r8, str._s_s.sys
mov edx, 0x104
mov rcx, rbx
call fcn.7ff7c8e48140
mov rdx, rbx
mov ecx, esi
call fcn.7ff7c8e54f40
test al, al
je 0x7ff7c8e551b7
mov al, 1
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.7ff7c8e589f0
mov rbx, qword [rsp + 0x278]
add rsp, 0x250
pop rdi
pop rsi
pop rbp
ret
Function at 0x7ff7c8e55e70
Capabilities:
Create directory

Disassembly:
sub rsp, 0x28
mov rax, qword [0x7ff7c8ea6030]
test rax, rax
jne 0x7ff7c8e55f3d
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x20], rdi
call fcn.7ff7c8e50dd0
or r8, 0xffffffffffffffff
mov rbx, rax
mov rcx, r8
nop dword [rax]
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x7ff7c8e55ea0
lea edi, [rcx + 6]
mov eax, 2
mul rdi
cmovo rax, r8
mov rcx, rax
call fcn.7ff7c8e636bc
mov qword [0x7ff7c8ea6030], rax
test rax, rax
je 0x7ff7c8e55f1b
mov r9, rbx
lea r8, str._sLogs
mov edx, edi
mov rcx, rax
call fcn.7ff7c8e48140
mov rcx, qword [0x7ff7c8ea6030]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x7ff7c8e55f2c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x7ff7c8e55f2c
lea rcx, str.GetAgentLogDirPath:_cannot_create_agent_logs_directory__n
call fcn.7ff7c8e566b0
mov rcx, qword [0x7ff7c8ea6030]
call fcn.7ff7c8e60e84
mov rbx, qword [rsp + 0x30]
xor eax, eax
mov rdi, qword [rsp + 0x20]
add rsp, 0x28
ret
mov rax, qword [0x7ff7c8ea6030]
mov rbx, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x20]
add rsp, 0x28
ret

Function at 0x7ff7c8e560c0
Capabilities:
Get file size
Write file on windows

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x7ff7c8ea3088]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rbx, rcx
test rcx, rcx
je 0x7ff7c8e561a4
mov rcx, qword [0x7ff7c8ea3bb0]
cmp rcx, 0xffffffffffffffff
je 0x7ff7c8e560f4
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov rcx, rbx
mov dword [rsp + 0x20], 2
lea edx, [r9 + 4]
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x7ff7c8ea3bb0], rax
cmp rax, 0xffffffffffffffff
jne 0x7ff7c8e56162
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rbx
lea rdx, str.ServiceLogInitInternal
mov r9d, eax
lea rcx, str._s:_unable_to_create_log_file__s__error__d__n
call fcn.7ff7c8e566b0
xor al, al
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.7ff7c8e589f0
add rsp, 0x50
pop rbx
ret
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x7ff7c8e561a4
mov rcx, qword [0x7ff7c8ea3bb0]
lea r9, [rsp + 0x44]
lea r8d, [rax + 2]
mov dword [rsp + 0x44], 2
lea rdx, [rsp + 0x40]
mov word [rsp + 0x40], 0xfeff
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov al, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.7ff7c8e589f0
add rsp, 0x50
pop rbx
ret
Function at 0x7ff7c8e561c0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0xc0
mov rax, qword [0x7ff7c8ea3088]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov rbx, qword [0x7ff7c8ea3bb0]
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx ecx, word [rsp + 0x64]
movzx edx, word [rsp + 0x62]
movzx r8d, word [rsp + 0x60]
movzx eax, word [rsp + 0x66]
movzx r10d, word [rsp + 0x5e]
movzx r11d, word [rsp + 0x5a]
movzx r9d, word [rsp + 0x58]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], ecx
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x38], edx
mov edx, 0x20
mov dword [rsp + 0x30], r8d
lea r8, str.__04u__02u__02u__02u:_02u:_02u._03u_UTC_
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
call fcn.7ff7c8e48140
add eax, eax
mov qword [rsp + 0x20], 0
mov r8d, eax
mov dword [rsp + 0x50], eax
lea r9, [rsp + 0x50]
mov rcx, rbx
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.7ff7c8e589f0
add rsp, 0xc0
pop rbx
ret
Function at 0x7ff7c8e56510
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push rsi
sub rsp, 0x50
mov rax, qword [0x7ff7c8ea3088]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov eax, dword [0x7ff7c8e98a38]
mov rcx, rdx
mov dword [rsp + 0x34], eax
mov rsi, rdx
movzx eax, word [0x7ff7c8e98a3c]
mov word [rsp + 0x38], ax
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [0x7ff7c8ea602c], 0
jne 0x7ff7c8e5668f
cmp byte [0x7ff7c8ea5f92], 0
je 0x7ff7c8e5657f
mov rdx, rsi
lea rcx, [0x7ff7c8e982d0]
call fcn.7ff7c8e50560
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.7ff7c8e589f0
add rsp, 0x50
pop rsi
ret
cmp qword [0x7ff7c8ea3bb0], 0xffffffffffffffff
je 0x7ff7c8e5668f
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x78], rdi
or rdi, 0xffffffffffffffff
mov rbx, rdi
inc rbx
cmp word [rsi + rbx*2], 0
jne 0x7ff7c8e565a3
mov eax, dword [0x7ff7c8ea603c]
xor ebp, ebp
test eax, eax
je 0x7ff7c8e565c6
lea rcx, [0x7ff7c8ea6040]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [0x7ff7c8ea602c], 1
call fcn.7ff7c8e56290
mov dword [0x7ff7c8ea602c], ebp
call fcn.7ff7c8e561c0
cmp ebx, 1
jb 0x7ff7c8e56605
lea edx, [rbx - 1]
cmp word [rsi + rdx*2], 0xa
jne 0x7ff7c8e56605
cmp ebx, 2
jb 0x7ff7c8e565fe
lea eax, [rbx - 2]
cmp word [rsi + rax*2], 0xd
je 0x7ff7c8e56605
mov ebx, edx
mov ebp, 1
mov rcx, qword [0x7ff7c8ea3bb0]
lea r8d, [rbx + rbx]
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], r8d
mov rdx, rsi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbx, qword [rsp + 0x60]
test ebp, ebp
mov rbp, qword [rsp + 0x70]
je 0x7ff7c8e56673
lea rax, [rsp + 0x34]
nop
inc rdi
cmp word [rax + rdi*2], 0
jne 0x7ff7c8e56640
mov rcx, qword [0x7ff7c8ea3bb0]
lea r9, [rsp + 0x30]
add edi, edi
mov qword [rsp + 0x20], 0
mov r8d, edi
mov dword [rsp + 0x30], edi
lea rdx, [rsp + 0x34]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x7ff7c8ea603c]
mov rdi, qword [rsp + 0x78]
test eax, eax
je 0x7ff7c8e5668f
lea rcx, [0x7ff7c8ea6040]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.7ff7c8e589f0
add rsp, 0x50
pop rsi
ret
Function at 0x7ff7c8e56ed0
Capabilities:
Delete file
Delete registry key
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x4a0
mov rax, qword [0x7ff7c8ea3088]
xor rax, rsp
mov qword [rsp + 0x490], rax
mov rsi, rcx
mov qword [rsp + 0x40], 0
lea rcx, [rsp + 0x70]
xor edx, edx
mov r8d, 0x20a
xor dil, dil
call fcn.7ff7c8e5c560
mov dword [rsp + 0x50], 0x105
call fcn.7ff7c8e56890
mov r9, rsi
lea r8, str.RegistryMachineSystemCurrentControlSetServices_s
mov edx, 0x105
lea rcx, [rsp + 0x280]
call fcn.7ff7c8e48140
mov rbx, qword [0x7ff7c8ea5f80]
mov rcx, rbx
call qword [fcn.7ff7c8e491c0]
lea rdx, [rsp + 0x280]
lea rcx, [rsp + 0x58]
call rbx
mov rbx, qword [0x7ff7c8ea5f30]
mov rcx, rbx
call qword [fcn.7ff7c8e491c0]
lea rcx, [rsp + 0x58]
call rbx
lea rax, [rsp + 0x40]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServices
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x7ff7c8e57063
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x48]
mov r9d, 0xf003f
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x7ff7c8e56fff
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rdx, str.ImagePath
lea rax, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x40]
mov rdx, rsi
call qword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
test eax, eax
jne 0x7ff7c8e57063
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x7ff7c8e57060
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dil, 1
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x7ff7c8e57073
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx eax, dil
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.7ff7c8e589f0
lea r11, [rsp + 0x4a0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x7ff7c8e63c48
Capabilities:
Parse pe header

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push r15
sub rsp, 0x20
mov esi, r8d
mov ebx, edx
mov r14d, ecx
test r8d, r8d
jne 0x7ff7c8e63a1c
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x7ff7c8e63a1c
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x7ff7c8e63a1c
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x7ff7c8e63a1c
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x7ff7c8e63a1c
cmp dword [rcx + 0x84], 0xe
jbe 0x7ff7c8e63a1c
cmp dword [rcx + 0xf8], esi
je 0x7ff7c8e63a1c
mov ecx, r14d
call fcn.7ff7c8e63b64
mov ecx, 2
call fcn.7ff7c8e6ba28
nop
cmp byte [0x7ff7c8ea5118], 0
jne 0x7ff7c8e63ae6
mov r15d, 1
mov eax, r15d
xchg dword [0x7ff7c8ea5108], eax
test ebx, ebx
jne 0x7ff7c8e63a8f
mov rdi, qword [0x7ff7c8ea3088]
mov edx, edi
and edx, 0x3f
lea ecx, [rbx + 0x40]
sub ecx, edx
xor eax, eax
ror rax, cl
xor rax, rdi
mov rcx, qword [0x7ff7c8ea5110]
cmp rcx, rax
je 0x7ff7c8e63a86
xor rdi, rcx
mov ecx, edx
ror rdi, cl
mov rcx, rdi
call qword [fcn.7ff7c8e491c0]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call rdi
lea rcx, [0x7ff7c8ea5570]
jmp 0x7ff7c8e63a9b
cmp ebx, r15d
jne 0x7ff7c8e63aa1
lea rcx, [0x7ff7c8ea5588]
call fcn.7ff7c8e6fce8
nop
test ebx, ebx
jne 0x7ff7c8e63ab8
lea rdx, [0x7ff7c8e83620]
lea rcx, [0x7ff7c8e835f8]
call fcn.7ff7c8e6ffe0
lea rdx, [0x7ff7c8e83630]
lea rcx, [0x7ff7c8e83628]
call fcn.7ff7c8e6ffe0
movzx eax, byte [0x7ff7c8ea5118]
test esi, esi
cmove eax, r15d
mov byte [0x7ff7c8ea5118], al
jmp 0x7ff7c8e63ae6
mov ecx, 2
call fcn.7ff7c8e6ba88
test esi, esi
jne 0x7ff7c8e63afd
mov ecx, r14d
call fcn.7ff7c8e63b18
int3
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
add rsp, 0x20
pop r15
ret
xor r8d, r8d
xor edx, edx
jmp 0x7ff7c8e639ac
Function at 0x1400011e0
Capabilities:
Start service

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
mov edi, ecx
mov rbx, rdx
lea rcx, [0x1400179d0]
call fcn.14002c5b0
call fcn.140014980
call fcn.140001110
lea rcx, [0x140076d30]
call qword [sym.imp.api_ms_win_service_core_l1_1_0.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x140001308
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x427
jne 0x1400013db
mov qword [rsp + 0x30], rsi
cmp edi, 2
jne 0x140001384
mov rcx, qword [rbx + 8]
lea r8d, [rdi + 2]
lea rdx, str._ddd
call fcn.14002d214
xor edi, edi
lea rsi, str.ssh_agent
test eax, eax
jne 0x140001266
mov dword [reloc.WS2_32.dll_closesocket], 7
jmp 0x1400012b0
mov rcx, qword [rbx + 8]
lea rdx, [0x140050238]
mov r8d, 3
call fcn.14002d214
test eax, eax
jne 0x14000128c
mov dword [reloc.WS2_32.dll_closesocket], 6
jmp 0x1400012b0
mov rcx, qword [rbx + 8]
lea rdx, [0x140050240]
mov r8d, 2
call fcn.14002d214
test eax, eax
jne 0x1400012cf
mov dword [reloc.WS2_32.dll_closesocket], 5
mov qword [0x140079040], rsi
mov qword [0x140079050], rdi
mov qword [0x140079048], rdi
mov dword [0x140076d50], 1
mov rcx, qword [rbx + 8]
lea rdx, [0x140050240]
mov r8d, 2
call fcn.14002d214
test eax, eax
jne 0x140001315
lea edx, [rax + 1]
lea rcx, [0x1400010f0]
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_SetConsoleCtrlHandler]
mov ecx, 1
call fcn.140001a20
mov rsi, qword [rsp + 0x30]
xor eax, eax
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov rcx, qword [rbx + 8]
call fcn.14002d054
movsxd rbx, eax
test eax, eax
je 0x140001384
mov edx, 1
mov qword [0x140079040], rsi
mov rcx, rsi
mov dword [reloc.WS2_32.dll_closesocket], 3
mov qword [0x140079050], rdi
mov qword [0x140079048], rdi
lea r8d, [rdx + 7]
mov dword [0x140076d50], edi
mov dword [0x140076d54], 8
call fcn.140045a80
call fcn.140045da0
mov rcx, rbx
call fcn.140001ff0
mov rsi, qword [rsp + 0x30]
xor eax, eax
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 0x10]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
test rax, rax
je 0x1400013fe
mov r8d, setsockopt
lea rdx, [0x140050200]
mov rcx, rax
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
test rax, rax
je 0x1400013fe
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_StartServiceA]
test eax, eax
jne 0x140001303
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x420
je 0x140001303
jmp 0x1400013e9
or eax, 0xffffffff
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.unable_to_start_ssh_agent_service__error_:_d
call fcn.1400038c0
int3
lea rcx, str.unable_to_open_service_handle
call fcn.1400038c0
int3
Function at 0x140001a20
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x50
xor edi, edi
mov ebx, ecx
mov qword [rsp + 0x68], rdi
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcessId]
mov r9d, ebx
lea rdx, str.agent_start
lea rcx, str._s_pid:_d__dbg:_d
mov dword [rsp + 0x60], eax
mov r8d, eax
call fcn.140003980
xor eax, eax
mov dword [0x140078fc0], ebx
mov qword [0x140079020], rax
lea rbx, [0x140079020]
mov r9, rbx
mov dword [0x140079020], 0x18
lea r8, [0x140079028]
mov qword [0x140079028], rax
lea edx, [rdi + 1]
mov qword [0x140079030], rax
lea rcx, str.D:P_A__GA___SY__A__GA___BA__A__0x12019b___AU_
call qword [sym.imp.api_ms_win_security_sddl_l1_1_0.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x140001b72
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x68]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREOpenSSHAgent
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x20006
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], edi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
test eax, eax
jne 0x140001b87
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x60]
mov dword [rsp + 0x28], 4
lea r9d, [rdi + 4]
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.ProcessID
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
test eax, eax
jne 0x140001b96
xor r9d, r9d
lea edx, [rdi + 1]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateEventA]
mov qword [0x140078ff8], rax
test rax, rax
je 0x140001ba5
xor r9d, r9d
lea edx, [rdi + 1]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateEventA]
mov qword [0x140079018], rax
test rax, rax
je 0x140001bba
mov qword [0x140079038], 0xffffffffffffffff
mov dword [0x140079030], edi
call fcn.140001680
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.cannot_convert_sddl_ERROR:_d
call fcn.1400038c0
int3
mov edx, eax
lea rcx, str.cannot_create_agent_root_reg_key__ERROR:_d
call fcn.1400038c0
int3
mov edx, eax
lea rcx, str.cannot_publish_agent_master_process_id_ERROR:_d
call fcn.1400038c0
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.cannot_create_global_stop_event_ERROR:_d
call fcn.1400038c0
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.cannot_create_event_ERROR:_d
call fcn.1400038c0
int3
Function at 0x140002180
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x10], edx
push rdi
sub rsp, 0x30
mov r9d, dword [rcx + 0x40044]
mov rdi, r8
mov r8d, edx
mov rbx, rcx
mov rdx, rcx
lea rcx, str.connection_io__p_bytes:_d_state:_d
call fcn.140003a10
mov edx, dword [rsp + 0x48]
test edx, edx
jne 0x1400021d6
mov rcx, qword [rbx + 0x20]
lea r8, [rsp + 0x48]
xor r9d, r9d
mov rdx, rdi
call qword [sym.imp.api_ms_win_core_io_l1_1_0.dll_GetOverlappedResult]
test eax, eax
je 0x140002322
mov edx, dword [rsp + 0x48]
cmp dword [rbx + 0x40044], 4
jne 0x1400021e9
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_DebugBreak]
mov edx, dword [rsp + 0x48]
mov ecx, dword [rbx + 0x40044]
test ecx, ecx
je 0x1400022cf
sub ecx, 1
je 0x140002272
sub ecx, 1
je 0x14000221b
cmp ecx, 1
je 0x1400022cf
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_DebugBreak]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
add dword [rbx + 0x3c], edx
mov eax, dword [rbx + 0x3c]
mov ecx, dword [rbx + 0x38]
cmp eax, ecx
jne 0x140002261
mov rcx, rbx
call fcn.140002340
test eax, eax
jne 0x140002322
mov r8d, dword [rbx + 0x38]
lea rdx, [rbx + 0x40]
mov rcx, qword [rbx + 0x20]
xor r9d, r9d
mov dword [rbx + 0x40044], 3
mov qword [rsp + 0x20], rbx
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
jmp 0x140002311
sub ecx, eax
lea rdx, [rbx + 0x40]
add rdx, rax
mov r8d, ecx
jmp 0x1400022ff
add dword [rbx + 0x3c], edx
lea rdx, [rbx + 0x40]
cmp dword [rbx + 0x3c], 4
jne 0x1400022be
movzx eax, byte [rbx + 0x41]
movzx ecx, byte [rdx]
shl ecx, 8
or ecx, eax
movzx eax, byte [rbx + 0x42]
shl ecx, 8
or ecx, eax
movzx eax, byte [rbx + 0x43]
shl ecx, 8
or ecx, eax
mov dword [rbx + 0x3c], 0
mov dword [rbx + 0x38], ecx
cmp ecx, 0x40000
ja 0x140002322
mov dword [rbx + 0x40044], 2
mov r8d, ecx
jmp 0x1400022ff
mov eax, dword [rbx + 0x38]
mov r8d, 4
sub r8d, eax
add rdx, rax
jmp 0x1400022ff
cmp edx, dword [rbx + 0x38]
je 0x1400022da
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_DebugBreak]
xor edx, edx
mov dword [rbx + 0x40044], 1
mov r8d, 0x4000c
lea rcx, [rbx + 0x38]
call fcn.14002bc10
lea rdx, [rbx + 0x40]
mov r8d, 4
mov rcx, qword [rbx + 0x20]
xor r9d, r9d
mov qword [rsp + 0x20], rbx
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x140002334
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x3e5
je 0x140002334
mov rcx, rbx
mov dword [rbx + 0x40044], 4
call fcn.1400019b0
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x140003330
Capabilities:
Delete registry key

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x30
xor edi, edi
mov qword [rsp + 0x50], 0
cmp dword [r8 + 0x40048], 2
mov rcx, 0xffffffff80000002
mov rbx, rdx
mov qword [rsp + 0x40], rcx
jg 0x1400033aa
mov rcx, qword [r8 + 0x28]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x1400033e0
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x40], rdi
mov ecx, 0xf003f
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenCurrentUser]
test eax, eax
je 0x14000339b
mov edx, eax
lea rcx, str.unable_to_open_users_registry_hive__ERROR____d
call fcn.1400039b0
or edi, 0xffffffff
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_RevertToSelf]
test edi, edi
jne 0x1400033e0
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x50]
mov r9d, 0x10109
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREOpenSSHAgent
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400033e0
mov rcx, qword [rsp + 0x50]
lea rdx, str.Keys
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegDeleteTreeW]
xor edi, edi
mov rcx, rbx
lea edx, [rdi + 1]
call fcn.1400040f0
test eax, eax
jne 0x140003405
mov rcx, qword [rbx + 0x18]
mov rdi, qword [rbx]
add rdi, rcx
lea rax, [rcx + 1]
mov qword [rbx + 0x18], rax
jmp 0x140003407
js 0x14000340c
mov byte [rdi], 6
xor eax, eax
mov rcx, qword [rsp + 0x40]
neg eax
sbb ebx, ebx
test rcx, rcx
je 0x140003420
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140003430
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, ebx
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret