joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002634
Capabilities:
Create thread
Enumerate processes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x280
mov rax, qword [0x14003a020]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rsi, qword [0x14003ca48]
xor ebx, ebx
xor edx, edx
lea ecx, [rbx + 6]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140002725
xor edx, edx
mov dword [rsp + 0x30], 0x238
mov r8d, 0x234
lea rcx, [rsp + 0x34]
call fcn.14000b250
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x14000271c
lea rdx, str.CymulateEDRScenarioGenerator.exe
lea rcx, [rsp + 0x5c]
call fcn.14000f024
test eax, eax
je 0x1400026d4
lea rdx, [0x140034170]
lea rcx, [rsp + 0x5c]
call fcn.14000f024
test eax, eax
jne 0x1400026ee
mov r8d, dword [rsp + 0x38]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
jne 0x140002707
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x1400026aa
test rbx, rbx
je 0x14000271c
jmp 0x140002713
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r9, qword [rsi + 0x88]
test r9, r9
je 0x140002768
lea r8, [0x1400341b0]
xor edx, edx
xor ecx, ecx
call fcn.140001c50
inc eax
movsxd rcx, eax
call fcn.140008e20
mov r8, qword [rsi + 0x88]
lea rdx, [0x1400341b0]
mov rcx, rax
mov qword [rsi + 0x98], rax
call fcn.140001bf8
and qword [rsp + 0x28], 0
lea r8, [0x140001eb8]
and dword [rsp + 0x20], 0
mov r9, rsi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsi + 0x58], rax
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.1400088d0
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x1400027b4
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x280
mov rax, qword [0x14003a020]
xor rax, rsp
mov qword [rsp + 0x278], rax
mov rdi, rcx
mov qword [rsp + 0x20], rcx
xor edx, edx
lea ecx, [rdx + 6]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140002853
mov dword [rsp + 0x30], 0x238
xor edx, edx
mov r8d, 0x234
lea rcx, [rsp + 0x34]
call fcn.14000b250
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
jmp 0x140002846
lea rdx, str.CymulateEDR.exe
lea rcx, [rsp + 0x5c]
call fcn.14000f024
mov rcx, rbx
test eax, eax
jne 0x14000283b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x14000286f
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140002819
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8, qword [rdi + 0x80]
lea rdx, str.Log:isEDRProcessRunning:false:_s__n
mov rcx, rdi
call fcn.140001f78
xor al, al
jmp 0x14000286f
mov rcx, qword [rsp + 0x278]
xor rcx, rsp
call fcn.1400088d0
mov rbx, qword [rsp + 0x298]
add rsp, 0x280
pop rdi
ret
Function at 0x140002894
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Terminate process
Terminate thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov r9, qword [rcx + 0x88]
lea r8, [0x140034238]
mov rbx, rcx
xor edx, edx
xor ecx, ecx
call fcn.140001c50
inc eax
movsxd rcx, eax
call fcn.140008e20
mov r8, qword [rbx + 0x88]
lea rdx, [0x140034238]
mov rcx, rax
mov rbp, rax
call fcn.140001bf8
cmp byte [rbx + 0x50], 0
jne 0x140002a09
lea rsi, str.KEEPALIVE:_s__n
mov r8, rbp
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov rdi, rax
test rax, rax
je 0x14000296e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140002939
cmp eax, 5
je 0x140002939
mov rcx, qword [rbx + 0x80]
lea rdx, [0x140034258]
call fcn.14000a69c
test rax, rax
je 0x1400029c9
cmp qword [rbx + 0xa8], 0
je 0x14000295a
mov r8, qword [rbx + 0x80]
test r8, r8
je 0x14000295a
mov rdx, rsi
mov rcx, rbx
call fcn.140001f78
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400029b3
mov rcx, qword [rbx + 0x80]
lea rdx, [0x140034258]
call fcn.14000a69c
test rax, rax
jne 0x140002992
mov rcx, rbx
call fcn.1400027b4
test al, al
je 0x1400029f3
cmp qword [rbx + 0xa8], 0
je 0x1400029b3
mov r8, qword [rbx + 0x80]
test r8, r8
je 0x1400029b3
mov rdx, rsi
mov rcx, rbx
call fcn.140001f78
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [rbx + 0x50], 0
jne 0x140002a09
jmp 0x1400028f6
mov r8, qword [rbx + 0x80]
lea rdx, str.Log:keepalive_loop_break__if__ulLastError__ERROR_ALREADY_EXISTS__ulLastError__ERROR_ACCESS_DENIED__:_s__n
mov rcx, rbx
call fcn.140001f78
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140002a09
mov r8, qword [rbx + 0x80]
lea rdx, str.Log:keepalive_loop_break_if__HANDLE_hMutex__CreateMutexA_0__false__pszAttackMutex__:_s__n
mov rcx, rbx
call fcn.140001f78
mov r8, qword [rbx + 0x80]
lea rdx, str.Log:keepalive_loop_finished:_s__n
mov rcx, rbx
call fcn.140001f78
cmp byte [rbx + 0x50], 0
jne 0x140002aa1
mov r8, qword [rbx + 0x80]
lea rdx, str.Log:keepalive_loop_terminating.._:_s__n
mov rcx, rbx
call fcn.140001f78
cmp byte [rbx + 0xa0], 0
mov rcx, rbx
jne 0x140002a66
lea rdx, str.Log:TerminateProcess_n
call fcn.140001f78
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x140002aa1
lea rdx, str.Log:FreeLibraryAndExitThread_FreeLibraryAndExitThreadReflected_n
call fcn.140001f78
mov rdi, qword [rbx + 0x70]
sub rdi, qword [rbx + 0x68]
sar rdi, 3
test edi, edi
je 0x140002aa1
mov esi, edi
shl rsi, 3
mov rcx, qword [rbx + 0x68]
lea rsi, [rsi - 8]
xor edx, edx
mov rcx, qword [rsi + rcx]
call qword [sym.imp.KERNEL32.dll_TerminateThread]
add edi, 0xffffffff
jne 0x140002a88
mov edx, 1
mov rcx, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
jmp fcn.1400088f0
Function at 0x140003bc0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push r15
sub rsp, 0x30
mov rbx, qword [0x14003ca68]
mov r8d, 6
lea rdx, [0x1400344b0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
je 0x140003d1b
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140003d1b
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rsi, rax
test rax, rax
je 0x140003d1b
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
test eax, eax
je 0x140003d1b
mov r14d, eax
mov ecx, eax
call fcn.140008e20
mov rdi, rax
mov r8d, r14d
mov rdx, rsi
mov rcx, rax
call fcn.14000ab90
mov esi, dword [rdi]
lea rcx, [rsi + 1]
call fcn.140008e20
mov r14, rax
lea r8, [rsi + 1]
xor edx, edx
mov rcx, rax
call fcn.14000b250
lea rdx, [rdi + 4]
mov r8d, esi
mov rcx, r14
call fcn.14000ab90
mov rdx, r14
mov rcx, rbx
call fcn.140003d38
test al, al
je 0x140003d1b
movzx eax, byte [rsi + rdi + 4]
mov byte [rbx + 8], al
test al, al
je 0x140003d15
lea rcx, [rax + 1]
call fcn.140008e20
mov qword [rbx], rax
movzx r8d, byte [rbx + 8]
inc r8
xor edx, edx
mov rcx, rax
call fcn.14000b250
movzx r8d, byte [rbx + 8]
lea rdx, [rdi + 5]
add rdx, rsi
mov rcx, qword [rbx]
call fcn.14000ab90
movzx eax, byte [rbx + 8]
add rax, rsi
mov ecx, dword [rax + rdi + 5]
mov dword [rbx + 0x18], ecx
call fcn.140008e20
mov qword [rbx + 0x10], rax
mov r8d, dword [rbx + 0x18]
xor edx, edx
mov rcx, rax
call fcn.14000b250
mov r8d, dword [rbx + 0x18]
movzx edx, byte [rbx + 8]
add rdx, 9
add rdx, rsi
add rdx, rdi
mov rcx, qword [rbx + 0x10]
call fcn.14000ab90
nop
mov al, 1
jmp 0x140003d1b
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
mov r14, qword [rsp + 0x58]
add rsp, 0x30
pop r15
ret
Function at 0x140006864
Capabilities:
Allocate or change rwx memory

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x20
movsxd rbx, dword [rcx + 0x3c]
lea r9, [rsp + 0x40]
mov dword [rax + 8], 2
add rbx, rcx
mov edi, 1
mov r14, rcx
mov edx, dword [rbx + 0x54]
mov r8d, dword [rbx + 0x38]
dec edx
add edx, r8d
neg r8d
mov eax, r8d
lea r8d, [rdi + 1]
and rdx, rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
xor r15d, r15d
test eax, eax
je 0x140006967
movzx eax, word [rbx + 0x14]
mov ebp, r15d
add rax, 0x20
cmp r15w, word [rbx + 6]
jae 0x140006976
lea rsi, [rax + rbx]
mov edx, dword [rsi + 0x1c]
mov ecx, edx
mov eax, edx
and ecx, 0x40000000
sar eax, 0x1f
bt edx, 0x1d
jae 0x140006905
test ecx, ecx
je 0x1400068fd
and eax, 0x20
add eax, 0x20
jmp 0x140006916
and eax, 0x70
add eax, 0x10
jmp 0x140006916
test ecx, ecx
je 0x140006911
and eax, 2
add eax, 2
jmp 0x140006916
and eax, 7
add eax, edi
mov r8d, eax
bts r8d, 9
bt edx, 0x1a
cmovae r8d, eax
mov dword [rsp + 0x40], r8d
mov r9d, dword [rbx + 0x38]
mov ecx, dword [rsi + 4]
add rcx, r14
lea edx, [r9 - 1]
neg r9d
add edx, dword [rsi]
mov eax, r9d
lea r9, [rsp + 0x40]
and rdx, rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140006967
movzx eax, word [rbx + 6]
add rsi, 0x28
add ebp, edi
cmp ebp, eax
jb 0x1400068db
jmp 0x140006976
lea rcx, str.VirtualProtect___Failed._n
call fcn.140006538
mov dil, r15b
mov rbx, qword [rsp + 0x48]
mov al, dil
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret

Function at 0x1400069b4
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
xor ebx, ebx
mov qword [0x14003ca30], rbx
movsxd rax, dword [rcx + 0x3c]
cmp dword [rax + rcx + 0x28], ebx
je 0x140006a12
mov r9d, dword [rax + rcx + 0x28]
mov edx, 0x2000
add r9, rcx
test word [rax + rcx + 0x16], dx
je 0x1400069f5
lea r8, [0x14003ca30]
lea edx, [rbx + 1]
call r9
test al, al
setne bl
jmp 0x140006a12
mov qword [rsp + 0x28], rbx
lea r8, [0x140006994]
xor edx, edx
mov dword [rsp + 0x20], ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbx, rax
mov rax, rbx
add rsp, 0x30
pop rbx
ret
Function at 0x140009578
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400095c2
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400095c2
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400095c2
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400095c2
cmp dword [rcx + 0x84], 0xe
jbe 0x1400095c2
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400095c4
xor al, al
add rsp, 0x28
ret

Function at 0x140016fe0
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140016ddc
Function at 0x14001fdbc
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14001fe43
mov rsi, rbx
cmp word [rax], bp
je 0x14001fe02
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14001fdec
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14001fde8
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14001b108
mov rdi, rax
test rax, rax
je 0x14001fe30
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14000ab90
mov rbp, rdi
xor ecx, ecx
call fcn.14001a8e8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140022500
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.14001a438
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x1400225a1
cmp ebx, dword [rsp + 0x30]
je 0x14002259a
test esi, esi
je 0x14002259a
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x140022575
sub r8w, 0x61
cmp r8w, 0x19
ja 0x140022582
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14002255f
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x140022586
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1400225a3
mov eax, 1
jmp 0x1400225a3
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x1400243d4
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1400243ea
mov al, 1
jmp 0x14002444a
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400243fb
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140024448
mov ecx, dword [rcx + 0x18]
nop
call fcn.14001bdf4
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140024448
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140024448
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140024448
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14002444a
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140027390
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400273b8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400273b8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret

Function at 0x1409b82c0
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1409b8447
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1409b82f1
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1409b82d7
add dl, dl
jne 0x1409b82fe
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1409b835e
xor eax, eax
add dl, dl
jne 0x1409b830d
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1409b8415
add dl, dl
jne 0x1409b831e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409b832b
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409b8338
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409b8345
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1409b8352
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1409b82e6
mov eax, 1
add dl, dl
jne 0x1409b836e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409b837b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1409b8363
sub eax, ebx
mov ebx, 1
jne 0x1409b83b4
mov ecx, 1
add dl, dl
jne 0x1409b8396
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1409b83a3
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1409b838b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1409b82e6
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1409b83d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1409b83dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1409b83c5
cmp eax, 0x7d00
jae 0x1409b8403
cmp eax, 0x500
jb 0x1409b83fe
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1409b82e6
cmp eax, 0x7f
ja 0x1409b8406
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1409b82e6
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1409b843a
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1409b82e6
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140002b50
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.140004650
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.140004650
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 0x140002bc0
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 0x140002cf0
mov rax, qword [0x1400090a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002c0b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002c95
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002bf0
mov rcx, rbx
call fcn.140003610
mov rdi, rax
test rax, rax
je 0x140002d12
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.140003750
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 0x140002cf7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002c8e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002ca0
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 0x140002c8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002b50
nop dword [rax]
xor esi, esi
jmp 0x140002c18
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.140002b50
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002b50
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003280
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 0x1400032dc
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 0x1400032d3
test rsi, rsi
je 0x1400032d3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400032b8
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 0x140003610
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140003690
Capabilities:
Parse pe header

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

Function at 0x140003750
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006a50]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000376f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003778
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140002198
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x13e0
call fcn.14003b760
sub rsp, rax
mov rax, qword [0x14005d010]
xor rax, rsp
mov qword [rsp + 0x13d0], rax
mov edi, edx
mov ebx, ecx
call fcn.140013acc
or dword [rsp + 0x13c4], 0xffffffff
mov ecx, 0x270
mov dword [rsp + 0x44], eax
mov r8d, 1
mov edx, eax
shr edx, 0x1e
xor edx, eax
imul eax, edx, 0x6c078965
add eax, r8d
mov dword [rsp + r8*4 + 0x44], eax
inc r8
cmp r8, rcx
jb 0x1400021e7
or dword [rsp + 0x30], 0xffffffff
lea rax, [rsp + 0x40]
mov ebp, 0x80000000
mov qword [rsp + 0x20], rax
cmp ebx, ebp
mov dword [rsp + 0x40], ecx
lea eax, [rbx - 0x80000000]
mov qword [rsp + 0x28], 0x20
lea esi, [rbx + rbp]
cmovae esi, eax
lea ebx, [rdi + rbp]
cmp edi, ebp
lea eax, [rdi - 0x80000000]
cmovae ebx, eax
sub ebx, esi
cmp ebx, 0xffffffff
jne 0x140002256
lea rcx, [rsp + 0x20]
call fcn.140007158
mov edx, eax
jmp 0x14000229a
lea edi, [rbx + 1]
xor r8d, r8d
xor r9d, r9d
test ebx, ebx
je 0x140002274
lea rcx, [rsp + 0x20]
call fcn.140007158
mov r8d, eax
or r9d, 0xffffffff
xor edx, edx
mov eax, r9d
div edi
xor edx, edx
mov ecx, eax
mov eax, r8d
div edi
cmp eax, ecx
jb 0x140002293
xor edx, edx
mov eax, r9d
div edi
cmp edx, ebx
jne 0x140002259
xor edx, edx
mov eax, r8d
div edi
add edx, esi
cmp edx, ebp
lea ecx, [rdx - 0x80000000]
lea eax, [rdx + rbp]
cmovae eax, ecx
mov rcx, qword [rsp + 0x13d0]
xor rcx, rsp
call fcn.140012020
lea r11, [rsp + 0x13e0]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret