joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14006c158
Capabilities:
Parse pe header

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

Function at 0x1400700d0
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 0x14006ff3b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14006ff3b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14006ff3b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14006ff3b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14006ff3b
cmp dword [rcx + 0x84], 0xe
jbe 0x14006ff3b
cmp dword [rcx + 0xf8], 0
je 0x14006ff3b
mov ecx, ebx
call fcn.14006ffec
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.14006fdc8
nop
cmp dword [rbp + 0x20], 0
je 0x14006ff89
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14006ff94
int3
xor r8d, r8d
xor edx, edx
jmp 0x14006fecc
Function at 0x14007a504
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 0x14007a58b
mov rsi, rbx
cmp word [rax], bp
je 0x14007a54a
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14007a534
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14007a530
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140076800
mov rdi, rax
test rax, rax
je 0x14007a578
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140081360
mov rbp, rdi
xor ecx, ecx
call fcn.140076db8
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 0x14007ce98
Capabilities:
Get file size

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

Function at 0x140080c10
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140080c38
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140080c38
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14079a108
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.14079a28f
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 0x14079a139
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14079a11f
add dl, dl
jne 0x14079a146
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14079a1a6
xor eax, eax
add dl, dl
jne 0x14079a155
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14079a25d
add dl, dl
jne 0x14079a166
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14079a173
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14079a180
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14079a18d
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14079a19a
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14079a12e
mov eax, 1
add dl, dl
jne 0x14079a1b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14079a1c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14079a1ab
sub eax, ebx
mov ebx, 1
jne 0x14079a1fc
mov ecx, 1
add dl, dl
jne 0x14079a1de
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14079a1eb
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14079a1d3
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14079a12e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14079a218
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14079a225
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14079a20d
cmp eax, 0x7d00
jae 0x14079a24b
cmp eax, 0x500
jb 0x14079a246
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14079a12e
cmp eax, 0x7f
ja 0x14079a24e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14079a12e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14079a282
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 0x14079a12e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140009038
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, r8
mov r9, rcx
xor ecx, ecx
movabs r8, 0xcbf29ce484222325
mov rsi, rdx
movzx eax, byte [rbx + rcx + 0x10]
movabs rdx, 0x100000001b3
xor r8, rax
inc rcx
imul r8, rdx
cmp rcx, 4
jb 0x14000905c
mov rdx, qword [r9 + 0x30]
mov rcx, qword [r9 + 0x18]
and rdx, r8
add rdx, rdx
cmp qword [rcx + rdx*8 + 8], rbx
jne 0x1400090b3
cmp qword [rcx + rdx*8], rbx
jne 0x1400090a8
mov rax, qword [r9 + 8]
mov qword [rcx + rdx*8], rax
mov rcx, qword [r9 + 0x18]
mov rax, qword [r9 + 8]
jmp 0x1400090ac
mov rax, qword [rbx + 8]
mov qword [rcx + rdx*8 + 8], rax
jmp 0x1400090c0
cmp qword [rcx + rdx*8], rbx
jne 0x1400090c0
mov rax, qword [rbx]
mov qword [rcx + rdx*8], rax
mov rax, qword [rbx + 8]
mov rdi, qword [rbx]
mov qword [rax], rdi
mov rcx, qword [rbx]
mov rax, qword [rbx + 8]
mov qword [rcx + 8], rax
dec qword [r9 + 0x10]
mov rdx, qword [rbx + 0x30]
cmp rdx, 8
jb 0x1400090f5
mov rcx, qword [rbx + 0x18]
inc rdx
mov r8d, 2
call fcn.1400020a4
mov edx, 1
mov rcx, rbx
lea r8d, [rdx + 0x37]
call fcn.1400020a4
mov rbx, qword [rsp + 0x30]
mov rax, rsi
mov qword [rsi], rdi
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x14000b51c
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_debug_l1_1_1.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x1400148a0], eax
call fcn.14000b2a4
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_UnhandledExceptionFilter]
cmp dword [0x1400148a0], 0
jne case.default.0x14000b572
mov ecx, 1
call fcn.14000b2a4
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_TerminateProcess]
xchg byte ss:[rdx], cl
jmp 0x140020a34
pop rdi
mov ebp, 0xadc3f91d
invalid
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004ad8f0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004ad900]
mov dword [rax], 1
mov rax, qword [0x004ad910]
mov dword [rax], 1
mov rax, qword [0x004ad8e0]
mov dword [rax], 1
mov rax, qword [0x004ad7a0]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004ad8d0]
mov dword [0x004d1008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x004ad890]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004acc40]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x401a7b
Capabilities:
Enumerate processes

Disassembly:
push rbp
sub rsp, 0x160
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xf0], rcx
mov dword [rbp + 0xdc], 0
mov edx, 0
mov ecx, 2
call sym.CreateToolhelp32Snapshot
mov qword [rbp + 0xd0], rax
cmp qword [rbp + 0xd0], 0xffffffffffffffff
jne 0x401ac6
mov eax, 0
jmp 0x401b65
mov dword [rbp - 0x60], 0x130
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0xd0]
mov rcx, rax
call sym.Process32First
test eax, eax
sete al
test al, al
je 0x401b03
mov rax, qword [rbp + 0xd0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
jmp 0x401b65
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0xd0]
mov rcx, rax
call sym.Process32Next
test eax, eax
setne al
test al, al
je 0x401b4c
lea rax, [rbp - 0x60]
add rax, 0x2c
mov rdx, rax
mov rcx, qword [rbp + 0xf0]
mov rax, qword [sym.imp.KERNEL32.dll_lstrcmpiA]
call rax
test eax, eax
sete al
test al, al
je 0x401b03
mov eax, dword [rbp - 0x58]
mov dword [rbp + 0xdc], eax
mov rax, qword [rbp + 0xd0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [rbp + 0xdc]
add rsp, 0x160
pop rbp
ret
Function at 0x40cd30
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004d1664]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40ceb8
mov rax, qword [0x004d1668]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40cd7c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40ce05
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40cd60
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40ceed
mov rax, qword [0x004d1668]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004d1668]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40ced0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40cdfe
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40ce60
add dword [0x004d1664], 1
cmp edi, 8
jae 0x40ce33
test dil, 4
jne 0x40cea4
test edi, edi
je 0x40ce28
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40cebf
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x40ce28
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40ce4c
jmp 0x40ce28
add rsi, qword [0x004d1668]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40cdfe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x40ce28
xor esi, esi
jmp 0x40cd87
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40ce28
mov rax, qword [0x004d1668]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x40d640
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004d1940]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004d1920]
test rbx, rbx
je 0x40d694
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40d68b
test rsi, rsi
je 0x40d68b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40d670
lea rcx, [0x004d1940]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40d8d0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x40d8e0
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x40d8f0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d931
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x40d928
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40d933
add rax, 0x28
cmp rax, r9
jne 0x40d914
xor eax, eax
ret

Function at 0x40d9d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004ad7a0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40da3d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40da3d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40da3d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40da34
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40da3f
add rax, 0x28
cmp rax, r9
jne 0x40da20
xor eax, eax
add rsp, 0x28
ret

Function at 0x40db40
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004ad7a0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x40db60
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40db58
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40dbbd
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40dbb4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40dbc4
add rax, 0x28
cmp rax, r9
jne 0x40dba0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x40dbe0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004ad7a0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40dc4e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40dc4e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40dc4e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40dc4e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x40dc45
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x40dc55
add rcx, 0x28
cmp rcx, rax
jne 0x40dc30
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x40dc68
jmp 0x40dc4e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x40dc76
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40dc4e
test r9d, r9d
jg 0x40dc60
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x413540
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x413595
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x413580
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x413610
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
mov r8d, 1
cmovl r12d, edx
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
add r12d, 1
mov dword [rbx + 0xc], eax
call sym.__pformat_emit_float
mov ecx, dword [rbx + 8]
mov rdx, rbx
mov eax, dword [rbx + 0x2c]
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call sym.__pformat_putc
mov rdx, rbx
mov rcx, rsi
add dword [rbx + 0xc], r12d
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp sym.__pformat_int.isra.0
mov eax, dword [0x004a40c0]
cmp eax, 0xffffffff
je 0x413646
test eax, eax
je 0x413636
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x41359d
mov dword [0x004a40c0], 0
call sym._get_output_format
mov edx, 3
test al, 1
jne 0x41361f
jmp 0x413624
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sym.getenv
test rax, rax
je 0x41362c
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
ja 0x41362c
mov dword [0x004a40c0], 1
jmp 0x41361f

Function at 0x419cc0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x004a4188], eax
je 0x419cda
add rsp, 0x28
ret
call sym.abort
nop

Function at 0x41a1e0
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x41a203
call sym.pthread_spin_destroy
cmp eax, 1
je 0x41a20e
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
lea rdi, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
lea rbx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rbx + 0x27]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x41a285
mov eax, 0x28
jmp 0x41a26a
add rax, 1
cmp rax, 0x6b
je 0x41a277
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x41a260
cmp eax, 0x6a
jne 0x41a28a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov edx, 0x27
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
jmp 0x41a277
Function at 0x41a330
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x004d2410], 1
je 0x41a346
call sym._pthread_once_raw.part.5.constprop.11
mov ecx, dword [0x004a4188]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x41a370
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rsi, rax
je 0x41a35a
test rax, rax
je 0x41a35a
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 [rsi + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
lea rcx, [rsi + 0x68]
mov qword [rsi + 0x38], 0xffffffffffffffff
mov qword [rsi + 0x30], rax
call sym.replace_spin_keys.constprop.10
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsi + 0xb8], 0
mov qword [rsi + 0x28], 0
call rbx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rbx
mov dword [rsp + 0x30], 2
mov r8, rbp
mov rdx, rdi
mov dword [rsp + 0x28], 0
lea r9, [rsi + 0x28]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x41a460
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x004a4188]
mov dword [rsi + 0xbc], 0
mov dword [rsi + 0xc0], eax
movzx eax, byte [rsi + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rsi + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x41a460
mov rbx, rsi
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.abort
nop
nop word cs:[rax + rax]
Function at 0x41a5d0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
test edx, edx
jne 0x41a5f1
test r8, r8
je 0x41a690
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
cmp edx, 1
je 0x41a6c0
cmp edx, 3
jne 0x41a5e4
mov ecx, dword [0x004a4188]
cmp ecx, 0xffffffff
je 0x41a5e4
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x41a5e4
test byte [rax + 0x40], 0x30
je 0x41a6e0
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
jne 0x41a7d5
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x41a65f
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41a64f
call rsi
mov qword [rbx + 0x30], 0
mov qword [rbx + 0x28], 0
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x1d0], 0
jne 0x41a76c
mov rcx, rbx
call sym.push_pthread_mem.part.2
jmp 0x41a76c
mov rcx, qword [0x004d23d0]
test rcx, rcx
je 0x41a5e4
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x004d23d0], 0
jmp 0x41a5e4
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x004d23d0], rax
jmp 0x41a5e4
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x41a780
test rcx, rcx
je 0x41a6fd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x1d8]
mov qword [rbx + 0x30], 0
mov dword [rbx + 0xbc], 1
test rcx, rcx
jne 0x41a7b0
test byte [rbx + 0x44], 4
lea rdi, [rbx + 0x38]
lea rsi, [rbx + 0x68]
je 0x41a7c0
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x41a746
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
mov qword [rbx + 0x28], 0
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x1d0], 0
je 0x41a67f
xor edx, edx
mov ecx, dword [0x004a4188]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x41a5e4
test rcx, rcx
je 0x41a78b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x38]
mov qword [rbx + 0x30], 0
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.replace_spin_keys.constprop.10
jmp 0x41a5e4
call sym._pthread_cleanup_dest.part.8
jmp 0x41a71f
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
jmp 0x41a5e4
call sym._pthread_cleanup_dest.part.8
jmp 0x41a632