joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140068bd0
Capabilities:
Get token membership

Disassembly:
push rbp
lea rbp, [rsp - 0x90]
sub rsp, 0x190
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov rax, qword [0x1400bd010]
xor rax, rsp
mov qword [rbp + 0x80], rax
xor ecx, ecx
mov dword [rsp + 0x78], ecx
mov dword [rsp + 0x70], ecx
mov word [rsp + 0x74], 0x500
mov qword [rsp + 0x68], rcx
lea rax, [rsp + 0x68]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], ecx
mov dword [rsp + 0x40], ecx
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], ecx
mov r9d, 0x220
lea r8d, [rcx + 0x20]
mov dl, 2
lea rcx, [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
cmp eax, 1
jne 0x140068d26
lea r8, [rsp + 0x78]
mov rdx, qword [rsp + 0x68]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x140068d1b
lea rcx, [rbp - 0x80]
call fcn.140004550
nop
lea rdx, str._PsVerifyAdminPrivilege__CheckTokenMembership_Ret:
lea rcx, [rbp - 0x70]
call fcn.140015a40
mov rcx, rax
xor edx, edx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___int____ptr64]
mov rcx, rax
lea rdx, [0x140087c64]
call fcn.140015a40
mov rcx, rax
lea rdx, str.HWPROCESS6::PsVerifyAdminPrivilege
call fcn.140015c30
mov rcx, rax
lea rdx, [0x140087c60]
call fcn.140015a40
call qword [sym.imp.LogHelper.dll_public:_static_class_HwLogger____ptr64___cdecl_HwLogger::GetInstance_void_]
mov rcx, rax
lea r8, [rbp - 0x80]
mov edx, 3
call qword [sym.imp.LogHelper.dll_public:_void___cdecl_HwLogger::Log_enum_LOG_MESSAGE_LEVEL__class_std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64____ptr64]
nop
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rbp + rcx - 0x80], rax
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x7c], edx
lea rcx, [rbp - 0x68]
call fcn.140012ea0
lea rcx, [rbp - 0x60]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
lea rcx, [rbp + 0x18]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [rsp + 0x78]
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.140079c90
add rsp, 0x190
pop rbp
ret
Function at 0x140068d50
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r14
sub rsp, 0x270
mov rax, qword [0x1400bd010]
xor rax, rsp
mov qword [rsp + 0x260], rax
xor edi, edi
mov r14, rdx
mov rsi, rcx
test rdx, rdx
je 0x140068e23
mov dword [rdx], edi
lea ecx, [rdi + 2]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140068e23
xor edx, edx
lea rcx, [rsp + 0x24]
mov r8d, 0x234
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x238
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
cmp eax, 1
jne 0x140068e16
nop word [rax + rax]
mov rdx, rsi
lea rcx, [rsp + 0x4c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140068e0a
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x238
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32NextW]
cmp eax, 1
je 0x140068dd0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x140068e25
mov eax, dword [rsp + 0x28]
mov edi, 1
mov dword [r14], eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x140068e25
xor eax, eax
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.140079c90
mov rbx, qword [rsp + 0x2a0]
add rsp, 0x270
pop r14
pop rdi
pop rsi
ret
Function at 0x14006d4b0
Capabilities:
Get token membership

Disassembly:
push rbx
sub rsp, 0x80
mov rax, qword [0x1400bd010]
xor rax, rsp
mov qword [rsp + 0x78], rax
xor ebx, ebx
mov word [rsp + 0x6c], 0x500
lea rax, [rsp + 0x60]
mov dword [rsp + 0x70], ebx
mov qword [rsp + 0x50], rax
lea rcx, [rsp + 0x68]
mov dword [rsp + 0x48], ebx
mov r9d, 0x220
mov dword [rsp + 0x40], ebx
lea r8d, [rbx + 0x20]
mov dword [rsp + 0x38], ebx
mov dl, 2
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
mov dword [rsp + 0x68], ebx
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
cmp eax, 1
jne 0x14006d540
mov rdx, qword [rsp + 0x60]
lea r8, [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov rcx, qword [rsp + 0x60]
mov eax, 1
cmp dword [rsp + 0x70], eax
cmove ebx, eax
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, ebx
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140079c90
add rsp, 0x80
pop rbx
ret
Function at 0x14006dba0
Capabilities:
Get user security identifier

Disassembly:
mov rax, rsp
push rsi
push rdi
push r14
sub rsp, 0x290
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbp
mov rax, qword [0x1400bd010]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov rsi, rdx
mov rbx, rcx
mov qword [rsp + 0x50], rcx
xor r14d, r14d
mov dword [rsp + 0x40], r14d
mov dword [rsp + 0x58], 0x104
mov qword [rcx + 0x10], r14
mov qword [rcx + 0x18], 7
mov word [rcx], r14w
xor r8d, r8d
lea rdx, [0x140087c68]
call sym.HwMdcCenter.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
mov dword [rsp + 0x40], 1
mov ecx, dword [rsp + 0x58]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbp, rax
test rax, rax
je 0x14006dce7
mov ecx, dword [rsp + 0x58]
mov rdi, rax
xor eax, eax
rep stosb byte [rdi], al
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_memset
lea rdi, [rsp + 0x70]
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
mov dword [rsp + 0x68], 0x104
cmp qword [rsi + 0x18], 8
jb 0x14006dc66
mov rsi, qword [rsi]
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
mov r8, rbp
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x14006dcde
mov qword [rsp + 0x60], r14
lea rdx, [rsp + 0x60]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
cmp eax, 1
jne 0x14006dcde
mov rdx, qword [rsp + 0x60]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp word [rdx + r8*2], 0
jne 0x14006dcc0
mov rcx, rbx
call sym.HwMdcCenter.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, rbx
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.140079c90
lea r11, [rsp + 0x290]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
Function at 0x14006dd20
Capabilities:
Get session user name

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x250
mov rax, qword [0x1400bd010]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov eax, edx
mov qword [rsp + 0x20], rcx
mov rbx, rcx
lea rdx, [rsp + 0x20]
xor esi, esi
mov ecx, eax
mov qword [rsp + 0x20], rsi
mov edi, esi
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
cmp eax, 1
jne 0x14006dd76
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov edi, eax
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
lea r8, [rsp + 0x28]
mov dword [rsp + 0x28], 0x104
lea rdx, [rsp + 0x30]
mov ecx, 2
call qword [sym.imp.Secur32.dll_GetUserNameExW]
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x14006ddca
cmp edi, 1
jne 0x14006ddbf
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x20], rsi
mov qword [rbx + 0x10], rsi
lea rax, [rsp + 0x30]
mov qword [rbx + 0x18], 7
mov r8, 0xffffffffffffffff
mov word [rbx], si
inc r8
cmp word [rax + r8*2], si
jne 0x14006dde5
lea rdx, [rsp + 0x30]
mov rcx, rbx
call sym.HwMdcCenter.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
mov rax, rbx
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140079c90
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x140072790
Capabilities:
Get file version info

Disassembly:
push rbp
push rsi
push r12
push r14
lea rbp, [rsp - 0x3f]
sub rsp, 0x98
mov rax, qword [0x1400bd010]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r12, rdx
mov dword [rbp - 0x21], 0
mov rsi, rcx
lea rdx, [rbp - 0x21]
mov rcx, r12
call qword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov r14d, eax
test eax, eax
je 0x14007298e
inc eax
mov qword [rsp + 0xd0], rbx
mov ecx, eax
lea rdx, [0x1400bf9a0]
mov qword [rsp + 0x90], r15
mov r15d, eax
call fcn.14007a884
mov rbx, rax
test rax, rax
je 0x14007298c
mov qword [rsp + 0xd8], rdi
mov ecx, r15d
mov rdi, rax
mov r9, rbx
xor eax, eax
mov r8d, r14d
rep stosb byte [rdi], al
mov edx, dword [rbp - 0x21]
mov rcx, r12
call qword [sym.imp.VERSION.dll_GetFileVersionInfoW]
mov edi, eax
test eax, eax
je 0x140072950
lea r9, [rbp + 0x1f]
mov qword [rbp - 0x29], 0
lea r8, [rbp - 0x29]
mov rcx, rbx
lea rdx, [0x14008c1c8]
call qword [sym.imp.VERSION.dll_VerQueryValueW]
cmp eax, 1
jne 0x1400728a2
mov rax, qword [rbp - 0x29]
test rax, rax
je 0x14007287a
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x19], xmm0
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rbp - 9], xmm1
movups xmmword [rbp + 7], xmm0
jmp 0x1400728aa
mov qword [rbp - 0x11], rax
mov qword [rbp - 9], rax
mov qword [rbp - 1], rax
mov qword [rbp + 7], rax
mov qword [rbp + 0xf], rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
jmp 0x1400728aa
test eax, eax
je 0x140072950
mov eax, dword [rbp - 0x11]
lea r9, [rsi + 0x22a]
shr eax, 0x10
lea r8, [0x14008db58]
mov word [rsi], ax
mov rdx, rbx
movzx eax, word [rbp - 0x11]
mov word [rsi + 2], ax
mov eax, dword [rbp - 0xd]
shr eax, 0x10
mov word [rsi + 4], ax
movzx eax, word [rbp - 0xd]
mov word [rsi + 6], ax
mov eax, dword [rbp - 9]
shr eax, 0x10
mov word [rsi + 8], ax
movzx eax, word [rbp - 9]
mov word [rsi + 0xa], ax
mov eax, dword [rbp - 5]
shr eax, 0x10
mov word [rsi + 0xc], ax
movzx eax, word [rbp - 5]
mov word [rsi + 0xe], ax
mov eax, dword [rbp + 3]
mov dword [rsi + 0x10], eax
mov eax, dword [rbp + 7]
mov dword [rsi + 0x14], eax
mov eax, dword [rbp + 0xb]
mov dword [rsi + 0x18], eax
mov eax, dword [rbp + 0xf]
mov dword [rsi + 0x1c], eax
call fcn.140072bd0
lea r9, [rsi + 0x63e]
mov rdx, rbx
lea r8, [0x14008db38]
call fcn.140072bd0
lea r9, [rsi + 0x434]
mov rdx, rbx
lea r8, [0x14008dba8]
call fcn.140072bd0
mov edi, 1
mov rcx, rbx
call fcn.14007aba4
mov eax, edi
mov rdi, qword [rsp + 0xd8]
mov rbx, qword [rsp + 0xd0]
mov r15, qword [rsp + 0x90]
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140079c90
add rsp, 0x98
pop r14
pop r12
pop rsi
pop rbp
ret
jmp 0x140072962
xor eax, eax
jmp 0x140072972
Function at 0x140073e20
Capabilities:
Get file version info

Disassembly:
mov r11, rsp
push rsi
push rdi
push r14
sub rsp, 0x80
mov qword [r11 - 0x68], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rbp
mov rax, qword [0x1400bd010]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov r14, rdx
mov rbx, rcx
lea rcx, [r11 - 0x48]
call fcn.140073da0
nop
xor edi, edi
cmp qword [rbx + 0x10], rdi
je 0x140073fb8
mov dword [rsp + 0x48], edi
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140073e7a
mov rcx, qword [rbx]
lea rdx, [rsp + 0x48]
call qword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov ebp, eax
test eax, eax
je 0x140073fb8
mov ecx, ebp
lea rdx, [0x1400bf9a0]
call fcn.14007a884
mov rsi, rax
test rax, rax
je 0x140073fb8
cmp qword [rbx + 0x18], 8
jb 0x140073eb3
mov rbx, qword [rbx]
mov r9, rsi
mov r8d, ebp
mov edx, dword [rsp + 0x48]
mov rcx, rbx
call qword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x140073faf
mov dword [rsp + 0x4c], edi
mov qword [rsp + 0x38], rdi
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0x38]
lea rdx, str.VarFileInfoTranslation
mov rcx, rsi
call qword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x140073faf
mov rax, qword [rsp + 0x38]
movzx ebx, word [rax]
shl ebx, 0x10
movzx eax, word [rax + 2]
or ebx, eax
lea rdx, [0x1400bf9a0]
mov ecx, 0x208
call fcn.14007a884
mov rbp, rax
test rax, rax
je 0x140073faf
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, ebx
lea r8, [0x14008dc28]
mov edx, 0x104
mov rcx, rbp
call fcn.140072d30
test eax, eax
jle 0x140073fa7
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0x40]
mov rdx, rbp
mov rcx, rsi
call qword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x140073fa7
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x140073fa7
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp word [rdx + r8*2], di
jne 0x140073f90
mov rcx, r14
call sym.HwMdcCenter.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
mov edi, 1
mov rcx, rbp
call fcn.14007aba4
mov rcx, rsi
call fcn.14007aba4
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x140073ffd
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140073ff8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140073ff8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14007a810
mov eax, edi
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.140079c90
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
Function at 0x40b940
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004ce624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40bac8
mov rax, qword [0x004ce628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40b98c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40ba15
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40b970
mov rcx, rbx
call fcn.0040c5e0
test rax, rax
mov r12, rax
je 0x40bafd
mov rax, qword [0x004ce628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.0040c710
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004ce628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40bae0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40ba0e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40ba70
add dword [0x004ce624], 1
cmp edi, 8
jae 0x40ba43
test dil, 4
jne 0x40bab4
test edi, edi
je 0x40ba38
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40bacf
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 0x40ba38
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 0x40ba5c
jmp 0x40ba38
add rsi, qword [0x004ce628]
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 0x40ba0e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.004a15a0
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x40ba38
xor esi, esi
jmp 0x40b997
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40ba38
mov rax, qword [0x004ce628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.004a15a0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.004a15a0
nop
nop dword [rax]

Function at 0x40c250
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004ce900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004ce8e0]
test rbx, rbx
je 0x40c2a4
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 0x40c29b
test rsi, rsi
je 0x40c29b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40c280
lea rcx, [0x004ce900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40c5e0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004aa5a0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40c64d
mov rcx, r8
call fcn.0040c4c0
test eax, eax
je 0x40c64d
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 0x40c64d
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 0x40c644
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40c64f
add rax, 0x28
cmp rax, r9
jne 0x40c630
xor eax, eax
add rsp, 0x28
ret

Function at 0x418f60
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x004a2148], eax
je 0x418f7a
add rsp, 0x28
ret
call sub.msvcrt.dll_abort
nop

Function at 0x419480
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x4194a3
call fcn.00418e20
cmp eax, 1
je 0x4194ae
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 0x419525
mov eax, 0x28
jmp 0x41950a
add rax, 1
cmp rax, 0x6b
je 0x419517
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x419500
cmp eax, 0x6a
jne 0x41952a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_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 0x419517
Function at 0x4195d0
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 [0x004cf3e0], 1
je 0x4195e6
call fcn.00419540
mov ecx, dword [0x004a2148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x419610
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.004193c0
cmp qword [0x004d2050], 0
mov rsi, rax
je 0x4195fa
test rax, rax
je 0x4195fa
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 fcn.00419480
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 0x419700
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x004a2148]
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 0x419700
mov rbx, rsi
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sub.msvcrt.dll_abort
nop
nop word cs:[rax + rax]
Function at 0x46c900
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rbp, rcx
mov rdi, rdx
mov esi, r8d
jmp 0x46c928
call r12
cmp dword [rax], 4
jne 0x46c946
mov rcx, rbp
call fcn.0046c800
mov r8d, esi
mov rdx, rdi
mov ecx, eax
call sub.msvcrt.dll__read
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
je 0x46c920
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x4a15a0
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp fcn.00401510
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.00417610
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.00417610
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530