joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001ece0
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, [0x14003e410]
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 0x14001ed37
cmp word [rdx], r13w
jne 0x14001ed37
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14001ed3c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14001ee61
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14001ee82
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14001ed75
mov rdx, r9
mov word [rbx], cx
jmp 0x14001ed9c
cmp r9, r8
jae 0x14001edac
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 0x14001ed56
jmp 0x14001ee61
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 0x14001ee56
cmp dword [rsp + 0x80], esi
je 0x14001ee56
lea r8, [0x14003e410]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14001ee2e
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14001edfe
mov word [rbx], r13w
jmp 0x14001ee5e
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 0x14001ee0b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14001ee5e
cmp word [rsp + 0x70], r13w
jne 0x14001ee3b
cmp rbx, r14
je 0x14001edf8
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14001f948
cmp word [rsp + 0x70], r13w
je 0x14001ee61
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, [0x14003e410]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14001ee5b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14001ee61
Function at 0x14002188c
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 0x1400218bc
xor eax, eax
jmp 0x14002197f
mov rbp, rbx
cmp word [rax], si
je 0x1400218e1
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400218c8
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400218c4
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.14001fe8c
movsxd r14, eax
test eax, eax
jne 0x14002191f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400218b5
mov rcx, r14
call fcn.140019f34
mov rdi, rax
test rax, rax
jne 0x140021938
xor ecx, ecx
call fcn.14001940c
jmp 0x140021914
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.14001fe8c
test eax, eax
jne 0x140021969
mov rcx, rdi
call fcn.14001940c
jmp 0x140021973
xor ecx, ecx
call fcn.14001940c
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 0x140024648
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.140019034
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 0x1400246e9
cmp ebx, dword [rsp + 0x30]
je 0x1400246e2
test esi, esi
je 0x1400246e2
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x1400246bd
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1400246ca
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x1400246a7
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1400246ce
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1400246eb
mov eax, 1
jmp 0x1400246eb
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400275a4
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.1400152ac
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14002762e
cmp byte [rbp - 0x21], r15b
je 0x140027629
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140027664
call fcn.14001b9d4
test eax, eax
jne 0x140027650
cmp byte [rbp - 0x21], r15b
je 0x140027648
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140027664
cmp byte [rbp - 0x21], r15b
je 0x140027661
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1400158e4
test eax, eax
jne 0x140027704
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1400152ac
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400276a3
cmp byte [rbp - 0x21], r15b
je 0x1400276d8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400276d8
call fcn.14001b9d4
test eax, eax
jne 0x1400276c4
cmp byte [rbp - 0x21], r15b
je 0x1400276bd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400276d8
cmp byte [rbp - 0x21], r15b
je 0x1400276d5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1400158e4
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140027704
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140027707
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140027715
mov rcx, rdi
call fcn.14001940c
cmp byte [rbp + 0x3f], r15b
je 0x140027724
mov rcx, qword [rbp + 0x27]
call fcn.14001940c
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x14103c058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.14103c1df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, pe_nt_image_headers64
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x14103c089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14103c06f
add dl, dl
jne 0x14103c096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14103c0f6
xor eax, eax
add dl, dl
jne 0x14103c0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14103c1ad
add dl, dl
jne 0x14103c0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14103c0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14103c0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14103c0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14103c0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14103c07e
mov eax, 1
add dl, dl
jne 0x14103c106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14103c113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14103c0fb
sub eax, ebx
mov ebx, 1
jne 0x14103c14c
mov ecx, 1
add dl, dl
jne 0x14103c12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14103c13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14103c123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14103c07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14103c168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14103c175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14103c15d
cmp eax, 0x7d00
jae 0x14103c19b
cmp eax, 0x500
jb 0x14103c196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14103c07e
cmp eax, 0x7f
ja 0x14103c19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14103c07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14103c1d2
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 0x14103c07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x14003173c
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
movsxd r8, dword [0x14000003c]
lea rsi, [0x140000000]
add r8, rsi
mov rbx, rdx
mov rdi, rcx
cmp dword [r8 + 0x84], 0xd
jbe 0x1400317b4
mov r10d, dword [r8 + 0xf0]
xor r9d, r9d
test r10d, r10d
je 0x1400317b4
movzx ecx, word [r8 + 0x14]
movzx r11d, word [r8 + 6]
add rcx, 0x18
mov r10d, dword [r10 + rsi + 0xc]
add rcx, r8
test r11d, r11d
je 0x1400317b4
mov eax, dword [rcx + 0xc]
cmp r10d, eax
jb 0x1400317a8
mov edx, dword [rcx + 8]
add eax, edx
cmp r10d, eax
jb 0x1400317c6
inc r9d
add rcx, 0x28
cmp r9d, r11d
jb 0x140031796
xor eax, eax
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
ret
mov dword [rdi], edx
mov eax, dword [rcx + 0x24]
mov dword [rbx], eax
mov eax, dword [rcx + 0xc]
add rax, rsi
jmp 0x1400317b6

Function at 0x140033300
Capabilities:
Parse pe header

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

Function at 0x14003c094
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14003bdf8

Function at 0x140045fb0
Capabilities:
Parse pe header

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

Function at 0x140e7e050
Capabilities:
Encode data using xor

Disassembly:
jmp 0x140e7e05a
push rax
push rcx
push rdx
push rbx
push rbp
push rsi
push rdi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
pushfq
sub rsp, 8
stmxcsr dword [rsp]
call 0x140e7e083
pop rbp
sub rbp, 0x33
sub rbp, 0xe7e050
sub rsp, 0x20
add byte [rax], al
jmp 0x140e7e0a2
mov rax, 0xe7e050
add rax, rbp
add rax, 0x84
mov rcx, 0x60b
mov rdx, 0x7a330034
add byte [rbx], dh
jp 0x140e7e0f2
xor byte [rax], dl
inc rax
dec rcx
adc byte [rax - 1], cl
ror byte [rax - 1], 0xc9
jne 0x140e7e0c1
jmp 0x140e7e0d8
jl 0x140e7e097
fnstsw word [rdi + 0x343408bd]
xor al, 0x7c
mov ch, 0xf5
cmp al, 0x35
xor al, 0x34
jl 0x140e7e11f
xor al, 0x7c
xor eax, 0xf4f37cdd
fnstsw word [rbx + rsi*8 - 0xc]
xor esi, dword [rsp + rsi]
xor al, 0x7c
neg byte [rsp + rsi]
jl 0x140e7e0e7
neg byte [rsp + rsi]
xor al, 0x34
jl 0x140e7e0be
invalid
xor eax, 0x9f8e7cdd
jge 0x140e7e136
xor dh, byte [rsp + rsi]
xor al, 0x34
fdiv qword [rcx]
xor al, 0x34
xor al, 0xdd
and dh, byte [rsp + rsi]
xor al, 0xf5
fdiv qword [rsi]
add eax, 0xf5b57c25
xor byte [rsp + rsi], dh
xor al, 0x7c
retf
Function at 0x4548a0
Capabilities:
Terminate process

Disassembly:
push rbp
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x20
lea rbp, [rsp + 0x20]
mov rax, qword gs:[0x30]
mov rdi, qword [rax + 8]
mov rsi, qword [0x00476070]
xor eax, eax
lock cmpxchg qword [rsi], rdi
sete bl
je 0x4548f9
cmp rdi, rax
je 0x4548f9
mov r14, qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov ecx, 0x3e8
call r14
xor eax, eax
lock cmpxchg qword [rsi], rdi
sete bl
je 0x4548f9
cmp rdi, rax
jne 0x4548e0
mov rdi, qword [0x00476078]
mov eax, dword [rdi]
cmp eax, 1
jne 0x454913
mov ecx, 0x1f
call fcn.00458e20
jmp 0x45493a
cmp dword [rdi], 0
je 0x454921
mov byte [0x00488720], 1
jmp 0x45493a
mov dword [rdi], 1
mov rcx, qword [0x00476090]
mov rdx, qword [0x00476098]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov eax, dword [rdi]
cmp eax, 1
jne 0x45495a
mov rcx, qword [0x00476080]
mov rdx, qword [0x00476088]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov dword [rdi], 2
test bl, bl
je 0x454963
xor eax, eax
xchg qword [rsi], rax
mov rax, qword [0x00476038]
mov rax, qword [rax]
test rax, rax
je 0x45497e
xor ecx, ecx
mov edx, 2
xor r8d, r8d
call rax
call fcn.00454de0
lea rcx, [0x00455300]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [0x00476068]
mov qword [rcx], rax
lea rcx, [0x00454ae0]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.00454dd0
movsxd rdi, dword [0x0048870c]
lea rcx, [rdi*8 + 8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rsi, rax
test rdi, rdi
jle 0x454a19
mov r14d, edi
mov r15, qword [0x00488710]
xor r12d, r12d
nop word cs:[rax + rax]
nop
mov rdi, qword [r15 + r12*8]
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
lea rbx, [rax*2 + 2]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [rsi + r12*8], rax
mov rcx, rax
mov rdx, rdi
mov r8, rbx
call fcn.004736e0
add r12, 1
cmp r14, r12
jne 0x4549e0
jmp 0x454a1c
xor r14d, r14d
mov qword [rsi + r14*8], 0
mov qword [0x00488710], rsi
mov dword [0x00488710], esi
call fcn.00454bb0
mov r8, qword [0x00488718]
mov rax, qword [0x00476040]
mov rax, qword [rax]
mov qword [rax], r8
mov ecx, dword [0x0048870c]
mov rdx, qword [0x00488710]
call section..text
mov dword [0x00488724], eax
cmp dword [0x00488704], 0
je 0x454a88
cmp byte [0x00488720], 0
jne 0x454a79
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x00488724]
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
ret
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
int3
Function at 0x455290
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
sub rsp, 0x28
lea rbp, [rsp + 0x20]
mov rsi, rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
lea rcx, str.Mingw_w64_runtime_failure:_n
mov edx, 0x1b
mov r8d, 1
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8, qword [rbp]
mov rcx, rax
mov rdx, rsi
call fcn.00475350
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3

Function at 0x470700
Capabilities:
Resolve function by brute ratel badger hash

Disassembly:
push rbp
push r15
push r14
push r12
push rsi
push rdi
push rbx
mov rbp, rsp
movd edx, xmm0
mov eax, edx
not eax
test eax, 0x7f800000
jne 0x47072d
movdqa xmm1, xmm0
mulss xmm1, xmm0
addss xmm0, xmm1
jmp 0x470b89
test edx, edx
jle 0x470740
cmp edx, 0x800000
jb 0x470757
mov eax, edx
shr eax, 0x17
jmp 0x470769
movd eax, xmm0
test eax, 0x7fffffff
je 0x470b89
test edx, edx
js 0x470b94
bsr ecx, edx
mov eax, ecx
xor eax, 0xffffffe0
not cl
add cl, 0x18
shl edx, cl
add eax, 0xa
add eax, 0xffffff81
and edx, 0x7fffff
or edx, 0x800000
mov ecx, eax
and cl, 1
shl edx, cl
lea ecx, [rdx*4]
lea r9d, [rdx*4 - 0x2800000]
xor r8d, r8d
cmp edx, 0x1200000
cmovb r9d, ecx
setae r8b
mov r11d, r8d
shl r11d, 0x18
lea r10d, [r11 + 0x2000000]
lea ecx, [r9*2 - 0x4000000]
lea esi, [r11 + 0x2400000]
or r11d, 0x2800000
xor edx, edx
xor r9d, r9d
cmp esi, ecx
cmovg r11d, r10d
setle r9b
cmovg esi, edx
sub ecx, esi
add ecx, ecx
lea esi, [r11 + 0x200000]
add byte [rax], ah
add byte [rcx - 0x73], al
mov ebx, 0x400000
movss xmm0, dword [0x004775e0]
jmp 0x470b89

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

Disassembly:
push rbp
mov rbp, rsp
mov rax, qword [0x00476030]
movzx edx, word [rax]
cmp edx, 0x5a4d
jne 0x4750cd
movsxd rdx, dword [rax + 0x3c]
cmp dword [rax + rdx], 0x4550
jne 0x4750cd
add rax, rdx
movzx edx, word [rax + 0x18]
cmp edx, 0x20b
jne 0x4750cd
movzx edx, word [rax + 6]
test edx, edx
je 0x4750cd
sub rcx, qword [0x00476030]
movzx r8d, word [rax + 0x14]
add rax, r8
add rax, 0x18
jmp 0x4750b9
add rax, 0x28
add edx, 0xffffffff
je 0x4750cd
mov r8d, dword [rax + 0xc]
cmp rcx, r8
jb 0x4750b0
add r8d, dword [rax + 8]
cmp rcx, r8
jae 0x4750b0
jmp 0x4750cf
xor eax, eax
pop rbp
ret

Function at 0x4750e0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
mov rcx, qword [0x00476030]
movzx edx, word [rcx]
xor eax, eax
cmp edx, 0x5a4d
jne 0x475119
movsxd rdx, dword [rcx + 0x3c]
cmp dword [rcx + rdx], 0x4550
jne 0x475119
movzx r8d, word [rcx + rdx + 0x18]
cmp r8d, 0x20b
jne 0x475119
movzx eax, word [rcx + rdx + 6]
pop rbp
ret

Function at 0x475190
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
mov rax, qword [0x00476030]
movzx ecx, word [rax]
cmp ecx, 0x5a4d
jne 0x4751c0
movsxd rcx, dword [rax + 0x3c]
cmp dword [rax + rcx], 0x4550
jne 0x4751c0
movzx ecx, word [rax + rcx + 0x18]
cmp ecx, 0x20b
je 0x4751c2
xor eax, eax
pop rbp
ret
Function at 0x14000bdb0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x14000be30
Capabilities:
Parse pe header

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

Function at 0x14000bef0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400d1470]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000bf0f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x14000bf18
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x14007b230
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
mov rcx, qword [rdi]
call sub.msvcrt.dll__fileno_1
mov ecx, eax
mov r8d, ebx
mov rdx, rsi
call sub.msvcrt.dll__read
movsxd rbp, eax
cmp eax, 0xffffffff
je 0x14007b278
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call r12
cmp dword [rax], 4
je 0x14007b24a
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x1400c5410
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
lea rcx, [0x1400ca1e0]
jmp 0x14000cc10

Function at 0x1400c5420
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
lea rcx, [0x1400ca1e0]
jmp 0x14000cc10
Function at 0x4010d0
Capabilities:
Create process on windows
Enumerate processes

Disassembly:
mov r11, rsp
sub rsp, 0x398
mov rax, qword [0x004364e0]
xor rax, rsp
mov qword [rsp + 0x370], rax
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rbp
mov qword [r11 - 8], rsi
mov rsi, rdx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x80]
xor ebp, ebp
mov edx, 0xf01ff
mov rcx, rax
mov qword [rsp + 0x80], rbp
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, qword [rsp + 0x80]
lea rax, [rsp + 0x60]
lea r9d, [rbp + 1]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov edx, 0x2000000
mov qword [rsp + 0x60], rbp
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov rcx, qword [rsp + 0x60]
lea r9d, [rbp + 4]
lea r8, [rsp + 0x70]
lea edx, [rbp + 0xc]
mov dword [rsp + 0x70], eax
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
lea ecx, [rbp + 2]
xor edx, edx
mov dword [rsp + 0xa8], 0x18
mov dword [rsp + 0xb8], ebp
mov qword [rsp + 0xb0], rbp
mov qword [rsp + 0x68], rbp
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
lea rdx, [rsp + 0x130]
mov rcx, rax
mov rbx, rax
mov dword [rsp + 0x130], 0x238
call sub.KERNEL32.dll_Process32FirstW
mov qword [rsp + 0x388], rdi
nop
nop
nop
nop
lea rdx, str.explorer.exe
lea rcx, [rsp + 0x15c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x401204
lea rdx, [rsp + 0x130]
mov rcx, rbx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4011d0
mov rdi, qword [rsp + 0x68]
jmp 0x40121c
mov r8d, dword [rsp + 0x138]
xor edx, edx
mov ecx, 0x1f0fff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r8, [rsp + 0x88]
mov edx, 0xf01ff
mov rcx, rdi
mov qword [rsp + 0x88], rbp
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, qword [rsp + 0x88]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov r9d, 1
xor r8d, r8d
mov edx, 0x2000000
mov qword [rsp + 0x78], rbp
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x68]
xor r8d, r8d
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
lea rcx, [rsp + 0xc0]
lea r8d, [rdx + 0x68]
call fcn.0040bb30
mov rcx, qword [rsp + 0x60]
xor r11d, r11d
lea rax, str.WinSta0Default
lea r9, [rsp + 0xa8]
mov r8, rsi
mov qword [rsp + 0xd0], rax
lea rax, [rsp + 0x90]
xor edx, edx
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x90], r11
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x430
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rbp
mov qword [rsp + 0x98], r11
mov qword [rsp + 0xa0], r11
mov dword [rsp + 0xc0], 0x68
mov dword [rsp + 0xfc], 1
mov word [rsp + 0x100], 1
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov rdi, qword [rsp + 0x388]
mov rsi, qword [rsp + 0x390]
mov rbp, qword [rsp + 0x3b8]
mov rbx, qword [rsp + 0x3b0]
mov rcx, qword [rsp + 0x370]
xor rcx, rsp
call fcn.0040bd10
add rsp, 0x398
ret