joyce8/EMBER2024-capa huggingface dataset:
Function at 0x12940
Capabilities:
Create thread
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xd8
mov dword [rsp + 0x40], 0
mov qword [rsp + 0xc0], 0
lea rcx, [0x00054960]
call fcn.00011030
mov rdx, qword [rsp + 0xf0]
mov qword [0x00054980], rdx
mov edx, 0x4b000
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov qword [0x000549a0], rax
lea r9, [0x0005487c]
mov r8, qword [0x000549a0]
mov edx, dword [0x00054878]
lea rcx, [0x00024620]
call fcn.0001f520
lea rdi, [0x00054880]
xor eax, eax
mov ecx, 0x80
rep stosb byte [rdi], al
mov rax, qword [rsp + 0xf8]
movzx ecx, word [rax]
lea rdi, [0x00054880]
mov rsi, qword [rsp + 0xf8]
mov rsi, qword [rsi + 8]
rep movsb byte [rdi], byte [rsi]
lea rdx, [0x00054880]
lea rcx, [0x00054900]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rdi, [rsp + 0x50]
xor eax, eax
mov ecx, 0x70
rep stosb byte [rdi], al
mov dword [rsp + 0x58], 0x24
lea rax, [0x00022900]
mov qword [rsp + 0x60], rax
lea rax, [0x00054974]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x50]
mov rdx, qword [0x00054908]
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_RtlQueryRegistryValues]
mov qword [rsp + 0x30], 0
lea rax, [0x00012620]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xc0]
call qword [sym.imp.ntoskrnl.exe_PsCreateSystemThread]
mov qword [rsp + 0x30], 0
lea rax, [0x00012b70]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xc0]
call qword [sym.imp.ntoskrnl.exe_PsCreateSystemThread]
mov eax, dword [rsp + 0x40]
add rsp, 0xd8
pop rdi
pop rsi
ret

Function at 0x13940
Capabilities:
Hash data with crc32

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x18
mov dword [rsp + 4], 0xffffffff
mov dword [rsp], 0
jmp 0x1396d
mov eax, dword [rsp]
add eax, 1
mov dword [rsp], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp], eax
jae 0x139a8
mov ecx, dword [rsp]
mov rax, qword [rsp + 0x28]
movzx ecx, byte [rax + rcx]
mov eax, dword [rsp + 4]
xor eax, ecx
and eax, 0xff
mov edx, eax
lea rax, [0x00024220]
mov ecx, dword [rsp + 4]
shr ecx, 8
mov eax, dword [rax + rdx*4]
xor eax, ecx
mov dword [rsp + 4], eax
jmp 0x13964
mov eax, dword [rsp + 4]
xor eax, 0xffffffff
add rsp, 0x18
ret
Function at 0x1a9d0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xa0
mov rax, qword [0x00024100]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0xb0]
neg rax
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x50], rax
xor eax, eax
mov word [rsp + 0x60], ax
lea rdi, [rsp + 0x62]
xor eax, eax
mov ecx, 0x2e
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x30]
movzx eax, byte [rax + 4]
test eax, eax
jne 0x1aa51
cmp qword [rsp + 0xb8], 0
je 0x1aa51
movsxd rax, dword [rsp + 0xc0]
cmp rax, 0x10
jae 0x1aa5b
mov eax, 0xffffffff
jmp 0x1ab9e
mov rax, qword [rsp + 0x30]
cmp dword [rax], 2
jne 0x1aaa7
mov dword [rsp + 0x60], 0x44005c
mov dword [rsp + 0x64], 0x760065
mov dword [rsp + 0x68], 0x630069
mov dword [rsp + 0x6c], 0x5c0065
mov dword [rsp + 0x70], 0x640055
mov dword [rsp + 0x74], 0x70
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
jmp 0x1aafd
mov rax, qword [rsp + 0x30]
cmp dword [rax], 1
jne 0x1aaf3
mov dword [rsp + 0x60], 0x44005c
mov dword [rsp + 0x64], 0x760065
mov dword [rsp + 0x68], 0x630069
mov dword [rsp + 0x6c], 0x5c0065
mov dword [rsp + 0x70], 0x630054
mov dword [rsp + 0x74], 0x70
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
jmp 0x1aafd
mov eax, 0xffffffff
jmp 0x1ab9e
mov rcx, qword [rsp + 0x30]
add rcx, 0x18
mov rax, qword [rsp + 0x30]
add rax, 0x10
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x30]
movzx r9d, byte [rax + 8]
mov rax, qword [rsp + 0x50]
movzx r8d, word [rax + 2]
mov rax, qword [rsp + 0x50]
mov edx, dword [rax + 4]
lea rcx, [rsp + 0x38]
call fcn.0001c110
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
jge 0x1ab6a
mov rax, qword [rsp + 0x30]
mov qword [rax + 0x18], 0
mov rax, qword [rsp + 0x30]
mov qword [rax + 0x10], 0xffffffffffffffff
mov eax, dword [rsp + 0x48]
jmp 0x1ab9e
mov rax, qword [rsp + 0x30]
cmp dword [rax], 1
jne 0x1ab93
mov r9, qword [rsp + 0x30]
lea r8, [0x0001a930]
mov edx, 1
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x18]
call fcn.0001c640
mov rax, qword [rsp + 0x30]
mov byte [rax + 4], 1
xor eax, eax
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.000225a0
add rsp, 0xa0
pop rdi
ret

Function at 0x56064
Capabilities:
Query or enumerate registry value

Disassembly:
sub rsp, 0x28
mov r8, rdx
mov r9, rcx
call fcn.00056008
mov rdx, r8
mov rcx, r9
add rsp, 0x28
jmp loc.00012940
Function at 0x140001f38
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004e27b0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004e27c0]
mov dword [rax], 1
mov rax, qword [0x004e27d0]
mov dword [rax], 1
mov rax, qword [0x004e27a0]
mov dword [rax], 1
mov rax, qword [0x004e2660]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004e2790]
mov dword [0x00504008], 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 [0x004e2750]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004e1ae0]
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:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push rbp
mov eax, 0x1070
call fcn.0040c780
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1000], rcx
mov qword [rbp + 0x1008], rdx
mov byte [rbp + 0xfef], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
lea rcx, str.WinINetDownloader
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp + 0xfe0], rax
cmp qword [rbp + 0xfe0], 0
je 0x40173a
mov rax, qword [rbp + 0xfe0]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x80000000
mov r9d, 0
mov r8d, 0
mov rdx, qword [rbp + 0x1000]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlA]
call rax
mov qword [rbp + 0xfd8], rax
cmp qword [rbp + 0xfd8], 0
je 0x401727
mov rax, qword [rbp + 0x1008]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
mov r9d, 0
mov r8d, 0
mov edx, 0x40000000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp + 0xfd0], rax
cmp qword [rbp + 0xfd0], 0xffffffffffffffff
je 0x401714
lea rdx, [rbp + 0xfcc]
lea rax, [rbp - 0x40]
mov rcx, qword [rbp + 0xfd8]
mov r9, rdx
mov r8d, 0x1000
mov rdx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
test eax, eax
je 0x40168c
mov eax, dword [rbp + 0xfcc]
test eax, eax
jne 0x401693
mov eax, 1
jmp 0x401698
mov eax, 0
test al, al
jne 0x4016f6
mov r8d, dword [rbp + 0xfcc]
lea rdx, [rbp + 0xfc8]
lea rax, [rbp - 0x40]
mov rcx, qword [rbp + 0xfd0]
mov qword [rsp + 0x20], 0
mov r9, rdx
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
test eax, eax
je 0x4016e1
mov edx, dword [rbp + 0xfc8]
mov eax, dword [rbp + 0xfcc]
cmp edx, eax
je 0x4016e8
mov eax, 1
jmp 0x4016ed
mov eax, 0
test al, al
jne 0x4016f9
jmp 0x401657
nop
jmp 0x4016fa
nop
mov rax, qword [rbp + 0xfd0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov byte [rbp + 0xfef], 1
mov rax, qword [rbp + 0xfd8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0xfe0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
movzx eax, byte [rbp + 0xfef]
add rsp, 0x1070
pop rbp
ret
Function at 0x40174a
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push rbp
sub rsp, 0x390
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x320], rcx
lea rax, [rbp + 0x200]
mov r9, qword [rbp + 0x320]
lea r8, str._s
mov edx, 0x104
mov rcx, rax
mov rax, qword [sym.sprintf_s]
call rax
lea rdx, [rbp + 0xc0]
lea rax, [rbp + 0x200]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindFirstFileA]
call rax
mov qword [rbp + 0x308], rax
cmp qword [rbp + 0x308], 0xffffffffffffffff
je 0x4018da
mov eax, dword [rbp + 0xc0]
and eax, 0x10
test eax, eax
je 0x40185c
lea rax, [rbp + 0xc0]
add rax, 0x2c
lea rdx, [0x004dd018]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x40189f
lea rax, [rbp + 0xc0]
add rax, 0x2c
lea rdx, [0x004dd01a]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x40189f
lea rax, [rbp - 0x50]
lea rdx, [rbp + 0xc0]
add rdx, 0x2c
mov qword [rsp + 0x20], rdx
mov r9, qword [rbp + 0x320]
lea r8, str._s_s
mov edx, 0x104
mov rcx, rax
mov rax, qword [sym.sprintf_s]
call rax
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.DeleteAllFilesInFolder_char_const_
lea rax, [rbp - 0x50]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
call rax
jmp 0x40189f
lea rax, [rbp - 0x50]
lea rdx, [rbp + 0xc0]
add rdx, 0x2c
mov qword [rsp + 0x20], rdx
mov r9, qword [rbp + 0x320]
lea r8, str._s_s
mov edx, 0x104
mov rcx, rax
mov rax, qword [sym.sprintf_s]
call rax
lea rax, [rbp - 0x50]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DeleteFileA]
call rax
lea rax, [rbp + 0xc0]
mov rcx, qword [rbp + 0x308]
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindNextFileA]
call rax
test eax, eax
setne al
test al, al
je 0x4018c7
jmp 0x4017b6
mov rax, qword [rbp + 0x308]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindClose]
call rax
nop
add rsp, 0x390
pop rbp
ret
Function at 0x40b820
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00504624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40b9a8
mov rax, qword [0x00504628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40b86c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40b8f5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40b850
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40b9dd
mov rax, qword [0x00504628]
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 [0x00504628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40b9c0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40b8ee
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40b950
add dword [0x00504624], 1
cmp edi, 8
jae 0x40b923
test dil, 4
jne 0x40b994
test edi, edi
je 0x40b918
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40b9af
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 0x40b918
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 0x40b93c
jmp 0x40b918
add rsi, qword [0x00504628]
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 0x40b8ee
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 0x40b918
xor esi, esi
jmp 0x40b877
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40b918
mov rax, qword [0x00504628]
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 0x40c130
Capabilities:
Get thread local storage value

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

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

Function at 0x40c3e0
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 0x40c421
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 0x40c418
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40c423
add rax, 0x28
cmp rax, r9
jne 0x40c404
xor eax, eax
ret

Function at 0x40c4c0
Capabilities:
Enumerate pe sections

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

Function at 0x40c630
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004e2660]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x40c650
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40c648
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 0x40c6ad
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 0x40c6a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40c6b4
add rax, 0x28
cmp rax, r9
jne 0x40c690
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x40c6d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004e2660]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40c73e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40c73e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40c73e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40c73e
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 0x40c735
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x40c745
add rcx, 0x28
cmp rcx, rax
jne 0x40c720
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x40c758
jmp 0x40c73e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x40c766
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40c73e
test r9d, r9d
jg 0x40c750
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x40c840
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x40c870
mov rdx, rbx
mov ecx, eax
mov dword [rsi], eax
add rsp, 0x28
pop rbx
pop rsi
jmp sym.__mingwthr_key_dtor
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x40c8a0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ebx, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x40c8d0
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40c8e5
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x40cc20
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x40cc51
xor edx, edx
mov ecx, eax
mov dword [0x00504950], eax
call sym.__mingwthr_key_dtor
test eax, eax
sete al
movzx eax, al
mov dword [0x004da068], eax
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40cc3e

Function at 0x40cd60
Capabilities:
Set thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov edi, 1
mov rax, qword [rdx]
mov rbp, qword [rcx + 0x10]
mov r12, qword [rcx + 0x18]
test rax, rax
mov rsi, rcx
mov rbx, rdx
mov r15, r8
je 0x40ce60
mov r13, qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x40cdbc
mov qword [0x00504958], r14
mov rax, qword [rbx]
add edi, 1
mov rax, qword [rax]
test rax, rax
mov qword [rbx], rax
je 0x40ce60
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0xa
mov ecx, 1
mov r14, qword [rax + 0x30]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rbx
call rbp
test eax, eax
jne 0x40ce80
test r14, r14
je 0x40ce0f
mov qword [rsp + 0x20], rbx
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0xa
mov ecx, 1
call r14
cmp eax, 7
je 0x40cea5
cmp eax, 8
jne 0x40ce80
mov rax, qword [rbx]
mov r14, qword [rax]
mov eax, dword [0x004da068]
test eax, eax
js 0x40ce50
test eax, eax
je 0x40cda0
mov rdx, r14
mov ecx, dword [0x00504950]
call r13
test eax, eax
jne 0x40cda7
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40cda7
call dbg.fc_key_init_once
mov eax, dword [0x004da068]
jmp 0x40ce1f
mov qword [rsp + 0x28], r12
mov r9, rsi
mov r8, qword [rsi]
mov edx, 0x1a
mov qword [rsp + 0x20], rbx
mov ecx, 1
call rbp
test eax, eax
je 0x40cea0
mov eax, 2
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 5
mov dword [r15], edi
jmp 0x40ce85
Function at 0x40ceb0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov eax, dword [0x004da068]
test eax, eax
mov rbx, rcx
js 0x40cf30
test eax, eax
jne 0x40cee3
mov rax, qword [0x00504958]
mov qword [0x00504958], rbx
mov qword [rbx], rax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov edi, dword [0x00504950]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rsi
mov ebp, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rbx], rdi
mov rdx, rbx
mov ecx, dword [0x00504950]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x40ceda
mov rax, rsi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
call dbg.fc_key_init_once
mov eax, dword [0x004da068]
jmp 0x40cec5

Function at 0x40cf40
Capabilities:
Set thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov eax, dword [0x004da068]
mov rbx, qword [rcx]
test eax, eax
js 0x40cf82
test eax, eax
jne 0x40cf63
mov qword [0x00504958], rbx
add rsp, 0x20
pop rbx
ret
mov rdx, rbx
mov ecx, dword [0x00504950]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x40cf5d
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
call dbg.fc_key_init_once
mov eax, dword [0x004da068]
jmp 0x40cf52

Function at 0x40d050
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x40
mov eax, dword [0x004da068]
test eax, eax
mov rbx, rcx
js 0x40d0d0
test eax, eax
mov rsi, qword [0x00504958]
jne 0x40d0e6
test rsi, rsi
mov qword [rsp + 0x38], rsi
je 0x40d0c1
lea rdi, [rsp + 0x38]
mov rax, rsi
mov rax, qword [rax + 0x30]
test rax, rax
je 0x40d0af
mov qword [rsp + 0x20], rdi
mov r9, rbx
mov r8, qword [rbx]
mov edx, 1
mov ecx, 1
call rax
cmp eax, 6
je 0x40d110
cmp eax, 8
jne 0x40d143
mov rax, qword [rsp + 0x38]
mov rax, qword [rax]
test rax, rax
mov qword [rsp + 0x38], rax
jne 0x40d081
mov eax, 5
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
call dbg.fc_key_init_once
mov eax, dword [0x004da068]
mov rsi, qword [0x00504958]
test eax, eax
je 0x40d06f
mov esi, dword [0x00504950]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40d06f
mov rax, qword [rsp + 0x38]
lea r8, [rsp + 0x34]
mov rdx, rdi
mov rcx, rbx
mov qword [rbx + 0x10], 0
mov qword [rsp + 0x38], rsi
mov qword [rbx + 0x18], rax
call dbg._Unwind_RaiseException_Phase2
cmp eax, 7
jne 0x40d0c6
mov rcx, rdi
call sym.uw_install_context.isra.5
mov eax, 3
jmp 0x40d0c6