joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400235b0
Capabilities:
Log keystrokes via polling

Disassembly:
sub rsp, 0x28
cmp qword [0x140160790], 0
je 0x1400235ce
test cl, cl
jne 0x1400235ce
movzx eax, byte [0x1401616d2]
add rsp, 0x28
ret
mov qword [rsp + 0x30], rbx
mov ecx, 0xa0
mov qword [rsp + 0x20], rdi
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
shr ax, 0xb
mov ecx, 0xa1
and al, 0x10
movzx ebx, al
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
mov edi, 0x8000
or cl, 0x20
movzx edx, cl
and ax, di
mov ecx, 0xa2
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 1
movzx edx, cl
and ax, di
mov ecx, 0xa3
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 2
movzx edx, cl
and ax, di
mov ecx, 0xa4
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 4
movzx edx, cl
and ax, di
mov ecx, 0xa5
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 8
movzx edx, cl
and ax, di
mov ecx, 0x5b
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 0x40
movzx edx, cl
and ax, di
mov ecx, 0x5c
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
and ax, di
movzx ecx, bl
or cl, 0x80
test ax, ax
movzx edi, cl
cmove edi, ebx
cmp qword [0x140160790], 0
je 0x140023724
movzx ecx, byte [0x1401616d2]
movzx ebx, dil
not bl
and bl, cl
je 0x140023724
movzx edx, byte [0x1401616d0]
movzx eax, bl
not al
and byte [0x1401616d1], al
and cl, al
and dl, al
mov byte [0x1401616d2], cl
lea rcx, [0x1401615d0]
mov byte [0x1401616d0], dl
call fcn.140023740
mov rcx, qword [0x140161760]
test rcx, rcx
je 0x140023724
test byte [rcx + 0xc], bl
mov eax, 0
cmovne rcx, rax
mov qword [0x140161760], rcx
mov rbx, qword [rsp + 0x30]
movzx eax, dil
mov rdi, qword [rsp + 0x20]
add rsp, 0x28
ret
Function at 0x140023b90
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
xor edi, edi
xor edx, edx
mov esi, edi
mov r15, rcx
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov r14, rax
test rax, rax
je 0x140023d61
movaps xmm0, xmmword [str.SYSTEMCurrentControlSetControlKeyboard_Layouts_]
lea rcx, [rbp - 0x6c]
movaps xmm1, xmmword [0x140137bc0]
mov eax, dword [0x140137c10]
movaps xmmword [rsp + 0x30], xmm0
movaps xmm0, xmmword [0x140137bd0]
movaps xmmword [rsp + 0x40], xmm1
movaps xmm1, xmmword [0x140137be0]
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [0x140137bf0]
movaps xmmword [rsp + 0x60], xmm1
movaps xmm1, xmmword [0x140137c00]
mov dword [rbp - 0x70], eax
movzx eax, word [0x140137c14]
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rbp - 0x80], xmm1
mov word [rbp - 0x6c], ax
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
test eax, eax
je 0x140023d21
lea rax, [rbp + 0x200]
xor r8d, r8d
lea r9d, [rdi + 1]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x30]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140023d1d
mov rcx, qword [rbp + 0x200]
lea rax, [rbp + 0x1f8]
mov qword [rsp + 0x28], rax
lea rdx, str.Layout_File
lea rax, [rbp - 0x50]
mov qword [rsp + 0x2f0], rbx
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rbp + 0x1f8], 0x208
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rbp + 0x200]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
mov rbx, qword [rsp + 0x2f0]
jne 0x140023d1d
mov ecx, dword [rbp + 0x1f8]
test ecx, ecx
je 0x140023d1d
shr ecx, 1
mov edx, ecx
dec ecx
mov dword [rbp + 0x1f8], ecx
cmp word [rbp + rcx*2 - 0x50], si
jne 0x140023cf7
mov edx, ecx
test ecx, ecx
je 0x140023d0a
nop dword [rax + rax]
dec ecx
cmp word [rbp + rcx*2 - 0x50], si
jne 0x140023d0a
mov dword [rbp + 0x1f8], ecx
mov edx, ecx
test ecx, ecx
jne 0x140023ce0
jmp 0x140023d0a
mov dword [rbp + 0x1f8], edx
cmp edx, 0x104
jae 0x140023d1d
mov word [rbp + rdx*2 - 0x50], di
test edx, edx
je 0x140023d21
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
jmp 0x140023d21
mov word [rbp - 0x50], di
cmp r15, r14
je 0x140023d31
xor edx, edx
mov rcx, r14
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
test rsi, rsi
je 0x140023d61
lea rdx, str.KbdLayerDescriptor
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140023d58
call rax
mov edi, dword [rax + 0x50]
not edi
and edi, 1
add edi, 3
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, edi
add rsp, 0x2c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x140024490
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
movzx edi, cx
movzx ebx, r9b
mov rsi, rdx
cmp edi, 0xa
jne 0x1400244c0
mov al, 0xd
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rdx, r8
mov qword [rsp + 0x30], rbp
movzx ecx, di
call qword [sym.imp.USER32.dll_VkKeyScanExW]
movsx rcx, ax
mov r8, rcx
shr r8, 8
cmp r8b, 0xff
jne 0x140024538
cmp cl, 0xff
jne 0x140024538
test bl, bl
je 0x14002453e
mov ebp, edi
test edi, 0xffffff80
jne 0x14002453e
mov edx, 0x103
mov ecx, edi
call fcn.1400fc354
test eax, eax
je 0x14002453e
mov edx, 2
mov ecx, edi
call fcn.1400fc354
mov edx, 1
movzx edi, dil
mov ecx, ebp
mov ebx, eax
call fcn.1400fc354
test eax, eax
movzx ecx, dil
setne r8b
and cl, 0xdf
test ebx, ebx
movzx ecx, cl
cmove ecx, edi
test r8b, 0x38
je 0x140024542
xor al, al
jmp 0x14002458c
test rsi, rsi
je 0x140024589
movzx eax, r8b
and al, 6
cmp al, 6
jne 0x140024556
or byte [rsi], 8
jmp 0x140024578
test r8b, 2
je 0x140024567
movzx eax, byte [rsi]
test al, 3
jne 0x140024567
or al, 1
mov byte [rsi], al
test r8b, 4
je 0x140024578
movzx eax, byte [rsi]
test al, 0xc
jne 0x140024578
or al, 4
mov byte [rsi], al
test r8b, 1
je 0x140024589
movzx eax, byte [rsi]
test al, 0x30
jne 0x140024589
or al, 0x10
mov byte [rsi], al
movzx eax, cl
mov rbp, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140025710
Capabilities:
Log keystrokes

Disassembly:
push rbx
sub rsp, 0x20
movzx ebx, cx
mov eax, ebx
cmp ebx, 0x11c
ja 0x1400257ee
je 0x1400257e6
sub eax, 0x1d
cmp eax, 0x36
ja case.0x140025813.286
lea rdx, [0x140000000]
cdqe
movzx eax, byte [rdx + rax + 0x258e4]
mov ecx, dword [rdx + rax*4 + 0x25898]
add rcx, rdx
jmp rcx
mov al, 0xa0
add rsp, 0x20
pop rbx
ret
mov al, 0xa2
add rsp, 0x20
pop rbx
ret
mov al, 0xa4
add rsp, 0x20
pop rbx
ret
mov al, 0x6a
add rsp, 0x20
pop rbx
ret
mov al, 0x6d
add rsp, 0x20
pop rbx
ret
mov al, 0x6b
add rsp, 0x20
pop rbx
ret
mov al, 0x2e
add rsp, 0x20
pop rbx
ret
mov al, reloc.WSOCK32.dll_ioctlsocket
add rsp, 0x20
pop rbx
ret
mov al, 0x2d
add rsp, 0x20
pop rbx
ret
mov al, 0x26
add rsp, 0x20
pop rbx
ret
mov al, 0x28
add rsp, 0x20
pop rbx
ret
mov al, 0x25
add rsp, 0x20
pop rbx
ret
mov al, 0x27
add rsp, 0x20
pop rbx
ret
mov al, 0x24
add rsp, 0x20
pop rbx
ret
mov al, reloc.OLEAUT32.dll_SafeArrayAllocDescriptor
add rsp, 0x20
pop rbx
ret
mov al, 0x21
add rsp, 0x20
pop rbx
ret
mov al, SafeArrayAllocDescriptor
add rsp, 0x20
pop rbx
ret
mov al, reloc.WSOCK32.dll_send
add rsp, 0x20
pop rbx
ret
mov al, 0xd
add rsp, 0x20
pop rbx
ret
sub eax, 0x11d
cmp eax, 0x40
ja case.0x140025813.286
lea rdx, [0x140000000]
cdqe
movzx eax, byte [rdx + rax + 0x25944]
mov ecx, dword [rdx + rax*4 + 0x2591c]
add rcx, rdx
jmp rcx
mov al, 0xa1
add rsp, 0x20
pop rbx
ret
mov al, 0xa3
add rsp, 0x20
pop rbx
ret
mov al, 0xa5
add rsp, 0x20
pop rbx
ret
mov al, 0x5b
add rsp, 0x20
pop rbx
ret
mov al, 0x5c
add rsp, 0x20
pop rbx
ret
mov al, 0x90
add rsp, 0x20
pop rbx
ret
mov al, reloc.WSOCK32.dll_WSAGetLastError
add rsp, 0x20
pop rbx
ret
mov al, 0x5d
add rsp, 0x20
pop rbx
ret
mov al, 0x2c
add rsp, 0x20
pop rbx
ret
bt bx, 8
jae 0x14002587c
movzx ecx, bl
mov edx, 1
or ecx, 0xe000
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
test eax, eax
jne 0x140025890
movzx ecx, bl
mov edx, 1
add rsp, 0x20
pop rbx
jmp qword [sym.imp.USER32.dll_MapVirtualKeyW]
add rsp, 0x20
pop rbx
ret
sub dword cs:[rsi], edi
xchg edx, eax
mov esi, 0x15f52a0
movabs dword [0xb4c076391777942c], eax
mov esp, 0x94f89d6f
popfq
clc
xchg esp, eax
popfq
clc
xchg esp, eax
cmp cl, byte [rbx - 0x26]
loopne 0x140272653
mov bh, 0xc3
test byte [rsi + rdi*8 + 0x3e381a9f], dl
sbb bh, byte [rax]
cmp byte [rsi], bh
jne 0x14027263f
sbb bh, byte [rax]
cmp byte [rsi], bh
jne 0x14027263f
mov dh, 0xb6
invalid
xchg ebp, eax
mov al, 0xa9
fbld tbyte [rdx]
xchg byte [rax + 0x1970b6fb], dh
xchg esi, eax
invalid
invalid
invalid
lodsb al, byte [rsi]
jno 0x14027267c
leave
invalid
sti
mov ebp, 0x3d1b4e3a
cmp cl, byte [rsi + 0x1b]
cmp eax, 0xc21dc8b
invalid
cmp cl, byte [rsi + 0x1b]
cmp eax, 0xc21dc8b
out 0x69, al
shr ch, 0xf4
sbb dword [rbx + 0x2b], edi
jnp 0x1402726b9
fsub qword [rcx]
or al, 0xe6
imul eax, eax, 0x7b19f4ed
sub edi, edi
cmp dword [rax], ebx
push rsp
in eax, dx
jmp 0x140272683
jnp 0x1402726b9
invalid
pop rax
insb byte [rdi], dx
cli
invalid
test eax, 0x8cbcb61a
insb byte [rdi], dx
jne str.:Ne
loopne 0x1402726b8
invalid
movsd dword [rdi], dword [rsi]
add byte [rcx], 0xaf
pop rsi
invalid
Function at 0x1400274e0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
lea r11, [0x140123950]
mov r9, rdx
not ecx
cmp r8d, 8
jb 0x1400275b1
mov r10d, r8d
shr r10, 3
nop dword [rax]
movzx edx, byte [r9]
mov eax, ecx
xor rdx, rax
shr ecx, 8
movzx eax, dl
add r8d, 0xfffffff8
movzx edx, byte [r9 + 1]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 2]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 3]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 4]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 5]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 6]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 7]
add r9, 8
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
xor ecx, dword [r11 + rax*4]
sub r10, 1
jne 0x140027500
test r8d, r8d
je 0x1400275dd
nop word [rax + rax]
movzx edx, byte [r9]
lea r9, [r9 + 1]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
xor ecx, dword [r11 + rax*4]
add r8d, 0xffffffff
jne 0x1400275c0
not ecx
mov eax, ecx
ret

Function at 0x140027a00
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
test byte [rcx], 1
mov r10, rdx
mov esi, r8d
mov rdi, rcx
jne 0x140027a69
mov rcx, qword [rcx + 8]
lea r9, [rsp + 0x40]
xor ebx, ebx
mov r8d, esi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140027a53
mov dword [rdi + 0x10], 7
mov eax, ebx
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov ebx, dword [rsp + 0x40]
mov eax, ebx
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rcx + 0x20]
mov rdx, qword [rdi + 0x18]
lea rax, [rcx + rsi]
cmp rax, rdx
jbe 0x140027a7e
mov esi, edx
sub esi, ecx
mov rdx, qword [rdi + 8]
add rdx, rcx
mov r8d, esi
mov rcx, r10
mov ebx, esi
call fcn.1400f1320
add qword [rdi + 0x20], rbx
mov eax, esi
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x140027ab0
Capabilities:
Read file on windows

Disassembly:
push rdi
sub rsp, 0x40
cmp dword [rcx + 0x10], 0
mov rdi, rcx
jne 0x140027b6d
test byte [rcx], 1
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x38], rsi
mov esi, 2
jne 0x140027b08
mov rcx, qword [rcx + 8]
lea r9, [rsp + 0x58]
xor ebx, ebx
lea rdx, [rsp + 0x50]
mov r8d, esi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140027b02
mov dword [rdi + 0x10], 7
jmp 0x140027b48
mov ebx, dword [rsp + 0x58]
jmp 0x140027b48
mov qword [rsp + 0x30], r14
mov r14, qword [rcx + 0x20]
mov rcx, qword [rcx + 0x18]
lea rax, [r14 + 2]
cmp rax, rcx
jbe 0x140027b23
mov esi, ecx
sub esi, r14d
mov rdx, qword [rdi + 8]
lea rcx, [rsp + 0x50]
add rdx, r14
mov r8d, esi
mov ebx, esi
call fcn.1400f1320
lea rax, [rbx + r14]
mov r14, qword [rsp + 0x30]
mov qword [rdi + 0x20], rax
mov ebx, esi
mov rsi, qword [rsp + 0x38]
test ebx, ebx
mov rbx, qword [rsp + 0x60]
je 0x140027b6d
movzx eax, byte [rsp + 0x51]
movzx ecx, byte [rsp + 0x50]
shl ax, 8
or ax, cx
add rsp, 0x40
pop rdi
ret
movzx eax, word [rsp + 0x50]
add rsp, 0x40
pop rdi
ret

Function at 0x140027b80
Capabilities:
Read file on windows

Disassembly:
push rbx
push rdi
sub rsp, 0x38
xor ebx, ebx
mov rdi, rcx
mov dword [rsp + 0x50], ebx
cmp dword [rcx + 0x10], ebx
jne 0x140027c53
test byte [rcx], 1
mov qword [rsp + 0x60], rsi
lea esi, [rbx + 4]
jne 0x140027bd5
mov rcx, qword [rcx + 8]
lea r9, [rsp + 0x58]
mov r8d, esi
mov qword [rsp + 0x20], rbx
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140027bcf
mov dword [rdi + 0x10], 7
jmp 0x140027c15
mov ebx, dword [rsp + 0x58]
jmp 0x140027c15
mov qword [rsp + 0x30], r14
mov r14, qword [rcx + 0x20]
mov rcx, qword [rcx + 0x18]
lea rax, [r14 + 4]
cmp rax, rcx
jbe 0x140027bf0
mov esi, ecx
sub esi, r14d
mov rdx, qword [rdi + 8]
lea rcx, [rsp + 0x50]
add rdx, r14
mov r8d, esi
mov ebx, esi
call fcn.1400f1320
lea rax, [rbx + r14]
mov r14, qword [rsp + 0x30]
mov qword [rdi + 0x20], rax
mov ebx, esi
mov rsi, qword [rsp + 0x60]
test ebx, ebx
je 0x140027c48
movzx ecx, byte [rsp + 0x52]
movzx eax, byte [rsp + 0x53]
shl eax, 8
or eax, ecx
movzx ecx, byte [rsp + 0x51]
shl eax, 8
or eax, ecx
movzx ecx, byte [rsp + 0x50]
shl eax, 8
or eax, ecx
add rsp, 0x38
pop rdi
pop rbx
ret
mov eax, dword [rsp + 0x50]
add rsp, 0x38
pop rdi
pop rbx
ret
mov eax, ebx
add rsp, 0x38
pop rdi
pop rbx
ret
Function at 0x140027c60
Capabilities:
Read file on windows

Disassembly:
push rbx
push rdi
sub rsp, 0x38
xor ebx, ebx
mov rdi, rcx
mov qword [rsp + 0x58], rbx
cmp dword [rcx + 0x10], ebx
jne 0x140027d6b
test byte [rcx], 1
mov qword [rsp + 0x60], rsi
lea esi, [rbx + 8]
jne 0x140027cb6
mov rcx, qword [rcx + 8]
lea r9, [rsp + 0x50]
mov r8d, esi
mov qword [rsp + 0x20], rbx
lea rdx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140027cb0
mov dword [rdi + 0x10], 7
jmp 0x140027cf6
mov ebx, dword [rsp + 0x50]
jmp 0x140027cf6
mov qword [rsp + 0x30], r14
mov r14, qword [rcx + 0x20]
mov rcx, qword [rcx + 0x18]
lea rax, [r14 + 8]
cmp rax, rcx
jbe 0x140027cd1
mov esi, ecx
sub esi, r14d
mov rdx, qword [rdi + 8]
lea rcx, [rsp + 0x58]
add rdx, r14
mov r8d, esi
mov ebx, esi
call fcn.1400f1320
lea rax, [rbx + r14]
mov r14, qword [rsp + 0x30]
mov qword [rdi + 0x20], rax
mov ebx, esi
mov rsi, qword [rsp + 0x60]
test ebx, ebx
je 0x140027d5f
movzx eax, byte [rsp + 0x5e]
movzx ecx, byte [rsp + 0x5a]
movzx edx, byte [rsp + 0x5f]
shl rdx, 8
or rdx, rax
movzx eax, byte [rsp + 0x5d]
shl rdx, 8
or rdx, rax
movzx eax, byte [rsp + 0x5c]
shl rdx, 8
or rdx, rax
movzx eax, byte [rsp + 0x5b]
shl rdx, 8
or rax, rdx
shl rax, 8
or rax, rcx
movzx ecx, byte [rsp + 0x59]
shl rax, 8
or rax, rcx
movzx ecx, byte [rsp + 0x58]
shl rax, 8
or rax, rcx
add rsp, 0x38
pop rdi
pop rbx
ret
mov rax, qword [rsp + 0x58]
add rsp, 0x38
pop rdi
pop rbx
ret
mov rax, rbx
add rsp, 0x38
pop rdi
pop rbx
ret
Function at 0x140029da0
Capabilities:
Get file size
Read file on windows

Disassembly:
push rbx
push rsi
sub rsp, 0x78
mov rsi, rdx
mov rbx, rcx
mov rcx, qword [rcx + 0x88]
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x140029dcf
mov eax, 1
add rsp, 0x78
pop rsi
pop rbx
ret
mov r8d, dword [rsp + 0x38]
mov r9d, r8d
and r9d, 1
mov qword [rsp + 0x70], rdi
mov eax, r8d
mov r10d, r8d
mov ecx, r9d
mov edi, 0x41000000
or ecx, 2
and al, 2
mov eax, r8d
cmove ecx, r9d
mov edx, ecx
or edx, 4
and al, 4
cmove edx, ecx
mov eax, edx
or eax, 0x10
and r10d, 0x10
cmove eax, edx
mov ecx, eax
or ecx, 0x20
and r8b, 0x20
cmove ecx, eax
test r10d, r10d
mov eax, 0x81000000
cmove edi, eax
or edi, ecx
test r9d, r9d
jne 0x140029e40
test r10d, r10d
mov edi, 0x41800000
mov eax, 0x81800000
cmove edi, eax
or edi, ecx
mov rcx, qword [rbx + 0x88]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov eax, eax
mov qword [rbx + 0x70], rax
cmp rax, 0x28
jbe 0x140029f81
cmp qword [rbx + 0x20], 0
jne 0x140029f81
mov rcx, qword [rbx + 0x88]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [rbx + 0x88]
lea r9, [rsp + 0xa0]
mov r8d, 2
mov qword [rsp + 0x20], 0
lea rdx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, qword [rbx + 0x88]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x24]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [rbx + 0x88]
lea r9, [rsp + 0xa0]
mov r8d, 4
mov qword [rsp + 0x20], 0
lea rdx, [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [rsp + 0x90], ax
jne 0x140029f6c
mov edx, dword [rsp + 0xa8]
lea ecx, [rdx + 0x34]
cmp qword [rbx + 0x70], rcx
jbe 0x140029f6c
mov rcx, qword [rbx + 0x88]
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [rbx + 0x88]
lea r9, [rsp + 0xa0]
mov r8d, 4
mov qword [rsp + 0x20], 0
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x30]
cmp eax, 0x5a4d
je 0x140029f68
add eax, 0xffffbab4
cmp eax, 4
ja 0x140029f6c
mov ecx, reloc.OLEAUT32.dll_SafeArrayUnlock
bt ecx, eax
jae 0x140029f6c
bts edi, 0x16
mov rcx, qword [rbx + 0x88]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [rsp + 0x44]
movabs r9, 0xd6bf94d5e57a42bd
movabs r8, 0xfe624e212ac18000
mov dword [rsi + 0x10], edi
add rcx, r8
mov rax, r9
imul rcx
add rdx, rcx
mov rcx, qword [rsp + 0x4c]
sar rdx, 0x17
add rcx, r8
add r8, qword [rsp + 0x3c]
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov rax, r9
mov dword [rsi], edx
imul rcx
mov rax, r9
add rdx, rcx
sar rdx, 0x17
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
lea rcx, [rsp + 0x4c]
mov dword [rsi + 4], edx
imul r8
add rdx, r8
lea r8, [rsp + 0xa0]
sar rdx, 0x17
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov dword [rsi + 8], edx
lea rdx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx eax, word [rsp + 0xa0]
movzx ecx, word [rsp + 0x90]
mov rdi, qword [rsp + 0x70]
shl ecx, 0x10
or ecx, eax
mov dword [rsi + 0xc], ecx
xor eax, eax
add rsp, 0x78
pop rsi
pop rbx
ret
Function at 0x14002cad0
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
cmp dword [rdx], 0
mov rdi, rcx
mov rcx, rdx
mov rbx, rdx
jge 0x14002cb38
mov edx, 0x8b1f
call fcn.14002d4d0
mov edx, 0x808
mov rcx, rbx
call fcn.14002d4d0
mov edx, dword [rdi + 4]
mov rcx, rbx
call fcn.14002d4d0
movzx edx, word [rdi + 6]
mov rcx, rbx
call fcn.14002d4d0
mov edx, 0xb02
mov rcx, rbx
call fcn.14002d4d0
mov r8d, dword [rdi + 0x20]
lea rdx, [rdi + 0x50]
inc r8d
jmp 0x14002cc94
mov edx, 0x4034b50
call fcn.14002d4d0
mov edx, 0x403
mov rcx, rbx
call fcn.14002d4d0
mov edx, 0x2d
mov rcx, rbx
call fcn.14002d4d0
movzx edx, word [rdi + 0x30]
mov rcx, rbx
call fcn.14002d4d0
movzx edx, word [rdi + 2]
mov rcx, rbx
call fcn.14002d4d0
mov edx, dword [rdi + 4]
mov rcx, rbx
call fcn.14002d4d0
movzx edx, word [rdi + 6]
mov rcx, rbx
call fcn.14002d4d0
mov edx, dword [rdi + 8]
mov rcx, rbx
call fcn.14002d4d0
movzx edx, word [rdi + 0xa]
mov rcx, rbx
call fcn.14002d4d0
mov edx, 0xffffffff
mov rcx, rbx
call fcn.14002d4d0
mov edx, 0xffffffff
mov rcx, rbx
call fcn.14002d4d0
mov edx, 0xffffffff
mov rcx, rbx
call fcn.14002d4d0
mov edx, 0xffffffff
mov rcx, rbx
call fcn.14002d4d0
mov edx, dword [rdi + 0x20]
mov rcx, rbx
call fcn.14002d4d0
mov edx, dword [rdi + 0x24]
mov rcx, rbx
add edx, 0x14
call fcn.14002d4d0
mov r8d, dword [rdi + 0x20]
lea rdx, [rdi + 0x50]
mov rcx, rbx
call fcn.14002d660
mov edx, 1
mov rcx, rbx
call fcn.14002d4d0
mov edx, reloc.WSOCK32.dll_recv
mov rcx, rbx
call fcn.14002d4d0
mov edx, dword [rdi + 0x18]
mov rcx, rbx
call fcn.14002d4d0
mov rdx, qword [rdi + 0x18]
mov rcx, rbx
shr rdx, 0x10
call fcn.14002d4d0
mov rdx, qword [rdi + 0x18]
mov rcx, rbx
shr rdx, 0x20
call fcn.14002d4d0
movzx edx, word [rdi + 0x1e]
mov rcx, rbx
call fcn.14002d4d0
mov edx, dword [rdi + 0x10]
mov rcx, rbx
call fcn.14002d4d0
mov rdx, qword [rdi + 0x10]
mov rcx, rbx
shr rdx, 0x10
call fcn.14002d4d0
mov rdx, qword [rdi + 0x10]
mov rcx, rbx
shr rdx, 0x20
call fcn.14002d4d0
movzx edx, word [rdi + 0x16]
mov rcx, rbx
call fcn.14002d4d0
mov r8d, dword [rdi + 0x24]
test r8d, r8d
je 0x14002cc9c
mov rdx, qword [rdi + 0x40]
mov rcx, rbx
call fcn.14002d660
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x14002d3b0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov r9, rdx
test rdx, rdx
jne 0x14002d3bb
xor eax, eax
ret
lea r11, [0x140123950]
not ecx
cmp r8d, 8
jb 0x14002d491
mov r10d, r8d
shr r10, 3
nop word [rax + rax]
movzx edx, byte [r9]
mov eax, ecx
xor rdx, rax
shr ecx, 8
movzx eax, dl
add r8d, 0xfffffff8
movzx edx, byte [r9 + 1]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 2]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 3]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 4]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 5]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 6]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 7]
add r9, 8
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
xor ecx, dword [r11 + rax*4]
sub r10, 1
jne 0x14002d3e0
test r8d, r8d
je 0x14002d4bd
nop word [rax + rax]
movzx edx, byte [r9]
lea r9, [r9 + 1]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
xor ecx, dword [r11 + rax*4]
add r8d, 0xffffffff
jne 0x14002d4a0
not ecx
mov eax, ecx
ret
Function at 0x14002d4d0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
cmp dword [rcx + 0x28], 0
mov rbx, rcx
movsxd r8, edx
jne 0x14002d655
mov eax, dword [rcx]
mov qword [rsp + 0x58], rdi
mov edi, r8d
shr edi, 8
mov byte [rsp + 0x40], r8b
mov byte [rsp + 0x41], dil
test al, 0x10
je 0x14002d5d9
mov r10d, dword [rcx + 0x48]
mov r11d, dword [rcx + 0x50]
mov edx, r11d
movsx rax, r8b
xor rax, r10
mov qword [rsp + 0x48], rsi
movzx ecx, al
lea rsi, [0x140123950]
and edx, 0xfffd
shr r10d, 8
or edx, 2
xor r10d, dword [rsi + rcx*4]
movzx ecx, r11b
movzx eax, r10b
add eax, dword [rbx + 0x4c]
imul r9d, eax, 0x8088405
shr r11d, 8
inc r9d
mov eax, r9d
shr rax, 0x18
xor rcx, rax
mov eax, edx
xor eax, 1
imul eax, edx
mov edx, r10d
xor r11d, dword [rsi + rcx*4]
shr eax, 8
xor al, r8b
mov r8d, r11d
mov byte [rsp + 0x40], al
and r8d, 0xfffd
or r8d, 2
movsx rax, dil
xor rax, rdx
shr edx, 8
movzx ecx, al
xor edx, dword [rsi + rcx*4]
movzx eax, dl
add eax, r9d
mov dword [rbx + 0x48], edx
imul eax, eax, 0x8088405
mov edx, r11d
shr edx, 8
inc eax
mov ecx, eax
mov dword [rbx + 0x4c], eax
shr rcx, 0x18
movzx eax, r11b
xor rcx, rax
mov eax, r8d
xor eax, 1
imul eax, r8d
xor edx, dword [rsi + rcx*4]
mov rsi, qword [rsp + 0x48]
mov dword [rbx + 0x50], edx
shr eax, 8
xor al, dil
mov byte [rsp + 0x41], al
mov eax, dword [rbx]
mov rdi, qword [rsp + 0x58]
test al, 1
je 0x14002d611
mov rdx, qword [rbx + 0x38]
lea rax, [rdx + 2]
cmp rax, qword [rbx + 0x40]
jb 0x14002d5fd
mov dword [rbx + 0x28], reloc.WSOCK32.dll_inet_ntoa
add rsp, 0x30
pop rbx
ret
mov rcx, qword [rbx + 8]
movzx eax, word [rsp + 0x40]
mov word [rdx + rcx], ax
add qword [rbx + 0x38], 2
jmp 0x14002d646
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x50]
mov r8d, 2
mov qword [rsp + 0x20], 0
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14002d63f
cmp dword [rsp + 0x50], 2
je 0x14002d646
mov dword [rbx + 0x28], 3
test dword [rbx], 0x40000000
je 0x14002d655
mov dword [rbx + 0x28], reloc.OLEAUT32.dll_SafeArrayLock
add rsp, 0x30
pop rbx
ret