joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140b29058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.140b291df
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 0x140b29089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140b2906f
add dl, dl
jne 0x140b29096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140b290f6
xor eax, eax
add dl, dl
jne 0x140b290a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140b291ad
add dl, dl
jne 0x140b290b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b290c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b290d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b290dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140b290ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140b2907e
mov eax, 1
add dl, dl
jne 0x140b29106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140b29113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140b290fb
sub eax, ebx
mov ebx, 1
jne 0x140b2914c
mov ecx, 1
add dl, dl
jne 0x140b2912e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140b2913b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140b29123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140b2907e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140b29168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140b29175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140b2915d
cmp eax, 0x7d00
jae 0x140b2919b
cmp eax, 0x500
jb 0x140b29196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140b2907e
cmp eax, 0x7f
ja 0x140b2919e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140b2907e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140b291d2
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 0x140b2907e
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 [0x140109bf0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140109c00]
mov dword [rax], 1
mov rax, qword [0x140109c10]
mov dword [rax], 1
mov rax, qword [0x140109b90]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140109be0]
mov dword [0x140132020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x140109cd0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140109cb0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140108f80]
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 [sym._matherr]
call sym.__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 0x1400018e8
Capabilities:
Create process on windows

Disassembly:
push rbp
push rdi
push rbx
sub rsp, 0xe0
lea rbp, [rsp + 0xe0]
mov qword [rbp + 0x20], rcx
lea rdx, [rbp - 0x70]
mov eax, 0
mov ecx, 0xd
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rbp - 0x70], 0x68
mov dword [rbp - 0x34], 1
mov word [rbp - 0x30], 0
mov rax, qword [rbp + 0x20]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const
mov rdx, rax
lea rax, [rbp - 0x90]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
setne al
test al, al
je 0x1400019bc
mov rax, qword [rbp - 0x90]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x140001a02
lea rax, str.Failed_to_start_process__error_code:
mov rdx, rax
mov rax, qword [0x140109570]
mov rcx, rax
call dbg.std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
mov rbx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
mov rcx, rbx
call dbg.std::ostream::operator<<(unsigned long)
mov rcx, rax
mov rax, qword [dbg.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call dbg.std::ostream::operator<<(std::ostream& (*)(std::ostream&))
mov eax, 0
add rsp, 0xe0
pop rbx
pop rdi
pop rbp
ret
Function at 0x140001a0d
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push rbp
push rbx
mov eax, 0x1238
call fcn.140015a80
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x11d0], rcx
mov qword [rbp + 0x11d8], rdx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
lea rax, str.Downloader
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp + 0x11a8], rax
cmp qword [rbp + 0x11a8], 0
je 0x140001ba6
mov rax, qword [rbp + 0x11d0]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const
mov rdx, rax
mov rax, qword [rbp + 0x11a8]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x4000000
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlA]
call rax
mov qword [rbp + 0x11a0], rax
cmp qword [rbp + 0x11a0], 0
je 0x140001ba6
mov rdx, qword [rbp + 0x11d8]
lea rax, [rbp - 0x50]
mov r8d, 4
mov rcx, rax
call fcn.1400c8510
lea rax, [rbp - 0x50]
add rax, 0xd0
mov rcx, rax
call dbg.std::basic_ios<char, std::char_traits<char> >::operator bool() const
test al, al
je 0x140001b6d
jmp 0x140001b19
mov eax, dword [rbp + 0x119c]
mov ecx, eax
lea rdx, [rbp + 0x190]
lea rax, [rbp - 0x50]
mov r8, rcx
mov rcx, rax
call dbg.std::ostream::write(char const*, long long)
lea rcx, [rbp + 0x119c]
lea rdx, [rbp + 0x190]
mov rax, qword [rbp + 0x11a0]
mov r9, rcx
mov r8d, 0x1000
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
test eax, eax
je 0x140001b58
mov eax, dword [rbp + 0x119c]
test eax, eax
je 0x140001b58
mov eax, 1
jmp 0x140001b5d
mov eax, 0
test al, al
jne 0x140001afb
lea rax, [rbp - 0x50]
mov rcx, rax
call dbg.std::basic_ofstream<char, std::char_traits<char> >::close()
mov rax, qword [rbp + 0x11a0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0x11a8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov ebx, 1
lea rax, [rbp - 0x50]
mov rcx, rax
call method.std::basic_ofstream_char__std::char_traits_char___.basic_ofstream__
jmp 0x140001bab
mov ebx, 0
mov eax, ebx
jmp 0x140001bc9
add rsp, 0x1238
pop rbx
pop rbp
ret
Function at 0x140014c50
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 sym.__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 sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140014cc0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1401320c4]
mov rbx, rcx
test esi, esi
jle 0x140014df0
mov rax, qword [0x1401320c8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140014d0b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140014d95
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140014cf0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140014e12
mov rax, qword [0x1401320c8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1401320c8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140014df7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140014d8e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140014da0
add dword [0x1401320c4], 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 [0x1401320c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140014d8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140014d18
mov rax, qword [0x1401320c8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x1400154a0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp edx, 2
je 0x1400155d0
ja 0x1400154e8
test edx, edx
je 0x140015568
mov eax, dword [0x140132108]
test eax, eax
je 0x140015650
mov dword [0x140132108], 1
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp edx, 3
jne 0x1400154d5
mov eax, dword [0x140132108]
test eax, eax
je 0x1400154d5
lea r12, [0x140132120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140132100]
test rbx, rbx
je 0x140015554
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 0x140015678
test rsi, rsi
je 0x140015678
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140015528
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1400154d5
mov eax, dword [0x140132108]
test eax, eax
jne 0x1400155e8
mov eax, dword [0x140132108]
cmp eax, 1
jne 0x1400154d5
mov rbx, qword [0x140132100]
test rbx, rbx
je 0x1400155a1
nop dword [rax]
mov rcx, rbx
mov rbx, qword [rbx + 0x10]
call sym.free
test rbx, rbx
jne 0x140015590
lea rcx, [0x140132120]
mov qword [0x140132100], 0
mov dword [0x140132108], 0
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x1400154d5
call sym._fpreset
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea r12, [0x140132120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140132100]
test rbx, rbx
je 0x14001563c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word [rax + rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140015668
test rsi, rsi
je 0x140015668
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140015618
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140015572
lea rcx, [0x140132120]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x1400154cb
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140015618
jmp 0x14001563c
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140015528
jmp 0x140015554

Function at 0x140015690
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400156a8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400156b0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400156c0
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 0x14001570d
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 0x140015704
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14001570f
add rax, 0x28
cmp rax, r9
jne 0x1400156f0
xor eax, eax
ret
Function at 0x140015710
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400157a0
mov rdx, qword [0x140109b90]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14001578e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14001578e
cmp word [rax + 0x18], 0x20b
jne 0x14001578e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400157a0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140015779
add rbx, 0x28
cmp rbx, rdi
je 0x1400157a0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140015770
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 0x1400157b0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r8, qword [0x140109b90]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400157d0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400157d8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400157d0
movzx eax, word [rdx + 0x14]
sub rcx, r8
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140015825
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14001581c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400157d0
add rax, 0x28
cmp rax, r9
jne 0x140015808
xor eax, eax
ret

Function at 0x140015830
Capabilities:
Parse pe header

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

Function at 0x140015870
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140109b90]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140015890
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140015898
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140015890
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x1400158e0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400158d7
test rcx, rcx
je 0x140015890
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x1400158c8
xor eax, eax
ret

Function at 0x1400158f0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140109b90]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14001590f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140015918
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140015930
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140109b90]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140015950
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140015958
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140015950
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140015950
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 0x1400159a4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x1400159b0
add rdx, 0x28
cmp r9, rdx
jne 0x140015990
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x140109b90]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x1400159e4
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
cmp dword [rcx], 0x4550
je 0x1400159f0
mov rax, r9
ret
cmp word [rcx + 0x18], 0x20b
jne 0x1400159e4
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x1400159e4
movzx edx, word [rcx + 0x14]
movzx r10d, word [rcx + 6]
lea rdx, [rcx + rdx + 0x18]
test r10w, r10w
je 0x1400159e4
lea ecx, [r10 - 1]
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x140015a3c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x140015a50
add rdx, 0x28
cmp rdx, r10
jne 0x140015a28
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140015a60
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x140015a6e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140015a45
test r8d, r8d
jg 0x140015a58
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140015ba0
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 0x140015bd0
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140015be8
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x140020730
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 0x140020778
mov rcx, rbx
mov qword [sym.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 [0x140132c80], rax
lea rax, [sym.mingw_rand_s]
jmp 0x14002075e

Function at 0x140023240
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 0x14002326c
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x140023ea0
Capabilities:
Write file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
cmp byte [0x140101f90], 0
jne 0x140023fa6
mov byte [global_terminating], 1
call dbg.__cxa_current_exception_type
test rax, rax
je 0x140023f7c
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 dbg.__cxa_demangle
mov ecx, 2
mov rsi, qword [sym.__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 0x140023f6d
call rsi
mov rcx, rbx
mov rdx, rax
call sym.fputs
mov ecx, 2
call rsi
mov r8d, 2
mov edx, 1
lea rcx, [0x1401024d1]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x140023f68
mov rcx, rdi
call sym.free
call dbg.__cxa_rethrow
call rsi
mov rcx, rdi
mov rdx, rax
call sym.fputs
jmp 0x140023f37
mov ecx, 2
call qword [sym.__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 [sym.__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 0x14002403b
call dbg.__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 dbg.__cxa_end_catch
jmp 0x140023fa1
call dbg.__cxa_begin_catch
call dbg.__cxa_end_catch
jmp 0x140023fa1
Function at 0x1400aa6d0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
mov rcx, qword [rdi]
call sym.fileno
mov ecx, eax
mov r8d, ebx
mov rdx, rsi
call sym.read
movsxd rbp, eax
cmp eax, 0xffffffff
je 0x1400aa718
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call r12
cmp dword [rax], 4
je 0x1400aa6ea
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x1400c3010
Capabilities:
Read file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rax, qword [rcx + 8]
mov rdi, rcx
test rax, rax
je 0x1400c3038
mov rcx, qword [rcx]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov ebx, 4
lea rsi, [rsp + 0x2c]
nop dword [rax]
mov ecx, dword [rdi + 0x10]
mov r8d, ebx
mov rdx, rsi
call sym.read
test eax, eax
jle 0x1400c3080
cdqe
add rsi, rax
sub rbx, rax
jne 0x1400c3050
mov eax, dword [rsp + 0x2c]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp eax, 0xffffffff
jne 0x1400c308c
call rbp
cmp dword [rax], 4
je 0x1400c3050
lea rcx, str.random_device_could_not_be_read
call dbg.std::__throw_runtime_error(char const*)
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x1400c3510
Capabilities:
Read file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rax, qword [rcx + 8]
mov rdi, rcx
test rax, rax
je 0x1400c3538
mov rcx, qword [rcx]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov ebx, 4
lea rsi, [rsp + 0x2c]
nop dword [rax]
mov ecx, dword [rdi + 0x10]
mov r8d, ebx
mov rdx, rsi
call sym.read
test eax, eax
jle 0x1400c3580
cdqe
add rsi, rax
sub rbx, rax
jne 0x1400c3550
mov eax, dword [rsp + 0x2c]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp eax, 0xffffffff
jne 0x1400c358c
call rbp
cmp dword [rax], 4
je 0x1400c3550
lea rcx, str.random_device_could_not_be_read
call dbg.std::__throw_runtime_error(char const*)
nop
nop
nop
nop
nop
nop
nop
nop