joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000fab8
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x290
mov rax, qword [0x140032010]
xor rax, rsp
mov qword [rsp + 0x280], rax
xor edi, edi
mov rbx, rdx
test rcx, rcx
jne 0x14000f92d
call fcn.14000dcd4
mov dword [rax], 0x16
call fcn.140013130
or eax, 0xffffffff
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.140008660
mov rbx, qword [rsp + 0x2b0]
add rsp, 0x290
pop rdi
ret
cmp rcx, 0xffffffffffffffff
je 0x14000f8f9
test rdx, rdx
je 0x14000f8f9
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x14000f988
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jb 0x14000f961
cmp eax, 3
jbe 0x14000f97b
cmp eax, 8
je 0x14000f96e
cmp eax, 0x12
je 0x14000f97b
call fcn.14000dcd4
mov dword [rax], 0x16
jmp 0x14000f909
call fcn.14000dcd4
mov dword [rax], ntohl
jmp 0x14000f909
call fcn.14000dcd4
mov dword [rax], 2
jmp 0x14000f909
mov eax, dword [rsp + 0x30]
lea rcx, [rsp + 0x34]
cmp eax, 0x80
cmove eax, edi
mov dword [rbx], eax
call fcn.14000f9f8
lea rcx, [rsp + 0x3c]
mov qword [rbx + 8], rax
call fcn.14000f9f8
lea rcx, [rsp + 0x44]
mov qword [rbx + 0x10], rax
call fcn.14000f9f8
mov qword [rbx + 0x18], rax
lea rcx, [rbx + 0x24]
mov eax, dword [rsp + 0x50]
lea r8, [rsp + 0x5c]
mov edx, 0x104
mov dword [rbx + 0x20], eax
call fcn.1400183f4
test eax, eax
je 0x14000f90c
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.140013150
int3
jmp 0x14000f8d0

Function at 0x1400105d0
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400105f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14000dc64
or eax, 0xffffffff
jmp 0x1400105f2
xor eax, eax
add rsp, 0x28
ret
Function at 0x140011b3c
Capabilities:
Parse pe header

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push r15
sub rsp, 0x20
mov esi, r8d
mov ebx, edx
mov r14d, ecx
test r8d, r8d
jne 0x140011910
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140011910
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140011910
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140011910
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140011910
cmp dword [rcx + 0x84], 0xe
jbe 0x140011910
cmp dword [rcx + 0xf8], esi
je 0x140011910
mov ecx, r14d
call fcn.140011a58
mov ecx, 2
call fcn.140018264
nop
cmp byte [0x14003c740], 0
jne 0x1400119da
mov r15d, 1
mov eax, r15d
xchg dword [0x14003c734], eax
test ebx, ebx
jne 0x140011983
mov rdi, qword [0x140032010]
mov edx, edi
and edx, 0x3f
lea ecx, [rbx + 0x40]
sub ecx, edx
xor eax, eax
ror rax, cl
xor rax, rdi
mov rcx, qword [0x14003c738]
cmp rcx, rax
je 0x14001197a
xor rdi, rcx
mov ecx, edx
ror rdi, cl
mov rcx, rdi
call qword [fcn.140008f80]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call rdi
lea rcx, [0x14003c750]
jmp 0x14001198f
cmp ebx, r15d
jne 0x140011995
lea rcx, [0x14003c768]
call fcn.14001200c
nop
test ebx, ebx
jne 0x1400119ac
lea rdx, [0x1400223d8]
lea rcx, [0x1400223b0]
call fcn.1400117d0
lea rdx, [0x1400223e8]
lea rcx, [0x1400223e0]
call fcn.1400117d0
movzx eax, byte [0x14003c740]
test esi, esi
cmove eax, r15d
mov byte [0x14003c740], al
jmp 0x1400119da
mov ecx, 2
call fcn.1400182b8
test esi, esi
jne 0x1400119f1
mov ecx, r14d
call fcn.140011a0c
int3
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
add rsp, 0x20
pop r15
ret
xor r8d, r8d
xor edx, edx
jmp 0x1400118a0
Function at 0x140014190
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov qword [rax + 8], rcx
push rbp
mov rbp, rsp
sub rsp, 0x20
test rcx, rcx
jne 0x140014030
call fcn.14000dcd4
mov dword [rax], 0x16
call fcn.140013130
or eax, 0xffffffff
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop rbp
ret
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x140014018
mov rax, qword [rbp + 0x10]
mov ecx, dword [rax + 0x14]
shr ecx, 0xc
test cl, 1
jne 0x140014018
mov rax, qword [rbp + 0x10]
mov ecx, dword [rax + 0x14]
mov rax, qword [rbp + 0x10]
shr ecx, 1
test cl, 1
je 0x140014062
lock or dword [rax + 0x14], 0x10
jmp 0x140014018
lock or dword [rax + 0x14], 1
mov rax, qword [rbp + 0x10]
mov ecx, dword [rax + 0x14]
test ecx, 0x4c0
jne 0x14001407f
mov rcx, qword [rbp + 0x10]
call fcn.14001b298
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax + 8]
mov qword [rax], rcx
mov rbx, qword [rbp + 0x10]
mov rcx, rbx
call fcn.1400122d8
mov rdx, qword [rbp + 0x10]
mov ecx, eax
mov r8d, dword [rdx + 0x20]
mov rdx, qword [rdx + 8]
call fcn.140013a68
mov dword [rbx + 0x10], eax
mov rax, qword [rbp + 0x10]
mov edx, dword [rax + 0x10]
lea ecx, [rdx + 1]
cmp ecx, 1
ja 0x1400140d6
neg edx
sbb ecx, ecx
and ecx, 8
add ecx, 8
lock or dword [rax + 0x14], ecx
mov rax, qword [rbp + 0x10]
and dword [rax + 0x10], 0
jmp 0x140014018
mov ecx, dword [rax + 0x14]
test cl, 6
jne 0x140014142
mov rcx, qword [rbp + 0x10]
call fcn.1400122d8
cmp eax, 0xffffffff
je 0x140014129
mov rcx, qword [rbp + 0x10]
call fcn.1400122d8
cmp eax, 0xfffffffe
je 0x140014129
mov rbx, qword [rbp + 0x10]
mov rcx, rbx
call fcn.1400122d8
movsxd rdi, eax
lea rsi, [0x14003c790]
mov rcx, rbx
sar rdi, 6
call fcn.1400122d8
and eax, 0x3f
shl rax, 6
add rax, qword [rsi + rdi*8]
jmp 0x140014130
lea rax, [0x140032270]
mov al, byte [rax + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x140014142
mov rax, qword [rbp + 0x10]
lock or dword [rax + 0x14], 0x20
mov rax, qword [rbp + 0x10]
cmp dword [rax + 0x20], 0x200
jne 0x140014178
mov ecx, dword [rax + 0x14]
shr ecx, 6
test cl, 1
je 0x140014174
mov rax, qword [rbp + 0x10]
mov ecx, dword [rax + 0x14]
shr ecx, 8
test cl, 1
jne 0x140014174
mov rax, qword [rbp + 0x10]
mov dword [rax + 0x20], 0x1000
mov rax, qword [rbp + 0x10]
dec dword [rax + 0x10]
mov rcx, qword [rax]
movzx edx, byte [rcx]
inc rcx
mov qword [rax], rcx
mov eax, edx
jmp 0x14001401b
jmp 0x140013fe8
Function at 0x140007080
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
mov esi, eax
movabs eax, dword [0xda8b088900409214]
test ebx, ebx
jle reloc.ADVAPI32.dll_AdjustTokenPrivileges
mov eax, reloc.ADVAPI32.dll_AdjustTokenPrivileges
call fcn.140002680
xor byte [rsi], al
jne reloc.ADVAPI32.dll_AdjustTokenPrivileges
pop rsi
pop rbx
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00810ad0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00810ae0]
mov dword [rax], 1
mov rax, qword [0x00810af0]
mov dword [rax], 1
mov rax, qword [0x00810ac0]
mov dword [rax], 1
mov rax, qword [0x00810980]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00810ab0]
mov dword [0x00834008], 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 [0x00810a70]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x0080fe20]
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 0x401550
Capabilities:
Execute command

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
lea rcx, str.C:UsersPublicDocumentsjava.exe
call sym.system
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x401d66
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov eax, ecx
mov qword [rbp - 0x28], rdx
mov byte [rbp - 0x30], al
movzx eax, byte [rbp - 0x30]
mov byte [rbp - 0x51], al
mov rax, qword [rbp - 0x28]
mov rcx, rax
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.size___const
mov qword [rbp - 0x60], rax
cmp qword [rbp - 0x60], 0
je 0x401dfc
movzx eax, byte [rbp - 0x51]
sar eax, 1
mov edx, eax
movzx eax, byte [rbp - 0x51]
shl eax, 7
or eax, edx
mov byte [rbp - 0x51], al
mov rax, qword [rbp - 0x60]
lea rdx, [rax - 1]
mov rax, qword [rbp - 0x28]
mov rcx, rax
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.operator___unsigned_long_long__const
movzx edx, byte [rax]
cmp dl, 0xff
setae al
neg eax
sub edx, eax
mov eax, edx
xor al, byte [rbp - 0x51]
mov ebx, eax
mov rax, qword [rbp - 0x60]
lea rdx, [rax - 1]
mov rax, qword [rbp - 0x28]
mov rcx, rax
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.operator___unsigned_long_long__const
movzx eax, byte [rax]
sub ebx, eax
mov eax, ebx
mov byte [rbp - 0x51], al
sub qword [rbp - 0x60], 1
jmp 0x401d94
movzx eax, byte [rbp - 0x51]
add rsp, 0x38
pop rbx
pop rbp
ret
Function at 0x40221f
Capabilities:
Create thread
Move file
Set current directory
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x90
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call sym.__main
call sym.time_if__
test eax, eax
sete al
test al, al
je 0x402465
lea rcx, str.C:UsersPublicDocuments
mov rax, qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call rax
lea rdx, [0x0080b0d1]
lea rcx, str.C:UsersPublicDocumentsjava.exe
call sym.fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x4022a9
mov dword [rbp - 0xc], 0xa
mov dword [rbp - 0x10], 0
mov eax, dword [rbp - 0xc]
cdq
idiv dword [rbp - 0x10]
mov dword [rbp - 0x14], eax
mov eax, dword [rbp - 0x14]
mov edx, eax
lea rcx, [0x0080b0d4]
call sym.printf_char_const__::_
mov eax, 0
jmp 0x4024d5
mov rax, qword [rbp - 8]
mov r9, rax
mov r8d, 1
mov edx, 0x8988
lea rcx, [0x004e1020]
call sym.fwrite
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
lea rdx, [0x0080b0d1]
lea rcx, str.C:UsersPublicDocumentsjli.dll
call sym.fopen
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov r9, rax
mov r8d, 1
mov edx, 0x4e00
lea rcx, [0x004e99c0]
call sym.fwrite
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.fclose
lea rdx, [0x0080b0d1]
lea rcx, str.C:UsersPublicDocumentslcms.dll
call sym.fopen
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov r9, rax
mov r8d, 1
mov edx, 0x16388
lea rcx, [0x004ee7c0]
call sym.fwrite
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.fclose
lea rdx, [0x0080b0d1]
lea rcx, str.C:UsersPublicDocuments_vcruntime140.dll
call sym.fopen
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x30]
mov r9, rax
mov r8d, 1
mov edx, 0x1afc0
lea rcx, [0x00504b60]
call sym.fwrite
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.fclose
lea rdx, [0x0080b0d1]
lea rcx, str.C:UsersPublicDocumentsmsvcp.dll
call sym.fopen
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x38]
mov r9, rax
mov r8d, 1
mov edx, 0x8be50
lea rcx, [0x0052c100]
call sym.fwrite
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.fclose
lea rdx, [0x0080b0d1]
lea rcx, str.C:UsersPublicDocuments_vcruntime140_1.dll
call sym.fopen
mov qword [rbp - 0x40], rax
mov rax, qword [rbp - 0x40]
mov r9, rax
mov r8d, 1
mov edx, 0xc5d0
lea rcx, [0x0051fb20]
call sym.fwrite
mov rax, qword [rbp - 0x40]
mov rcx, rax
call sym.fclose
lea rdx, str.msvcp140.dll
lea rcx, str.msvcp.dll
call sym.rename
call sym.kkb__
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
lea r8, [sym.jj_pro_void_]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov qword [rbp - 0x48], rax
call sym.time_if__
test eax, eax
sete al
test al, al
je 0x402499
mov dword [rbp - 0x4c], 0xa
mov dword [rbp - 0x50], 0
mov ecx, 0x1388
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov ecx, 0
call sym.exit
mov dword [rbp - 0x54], 0xa
mov dword [rbp - 0x58], 0
mov ecx, 0x1388
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov eax, dword [rbp - 0x54]
cdq
idiv dword [rbp - 0x58]
mov dword [rbp - 0x5c], eax
mov eax, dword [rbp - 0x5c]
mov edx, eax
lea rcx, [0x0080b0d4]
call sym.printf_char_const__::_
mov eax, 0
add rsp, 0x90
pop rbp
ret
Function at 0x40c2f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00834664]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40c478
mov rax, qword [0x00834668]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40c33c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40c3c5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40c320
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40c4ad
mov rax, qword [0x00834668]
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 [0x00834668]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40c490
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40c3be
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40c420
add dword [0x00834664], 1
cmp edi, 8
jae 0x40c3f3
test dil, 4
jne 0x40c464
test edi, edi
je 0x40c3e8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40c47f
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 0x40c3e8
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 0x40c40c
jmp 0x40c3e8
add rsi, qword [0x00834668]
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 0x40c3be
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 0x40c3e8
xor esi, esi
jmp 0x40c347
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40c3e8
mov rax, qword [0x00834668]
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 0x40cc00
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00834940]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00834920]
test rbx, rbx
je 0x40cc54
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 0x40cc4b
test rsi, rsi
je 0x40cc4b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40cc30
lea rcx, [0x00834940]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40ce90
Capabilities:
Parse pe header

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

Function at 0x40ceb0
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 0x40cef1
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 0x40cee8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40cef3
add rax, 0x28
cmp rax, r9
jne 0x40ced4
xor eax, eax
ret

Function at 0x40cf90
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00810980]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40cffd
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40cffd
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 0x40cffd
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 0x40cff4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40cfff
add rax, 0x28
cmp rax, r9
jne 0x40cfe0
xor eax, eax
add rsp, 0x28
ret

Function at 0x40d100
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00810980]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x40d120
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d118
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 0x40d17d
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 0x40d174
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d184
add rax, 0x28
cmp rax, r9
jne 0x40d160
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x40d1a0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00810980]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40d20e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d20e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40d20e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40d20e
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 0x40d205
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x40d215
add rcx, 0x28
cmp rcx, rax
jne 0x40d1f0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x40d228
jmp 0x40d20e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x40d236
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40d20e
test r9d, r9d
jg 0x40d220
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x419bc0
Capabilities:
Allocate thread local storage

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

Function at 0x41a0e0
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x41a103
call sym.pthread_spin_destroy
cmp eax, 1
je 0x41a10e
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 0x41a185
mov eax, 0x28
jmp 0x41a16a
add rax, 1
cmp rax, 0x6b
je 0x41a177
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x41a160
cmp eax, 0x6a
jne 0x41a18a
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 0x41a177

Function at 0x41a230
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 [0x00835440], 1
je 0x41a246
call sym._pthread_once_raw.part.5.constprop.11
mov ecx, dword [0x008080b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x41a270
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 0x41a25a
test rax, rax
je 0x41a25a
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 0x41a360
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x008080b8]
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 0x41a360
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 0x41a4d0
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 0x41a4f1
test r8, r8
je 0x41a590
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
cmp edx, 1
je 0x41a5c0
cmp edx, 3
jne 0x41a4e4
mov ecx, dword [0x008080b8]
cmp ecx, 0xffffffff
je 0x41a4e4
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x41a4e4
test byte [rax + 0x40], 0x30
je 0x41a5e0
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
jne 0x41a6d5
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x41a55f
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41a54f
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 0x41a66c
mov rcx, rbx
call sym.push_pthread_mem.part.2
jmp 0x41a66c
mov rcx, qword [0x00835400]
test rcx, rcx
je 0x41a4e4
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x00835400], 0
jmp 0x41a4e4
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x00835400], rax
jmp 0x41a4e4
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x41a680
test rcx, rcx
je 0x41a5fd
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 0x41a6b0
test byte [rbx + 0x44], 4
lea rdi, [rbx + 0x38]
lea rsi, [rbx + 0x68]
je 0x41a6c0
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x41a646
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 0x41a57f
xor edx, edx
mov ecx, dword [0x008080b8]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x41a4e4
test rcx, rcx
je 0x41a68b
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 0x41a4e4
call sym._pthread_cleanup_dest.part.8
jmp 0x41a61f
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
jmp 0x41a4e4
call sym._pthread_cleanup_dest.part.8
jmp 0x41a532