joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140025280
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
mov eax, 0x10090
call fcn.14004faa0
sub rsp, rax
mov rax, qword [0x140067040]
xor rax, rsp
mov qword [rsp + 0x10080], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor ebp, ebp
mov rsi, rcx
mov word [rsp + 0x80], bp
mov edi, 0x28
mov word [rsp + 0x30], bp
test al, al
je 0x140025342
nop dword [rax]
nop word [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], bpl
lea rcx, [rsp + 0x24]
call fcn.14004362c
cmp rax, 1
jne 0x14002539e
mov rcx, rdi
mov rax, rbx
cmp word [rbx], bp
je 0x14002531f
add rax, 2
dec rcx
cmp word [rax], bp
jne 0x140025313
cmp rcx, 1
jb 0x14002539e
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], bp
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x1400252e0
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x140025373
lea rcx, [rsp + 0x80]
call fcn.140044b6c
jmp 0x140025375
xor eax, eax
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.140034bf0
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
call fcn.140038320
int3

Function at 0x1400253b0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x140067040]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor ebp, ebp
lea rsi, str.NUITKA_PYTHONPATH
mov word [rsp + 0x30], bp
lea rbx, [rsp + 0x30]
mov edi, 0x28
mov al, 0x4e
nop dword [rax]
nop word [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], bpl
lea rcx, [rsp + 0x24]
call fcn.14004362c
cmp rax, 1
jne 0x140025495
mov rcx, rdi
mov rax, rbx
cmp word [rbx], bp
je 0x14002543c
nop
add rax, 2
dec rcx
cmp word [rax], bp
jne 0x140025430
cmp rcx, 1
jb 0x140025495
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], bp
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x140025400
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140034bf0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
call fcn.140038320
int3
Function at 0x14002fc80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp byte [0x14006c1c6], 0
mov rsi, r8
mov rdi, rdx
mov rbp, rcx
jne 0x14002fd03
mov edx, 3
xor ecx, ecx
mov r8d, 0xa
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x14006bff8], rax
mov ebx, dword [rax]
lea rdx, [rax + 4]
mov qword [0x14006bff8], rdx
mov r8d, dword [rdx]
add rdx, 4
mov qword [0x14006bff8], rdx
call fcn.14002e000
cmp eax, ebx
jne 0x14002fe6d
mov byte [0x14006c1c6], 1
lea rdx, [0x14005a418]
mov rcx, rsi
call fcn.14004fc60
test eax, eax
je 0x14002fd8e
cmp byte [0x14006c1c7], 1
je 0x14002fd8e
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ccf8], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006d1c0], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ca10], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006c978], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006d220], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006caa0], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006d1c8], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006d1e0], rax
mov byte [0x14006c1c7], 1
mov r8, qword [0x14006bff8]
mov rax, rsi
mov rdx, r8
sub rdx, rsi
nop
movzx ecx, byte [rax]
xor r9d, r9d
cmp cl, byte [rax + rdx]
jne 0x14002fdb7
inc rax
test cl, cl
jne 0x14002fda0
mov ecx, r9d
jmp 0x14002fdbc
sbb ecx, ecx
or ecx, 1
mov rax, 0xffffffffffffffff
cmp byte [r8 + rax + 1], r9b
lea rax, [rax + 1]
jne 0x14002fdc3
lea rdx, [r8 + rax]
mov eax, dword [r8 + rax + 1]
add rdx, 5
test ecx, ecx
je 0x14002fe28
nop
add rdx, rax
mov rax, rsi
mov r8, rdx
sub r8, rsi
nop dword [rax]
movzx ecx, byte [rax]
cmp cl, byte [rax + r8]
jne 0x14002fe05
inc rax
test cl, cl
jne 0x14002fdf0
mov ecx, r9d
jmp 0x14002fe0a
sbb ecx, ecx
or ecx, 1
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rdx + rax], r9b
jne 0x14002fe11
add rdx, rax
mov eax, dword [rdx + 1]
add rdx, 5
test ecx, ecx
jne 0x14002fde0
movzx ecx, word [rdx]
lea rax, [rdx + 2]
cmp r9w, cx
jae 0x14002fe58
mov ebx, ecx
nop word [rax + rax]
mov r8, rax
mov rdx, rdi
mov rcx, rbp
call fcn.14002ed00
add rdi, 8
sub rbx, 1
jne 0x14002fe40
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
lea rcx, str.Error__corrupted_constants_object
call fcn.14004015c
call fcn.140038320
int3

Function at 0x1400355c8
Capabilities:
Parse pe header

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

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

Function at 0x140038680
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x1400384eb
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400384eb
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400384eb
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400384eb
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400384eb
cmp dword [rcx + 0x84], 0xe
jbe 0x1400384eb
cmp dword [rcx + 0xf8], 0
je 0x1400384eb
mov ecx, ebx
call fcn.14003859c
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140038378
nop
cmp dword [rbp + 0x20], 0
je 0x140038539
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140038544
int3
xor r8d, r8d
xor edx, edx
jmp 0x14003847c
Function at 0x140049580
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x140049607
mov rsi, rbx
cmp word [rax], bp
je 0x1400495c6
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400495b0
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400495ac
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140047188
mov rdi, rax
test rax, rax
je 0x1400495f4
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140050100
mov rbp, rdi
xor ecx, ecx
call fcn.1400451d8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14004bd0c
Capabilities:
Get file size

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

Function at 0x14004f9b0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14004f9d8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14004f9d8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140ab00
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x140ab0d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x140ab1d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x140ab05
lea eax, [rcx + 1]
jmp 0x140ab2b
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x140ab3e
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x140ab24
sub eax, 3
jb 0x140ab5e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x140abad
sar eax, 1
movsxd rbp, eax
jb 0x140ab94
jmp 0x140ab6c
add ebx, ebx
jne 0x140ab6a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140ab94
inc ecx
add ebx, ebx
jne 0x140ab7a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140ab94
call r11
adc ecx, ecx
add ebx, ebx
jne 0x140ab8d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x140ab7c
add ecx, 2
jmp 0x140ab99
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.0140aac2
jmp 0x140ab0d
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x258600
mov dl, 0x2e
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x140abf9
cmp rsi, rcx
jae 0x140ac01
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x140abe0
cmp al, 0x8f
ja 0x140abe0
cmp byte [rsi - 2], 0xf
je 0x140abe6
sub al, 0xe8
cmp al, 1
ja 0x140abca
cmp rsi, rcx
jae 0x140ac01
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x140abd0
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x140ac01
lodsb al, byte [rsi]
jmp 0x140abe0
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x1003000]
mov eax, dword [rdi]
or eax, eax
je 0x140ac5e
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x100a000]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x140ac0e
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x140ac58
mov qword [rbx], rax
add rbx, 8
jmp 0x140ac2e
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x140aca2
cmp al, 0xef
ja 0x140ac8a
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x140ac6a
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0x140ac79
mov eax, dword [rdi]
add rdi, 4
jmp 0x140ac79
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x1af]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x140acf6
sub rsp, 0xffffffffffffff80
jmp 0x46d520
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400c6730]
mov dword [rax], 1
mov rax, qword [0x1400c6740]
mov dword [rax], 1
mov rax, qword [0x1400c6750]
mov dword [rax], 1
mov rax, qword [0x1400c66e0]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x140001860
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rax, qword [rcx + 8]
lea rsi, [rax + 1]
mov rdx, rsi
mov rdi, rcx
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rdi, qword [rdi]
mov rbx, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call sym.memcpy
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor ecx, ecx
call qword [sym.imp.USER32.dll_OpenClipboard]
call qword [sym.imp.USER32.dll_EmptyClipboard]
mov rdx, rbx
mov ecx, 1
call qword [sym.imp.USER32.dll_SetClipboardData]
call qword [sym.imp.USER32.dll_CloseClipboard]
mov rcx, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_GlobalFree]
Function at 0x14000d0c0
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 0x14000dd92
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400ee108]
test eax, eax
je 0x14000de2a
lea rax, [0x1400ee0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400ee110]
mov qword [rbp - 8], rax
jmp 0x14000de0e
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 0x14000de02
cmp qword [rbp - 0x10], 0
je 0x14000de02
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 0x14000ddc8
lea rax, [0x1400ee0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000de2b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14000df30
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 0x14000df58
mov eax, 0
jmp 0x14000dfa6
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 0x14000df81
mov eax, 0
jmp 0x14000dfa6
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 0x14000dfa1
mov eax, 0
jmp 0x14000dfa6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x14000dfac
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 0x14000e02a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x14000e021
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 0x14000e021
mov rax, qword [rbp - 8]
jmp 0x14000e03f
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 0x14000dff4
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x140018c6e
Capabilities:
Generate random numbers via rtlgenrandom

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

Function at 0x14001b3e0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400bd178], eax
cmp eax, 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x28
ret
Function at 0x14001b400
Capabilities:
Print debug messages

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

Function at 0x14001b8a0
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x1400eed00], 1
je 0x14001b918
lea rdi, [0x1400eed00]
mov rcx, rdi
call sym.enterOnceObject
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call sym.pthread_mutex_lock
mov esi, dword [0x1400eed00]
test esi, esi
jne 0x14001b928
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400bd178], eax
cmp eax, 0xffffffff
je sym._pthread_once_raw.constprop.0.isra.0.cold
mov dword [0x1400eed00], 1
mov rcx, rbp
call sym.pthread_mutex_unlock
test rbx, rbx
je 0x14001b918
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp sym.leaveOnceObject.part.0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x14001b8f8
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sym.fprintf
jmp 0x14001b8f8
Function at 0x14001b950
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rbx, rax
je 0x14001ba68
test rax, rax
je 0x14001ba68
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call sym.pthread_spin_destroy
cmp eax, 1
je 0x14001ba76
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rsi, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, rsi
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je sym.__pthread_self_lite.part.0.cold
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x1400bd178]
mov rdx, rbx
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, 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 0x14001ba7c
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.replace_spin_keys.part.0
nop
jmp sym.__pthread_self_lite.part.0.cold

Function at 0x14001ba90
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
sub rsp, 0x28
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400bd178]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001bab0
add rsp, 0x28
ret
add rsp, 0x28
jmp sym.__pthread_self_lite.part.0