joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400151a0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x48
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsp + 0x30]
add rsp, 0x48
ret

Function at 0x1400151f0
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
movsxd rax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x10]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x40]
cmp qword [rax], 0
jne 0x140015256
movsxd rax, dword [rsp + 0x20]
add rax, 0xa
mov r8, rax
xor edx, edx
mov rcx, qword [0x140542ab0]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
jmp 0x140015281
movsxd rax, dword [rsp + 0x20]
add rax, 0xa
mov r9, rax
mov rax, qword [rsp + 0x40]
mov r8, qword [rax]
xor edx, edx
mov rcx, qword [0x140542ab0]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
movsxd rax, dword [rsp + 0x20]
xor edx, edx
mov ecx, 2
div rcx
movsxd rcx, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x28]
add rcx, qword [rdx]
mov r8d, eax
mov rdx, rcx
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
call fcn.140015920
movsxd rax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x10], rax
add rsp, 0x38
ret

Function at 0x140015370
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
add rsp, 0x38
ret

Function at 0x1400153a0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
add rax, 2
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
add rsp, 0x38
ret

Function at 0x140015520
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 0x10]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
add rsp, 0x38
ret
Function at 0x140015660
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
cmp dword [0x14053eaf0], 0xffffffff
jne 0x14001568f
call fcn.140015130
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, rax
lea rcx, [0x140015610]
call fcn.14006b3c0
jmp 0x1400156c0
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x1400156c0
call fcn.140015cf0
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, rax
lea rcx, [0x140015610]
call fcn.14006b3c0
add rsp, 0x28
ret

Function at 0x140015700
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 0x10], edx
mov dword [rsp + 8], ecx
sub rsp, 0x48
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
cmp dword [rsp + 0x58], 0xffffffff
jne 0x140015730
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x10]
mov dword [rsp + 0x58], eax
movsxd rax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x10]
lea rax, [rcx + rax*2]
mov dword [rsp + 0x20], eax
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 8]
sub rcx, 4
cmp rax, rcx
jl 0x1400157a2
mov eax, dword [rsp + 0x20]
add eax, 0x4000
cdqe
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
add rax, 0xa
mov r9, rax
mov rax, qword [rsp + 0x28]
mov r8, qword [rax]
xor edx, edx
mov rcx, qword [0x140542ab0]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, qword [rsp + 0x28]
mov qword [rcx], rax
jmp 0x140015800
mov rax, qword [rsp + 0x28]
cmp qword [rax + 8], 0x100000
jle 0x140015800
cmp dword [rsp + 0x20], 0x100000
jge 0x1400157c3
mov dword [rsp + 0x20], 0x100000
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
add rax, 0xa
mov r9, rax
mov rax, qword [rsp + 0x28]
mov r8, qword [rax]
xor edx, edx
mov rcx, qword [0x140542ab0]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, qword [rsp + 0x28]
mov qword [rcx], rax
movsxd rax, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x28]
add rax, qword [rcx]
mov qword [rsp + 0x30], rax
movsxd rax, dword [rsp + 0x58]
movsxd rcx, dword [rsp + 0x50]
lea rax, [rax + rcx*2]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x30]
add rsp, 0x48
ret

Function at 0x140015840
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov eax, dword [rsp + 0x40]
shl eax, 1
cdqe
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0x10]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
add rsp, 0x38
ret
Function at 0x140015880
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
cmp qword [rsp + 0x40], rax
jb 0x1400158db
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 0x10]
cmp qword [rsp + 0x40], rax
ja 0x1400158db
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
inc rax
jmp 0x1400158dd
xor eax, eax
add rsp, 0x38
ret

Function at 0x1400158f0
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx]
lea rax, [rcx + rax - 1]
add rsp, 0x38
ret

Function at 0x140015cf0
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x38
mov r8d, 0x18
xor edx, edx
mov rcx, qword [0x140542ab0]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x20], rax
mov r8d, 0x10
xor edx, edx
mov rcx, qword [0x140542ab0]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rcx, qword [rsp + 0x20]
mov qword [rcx], rax
mov rax, qword [rsp + 0x20]
mov qword [rax + 8], 0x10
mov rax, qword [rsp + 0x20]
mov qword [rax + 0x10], 0
mov rdx, qword [rsp + 0x20]
mov ecx, dword [0x14053eaf0]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
add rsp, 0x38
ret
Function at 0x14003c3b0
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x268
test cl, 2
je 0x14003c3fa
lea rdx, [rsp + 0xc0]
mov ecx, 0x202
call qword [sym.imp.WSOCK32.DLL_WSAStartup]
test eax, eax
jne 0x14003c3ed
movzx eax, word [rsp + 0xc0]
cmp al, 2
jne 0x14003c3e7
shr ax, 8
cmp al, 2
je 0x14003c3fa
call qword [sym.imp.WSOCK32.DLL_WSACleanup]
mov eax, 2
add rsp, 0x268
ret
call fcn.140059370
test eax, eax
jne 0x14003c501
lea rcx, str.iphlpapi.dll
call fcn.14003c060
mov qword [0x140542358], rax
test rax, rax
je 0x14003c444
lea rdx, str.if_nametoindex
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140542350]
test rax, rax
cmovne rcx, rax
mov qword [0x140542350], rcx
lea rcx, [rsp + 0x20]
xor edx, edx
mov r8d, 0x9c
call sub.msvcrt.dll_memset
mov r8b, 3
mov edx, 2
xor ecx, ecx
mov dword [rsp + 0x20], 0x9c
mov qword [rsp + 0x24], 6
mov dword [rsp + 0x30], 2
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 3
mov rcx, rax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 3
mov edx, 0x20
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 3
mov edx, 0x10
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 1
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
lea rcx, [rsp + 0x20]
mov edx, 0x33
mov r8, rax
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
test eax, eax
je 0x14003c4f8
lea rcx, [0x140542ac0]
mov byte [0x140542ad0], 1
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
add rsp, 0x268
ret
mov byte [0x140542ad0], 0
xor eax, eax
add rsp, 0x268
ret

Function at 0x14003c820
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
cmp qword [rcx + 0x718], 0
mov rsi, r9
mov rbp, r8
movsxd rbx, edx
mov rdi, rcx
je 0x14003c87e
mov dl, 1
call fcn.14003df40
mov rax, qword [rdi + 0x670]
mov r9, rsi
mov r8, rbp
mov edx, ebx
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [rdi + 0x718]
xor edx, edx
mov rcx, rdi
mov ebx, eax
call fcn.14003df40
mov eax, ebx
jmp 0x14003c8c2
cmp ebx, 2
ja 0x14003c8c0
mov r9, qword [rdi + 0x668]
lea rdx, [0x140081120]
lea rcx, [rbx + rbx*2]
add rcx, rdx
mov edx, 2
lea r8d, [rdx - 1]
call qword [sym.imp.msvcrt.dll_fwrite]
mov r9, qword [rdi + 0x668]
mov r8d, 1
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.msvcrt.dll_fwrite]
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x140041900
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [0x1405424d0]
mov rbx, rcx
mov dword [rsp + 0x50], 0x4020
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 4
test eax, eax
jne 0x14004195d
lea r9d, [rax + 3]
lea r8d, [rax + 2]
lea ecx, [rax + 6]
xor edx, edx
call fcn.14003c200
test al, al
je 0x140041951
mov dword [0x1405424d0], 2
add rsp, 0x30
pop rbx
ret
mov dword [0x1405424d0], 1
jmp 0x140041962
cmp eax, 2
je 0x1400419b4
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x48]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WSOCK32.DLL_getsockopt]
test eax, eax
jne 0x140041993
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x48], eax
jg 0x1400419b4
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
mov dword [rsp + 0x20], 4
call qword [sym.imp.WSOCK32.DLL_setsockopt]
add rsp, 0x30
pop rbx
ret
Function at 0x14006b3c0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
cmp dword [0x140542610], 0
mov r14, rdx
mov r15, rcx
lea rbx, [0x140542620]
jne 0x14006b40d
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, rbx
mov dword [0x140542648], eax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x140542610], 1
mov ecx, dword [0x140542648]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
test rax, rax
jne 0x14006b4e2
mov rcx, qword [0x1405411e0]
lea edx, [rax + 8]
lea r8d, [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x14006b50d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x140542618]
test rax, rax
je 0x14006b45d
mov qword [rax], rbp
mov rcx, rbx
mov qword [rbp + 8], rax
mov qword [0x140542618], rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
lea r9, [rbp + 0x20]
mov r8, rdi
mov rcx, rax
mov rdx, rbx
mov dword [rsp + 0x20], 0x100000
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rdx, qword [rbp + 0x20]
lea rcx, [rbp + 0x18]
lea r8, [0x14006b528]
mov r9, rbp
mov dword [rsp + 0x28], 8
or dword [rsp + 0x20], 0xffffffff
call qword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
mov ecx, dword [0x140542648]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x1405411e0]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x14006b50d
mov qword [rax + 8], r15
mov qword [rax + 0x10], r14
mov rcx, qword [rbp + 0x10]
mov qword [rax], rcx
mov qword [rbp + 0x10], rax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x401b80
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0040d624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x401d08
mov rax, qword [0x0040d628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x401bcc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x401c55
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x401bb0
mov rcx, rbx
call fcn.00402820
test rax, rax
mov r12, rax
je 0x401d3d
mov rax, qword [0x0040d628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.00402950
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0040d628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401d20
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x401c4e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x401cb0
add dword [0x0040d624], 1
cmp edi, 8
jae 0x401c83
test dil, 4
jne 0x401cf4
test edi, edi
je 0x401c78
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x401d0f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x401c78
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x401c9c
jmp 0x401c78
add rsi, qword [0x0040d628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401c4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00408450
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x401c78
xor esi, esi
jmp 0x401bd7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x401c78
mov rax, qword [0x0040d628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.00408450
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.00408450
nop
nop dword [rax]

Function at 0x402490
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0040d900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0040d8e0]
test rbx, rbx
je 0x4024e4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x4024db
test rsi, rsi
je 0x4024db
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4024c0
lea rcx, [0x0040d900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x402820
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x0040a840]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40288d
mov rcx, r8
call fcn.00402700
test eax, eax
je 0x40288d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40288d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x402884
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40288f
add rax, 0x28
cmp rax, r9
jne 0x402870
xor eax, eax
add rsp, 0x28
ret

Function at 0x407950
Capabilities:
Query environment variable

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
test rdx, rdx
mov rsi, rcx
mov rdi, rdx
jne 0x40796b
test r8, r8
jne 0x407a02
mov rbx, r8
sub rbx, rdi
cmp rbx, 0xf
mov qword [rsp + 0x28], rbx
ja 0x4079c0
cmp rbx, 1
mov rax, qword [rsi]
jne 0x4079a2
movzx edx, byte [rdi]
mov byte [rax], dl
mov rbx, qword [rsp + 0x28]
mov rax, qword [rsi]
mov qword [rsi + 8], rbx
mov byte [rax + rbx], 0
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
test rbx, rbx
jne 0x4079dc
mov qword [rsi + 8], rbx
mov byte [rax + rbx], 0
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
lea rdx, [rsp + 0x28]
xor r8d, r8d
mov rcx, rsi
call fcn.004015e0
mov rdx, qword [rsp + 0x28]
mov qword [rsi], rax
mov qword [rsi + 0x10], rdx
mov r8, rbx
mov rdx, rdi
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rbx, qword [rsp + 0x28]
mov rax, qword [rsi]
mov qword [rsi + 8], rbx
mov byte [rax + rbx], 0
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
lea rcx, str.basic_string::_M_construct_null_not_valid
call fcn.00401598
nop
nop
Function at 0x408450
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp fcn.00401510
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.00407780
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.00407780
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530
Function at 0x1400021d0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push rdi
push r12
push r13
sub rsp, 0x888
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x870], rax
xor r13d, r13d
lea rax, [rsp + 0x60]
mov r12, rdx
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x50]
mov rbp, r8
mov qword [rsp + 0x38], rax
mov rdi, rcx
mov rdx, rcx
mov qword [rsp + 0x30], r13
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov qword [rsp + 0x50], r13
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x140002253
lea rcx, str.RegistryRemoveStringFromList:_RegCreateKeyEx__ts_failed_with_error__ld__n
mov r8d, eax
mov rdx, rdi
call fcn.140003308
lea rcx, [rsp + 0x472]
xor edx, edx
mov r8d, 0x3fe
mov word [rsp + 0x470], r13w
call fcn.1400039a0
lea rcx, [rsp + 0x72]
xor edx, edx
mov r8d, 0x3fe
mov word [rsp + 0x70], r13w
call fcn.1400039a0
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x470]
lea r9, [rsp + 0x58]
xor r8d, r8d
mov rdx, r12
mov dword [rsp + 0x5c], 0x400
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r8d, dword [rsp + 0x58]
mov edi, eax
test eax, eax
jne 0x1400022cf
cmp r8d, 1
je 0x1400022e5
lea rcx, str.RegistryRemoveStringFromList:_RegQueryValueEx_failed_with__d__key_type__0x_x__n
mov edx, eax
call fcn.140003308
test edi, edi
jne 0x1400023fb
lea rdx, [0x14000fa34]
lea rcx, [rsp + 0x470]
mov qword [rsp + 0x8c8], rbx
call fcn.140003a8c
mov rbx, rax
test rax, rax
je 0x140002389
mov qword [rsp + 0x880], rsi
nop word [rax + rax]
lea rdx, [0x14000fa34]
xor ecx, ecx
call fcn.140003a8c
mov rdx, rbp
mov rcx, rbx
mov rsi, rax
call fcn.140003d9c
test eax, eax
je 0x140002379
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x70]
repne scasw ax, word [rdi]
xor ecx, ecx
movzx eax, word [rbx + rcx]
add rcx, 2
mov word [rdi + rcx - 4], ax
test ax, ax
jne 0x140002350
xor eax, eax
lea rdi, [rsp + 0x70]
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
mov eax, dword [0x14000fa34]
mov dword [rdi - 2], eax
mov rbx, rsi
test rsi, rsi
jne 0x140002320
mov rsi, qword [rsp + 0x880]
mov rbx, qword [rsp + 0x8c8]
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x70]
repne scasw ax, word [rdi]
not rcx
cmp word [rsp + rcx*2 + 0x6c], 0x2c
jne 0x1400023b0
mov word [rsp + rcx*2 + 0x6c], r13w
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x70]
mov r9d, 1
repne scasw ax, word [rdi]
lea rax, [rsp + 0x70]
xor r8d, r8d
not rcx
mov rdx, r12
add rcx, rcx
mov dword [rsp + 0x28], ecx
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test eax, eax
je 0x1400023fb
lea rcx, str.RegistryRemoveStringFromList:_RegSetValueEx_failed_with__ld__n
mov edx, eax
call fcn.140003308
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
neg edi
sbb eax, eax
and eax, 2
mov rcx, qword [rsp + 0x870]
xor rcx, rsp
call fcn.140003450
add rsp, 0x888
pop r13
pop r12
pop rdi
pop rbp
ret
Function at 0x140002780
Capabilities:
Delete service

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rdi
sub rsp, 0x20
mov rdi, rcx
mov rdx, rcx
lea rcx, str.Deleting_service__ws_..._n
xor ebx, ebx
call fcn.140003308
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
jne 0x1400027e2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Could_not_get_handle_to_SCM__Error:__ld_n
mov edx, eax
call fcn.140003308
lea eax, [rbx + 2]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
mov r8d, 0xf01ff
mov rdx, rdi
mov rcx, rax
mov qword [rsp + 0x30], rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rsi, rax
test rax, rax
jne 0x140002821
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Could_not_open_service__ws__Error:__ld_n
mov rdx, rdi
mov r8d, eax
call fcn.140003308
lea ebx, [rsi + 2]
jmp 0x1400028c3
mov rcx, rbp
mov qword [rsp + 0x38], r12
call qword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov r12, rax
test rax, rax
je 0x14000289c
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140002882
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x430
je 0x140002879
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Could_not_delete_service__ws__Error:__ld_n
mov rdx, rdi
mov r8d, eax
call fcn.140003308
mov rcx, r12
mov ebx, 2
call qword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
jmp 0x1400028b5
lea rcx, str.Service__ws_already_marked_for_deletion._n
jmp 0x140002889
lea rcx, str.Service__ws_successfully_removed__n
mov rdx, rdi
call fcn.140003308
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
jmp 0x1400028b5
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Unable_to_lock_service_database__Error:__ld_n
mov edx, eax
call fcn.140003308
mov ebx, 2
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r12, qword [rsp + 0x38]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x48]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret