joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400020d0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x30
mov rdi, rcx
xor ebx, ebx
mov dword [rsp + 0x20], ebx
mov qword [rcx], rbx
mov qword [rcx + 8], rbx
mov qword [rcx + 0x10], rbx
mov dword [rsp + 0x20], 1
xor edx, edx
mov r9d, 0x78ffc5
lea r8, [0x140037c90]
call fcn.140005770
nop
movsxd rdx, ebx
add rdx, qword [rdi]
lea eax, [rbx + 0x64]
xor byte [rdx], al
inc ebx
cmp ebx, 0x78ffc5
jb 0x140002110
mov rax, rdi
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x140019e40
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.140006f90
sub rsp, rax
mov rax, qword [0x140037078]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.140015f40
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140019e8f
mov rax, rbp
jmp 0x140019f97
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 + 0x7c9240]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.14001ad8c
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x7c9240]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140019f93
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 0x140019f93
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.14001ad8c
test rax, rax
js 0x140019f93
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140019f93
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140019f85
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140019f85
cmp byte [rcx], 0xd
jne 0x140019f6b
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140019f7a
cmp byte [rcx + 1], 0xa
jne 0x140019f7a
inc rcx
jmp 0x140019f7a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x37470]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140019f4d
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140019f97
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140006f60
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 0x14001a12c
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, [0x1407c9240]
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 0x14001a183
cmp word [rdx], r13w
jne 0x14001a183
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14001a188
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14001a2ad
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14001a2ce
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14001a1c1
mov rdx, r9
mov word [rbx], cx
jmp 0x14001a1e8
cmp r9, r8
jae 0x14001a1f8
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 0x14001a1a2
jmp 0x14001a2ad
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 0x14001a2a2
cmp dword [rsp + 0x80], esi
je 0x14001a2a2
lea r8, [0x1407c9240]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14001a27a
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14001a24a
mov word [rbx], r13w
jmp 0x14001a2aa
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 0x14001a257
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14001a2aa
cmp word [rsp + 0x70], r13w
jne 0x14001a287
cmp rbx, r14
je 0x14001a244
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14001ad94
cmp word [rsp + 0x70], r13w
je 0x14001a2ad
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, [0x1407c9240]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14001a2a7
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14001a2ad
Function at 0x140b1d058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.140b1d1df
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 0x140b1d089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140b1d06f
add dl, dl
jne 0x140b1d096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140b1d0f6
xor eax, eax
add dl, dl
jne 0x140b1d0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140b1d1ad
add dl, dl
jne 0x140b1d0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b1d0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b1d0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b1d0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140b1d0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140b1d07e
mov eax, 1
add dl, dl
jne 0x140b1d106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b1d113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140b1d0fb
sub eax, ebx
mov ebx, 1
jne 0x140b1d14c
mov ecx, 1
add dl, dl
jne 0x140b1d12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140b1d13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140b1d123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140b1d07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140b1d168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140b1d175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140b1d15d
cmp eax, 0x7d00
jae 0x140b1d19b
cmp eax, 0x500
jb 0x140b1d196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140b1d07e
cmp eax, 0x7f
ja 0x140b1d19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140b1d07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140b1d1d2
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 0x140b1d07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400be370]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400be380]
mov dword [rax], 1
mov rax, qword [0x1400be390]
mov dword [rax], 1
mov rax, qword [0x1400be320]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400be360]
mov dword [0x1400e400c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x1400be450]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1400be430]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x1400bd760]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x14000ae00
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x14000ae70
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400e4714]
mov rbx, rcx
test esi, esi
jle 0x14000afa0
mov rax, qword [0x1400e4718]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000aebb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14000af45
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14000aea0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x14000afc2
mov rax, qword [0x1400e4718]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400e4718]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000afa7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000af3e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14000af50
add dword [0x1400e4714], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400e4718]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000af3e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x14000aec8
mov rax, qword [0x1400e4718]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14000b530
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400e4780]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400e4760]
test rbx, rbx
je 0x14000b58c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x14000b583
test rsi, rsi
je 0x14000b583
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000b568
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x14000b7a0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x14000b7b8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x14000b7c0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x14000b7d0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14000b81d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x14000b814
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000b81f
add rax, 0x28
cmp rax, r9
jne 0x14000b800
xor eax, eax
ret

Function at 0x14000b820
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x14000b8b0
mov rdx, qword [0x1400be320]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000b89e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000b89e
cmp word [rax + 0x18], 0x20b
jne 0x14000b89e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x14000b8b0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x14000b889
add rbx, 0x28
cmp rbx, rdi
je 0x14000b8b0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x14000b880
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

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

Disassembly:
mov rdx, qword [0x1400be320]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000b8e0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000b8e8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000b8e0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000b93d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14000b934
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14000b8e0
add rax, 0x28
cmp rax, r9
jne 0x14000b920
xor eax, eax
ret

Function at 0x14000b940
Capabilities:
Parse pe header

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

Function at 0x14000b980
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1400be320]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x14000b9a0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x14000b9a8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x14000b9a0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x14000b9f0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x14000b9e7
test rcx, rcx
je 0x14000b9a0
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x14000b9d8
xor eax, eax
ret
Function at 0x14000ba00
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400be320]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000ba1f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x14000ba28
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

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

Disassembly:
mov rdx, qword [0x1400be320]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000ba60
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000ba68
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000ba60
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x14000ba60
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x14000bab4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x14000bac0
add rdx, 0x28
cmp r9, rdx
jne 0x14000baa0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x1400be320]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x14000baf2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x14000bb00
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000baf2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x14000baf2
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x14000baf2
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x14000bb55
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x14000bb68
add rdx, 0x28
cmp rdx, r10
jne 0x14000bb40
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x14000bb77
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x14000bb87
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14000bb5e
test ecx, ecx
jg 0x14000bb70
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret

Function at 0x14000bc50
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x14000bc80
mov rdx, rbx
mov ecx, eax
mov dword [rsi], eax
add rsp, 0x28
pop rbx
pop rsi
jmp dbg.__mingwthr_key_dtor
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x14000bcc0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ebx, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x14000bcf0
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14000bd08
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x14000c6b0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x1400e4800], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x1400e4808], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x14000c700
lea rdx, [0x14000c5c0]
mov ecx, eax
mov dword [0x1400e47f8], eax
call dbg.__mingwthr_key_dtor
test eax, eax
jne 0x14000c708
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14000c6f7
call sym.abort
nop
nop
Function at 0x14000c710
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [str._P_v_]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x14000c748
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x14000c7b0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12, qword [rcx + 0x10]
test r12, r12
je 0x14000c7c0
mov esi, dword [0x1400e47f8]
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
call r13
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x14000c830
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x14000c878
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x14000c737
mov rcx, rbx
call fcn.14000c610
mov qword [rsi + r12*8 + 8], rax
jmp 0x14000c737
call fcn.14000c610
mov qword [rbx + 0x10], rax
jmp 0x14000c737
mov r10d, dword [rsi]
test r10d, r10d
je 0x14000c8da
mov r9d, dword [0x1400b5030]
test r9d, r9d
je 0x14000c908
lock add dword [0x1400e4800], 1
jne 0x14000c93c
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x14000c8e7
mov eax, dword [rsi]
test eax, eax
je 0x14000c751
lock sub dword [0x1400e4800], 1
js 0x14000c751
mov rcx, qword [0x1400e4808]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x14000c751
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call sym.calloc
mov rsi, rax
test rax, rax
je 0x14000c963
mov qword [rax], rdi
mov ecx, dword [0x1400e47f8]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14000c78b
call r13
jmp 0x14000c78b
lea rdi, [rbp + rbp]
lea rax, [r12 + 0x20]
mov rcx, rsi
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sym.realloc
mov rsi, rax
test rax, rax
je 0x14000c963
mov qword [rax], rdi
sub rdi, rbp
lea rcx, [rax + rbp*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sym.memset
jmp 0x14000c853
call fcn.14000c6b0
mov dword [0x1400b5030], 1
mov edx, dword [rsi]
test edx, edx
jne 0x14000c7dc
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x14000c751
mov rax, qword [0x1400e47f0]
lea r12, [rax + 1]
mov qword [0x1400e47f0], r12
mov qword [rbx + 0x10], r12
jmp 0x14000c7f7
lock add dword [0x1400b5034], 1
je 0x14000c8c1
mov r8d, dword [0x1400b5030]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x1400b5030]
test r8d, r8d
jne 0x14000c8d0
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x14000c930
jmp 0x14000c8d0
mov rcx, qword [0x1400e4808]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14000c7ea
lock sub dword [0x1400e4800], 1
jmp 0x14000c7ea
call sym.abort
nop
nop dword [rax]
Function at 0x140015110
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
lea rcx, str.msvcrt.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rsi, qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.rand_s
mov rcx, rax
call rsi
test rax, rax
je 0x140015158
mov rcx, rbx
mov qword [dbg.init_rand_s], rax
add rsp, 0x28
pop rbx
pop rsi
jmp rax
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rsi
mov qword [0x1400e5300], rax
lea rax, [dbg.mingw_rand_s]
jmp 0x14001513e

Function at 0x140017720
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9, qword [rcx + 0x40]
mov rsi, rdx
mov rbx, rcx
mov edx, 1
mov rcx, rsi
call sym.fread
mov edx, 0xffffffff
test rax, rax
jle 0x14001774c
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x140018380
Capabilities:
Write file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
cmp byte [0x1400b7f50], 0
jne 0x140018486
mov byte [0x1400b7f50], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x14001845c
mov rbx, qword [rax + 8]
xor eax, eax
lea r9, [rsp + 0x2c]
cmp byte [rbx], 0x2a
mov dword [rsp + 0x2c], 0xffffffff
sete al
xor r8d, r8d
xor edx, edx
add rbx, rax
mov rcx, rbx
call sym.__cxa_demangle
mov ecx, 2
mov rsi, qword [dbg.__acrt_iob_func]
mov rdi, rax
call rsi
mov edx, 1
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r8d, 0x30
mov r9, rax
call sym.fwrite
mov edx, dword [rsp + 0x2c]
mov ecx, 2
test edx, edx
je 0x14001844d
call rsi
mov rcx, rbx
mov rdx, rax
call sym.fputs
mov ecx, 2
call rsi
mov r8d, 2
mov edx, 1
lea rcx, [0x1400b8131]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x140018448
mov rcx, rdi
call sym.free
call sym.__cxa_rethrow
call rsi
mov rcx, rdi
mov rdx, rax
call sym.fputs
jmp 0x140018417
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x2d
mov edx, 1
lea rcx, str.terminate_called_without_an_active_exception_n
mov r9, rax
call sym.fwrite
call sym.abort
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x1d
mov edx, 1
lea rcx, str.terminate_called_recursively_n
mov r9, rax
call sym.fwrite
call sym.abort
sub rdx, 1
mov rcx, rax
jne 0x14001851b
call sym.__cxa_begin_catch
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov rbx, rax
call rsi
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
call rsi
mov rdx, rax
mov rcx, rbx
call sym.fputs
mov ecx, 2
call rsi
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x140018481
call sym.__cxa_begin_catch
call sym.__cxa_end_catch
jmp 0x140018481