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

Disassembly:
push rbx
sub rsp, 0x280
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rbx, rcx
lea rax, [rsp + 0x60]
xor ecx, ecx
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1a
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea r8, str.ExplorerPatchercleanup
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400179a0
xor edx, edx
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea r8, [0x140033980]
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400179a0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r9d, 0xa
lea rdx, [rsp + 0x30]
mov r8d, r9d
mov ecx, eax
call fcn.140018af4
lea r8, [rsp + 0x30]
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400179a0
lea r8, [0x140034554]
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400179a0
mov ecx, dword [0x14003aa70]
lea rdx, [rsp + 0x48]
mov r9d, 0xa
mov r8d, r9d
lea eax, [rcx + 1]
mov dword [0x14003aa70], eax
call fcn.140018af4
lea r8, [rsp + 0x48]
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400179a0
lea r8, [0x140034558]
mov edx, 0x104
lea rcx, [rsp + 0x60]
call fcn.1400179a0
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_MoveFileW]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.140008df0
add rsp, 0x280
pop rbx
ret
Function at 0x140003730
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x6a0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x690], rax
mov rsi, rcx
mov r8, rcx
lea rcx, [rsp + 0x480]
mov edx, 0x104
call fcn.140017938
lea r8, [0x1400345ec]
mov edx, 0x104
lea rcx, [rsp + 0x480]
call fcn.1400179a0
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x480]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400037b0
mov eax, 1
jmp 0x14000389b
lea rdx, [0x1400345f4]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x140003856
lea rdx, [0x1400345f8]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x140003856
mov r8, rsi
lea rcx, [rsp + 0x270]
mov edx, 0x104
call fcn.140017938
lea r8, [0x140033980]
mov edx, 0x104
lea rcx, [rsp + 0x270]
call fcn.1400179a0
lea r8, [rsp + 0x4c]
mov edx, 0x104
lea rcx, [rsp + 0x270]
call fcn.1400179a0
test byte [rsp + 0x20], 0x10
lea rcx, [rsp + 0x270]
je 0x14000383b
call fcn.140003730
jmp 0x140003852
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140003856
lea rcx, [rsp + 0x270]
call fcn.140002910
test eax, eax
je 0x1400038bc
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400037b0
mov qword [rsp + 0x6b8], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp ebx, 0x12
mov rbx, qword [rsp + 0x6b8]
jne 0x1400038c5
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov rcx, qword [rsp + 0x690]
xor rcx, rsp
call fcn.140008df0
mov rsi, qword [rsp + 0x6c0]
add rsp, 0x6a0
pop rdi
ret
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x14000389b
Function at 0x14000f6a4
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x14000f713
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000f713
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000f713
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000f713
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000f713
cmp dword [rcx + 0x84], 0xe
jbe 0x14000f713
cmp dword [rcx + 0xf8], 0
je 0x14000f713
mov ecx, ebx
call fcn.14000f7c4
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.14000f5a0
nop
cmp dword [rbp + 0x20], 0
je 0x14000f761
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000f76c
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000f6a4

Function at 0x14000f8a8
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x14000f713
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000f713
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000f713
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000f713
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000f713
cmp dword [rcx + 0x84], 0xe
jbe 0x14000f713
cmp dword [rcx + 0xf8], 0
je 0x14000f713
mov ecx, ebx
call fcn.14000f7c4
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.14000f5a0
nop
cmp dword [rbp + 0x20], 0
je 0x14000f761
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000f76c
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000f6a4
Function at 0x1400190d0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.1400278a0
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14001c2b8
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x14001911f
mov rax, rbp
jmp 0x140019227
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x3b770]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.14001f620
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x3b770]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140019223
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140019223
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.14001f620
test rax, rax
js 0x140019223
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140019223
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140019215
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140019215
cmp byte [rcx], 0xd
jne 0x1400191fb
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x14001920a
cmp byte [rcx + 1], 0xa
jne 0x14001920a
inc rcx
jmp 0x14001920a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x3a360]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1400191dd
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140019227
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140008df0
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x14001ee38
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14001ee4e
mov al, 1
jmp 0x14001eeae
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14001ee5f
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14001eeac
mov ecx, dword [rcx + 0x18]
nop
call fcn.140021ac0
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001eeac
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001eeac
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14001eeac
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001eeae
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x14001f6cc
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, [0x14003b770]
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 0x14001f723
cmp word [rdx], r13w
jne 0x14001f723
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14001f728
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14001f84d
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14001f86e
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14001f761
mov rdx, r9
mov word [rbx], cx
jmp 0x14001f788
cmp r9, r8
jae 0x14001f798
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 0x14001f742
jmp 0x14001f84d
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 0x14001f842
cmp dword [rsp + 0x80], esi
je 0x14001f842
lea r8, [0x14003b770]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14001f81a
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14001f7ea
mov word [rbx], r13w
jmp 0x14001f84a
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 0x14001f7f7
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14001f84a
cmp word [rsp + 0x70], r13w
jne 0x14001f827
cmp rbx, r14
je 0x14001f7e4
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14001f628
cmp word [rsp + 0x70], r13w
je 0x14001f84d
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, [0x14003b770]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14001f847
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14001f84d
Function at 0x140021578
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x1400215ff
mov rsi, rbx
cmp word [rax], bp
je 0x1400215be
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400215a8
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400215a4
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14001ad34
mov rdi, rax
test rax, rax
je 0x1400215ec
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140027e00
mov rbp, rdi
xor ecx, ecx
call fcn.14001acf8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140026974
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14001f628
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001f628
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140026ac4
cmp rax, 0xffffffffffffffff
je 0x140026ac4
xor edi, edi
test rbp, rbp
jle 0x140026a6f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001ac80
mov rbx, rax
test rax, rax
jne 0x1400269fc
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140026a65
mov edx, 0x8000
mov ecx, r14d
call fcn.14001a2f8
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14001e93c
cmp eax, 0xffffffff
je 0x140026a45
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140026a0c
mov edx, r15d
mov ecx, r14d
call fcn.14001a2f8
jmp 0x140026a65
cmp byte [rsi + 0x38], dil
je 0x140026a5c
cmp dword [rsi + 0x34], 5
jne 0x140026a5c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140026a65
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001acf8
jmp 0x140026ad8
jns 0x140026ad8
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001f628
cmp rax, 0xffffffffffffffff
jne 0x140026a90
cmp byte [rsi + 0x30], dil
je 0x140026ad8
mov edi, dword [rsi + 0x2c]
jmp 0x140026ad8
mov ecx, r14d
call fcn.140021ac0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140026ad8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140026ad8
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140026ad1
mov eax, dword [rsi + 0x2c]
jmp 0x140026ad6
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001f628
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140101960]
mov dword [rax], 1
mov rax, qword [0x140101970]
mov dword [rax], 1
mov rax, qword [0x140101980]
mov dword [rax], 1
mov rax, qword [0x140101910]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x14000329e
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov dword [rbp - 8], 0x42414736
mov rdx, qword [rbp + 0x28]
mov rax, qword [rbp + 0x20]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.basic_string_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov dword [rbp - 4], 0
jmp 0x140003359
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x28]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.operator___unsigned_long_long_
movzx edx, byte [rax]
mov eax, dword [rbp - 4]
cdqe
and eax, 3
movzx eax, byte [rbp + rax - 8]
mov ebx, edx
xor ebx, eax
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x20]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.operator___unsigned_long_long_
mov byte [rax], bl
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x20]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.operator___unsigned_long_long_
movzx eax, byte [rax]
test al, al
sete al
test al, al
je 0x140003355
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x28]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.operator___unsigned_long_long_
movzx ebx, byte [rax]
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, qword [rbp + 0x20]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.operator___unsigned_long_long_
mov byte [rax], bl
add dword [rbp - 4], 1
mov eax, dword [rbp - 4]
movsxd rbx, eax
mov rax, qword [rbp + 0x28]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.size___const
cmp rbx, rax
setb al
test al, al
jne 0x1400032d4
mov rax, qword [rbp + 0x28]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.size___const
mov rdx, rax
mov rax, qword [rbp + 0x20]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.operator___unsigned_long_long_
mov byte [rax], 0
jmp 0x1400033b3
mov rax, qword [rbp + 0x20]
add rsp, 0x38
pop rbx
pop rbp
ret

Function at 0x14000d2f0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop
Function at 0x14000dfc2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140138108]
test eax, eax
je 0x14000e05a
lea rax, [0x1401380e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140138110]
mov qword [rbp - 8], rax
jmp 0x14000e03e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x14000e032
cmp qword [rbp - 0x10], 0
je 0x14000e032
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x14000dff8
lea rax, [0x1401380e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000e05b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14000e160
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x14000e188
mov eax, 0
jmp 0x14000e1d6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x14000e1b1
mov eax, 0
jmp 0x14000e1d6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x14000e1d1
mov eax, 0
jmp 0x14000e1d6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x14000e1dc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x14000e25a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x14000e251
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x14000e251
mov rax, qword [rbp - 8]
jmp 0x14000e26f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x14000e224
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140018e9e
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
call sym.__mingw_get_msvcrt_handle
mov rcx, rax
lea rax, str.rand_s
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140018f0b
lea rax, [sym.mingw_rand_s]
mov qword [rbp - 8], rax
lea rax, str.advapi32.dll
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryW]
call rax
mov rcx, rax
lea rax, str.SystemFunction036
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [0x140138c60], rax
mov rax, qword [rbp - 8]
mov qword [sym.init_rand_s], rax
mov rdx, qword [sym.init_rand_s]
mov rax, qword [rbp + 0x10]
mov rcx, rax
call rdx
add rsp, 0x30
pop rbp
ret

Function at 0x14001b600
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400f5178], eax
cmp eax, 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x28
ret

Function at 0x14001b620
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x7b], 0
mov qword [rsp + 0x83], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x14001b722
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x14001b6fa
add rax, 1
cmp rax, 0x6b
je 0x14001b717
cmp byte [rcx + rax], 0
jne 0x14001b6f0
lea edx, [rax + 1]
cmp eax, 0x6a
je 0x14001b717
cdqe
mov byte [rsp + rax + 0x20], 0xa
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov edx, 0x28
mov eax, 0x27
lea rcx, [rsp + 0x20]
jmp 0x14001b708

Function at 0x14001bac0
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x140138d00], 1
je 0x14001bb38
lea rdi, [0x140138d00]
mov rcx, rdi
call sym.enterOnceObject
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call sym.pthread_mutex_lock
mov esi, dword [0x140138d00]
test esi, esi
jne 0x14001bb48
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400f5178], eax
cmp eax, 0xffffffff
je sym._pthread_once_raw.constprop.0.isra.0.cold
mov dword [0x140138d00], 1
mov rcx, rbp
call sym.pthread_mutex_unlock
test rbx, rbx
je 0x14001bb38
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp sym.leaveOnceObject.part.0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x14001bb18
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sym.fprintf
jmp 0x14001bb18