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

Disassembly:
call 0x140bb91df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, pe_nt_image_headers64
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140bb9089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140bb906f
add dl, dl
jne 0x140bb9096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140bb90f6
xor eax, eax
add dl, dl
jne 0x140bb90a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140bb91ad
add dl, dl
jne 0x140bb90b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140bb90c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140bb90d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140bb90dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140bb90ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140bb907e
mov eax, 1
add dl, dl
jne 0x140bb9106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140bb9113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140bb90fb
sub eax, ebx
mov ebx, 1
jne 0x140bb914c
mov ecx, 1
add dl, dl
jne 0x140bb912e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140bb913b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140bb9123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140bb907e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140bb9168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140bb9175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140bb915d
cmp eax, 0x7d00
jae 0x140bb919b
cmp eax, 0x500
jb 0x140bb9196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140bb907e
cmp eax, 0x7f
ja 0x140bb919e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140bb907e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140bb91d2
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 0x140bb907e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x14001115e
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
jmp 0x1400117a0
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x30]
ret

Function at 0x1400111e5
Capabilities:
Terminate process

Disassembly:
jmp 0x140012f80
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x140011262
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
jmp 0x140011a00
push rbp
push rdi
sub rsp, 0x1c8
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x3a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [section..data]
xor rax, rbp
mov qword [rbp + 0x198], rax
lea rcx, [0x14002109f]
call fcn.140011361
call fcn.14001116d
mov qword [rbp + 8], rax
mov rcx, qword [rbp + 8]
call fcn.1400113a7
mov qword [rbp + 0x28], rax
lea rdx, str.VirtualProtect
mov rcx, qword [rbp + 8]
call qword [rbp + 0x28]
mov qword [rbp + 0x48], rax
lea rdx, str.ConvertThreadToFiber
mov rcx, qword [rbp + 8]
call qword [rbp + 0x28]
mov qword [rbp + 0x68], rax
lea rdx, str.CreateFiber
mov rcx, qword [rbp + 8]
call qword [rbp + 0x28]
mov qword [rbp + 0x88], rax
lea r9, [rbp + 0xa4]
mov r8d, 0x40
mov edx, 1
lea rcx, [0x14001c170]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
xor ecx, ecx
call qword [rbp + 0x68]
xor r8d, r8d
lea rdx, [0x14001c170]
xor ecx, ecx
call qword [rbp + 0x88]
mov qword [rbp + 0xc8], rax
mov rcx, qword [rbp + 0xc8]
call qword [sym.imp.KERNEL32.dll_SwitchToFiber]
mov rcx, qword [rbp + 0xc8]
call qword [sym.imp.KERNEL32.dll_DeleteFiber]
xor eax, eax
mov edi, eax
lea rcx, [rbp - 0x20]
lea rdx, [0x140019c00]
call fcn.1400112f8
mov eax, edi
mov rcx, qword [rbp + 0x198]
xor rcx, rbp
call fcn.1400111a9
lea rsp, [rbp + 0x1a8]
pop rdi
pop rbp
ret

Function at 0x14001126c
Capabilities:
Parse pe header

Disassembly:
jmp 0x1400142d0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x1400142f0
xor al, al
jmp 0x140014371
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140014303
xor al, al
jmp 0x140014371
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14001432d
xor al, al
jmp 0x140014371
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140014341
xor al, al
jmp 0x140014371
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140014353
xor al, al
jmp 0x140014371
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001436f
xor al, al
jmp 0x140014371
mov al, 1
add rsp, 0x38
ret
Function at 0x1400113a7
Capabilities:
Resolve function by parsing pe exports

Disassembly:
jmp 0x1400117c0
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x1e8
lea rbp, [rsp + 0x20]
lea rcx, [0x14002109f]
call fcn.140011361
mov rax, qword [rbp + 0x1e0]
mov qword [rbp + 8], rax
mov rax, qword [rbp + 8]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x28], rax
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rbp + 0x28]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x1c]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x68], rax
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x20]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x88], rax
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x24]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0xa8], rax
mov qword [rbp + 0xc8], 0
jmp 0x140011885
mov rax, qword [rbp + 0xc8]
inc rax
mov qword [rbp + 0xc8], rax
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x18]
cmp qword [rbp + 0xc8], rax
jae 0x1400118f8
mov rax, qword [rbp + 0x88]
mov rcx, qword [rbp + 0xc8]
mov eax, dword [rax + rcx*4]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0xe8], rax
lea rdx, str.GetProcAddress
mov rcx, qword [rbp + 0xe8]
call fcn.1400113c5
test eax, eax
jne 0x1400118f3
mov rax, qword [rbp + 0xa8]
mov rcx, qword [rbp + 0xc8]
movzx eax, word [rax + rcx*2]
mov rcx, qword [rbp + 0x68]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rbp + 8]
add rcx, rax
mov rax, rcx
jmp 0x1400118f8
jmp 0x140011874
lea rsp, [rbp + 0x1c8]
pop rdi
pop rbp
ret

Function at 0x1439f9000
Capabilities:
Decompress data using aplib

Disassembly:
jmp 0x1439f900a
jmp 0x1439fb00f
jmp fcn.142656058
Function at 0x140001470
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x270
mov rax, qword [0x14000c040]
xor rax, rsp
mov qword [rsp + 0x260], rax
xor edx, edx
mov dword [rsp + 0x20], 0x238
mov rbx, rcx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
lea rdx, [rsp + 0x20]
xor esi, esi
mov rcx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x1400014f5
cmp qword [rbx + 0x18], 7
mov rdx, rbx
jbe 0x1400014ce
mov rdx, qword [rbx]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1400014f1
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x1400014c1
jmp 0x1400014f5
mov esi, dword [rsp + 0x28]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.140006430
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x140005cf8
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x140005d32
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x140005d37
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x140005d80
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x140008400]
cmp byte [rcx + rax], 0
je 0x140005d80
dec r8
sub rdx, 1
jne 0x140005d66
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x140006ed4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140006f1e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140006f1e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140006f1e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140006f1e
cmp dword [rcx + 0x84], 0xe
jbe 0x140006f1e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140006f20
xor al, al
add rsp, 0x28
ret
Function at 0x1423827f1
Capabilities:
Encode data using xor

Disassembly:
jmp 0x14237b007
push 0xffffffff9c2f2604
not ecx
mov dword [r10], ecx
push 0x3786acb6
lea rsp, [rsp + 0x10]
jmp fcn.14237297a
lea rsp, [rsp + 0x18]
je 0x1423520de
push r11
mov r11d, 0x123ef9a6
add r11, r11
lea r11, [0x1423684e0]
mov edx, 0x9a3cd3bd
movzx edx, byte [r8]
push 0xffffffffd23d9e85
xor edx, ecx
and edx, 0xff
inc word [rsp + 5]
mov edx, dword [r11 + rdx*4]
shr qword [rsp], 0xd4
shr ecx, 8
xor ecx, edx
inc r8
xor ecx, 0xba871e02
rol dword [rsp + 3], 0x15
dec rbx
push 0xffffffffebbb790f
lea rsp, [rsp + 0x10]
jne 0x14238280e
call fcn.1423520d4
Function at 0x2fc4d7fc0
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 0x2fc4d89c2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4fd108]
test eax, eax
je 0x2fc4d8a5a
lea rax, [0x2fc4fd0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4fd110]
mov qword [rbp - 8], rax
jmp 0x2fc4d8a3e
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 0x2fc4d8a32
cmp qword [rbp - 0x10], 0
je 0x2fc4d8a32
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 0x2fc4d89f8
lea rax, [0x2fc4fd0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d8a5b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d8b60
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 0x2fc4d8b88
mov eax, 0
jmp 0x2fc4d8bd6
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 0x2fc4d8bb1
mov eax, 0
jmp 0x2fc4d8bd6
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 0x2fc4d8bd1
mov eax, 0
jmp 0x2fc4d8bd6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d8bdc
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 0x2fc4d8c5a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4d8c51
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 0x2fc4d8c51
mov rax, qword [rbp - 8]
jmp 0x2fc4d8c6f
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 0x2fc4d8c24
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001001
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14007b500]
mov rcx, qword [0x14007b4a0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x14007b510]
cmp word [rcx], 0x5a4d
mov dword [rax], 1
mov rax, qword [0x14007b520]
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 [0x14007b4f0]
mov dword [0x1400a1020], 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 [0x14007b5e0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x14007b5c0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x14007a9c0]
cmp dword [rax], 1
jne 0x1400010e1
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
Function at 0x1400068a4
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x1400a10c8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x1400a10c4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x1400068f2
mov rdx, qword [rax]
cmp r12, rdx
jb 0x1400068ea
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400069d9
inc ebx
add rax, 0x28
jmp 0x1400068ca
mov rcx, r12
call sym.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
jne 0x140006911
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
movsxd rbx, ebx
mov rax, qword [0x1400a10c8]
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 [0x1400a10c8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140006973
mov rax, qword [0x1400a10c8]
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 - 0x40]
and edx, 0xffffffbf
je 0x1400069d3
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400069d3
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 [0x1400a10c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400069d3
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 [0x1400a10c4]
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 0x140006e40
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x1400a1120]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400a1100]
test rbx, rbx
je 0x140006e8c
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140006e86
test rsi, rsi
je 0x140006e86
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x140006e5e
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140007040
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140007063
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x140007063
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x140007064
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 0x14000709e
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x140007095
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400070a0
inc r8d
add rax, 0x28
jmp 0x14000707c
xor eax, eax
ret

Function at 0x140007111
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x14007b4a0]
mov r8, rcx
mov rcx, r9
call sym._ValidateImageBase
test eax, eax
je 0x14000713d
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp sym._FindPESection
xor eax, eax
add rsp, 0x28
ret

Function at 0x14000dc9e
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 0x14000dcf3
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rsi
mov qword [0x1400a1ca0], 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 0x14000fa83
Capabilities:
Allocate thread local storage

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

Function at 0x14000fc11
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
mov rbx, rcx
test rcx, rcx
je 0x14000fcad
call sym.pthread_spin_destroy
dec eax
jne 0x14000fca6
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 0x14000fc85
inc rax
cmp rax, 0x6b
jne 0x14000fc74
jmp 0x14000fc9b
cmp eax, 0x6a
je 0x14000fc9b
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 0x14000fd4f
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 [0x140073168]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test rax, rax
jne 0x14000fe5e
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rbx, rax
je 0x14000fe5e
test rax, rax
je 0x14000fe5e
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 0x14000fe24
call sym.abort
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x140073168]
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 0x14000fe1f
mov rsi, rbx
mov rax, rsi
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
Function at 0x140010598
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 0x1400105d2
test r8, r8
jne 0x1400106fd
mov rcx, qword [0x1400a1d00]
test rcx, rcx
je 0x1400106fd
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
xor r9d, r9d
mov qword [0x1400a1d00], r9
jmp 0x1400106fd
cmp edx, 1
jne 0x1400105f5
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x1400a1d00], rax
jmp 0x1400106fd
cmp edx, 3
jne 0x1400106fd
mov ecx, dword [0x140073168]
cmp ecx, 0xffffffff
je 0x1400106fd
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x1400106fd
test byte [rax + 0x40], 0x30
lea rdi, [rax + 0x38]
lea rsi, [rax + 0x68]
je 0x14001068b
mov rcx, qword [rax + 0x1d8]
call sym._pthread_cleanup_dest
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x140010663
mov rbp, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rbp
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x140010656
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 [0x140073168]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1400106fd
cmp dword [rax + 0xbc], 0
mov rcx, qword [rax + 0x30]
jne 0x1400106dc
test rcx, rcx
je 0x1400106a3
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 0x1400106ed
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x14001065d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14001065d
test rcx, rcx
je 0x1400106e7
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