joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ae909
Capabilities:
Create directory
Get common file path
Get file attributes

Disassembly:
push r14
push r13
push r12
push rbx
sub rsp, 0x458
lea r12, [0x005eb300]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1a
mov qword [rsp + 0x20], r12
mov r13, rcx
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
mov rbx, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test eax, eax
jns 0x4ae9a9
mov edx, 0x104
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea rdx, str.AppData
mov rcx, r12
call sub.msvcrt.dll_strcat
mov rcx, r12
call rbx
inc eax
jne 0x4ae9a9
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4ae9a9
mov rcx, qword [0x0053cb90]
lea rdx, str.couldnt_make_directory
call fcn.004d0ff9
mov rdx, r12
mov rcx, rax
call fcn.004d0ff9
mov rcx, rax
call fcn.004d13bf
mov rcx, r13
call fcn.004cebac
jmp 0x4aea11
lea r12, [rsp + 0x32]
lea r8, [0x005eb300]
lea rdx, str._sMikrotik
mov rcx, r12
call sub.msvcrt.dll_sprintf
mov rcx, r12
call rbx
inc eax
jne 0x4ae9d8
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea r14, [rsp + 0x23c]
mov r8, r12
lea rdx, str._sWinbox
mov rcx, r14
call sub.msvcrt.dll_sprintf
mov rcx, r14
call rbx
inc eax
jne 0x4aea06
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov rdx, r14
mov rcx, r13
call fcn.004cec4e
mov rax, r13
add rsp, 0x458
pop rbx
pop r12
pop r13
pop r14
ret

Function at 0x4aea23
Capabilities:
Enumerate files on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x178
xor r14d, r14d
lea r13, [rsp + 0x20]
mov rbx, rdx
lea rbp, [rsp + 0x30]
mov rdx, rcx
mov rcx, r13
call fcn.004cebf6
lea rdx, [0x00536d68]
mov rcx, r13
call fcn.004cedda
mov rax, qword [rsp + 0x20]
mov rdx, rbp
lea rcx, [rax + 4]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x4aeb38
mov r14, qword [sym.imp.KERNEL32.dll_FindNextFileA]
lea rsi, [rsp + 0x5c]
lea rdi, [rsp + 0x28]
lea rdx, [0x00536d6b]
mov rcx, rsi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4aeb1b
lea rdx, [0x00536d6d]
mov rcx, rsi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4aeb1b
mov rdx, rsi
mov rcx, rdi
call fcn.004cec4e
mov rcx, qword [rbx]
mov r15, qword [rbx + 8]
sub r15, rcx
call fcn.004d20e2
sar r15, 3
shr eax, 3
cmp r15d, eax
jne 0x4aeb02
mov rdx, qword [rbx + 8]
sub rdx, qword [rbx]
mov eax, 1
mov rcx, rbx
sar rdx, 3
mov r8d, 8
add edx, edx
cmove edx, eax
shl edx, 3
call fcn.004cf756
mov rcx, qword [rbx + 8]
mov rdx, rdi
call fcn.004cec08
add qword [rbx + 8], 8
mov rcx, rdi
call fcn.004cea4a
mov rdx, rbp
mov rcx, r12
call r14
test eax, eax
jne 0x4aea90
mov rcx, r12
mov r14b, 1
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, r13
call fcn.004cea4a
mov eax, r14d
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x4aeb57
Capabilities:
Get common file path

Disassembly:
push r14
push r13
push r12
sub rsp, 0x230
lea r14, [rsp + 0x28]
mov r12, rcx
mov ecx, 0x104
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x4aeb88
mov rcx, r12
call fcn.004cebac
jmp 0x4aebb5
lea r13, [rsp + 0x12c]
xor r8d, r8d
lea rdx, [0x00536d70]
mov rcx, r14
mov r9, r13
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x4aeb7e
mov rdx, r13
mov rcx, r12
call fcn.004cec4e
mov rax, r12
add rsp, 0x230
pop r12
pop r13
pop r14
ret

Function at 0x4b6648
Capabilities:
Get common file path

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rbp, rdx
mov r12, r8
mov rsi, r9
lea rdx, [0x005eb6e0]
mov ecx, 0x104
mov rdi, rbx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xor eax, eax
mov ecx, 0x26
rep stosd dword [rdi], eax
mov rax, qword [rsp + 0x70]
mov dword [rbx], 0x98
mov qword [rbx + 8], r12
mov qword [rbx + 0x18], rax
lea rax, [0x005eb6e0]
mov qword [rbx + 0x50], rax
mov rax, qword [rsp + 0x78]
mov dword [rbx + 0x2c], 1
mov qword [rbx + 0x68], rax
mov eax, dword [rsp + 0x80]
mov qword [rbx + 0x30], rbp
mov dword [rbx + 0x38], 0x104
mov qword [rbx + 0x58], rsi
mov dword [rbx + 0x60], eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x4b6735
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x360
lea rdx, str._s
lea rbx, [rsp + 0x160]
mov r8, rcx
lea rdi, [rsp + 0x20]
mov rsi, rcx
mov rcx, rbx
call sub.msvcrt.dll_sprintf
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov r12, rax
test rax, rax
je 0x4b67d0
mov rbp, qword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp byte [rsp + 0x4c], 0x2e
je 0x4b67ba
lea r9, [rsp + 0x4c]
mov r8, rsi
lea rdx, str._s_s
mov rcx, rbx
call sub.msvcrt.dll_sprintf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov rcx, rbx
test al, 0x10
je 0x4b67b4
call fcn.004b6735
jmp 0x4b67ba
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov rdx, rdi
mov rcx, r12
call rbp
test eax, eax
jne 0x4b677f
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
nop
add rsp, 0x360
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x4b6bbc
Capabilities:
Enumerate files on windows
Get file attributes

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x5d8
lea r15, [rsp + 0x60]
mov esi, ecx
lea rbp, [rsp + 0x78]
mov rcx, r15
lea rbx, [rsp + 0x1b8]
call fcn.004ae909
mov rax, qword [rsp + 0x60]
lea rdx, str._s
mov rcx, rbx
lea r8, [rax + 4]
call sub.msvcrt.dll_sprintf
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov r14, rax
test rax, rax
je 0x4b6e5d
mov rdi, qword [sym.imp.KERNEL32.dll_CreateFileA]
lea rax, [rsp + 0xa4]
lea r12, [rsp + 0x68]
mov rdx, rax
mov rcx, r12
mov qword [rsp + 0x40], rax
call fcn.004cec4e
xor r8d, r8d
mov edx, 0x2d
mov rcx, r12
call fcn.0052a7a0
mov r9d, eax
cmp eax, 0xffffffff
je 0x4b6c80
lea r13, [rsp + 0x3b8]
xor r8d, r8d
mov rdx, r12
mov rcx, r13
call fcn.004cf482
mov rcx, r12
mov rdx, r13
call fcn.004cef0e
mov rcx, r13
call fcn.004cea4a
mov rcx, r12
call fcn.004aedd0
test eax, eax
jne 0x4b6cb6
mov rcx, r12
call fcn.004cea4a
mov rdx, rbp
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4b6c22
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x4b6e5d
mov rax, qword [rsp + 0x60]
mov r9, qword [rsp + 0x40]
mov rcx, rbx
lea rdx, str._s_s
lea r8, [rax + 4]
call sub.msvcrt.dll_sprintf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
je 0x4b6c8c
test sil, sil
jne 0x4b6e49
lea r13, [rsp + 0x3b8]
mov r8, rbx
lea rdx, str._s_system.crc
mov rcx, r13
call sub.msvcrt.dll_sprintf
mov rcx, r13
xor r9d, r9d
mov edx, 0x80000000
mov qword [rsp + 0x30], 0
mov r8d, 1
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call rdi
mov rcx, rax
test rax, rax
jne 0x4b6dcb
mov r8, rbx
lea rdx, str._s_routeros.crc
mov rcx, r13
call sub.msvcrt.dll_sprintf
mov rcx, r13
xor r9d, r9d
mov edx, 0x80000000
mov qword [rsp + 0x30], 0
mov r8d, 1
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call rdi
mov rcx, rax
test rax, rax
jne 0x4b6dcb
mov r8, rbx
lea rdx, str._s_roteros.crc
mov rcx, r13
call sub.msvcrt.dll_sprintf
mov rcx, r13
xor r9d, r9d
mov edx, 0x80000000
mov qword [rsp + 0x30], 0
mov r8d, 1
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call rdi
mov rcx, rax
test rax, rax
je 0x4b6c8c
lea r13, [rsp + 0x70]
mov qword [rsp + 0x40], rcx
xor r8d, r8d
xor edx, edx
mov r9, r13
call qword [sym.imp.KERNEL32.dll_GetFileTime]
mov rcx, qword [rsp + 0x40]
test eax, eax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4b6e56
call rax
lea r8, [rsp + 0x5e]
lea rdx, [rsp + 0x5a]
mov rcx, r13
mov r9, qword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
mov qword [rsp + 0x48], r8
mov qword [rsp + 0x40], r9
call r9
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea rdx, [rsp + 0x5c]
mov r8, qword [rsp + 0x48]
mov rcx, r13
mov r9, qword [rsp + 0x40]
call r9
movzx eax, word [rsp + 0x5c]
movzx edx, word [rsp + 0x5a]
sub eax, edx
cmp eax, 0x1f
jle 0x4b6c8c
mov rcx, rbx
call fcn.004b6735
jmp 0x4b6c8c
call rax
jmp 0x4b6c8c
mov rcx, r15
call fcn.004cea4a
nop
add rsp, 0x5d8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x4b7342
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x848
lea rdx, str.loading
mov r12, rcx
mov rcx, qword [0x0053cb90]
call fcn.004d0ff9
mov rdx, r12
mov rcx, rax
call fcn.0052fb60
mov rcx, rax
call fcn.004d13bf
mov rax, qword [r12]
lea rdx, [0x00538154]
lea rcx, [rax + 4]
call sub.msvcrt.dll_fopen
mov r13, rax
test rax, rax
jne 0x4b73c5
mov rcx, qword [0x0053cb80]
lea rdx, str.could_not_open
call fcn.004d0ff9
mov rdx, r12
mov rcx, rax
call fcn.0052fb60
mov rcx, rax
call fcn.004d13bf
jmp 0x4b74fe
mov ecx, 0x58
lea r15, [rsp + 0x38]
call sub.msvcrt.dll_malloc
mov r12, rax
mov rcx, rax
call fcn.0047b7ca
mov dword [r12 + 0x50], 2
mov rcx, r13
call sub.msvcrt.dll_feof
mov ebx, eax
test eax, eax
jne 0x4b7502
lea rbp, [rsp + 0x40]
mov r9, r13
mov r8d, 0x800
mov edx, 1
mov rcx, rbp
call sub.msvcrt.dll_fread
mov rsi, rax
mov edi, eax
test eax, eax
je 0x4b7502
lea r14, [0x005382ab]
cmp ebx, edi
jge 0x4b73e8
movsxd rdx, ebx
mov r8d, edi
mov rcx, r12
add rdx, rbp
sub r8d, ebx
call fcn.0047b850
test eax, eax
jle 0x4b7458
mov rcx, r12
add ebx, eax
call fcn.0047b91e
test rax, rax
jne 0x4b7485
cmp esi, ebx
je 0x4b73e8
mov rcx, qword [0x0053cb80]
lea rdx, str.parse_error
call fcn.004d0ff9
mov rcx, rax
call fcn.004d13bf
mov rcx, r12
call fcn.004b6a90
mov rcx, r12
call fcn.004d4d78
jmp 0x4b74fe
mov rdx, qword [rax + 0x18]
test rdx, rdx
je 0x4b7502
mov eax, dword [rax + 0x10]
sub eax, 2
cmp eax, 1
ja 0x4b74ba
cmp dword [rdx + 0x10], 2
jne 0x4b74b1
mov rcx, r15
mov qword [rsp + 0x28], rdx
call method.CService.CService_JSNode_
mov rdx, qword [rsp + 0x28]
mov rdx, qword [rdx + 8]
test rdx, rdx
jne 0x4b7499
mov rcx, r12
call fcn.004b6a90
mov rcx, r12
call fcn.004d4d78
mov ecx, 0x58
call sub.msvcrt.dll_malloc
mov r12, rax
mov rcx, rax
call fcn.0047b7ca
mov r8d, 3
mov rdx, r14
mov rcx, r12
call fcn.0047b850
mov dword [r12 + 0x50], 2
jmp 0x4b7429
xor eax, eax
jmp 0x4b751c
mov rcx, r13
call sub.msvcrt.dll_fclose
mov rcx, r12
call fcn.004b6a90
mov rcx, r12
call fcn.004d4d78
mov al, 1
add rsp, 0x848
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x4b7530
Capabilities:
Create directory
Get file attributes

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x48
lea r13, [rsp + 0x38]
mov r12, rcx
mov rsi, rdx
mov ebx, r8d
mov rcx, r13
call fcn.004ae909
mov rax, qword [rsp + 0x38]
cmp dword [rax], 0
je 0x4b75ad
mov rdx, qword [rsi]
mov dword [rsp + 0x20], ebx
lea r8, [rax + 4]
lea rcx, [0x005eb4e0]
lea r9, [rdx + 4]
lea rdx, str._s_s__u
call sub.msvcrt.dll_sprintf
lea rcx, [0x005eb4e0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
inc eax
jne 0x4b759c
xor edx, edx
lea rcx, [0x005eb4e0]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea rdx, [0x005eb4e0]
mov rcx, r12
call fcn.004cec4e
jmp 0x4b75b5
mov rcx, r12
call fcn.004cebac
mov rcx, r13
call fcn.004cea4a
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop r12
pop r13
ret
Function at 0x4b7647
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rbx
sub rsp, 0x58
mov r12, rcx
lea rsi, [rsp + 0x34]
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rbx, qword [sym.imp.KERNEL32.dll_ReadFile]
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x20], 0
mov r14, rax
mov r9, rsi
mov r8d, 4
mov rcx, rax
call rbx
test eax, eax
jne 0x4b76bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x0053cb90]
lea rdx, str.read_len_failed
mov r13d, eax
call fcn.004d0ff9
mov edx, r13d
mov rcx, rax
call fcn.004d10e2
jmp 0x4b76d5
cmp dword [rsp + 0x34], 3
ja 0x4b76ea
mov rcx, qword [0x0053cb90]
lea rdx, str.bad_read_len
call fcn.004d0ff9
mov rcx, rax
call fcn.004d13bf
mov rcx, r12
call fcn.004291a6
jmp 0x4b77b1
lea r15, [rsp + 0x40]
lea r13, [rsp + 0x38]
mov rcx, r15
call fcn.004cf836
mov edx, dword [rsp + 0x30]
mov r8, r13
mov rcx, r15
mov byte [rsp + 0x38], 0
call fcn.004cfac2
mov r8d, dword [rsp + 0x30]
mov r9, rsi
mov rcx, r14
mov qword [rsp + 0x20], 0
mov rdx, qword [rsp + 0x40]
call rbx
test eax, eax
jne 0x4b7758
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x0053cb90]
lea rdx, str.read_msg_failed
mov r13d, eax
call fcn.004d0ff9
mov edx, r13d
mov rcx, rax
call fcn.004d10e2
jmp 0x4b7777
mov r8d, dword [rsp + 0x30]
cmp dword [rsp + 0x34], r8d
jae 0x4b7789
mov rcx, qword [0x0053cb90]
lea rdx, str.read_trimmed_msg
call fcn.004d0ff9
mov rcx, rax
call fcn.004d13bf
mov rcx, r12
call fcn.004291a6
jmp 0x4b77a9
mov rdx, qword [rsp + 0x40]
mov rcx, r13
call fcn.0042b090
mov rcx, r12
mov rdx, r13
call fcn.0042a642
mov rcx, r13
call fcn.00429c78
mov rcx, r15
call fcn.004cf846
mov rax, r12
add rsp, 0x58
pop rbx
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x4bfc5d
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x128
xor eax, eax
mov r10, rdx
mov r11d, r8d
lea rbx, [rsp + 0x30]
mov edx, dword [rcx + rax*4]
mov dword [rbx + rax*4], edx
inc rax
cmp r9d, eax
ja 0x4bfc75
mov r8d, r9d
mov rsi, rbx
lea rdi, [0x0053bc60]
xor ecx, ecx
lea rdx, str.cw
lea eax, [r8 - 1]
mov eax, dword [rsp + rax*4 + 0x30]
mov dword [rsp + 0x2c], eax
test ecx, ecx
jne 0x4bfced
ror eax, 8
inc rdi
movzx ebp, al
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2c], bpl
movzx ebp, ah
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2d], bpl
mov ebp, eax
shr eax, 0x18
shr ebp, 0x10
mov al, byte [rdx + rax]
movzx ebp, bpl
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2f], al
movzx eax, byte [rdi - 1]
mov byte [rsp + 0x2e], bpl
xor dword [rsp + 0x2c], eax
jmp 0x4bfd2c
cmp ecx, 4
jne 0x4bfd2c
cmp r9d, 8
jne 0x4bfd2c
movzx ebp, al
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2c], bpl
movzx ebp, ah
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2d], bpl
mov ebp, eax
shr eax, 0x18
shr ebp, 0x10
mov al, byte [rdx + rax]
movzx ebp, bpl
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2f], al
mov byte [rsp + 0x2e], bpl
mov eax, dword [rsi]
inc ecx
xor eax, dword [rsp + 0x2c]
mov dword [rbx + r8*4], eax
cmp r9d, ecx
jne 0x4bfd3f
xor ecx, ecx
inc r8
add rsi, 4
cmp r11d, r8d
ja 0x4bfc99
xor r9d, r9d
mov ecx, r9d
shl rcx, 2
lea rdx, [rbx + rcx]
add rcx, r10
call fcn.004bf820
add r9d, 4
cmp r11d, r9d
ja 0x4bfd52
add rsp, 0x128
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rax, [0x00599c80]
mov r9d, 4
mov r8d, 0x2c
mov r10, rdx
mov qword [rcx], rax
lea rdx, [rcx + 8]
mov rcx, r10
jmp 0x4bfc5d
Function at 0x4bfd7a
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x128
xor eax, eax
mov r10, rdx
mov r11d, r8d
lea rbx, [rsp + 0x30]
mov edx, dword [rcx + rax*4]
mov dword [rbx + rax*4], edx
inc rax
cmp r9d, eax
ja 0x4bfc75
mov r8d, r9d
mov rsi, rbx
lea rdi, [0x0053bc60]
xor ecx, ecx
lea rdx, str.cw
lea eax, [r8 - 1]
mov eax, dword [rsp + rax*4 + 0x30]
mov dword [rsp + 0x2c], eax
test ecx, ecx
jne 0x4bfced
ror eax, 8
inc rdi
movzx ebp, al
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2c], bpl
movzx ebp, ah
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2d], bpl
mov ebp, eax
shr eax, 0x18
shr ebp, 0x10
mov al, byte [rdx + rax]
movzx ebp, bpl
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2f], al
movzx eax, byte [rdi - 1]
mov byte [rsp + 0x2e], bpl
xor dword [rsp + 0x2c], eax
jmp 0x4bfd2c
cmp ecx, 4
jne 0x4bfd2c
cmp r9d, 8
jne 0x4bfd2c
movzx ebp, al
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2c], bpl
movzx ebp, ah
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2d], bpl
mov ebp, eax
shr eax, 0x18
shr ebp, 0x10
mov al, byte [rdx + rax]
movzx ebp, bpl
mov bpl, byte [rdx + rbp]
mov byte [rsp + 0x2f], al
mov byte [rsp + 0x2e], bpl
mov eax, dword [rsi]
inc ecx
xor eax, dword [rsp + 0x2c]
mov dword [rbx + r8*4], eax
cmp r9d, ecx
jne 0x4bfd3f
xor ecx, ecx
inc r8
add rsi, 4
cmp r11d, r8d
ja 0x4bfc99
xor r9d, r9d
mov ecx, r9d
shl rcx, 2
lea rdx, [rbx + rcx]
add rcx, r10
call fcn.004bf820
add r9d, 4
cmp r11d, r9d
ja 0x4bfd52
add rsp, 0x128
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rax, [0x00599c80]
mov r9d, 4
mov r8d, 0x2c
mov r10, rdx
mov qword [rcx], rax
lea rdx, [rcx + 8]
mov rcx, r10
jmp 0x4bfc5d

Function at 0x4bfe36
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rsi
push rbx
mov eax, 0x3020100
mov r9, rcx
mov dword [r9], eax
add eax, 0x4040404
add r9, 4
cmp eax, 0x4030200
jne 0x4bfe40
xor eax, eax
xor r10d, r10d
xor r9d, r9d
mov r11d, r10d
movzx esi, byte [rcx + rax]
inc r10d
movzx r11d, byte [rdx + r11]
mov ebx, esi
add r11d, esi
add r9d, r11d
movzx r9d, r9b
cmp r10d, r8d
jne 0x4bfe7e
xor r10d, r10d
mov r11d, r9d
mov sil, byte [rcx + r11]
mov byte [rcx + rax], sil
inc rax
mov byte [rcx + r11], bl
cmp rax, 0x100
jne 0x4bfe5b
mov qword [rcx + 0x100], 1
pop rbx
pop rsi
ret
Function at 0x4c1dec
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
cmp qword [0x005eb900], 0
mov rsi, rcx
mov r12, rdx
mov rbx, r8
jne 0x4c1ed9
mov ecx, 0x40
call sub.msvcrt.dll_malloc
xor edx, edx
lea r8, [0x0053c0a0]
mov qword [0x005eb908], rax
movzx ecx, byte [r8 + rdx]
mov byte [rax + rcx], dl
inc rdx
cmp rdx, 0x40
jne 0x4c1e2d
mov ecx, 0x800
lea rbp, [0x0053bf80]
lea rdi, [0x0053c0a0]
call sub.msvcrt.dll_malloc
xor r10d, r10d
mov qword [0x005eb900], rax
mov r11d, r10d
lea r13d, [r10*4]
xor r9d, r9d
shl r11, 3
mov edx, r9d
mov ecx, r9d
lea r14, [0x0053c080]
shr edx, 3
and ecx, 7
add rdx, r11
shl ecx, 2
mov r8d, dword [rbp + rdx*4]
xor edx, edx
shr r8d, cl
mov ecx, r13d
and r8d, 0xf
shl r8d, cl
movzx ecx, byte [r14]
mov r15d, r8d
add edx, edx
inc r14
shr r15d, cl
mov ecx, r15d
and ecx, 1
or edx, ecx
cmp rdi, r14
jne 0x4c1e9f
rol edx, 1
mov dword [rax + r9*4], edx
inc r9
cmp r9, 0x40
jne 0x4c1e72
inc r10d
add rax, 0x100
cmp r10d, 8
jne 0x4c1e60
lea r8, [0x0053c0a0]
mov edx, 0x20
mov rcx, r12
call fcn.004c1db5
mov edx, 0x20
lea r8, [0x0053c0c0]
mov rcx, r12
rol eax, 1
mov ebp, eax
call fcn.004c1db5
mov rdi, qword [0x005eb900]
xor r10d, r10d
rol eax, 1
mov edx, eax
mov r11d, r10d
mov r12, rdi
mov r8d, ebp
xor r9d, r9d
add r11, r11
mov eax, r9d
mov ecx, r9d
mov r15d, edx
shr eax, 2
and ecx, 3
imul ecx, ecx, 6
add rax, r11
mov eax, dword [rsi + rax*4 + 8]
shr eax, cl
lea ecx, [r9*4]
inc r9d
ror r15d, cl
xor eax, r15d
and eax, 0x3f
xor r8d, dword [r12 + rax*4]
add r12, 0x100
cmp r9d, 8
jne 0x4c1f22
inc r10d
mov ebp, edx
cmp r10d, 0x10
je 0x4c1f72
mov edx, r8d
jmp 0x4c1f13
mov ecx, r8d
lea r13, [rsp + 0x28]
ror ecx, 1
call fcn.004c1db0
ror edx, 1
mov dword [rsp + 0x28], eax
mov ecx, edx
call fcn.004c1db0
mov r8, qword [0x005eb908]
mov rcx, r13
mov edx, 0x20
mov dword [rsp + 0x2c], eax
call fcn.004c1db5
mov edx, 0x20
mov rcx, r13
mov r12d, eax
add r8, 0x20
call fcn.004c1db5
mov ecx, r12d
mov r8d, eax
call fcn.004c1db0
mov dword [rbx], eax
mov ecx, r8d
call fcn.004c1db0
mov dword [rbx + 4], eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x4d1c54
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x28
mov ecx, dword [rcx + 0x138]
call sub.msvcrt.dll__read
mov edx, 0
test eax, eax
cmovs eax, edx
add rsp, 0x28
ret

Function at 0x4d1fd8
Capabilities:
Write file on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x40
mov r12b, 1
mov rax, qword [rcx + 0x28]
mov rdx, qword [rcx + 0x20]
mov rsi, rax
sub rsi, rdx
mov rbx, rcx
cmp eax, edx
je 0x4d2032
mov rcx, qword [rcx + 0x138]
mov dword [rsp + 0x3c], 0
lea r9, [rsp + 0x3c]
mov r8d, esi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsp + 0x3c], esi
je 0x4d2029
xor r12d, r12d
jmp 0x4d2032
neg esi
movsxd rsi, esi
add qword [rbx + 0x28], rsi
mov eax, r12d
add rsp, 0x40
pop rbx
pop rsi
pop r12
ret
Function at 0x4d33d0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.004d4e70
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.004d4e70
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x4d3440
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x005ec004]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x4d35e8
mov rax, qword [0x005ec008]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x4d348c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x4d3517
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x4d3470
mov rcx, r12
call fcn.004d4140
mov rbp, rax
test rax, rax
je 0x4d3622
mov rax, qword [0x005ec008]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.004d4270
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x005ec008]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4d3631
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x4d3510
sub eax, 4
and eax, 0xfffffffb
jne 0x4d35a0
add dword [0x005ec004], 1
cmp ebx, 8
jae 0x4d3548
test bl, 4
jne 0x4d35f0
test ebx, ebx
je 0x4d3539
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x4d3610
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x4d3539
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x4d357a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x005ec008]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4d3510
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.004d33d0
nop dword [rax]
xor edi, edi
jmp 0x4d3497
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x4d3539
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x4d3539
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.004d33d0
mov rax, qword [0x005ec008]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.004d33d0
nop
nop dword [rax]