joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002ec0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
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.140004100
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.140004100
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140002f30
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400090a4]
mov rbx, rcx
test esi, esi
jle 0x140003060
mov rax, qword [0x1400090a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002f7b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140003005
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002f60
mov rcx, rbx
call fcn.140003980
mov rdi, rax
test rax, rax
je 0x140003082
mov rax, qword [0x1400090a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003ac0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400090a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140003067
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002ffe
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140003010
add dword [0x1400090a4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400090a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002ffe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002ec0
nop dword [rax]
xor esi, esi
jmp 0x140002f88
mov rax, qword [0x1400090a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002ec0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002ec0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400035f0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140009100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400090e0]
test rbx, rbx
je 0x14000364c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140003643
test rsi, rsi
je 0x140003643
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003628
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140003980
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140006970]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400039a0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400039a8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400039a0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400039fd
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x1400039f4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400039a0
add rax, 0x28
cmp rax, r9
jne 0x1400039e0
xor eax, eax
ret

Function at 0x140003a00
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006970]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140003a1f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140003a28
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140003a1f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140003ac0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006970]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140003adf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003ae8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140002b70
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x30
mov r14, rdx
mov r13, rcx
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov byte [rcx], 1
mov qword [rcx + 8], 0
mov byte [rcx + 0x10], 0
mov eax, dword [0x140297f88]
mov ecx, dword [0x140293330]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140002d21
mov ecx, dword [0x1402910c8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140002ca4
movsxd rcx, dword [0x140297f80]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x140297f84]
jne 0x140002ca4
mov rdi, qword [rax + rcx]
test rdi, rdi
je 0x140002ca4
movabs r12, 0x6000000000000000
movabs r15, 0xffffffffffffff
mov rax, qword [rdi]
mov rbx, rax
and rbx, r15
and rax, r12
movabs rcx, 0x4000000000000000
cmp rax, rcx
jne 0x140002c6a
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140002c57
mov rsi, qword [rdi]
call qword [rcx + 8]
movabs rcx, 0xff00000000000000
and rcx, rsi
or rcx, rax
mov qword [rdi], rcx
movabs rax, 0xbfffffffffffffff
lock and qword [rdi], rax
mov byte [r13 + 0x10], 1
movabs rsi, 0x8000000000000001
mov qword [r13 + 8], rbx
lea rbx, [rsp + 0x20]
mov rcx, rbx
call qword [fcn.14007b660]
mov rax, qword [rbx]
lea rcx, [r14 + rsi]
cmp rcx, 2
jae 0x140002cab
add rsi, rax
cmp rsi, 1
ja 0x140002ccd
cmp rax, r14
je 0x140002ccd
int3
mov byte [r13], 0
jmp 0x140002d01
xor ecx, ecx
mov rdx, rax
add rdx, r14
setns cl
movabs rdx, 0x7fffffffffffffff
add rdx, rcx
add rax, r14
cmovo rax, rdx
mov r14, rax
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140002cef
mov rsi, qword [rdi]
call qword [rcx + 8]
movabs rcx, 0xff00000000000000
and rcx, rsi
or rcx, rax
mov qword [rdi], rcx
mov rax, qword [rdi]
and rax, r12
and r14, r15
or r14, rax
mov qword [rdi], r14
inc dword [rdi + 0x14]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400ccfe0
mov rax, r13
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x140297f88]
call fcn.1400c9d58
cmp dword [0x140297f88], 0xffffffff
jne 0x140002bc8
mov qword [0x140297f80], 0
lea rcx, [0x140297f80]
xor edx, edx
call fcn.1400721e0
lea rcx, [0x140297f88]
call fcn.1400c9cf8
jmp 0x140002bc8
Function at 0x140003ac0
Capabilities:
Delete file

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x78
mov r12, rcx
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov rdi, qword [0x140295ed0]
test rdi, rdi
je 0x140003bc9
lea r14, [0x1402613a3]
mov rcx, rdi
mov rdx, r14
call fcn.1400a8f60
test al, al
jne 0x140003b1c
lea rdx, str.vmodule
mov rcx, rdi
call fcn.1400a8f60
test al, al
je 0x140003bc9
cmp qword [0x140295ee0], 0
jne 0x140003c89
mov rax, qword [0x140295ee8]
mov qword [0x140295ee0], rax
mov ecx, 0x20
call fcn.1400c9cbc
mov rbx, rax
lea rax, str.vmodule
lea r8, [rsp + 0x48]
mov qword [r8], rax
mov qword [r8 + 8], 7
lea r15, [rsp + 0x58]
mov rcx, rdi
mov rdx, r15
call fcn.14008db40
lea r8, [rsp + 0x20]
mov qword [r8], r14
mov qword [r8 + 8], 1
lea rsi, [rsp + 0x30]
mov rcx, rdi
mov rdx, rsi
call fcn.14008db40
lea r9, [0x140295ef0]
mov rcx, rbx
mov rdx, rsi
mov r8, r15
call fcn.14018ded0
mov qword [0x140295ee8], rbx
cmp byte [rsi + 0x17], 0
jns 0x140003bb8
mov rcx, qword [rsp + 0x30]
call fcn.1400c9cac
cmp byte [rsp + 0x6f], 0
jns 0x140003bc9
mov rcx, qword [rsp + 0x58]
call fcn.1400c9cac
mov eax, dword [r12]
mov dword [0x140291088], eax
mov bl, 1
test al, 1
je 0x140003c6c
mov rcx, qword [0x140295f00]
test rcx, rcx
je 0x140003c0f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x140295f00], 0
mov rcx, qword [0x140295ef8]
test rcx, rcx
jne 0x140003c3d
and byte [0x140291088], 0xfe
jmp 0x140003c1b
mov rcx, qword [0x140295ef8]
test rcx, rcx
jne 0x140003c3d
mov ecx, 0x18
call fcn.1400c9cbc
mov rcx, rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], 0
mov qword [0x140295ef8], rax
mov rdx, qword [r12 + 8]
call fcn.1400c04fc
cmp dword [r12 + 0x14], 0
jne 0x140003c65
mov rcx, qword [0x140295ef8]
cmp byte [rcx + 0x17], 0
jns 0x140003c5f
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.140059f20
mov ebx, eax
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1400ccfe0
mov eax, ebx
add rsp, 0x78
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
int3
Function at 0x140005520
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rsi, qword [0x140297820]
cmp rsi, 1
jbe 0x140005565
mov ecx, dword [0x1402910c8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1400055b7
movsxd rcx, dword [rsi]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rsi + 4]
jne 0x1400055b7
mov rax, qword [rax + rcx]
test rax, rax
je 0x1400055b7
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x140297820]
call fcn.14008f690
test al, al
je 0x1400055ab
mov qword [0x140297828], 0
lea rdi, [0x140297820]
lea rsi, [0x140297828]
mov rcx, rsi
xor edx, edx
call fcn.1400721e0
mov rcx, rdi
mov rdx, rsi
xor r8d, r8d
mov r9, rdi
call fcn.14008f670
jmp 0x140005533
mov rsi, qword [0x140297820]
jmp 0x140005533
int3
Function at 0x140007bf0
Capabilities:
Get thread local storage value

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x20
mov r14, r8
mov ebp, edx
mov rsi, rcx
mov ebx, dword [0x14029b018]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test edi, edi
jne 0x140007cd5
cmp rbx, 1
je 0x140007c33
mov eax, dword [rsi + 0x1518]
test eax, eax
je 0x140007c3a
xor eax, eax
jmp 0x140007cca
mov eax, 1
lock xadd dword [rsi + 0x1518], eax
cmp eax, 0x7fffffff
je 0x140007d21
mov rcx, rsi
call fcn.14005cc80
mov rdi, rax
lock dec dword [rsi + 0x1518]
inc qword [rax + 0x5a0]
cmp bp, 0x29
jae 0x140007ce2
movzx edx, bp
mov rsi, rdx
shl rsi, 4
mov rbx, rdi
add rbx, rsi
mov rax, qword [rdi + rsi]
test rax, rax
je 0x140007cf5
inc qword [rdi + 0x5a8]
mov rcx, qword [rax]
test rcx, rcx
je 0x140007cad
mov rdx, rcx
not rdx
cmp qword [rax + 8], rdx
jne 0x140007d1c
bswap rcx
prefetcht0 byte [rcx]
jmp 0x140007caf
xor ecx, ecx
dec byte [rdi + rsi + 8]
mov qword [rbx], rcx
movzx ecx, word [rdi + rsi + 0xa]
mov qword [r14], rcx
movzx ecx, word [rdi + rsi + 0xa]
sub qword [rdi + 0x590], rcx
add rsp, 0x20
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
ret
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140007c23
inc qword [rdi + 0x5c0]
inc qword [rdi + 0x5b0]
jmp 0x140007c33
inc qword [rdi + 0x5b8]
inc qword [rdi + 0x5b0]
mov rcx, rdi
call fcn.140075530
mov rax, qword [rbx]
test rax, rax
jne 0x140007c91
jmp 0x140007c33
call fcn.14011f1c0
int3

Function at 0x140007ff0
Capabilities:
Check if file exists

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rdi, rdx
mov rsi, rcx
mov qword [rcx], 0
test rdx, rdx
je 0x140008039
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rax, qword [rsi]
inc rax
cmp rax, 2
jae 0x140008057
lea rax, [rdi + 1]
cmp rax, 2
jb 0x140008031
mov qword [rsi], rdi
call fcn.140071760
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov word [rsi + 8], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp rax, rdi
je 0x14000808a
mov rax, rsi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
call fcn.140071760
mov r14, qword [rsi]
mov rcx, qword [0x1402980e0]
test rcx, rcx
je 0x14000807c
mov rax, qword [rcx]
mov rdx, r14
call qword [rax]
mov qword [rsi], 0
jmp 0x14000801f
call fcn.140122340
mov rcx, qword [0x1402980e0]
jmp 0x14000806b
int3
Function at 0x140008090
Capabilities:
Check if file exists

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rsi, rcx
xor eax, eax
test r8d, r8d
sete al
xor ebx, ebx
test edx, edx
sete bl
xor ecx, ecx
mov edx, ebx
mov r8d, eax
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsi], 0
test rax, rax
je 0x14000814c
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rax, qword [rsi]
inc rax
cmp rax, 2
jae 0x140008119
lea rax, [rdi + 1]
cmp rax, 2
jb 0x1400080f4
mov qword [rsi], rdi
call fcn.140071760
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsi]
mov byte [rsi + 8], 1
inc rax
cmp rax, 1
jbe 0x140008150
mov rax, rsi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
call fcn.140071760
mov r14, qword [rsi]
mov rcx, qword [0x1402980e0]
test rcx, rcx
je 0x14000813e
mov rax, qword [rcx]
mov rdx, r14
call qword [rax]
mov qword [rsi], 0
jmp 0x1400080e2
call fcn.140122340
mov rcx, qword [0x1402980e0]
jmp 0x14000812d
mov byte [rsi + 8], 1
int3

Function at 0x140008460
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
push rbx
mov eax, 0x1040
call fcn.1400ccf70
sub rsp, rax
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0x1038], rax
mov dword [rsp + 0x2c], 0xaaaaaaaa
mov ecx, dword [0x1402910c8]
mov dword [rsp + 0x2c], ecx
cmp ecx, 0xffffffff
jne 0x1400084ff
lea rcx, [rsp + 0x2c]
call fcn.1401034e0
test al, al
je 0x14000857c
mov ecx, dword [rsp + 0x2c]
cmp ecx, 0xffffffff
jne 0x1400084e0
lea rcx, [rsp + 0x2c]
call fcn.1401034e0
test al, al
je 0x14000857f
cmp dword [rsp + 0x2c], 0xffffffff
je 0x14000857f
mov ecx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_TlsFree]
mov ecx, dword [rsp + 0x2c]
mov eax, 0xffffffff
lock cmpxchg dword [0x1402910c8], ecx
je 0x1400084ff
call qword [sym.imp.KERNEL32.dll_TlsFree]
mov ecx, dword [0x1402910c8]
mov dword [rsp + 0x2c], ecx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test al, 3
jne 0x140008579
lea rsi, [rsp + 0x30]
mov r8d, 0x1000
mov rcx, rsi
xor edx, edx
call fcn.1400cf750
mov ecx, dword [rsp + 0x2c]
lea rdx, [rsp + 0x33]
mov rbx, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rbx
mov ecx, 0x1000
call fcn.1400ca15c
mov rdi, rax
mov r8d, 0x1000
mov rcx, rax
mov rdx, rsi
call fcn.1400cf0a0
mov ecx, dword [rsp + 0x2c]
mov rdx, rdi
or rdx, 3
call rbx
mov rcx, qword [rsp + 0x1038]
xor rcx, rsp
call fcn.1400ccfe0
mov rax, rdi
add rsp, 0x1040
pop rbx
pop rdi
pop rsi
ret
int3
int3
int3
Function at 0x1400086f0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rsi, qword [0x140295ff8]
cmp rsi, 1
jbe 0x140008735
mov ecx, dword [0x1402910c8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140008787
movsxd rcx, dword [rsi]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rsi + 4]
jne 0x140008787
mov rax, qword [rax + rcx]
test rax, rax
je 0x140008787
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x140295ff8]
call fcn.14008f690
test al, al
je 0x14000877b
mov qword [0x140296000], 0
lea rdi, [0x140295ff8]
lea rsi, [0x140296000]
mov rcx, rsi
xor edx, edx
call fcn.1400721e0
mov rcx, rdi
mov rdx, rsi
xor r8d, r8d
mov r9, rdi
call fcn.14008f670
jmp 0x140008703
mov rsi, qword [0x140295ff8]
jmp 0x140008703
int3
Function at 0x140009c30
Capabilities:
Check if file exists

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov edi, r8d
mov rbx, rdx
mov rsi, rcx
mov rcx, rdx
call fcn.14008e280
test al, al
jne 0x140009c61
mov rcx, rsi
mov rdx, rbx
mov r8d, edi
add rsp, 0x20
pop rbx
pop rdi
pop rsi
jmp fcn.14008e4c0
mov ecx, 5
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rsi + 0x24], 0xfffffffb
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret

Function at 0x140009c80
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
test rdx, rdx
je 0x140009cbc
mov rsi, rdx
mov rdi, rcx
mov r14d, 0xffffffff
cmp rsi, r14
mov ebx, 0xffffffff
cmovb rbx, rsi
mov rcx, rdi
mov edx, ebx
call sub.ADVAPI32.dll_SystemFunction036
test al, al
je 0x140009cc6
add rdi, rbx
sub rsi, rbx
jne 0x140009c9a
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
int3

Function at 0x140009cca
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x38
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov eax, 0xffffffff
cmp r8, rax
mov ebx, 0xffffffff
cmovb ebx, r8d
lea r9, [rsp + 0x2c]
mov dword [r9], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140009d69
mov r15, qword [sym.imp.KERNEL32.dll_GetFileType]
lea r14, [rsp + 0x2c]
mov r12, qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x140009d7d
mov rcx, rdi
call r15
cmp eax, 3
jne 0x140009da2
mov dword [rsp + 0x2c], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov rdx, rsi
mov r8d, ebx
mov r9, r14
call r12
test eax, eax
jne 0x140009d32
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
cmp eax, 0x6d
setne sil
neg rsi
jmp 0x140009d84
cmp eax, 0xffffffff
je 0x140009da8
mov esi, eax
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400ccfe0
mov rax, rsi
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov eax, dword [rsp + 0x2c]
jmp 0x140009d82
int3
Function at 0x14000bd40
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov edi, 0xffffffff
cmp r8, rdi
mov eax, 0xffffffff
cmovb eax, r8d
lea r9, [rsp + 0x2c]
mov dword [r9], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000bd94
mov esi, dword [rsp + 0x2c]
cmp rsi, rdi
jne 0x14000bd9b
int3
mov rsi, 0xffffffffffffffff
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400ccfe0
mov rax, rsi
add rsp, 0x38
pop rdi
pop rsi
ret
Function at 0x1400183a0
Capabilities:
Terminate process

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x30
mov ebx, r8d
mov esi, edx
mov rdi, rcx
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp byte [rcx + 8], 0
je 0x1400183cf
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
jmp 0x1400183d2
mov rcx, qword [rdi]
mov edx, esi
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x140018420
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [rdi + 8], 0
je 0x1400183f5
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
jmp 0x1400183f8
mov rcx, qword [rdi]
mov edx, 0xea60
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14001842f
xor esi, esi
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400ccfe0
mov eax, esi
add rsp, 0x30
pop rbx
pop rdi
pop rsi
ret
test bl, bl
je 0x140018474
cmp byte [rdi + 8], 0
jne 0x140018460
mov rcx, qword [rdi]
jmp 0x140018469
mov dword [rsp + 0x24], 0xaaaaaaaa
cmp byte [rdi + 8], 0
jne 0x140018442
mov rcx, qword [rdi]
jmp 0x14001844b
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x140018474
mov esi, dword [rsp + 0x24]
jmp 0x140018474
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xea60
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rdi
mov edx, esi
call fcn.14012c9b0
mov sil, 1
jmp 0x140018409
Function at 0x14001e566
Capabilities:
Allocate or change rwx memory
Generate random numbers via rtlgenrandom

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb0
mov r12, rcx
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0xa8], rax
test dl, dl
jne 0x14001e5c2
xor ebp, ebp
cmp qword [r12 + 0x18], 0
jne 0x14001e621
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.1400ccfe0
mov eax, ebp
add rsp, 0xb0
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
lea rax, [0x1402152f0]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0
lea rdi, [0x140279890]
lea r8, str.NtMapViewOfSection
mov rcx, r12
mov rdx, rdi
mov r9d, 1
call fcn.1401ff1e2
lea rax, [0x140215530]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 1
lea r8, str.NtUnmapViewOfSection
mov rcx, r12
mov rdx, rdi
mov r9d, 1
call fcn.1401ff1e2
mov rax, qword [r12]
mov r14, qword [rax]
mov dword [rsp + 0x20], 1
mov r8d, 0x10000
mov rcx, r14
xor edx, edx
mov r9d, 0x2000
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rdi, qword [r12 + 0x18]
shl rdi, 6
lea rbx, [rdi + 0x60]
cmp rbx, 0x10001
jae 0x14001e7f5
mov r15, rax
lea rbp, [rsp + 0x48]
mov dword [rbp], 0xaaaaaaaa
mov esi, 0xffa0
sub rsi, rdi
mov rcx, rbp
mov edx, 4
call sub.ADVAPI32.dll_SystemFunction036
movzx eax, word [rsp + 0x48]
mov dword [rsp + 0x48], eax
cmp rsi, rax
jb 0x14001e678
mov ebp, eax
mov ecx, 0x800
mov eax, 0x1000
mov edx, 0x800
mov rsi, rax
shr rdx, 1
mov rax, rcx
cmp rcx, rbx
mov rcx, rdx
jae 0x14001e6a4
neg esi
and ebp, esi
mov eax, ebp
and eax, 0xf000
add r15, rax
add rdi, 0x105f
and rdi, 0xfffffffffffff000
mov dword [rsp + 0x20], 0x40
mov rcx, r14
mov rdx, r15
mov r8, rdi
mov r9d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
test rax, rax
je 0x14001e7f8
mov rdi, rax
and ebp, 0xfff
add rdi, rbp
movaps xmm0, xmmword [0x140257270]
lea rbp, [rsp + 0x48]
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x50], xmm0
movups xmmword [rbp + 0x40], xmm0
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x20], xmm0
mov qword [rbp], rbx
mov dword [rbp + 0x18], 0
mov qword [rbp + 8], 0x20
lea rcx, [0x14029bef0]
mov r8d, 0xd8
xor edx, edx
call fcn.1400cf750
mov rcx, r12
mov rdx, rdi
mov r8, rbx
mov r9, rbp
call fcn.1401ff7b2
mov ebp, eax
test eax, eax
jne 0x14001e59e
movabs rax, 0xaaaaaaaaaaaaaaaa
lea rcx, [rsp + 0x40]
mov qword [rcx], rax
mov qword [rsp + 0x20], rcx
lea r8, [rsp + 0x48]
mov r9d, 0x20
mov rcx, r14
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ebp, 0x2a
test eax, eax
je 0x14001e59e
cmp qword [rsp + 0x40], 0x20
jne 0x14001e59e
lea rax, [rsp + 0x3c]
mov dword [rax], 0xaaaaaaaa
mov qword [rsp + 0x20], rax
mov rcx, r14
mov rdx, rdi
mov r8, rbx
mov r9d, 0x20
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov rcx, qword [r12]
lea rdx, str.g_originals
lea r8, [0x14029bef0]
mov r9d, 0xd8
call fcn.1401eb386
mov ebp, eax
jmp 0x14001e59e
int3
int3