joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400011c0
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push rbx
push rdi
push r14
push r15
sub rsp, 0x68
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rdi, rdx
mov r15, rcx
movzx edx, r8w
mov rcx, rdi
mov r8, r9
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov r14, rax
test rax, rax
jne 0x140001205
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400012ed
mov rdx, r14
mov qword [rsp + 0x58], rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
test rax, rax
jne 0x140001229
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400012e8
mov rcx, rsi
mov qword [rsp + 0x60], rbp
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbp, rax
test rax, rax
je 0x1400012d0
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov edx, 0x40000000
mov rcx, r15
mov dword [rsp + 0x20], 2
mov r14d, eax
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400012d0
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov r8d, r14d
mov rdx, rbp
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400012bd
cmp r14d, dword [rsp + 0x40]
jne 0x1400012bd
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400012d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400012d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov rbp, qword [rsp + 0x60]
mov eax, ebx
mov rsi, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140002f40
add rsp, 0x68
pop r15
pop r14
pop rdi
pop rbx
ret

Function at 0x1400038c0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000390a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000390a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000390a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000390a
cmp dword [rcx + 0x84], 0xe
jbe 0x14000390a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14000390c
xor al, al
add rsp, 0x28
ret
Function at 0x140001577
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
add rsp, 0xffffffffffffff80
mov rbx, rcx
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov r12, qword [rsp + 0x28]
mov rax, qword [rsp + 0x30]
cmp rbx, 0x40000000
jbe 0x1400015b4
lea rdx, [rbx - 0x40000000]
cmp r12, rdx
cmovb r12, rdx
lea rdi, [rbx + 0x40000000]
mov rsi, qword [0x1401d00a0]
cmp rdi, rax
cmova rdi, rax
sub rdi, 0xfff
test rsi, rsi
je 0x1400015ef
cmp rsi, r12
jb 0x1400015ea
cmp rsi, rdi
jae 0x1400015ea
cmp qword [rsi + 8], 0
jne 0x14000176c
mov rsi, qword [rsi]
jmp 0x1400015d0
mov rbp, rbx
cmp rbp, r12
jb 0x140001705
mov r14d, dword [rsp + 0x48]
mov rax, rbp
xor edx, edx
mov rcx, rbp
lea r13, [rsp + 0x50]
div r14
sub rcx, r14
mov rax, rcx
sub rax, rdx
cmp rax, r12
jb 0x140001705
mov rbp, rax
mov r8d, 0x30
mov rdx, r13
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001705
cmp dword [rsp + 0x70], 0x10000
jne 0x140001654
test rbp, rbp
jne 0x140001667
jmp 0x140001705
mov rax, qword [rsp + 0x58]
cmp rax, r14
jb 0x140001705
sub rax, r14
jmp 0x140001619
mov edx, 0x1000
mov r9d, 0x40
mov r8d, 0x3000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdx, rax
test rax, rax
je 0x1400015f2
jmp 0x140001723
mov rcx, qword [rsp + 0x50]
xor edx, edx
add rcx, r12
add rcx, qword [rsp + 0x68]
mov rax, rcx
div rbp
sub rcx, rdx
cmp rdi, rcx
jb 0x140001768
mov rbx, rcx
lea rdx, [rsp + 0x50]
mov r8d, 0x30
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001768
cmp dword [rsp + 0x70], 0x10000
jne 0x140001692
test rbx, rbx
je 0x140001768
mov edx, 0x1000
mov r9d, 0x40
mov r8d, 0x3000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdx, rax
test rax, rax
jne 0x140001723
cmp rdi, rbx
jb 0x140001768
mov ebp, dword [rsp + 0x48]
mov rax, rbx
xor edx, edx
div rbp
lea rcx, [rbx + rbp]
lea r12d, [rbp - 1]
sub rcx, rdx
jmp 0x1400016aa
xor ecx, ecx
lea rax, [rdx + 0x40]
lea r8, [rdx + 0x1000]
mov dword [rdx + 0x10], ecx
lea rcx, [rax + 0x40]
mov qword [rax], rsi
mov rsi, rax
cmp rcx, r8
je 0x140001747
mov rax, rcx
jmp 0x140001733
lea rax, [rdx + 0xfc0]
mov rsi, rdx
mov qword [rdx + 8], rax
mov rax, qword [0x1401d00a0]
mov qword [rdx], rax
mov qword [0x1401d00a0], rdx
jmp 0x14000176c
xor eax, eax
jmp 0x14000177a
mov rax, qword [rsi + 8]
mov rdx, qword [rax]
inc dword [rsi + 0x10]
mov qword [rsi + 8], rdx
sub rsp, 0xffffffffffffff80
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
Function at 0x140002099
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov ebp, 5
mov ebx, ecx
mov edi, edx
imul rbx, rbx, 0x38
add rbx, qword [0x1401d00b0]
mov rsi, qword [rbx]
test byte [rbx + 0x20], 1
je 0x1400020c9
sub rsi, 5
mov ebp, 7
lea r9, [rsp + 0x3c]
mov rdx, rbp
mov r12, qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rcx, rsi
mov qword [rsp + 0x28], r9
mov r8d, 0x40
call r12
mov edx, eax
mov eax, 0xa
test edx, edx
je 0x14000217e
mov al, byte [rbx + 0x20]
mov r9, qword [rsp + 0x28]
and eax, 1
test edi, edi
je 0x140002126
mov byte [rsi], 0xe9
mov rdx, qword [rbx + 8]
lea rcx, [rsi + 5]
sub rdx, rcx
mov dword [rsi + 1], edx
test al, al
je 0x140002141
mov rax, qword [rbx]
mov word [rax], 0xf9eb
jmp 0x140002141
mov edx, dword [rbx + 0x18]
test al, al
lea rax, [rbx + 0x18]
mov dword [rsi], edx
je 0x14000213b
mov eax, dword [rax + 3]
mov dword [rsi + 3], eax
jmp 0x140002141
mov al, byte [rax + 4]
mov byte [rsi + 4], al
mov r8d, dword [rsp + 0x3c]
mov rdx, rbp
mov rcx, rsi
call r12
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, rsi
mov r8, rbp
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov al, byte [rbx + 0x20]
mov edx, edi
and edx, 1
lea ecx, [rdx + rdx]
and eax, 0xfffffff9
shl edx, 2
or eax, ecx
or eax, edx
mov byte [rbx + 0x20], al
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140002189
Capabilities:
Resume thread

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
xor edi, edi
cmp qword [rcx], 0
mov rbx, rcx
je 0x1400021eb
mov r8, qword [rbx]
cmp edi, dword [rbx + 0xc]
jae 0x1400021d4
mov eax, edi
xor edx, edx
mov ecx, 0x5a
mov r8d, dword [r8 + rax*4]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x1400021d0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
jmp 0x14000219b
mov rcx, qword [0x1401d00c0]
xor edx, edx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_HeapFree]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
Function at 0x1400021f3
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
xor eax, eax
mov qword [rcx], rax
mov rbx, rcx
mov ebp, edx
xor edx, edx
mov qword [rcx + 8], rax
mov ecx, 4
mov r12d, r8d
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140002302
lea rdi, [rsp + 0x24]
mov rcx, rax
mov dword [rsp + 0x24], 0x1c
mov rdx, rdi
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x1400022f9
cmp dword [rsp + 0x24], 0xf
jbe 0x1400022e1
mov r13d, dword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp r13d, eax
jne 0x1400022e1
mov r13d, dword [rsp + 0x2c]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp r13d, eax
je 0x1400022e1
mov r8, qword [rbx]
test r8, r8
jne 0x1400022a2
mov dword [rbx + 8], pe_nt_image_headers64
mov rcx, qword [0x1401d00c0]
mov r8d, 0x200
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx], rax
test rax, rax
jne 0x1400022ce
jmp 0x1400022f9
mov eax, dword [rbx + 8]
cmp dword [rbx + 0xc], eax
jb 0x1400022ce
add eax, eax
xor edx, edx
mov rcx, qword [0x1401d00c0]
lea r9, [rax*4]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
test rax, rax
je 0x1400022f9
mov qword [rbx], rax
shl dword [rbx + 8], 1
mov eax, dword [rbx + 0xc]
mov rdx, qword [rbx]
lea ecx, [rax + 1]
mov dword [rbx + 0xc], ecx
mov ecx, dword [rsp + 0x2c]
mov dword [rdx + rax*4], ecx
mov rdx, rdi
mov rcx, rsi
mov dword [rsp + 0x24], 0x1c
call sub.KERNEL32.dll_Thread32Next
jmp 0x140002241
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
cmp qword [rbx], 0
je 0x140002350
cmp edi, dword [rbx + 0xc]
jae 0x140002350
mov rdx, qword [rbx]
mov eax, edi
mov ecx, 0x5a
mov r8d, dword [rdx + rax*4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x14000234c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov rcx, rsi
mov r8d, r12d
mov edx, ebp
call fcn.140001f4a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
jmp 0x14000230a
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
Function at 0x14000ccb0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
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.140013430
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.140013430
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x14000cd20
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1401d0134]
mov rbx, rcx
test esi, esi
jle 0x14000ce50
mov rax, qword [0x1401d0138]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000cd6b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14000cdf5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14000cd50
mov rcx, rbx
call fcn.14000d770
mov rdi, rax
test rax, rax
je 0x14000ce72
mov rax, qword [0x1401d0138]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.14000d8b0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1401d0138]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000ce57
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000cdee
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14000ce00
add dword [0x1401d0134], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1401d0138]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000cdee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000ccb0
nop dword [rax]
xor esi, esi
jmp 0x14000cd78
mov rax, qword [0x1401d0138]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.14000ccb0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.14000ccb0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14000d3e0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1401d01a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1401d0180]
test rbx, rbx
je 0x14000d43c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x14000d433
test rsi, rsi
je 0x14000d433
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000d418
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x14000d770
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1401b9210]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000d790
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000d798
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000d790
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000d7ed
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14000d7e4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14000d790
add rax, 0x28
cmp rax, r9
jne 0x14000d7d0
xor eax, eax
ret

Function at 0x14000d7f0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1401b9210]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000d80f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x14000d818
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000d80f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x14000d8b0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1401b9210]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000d8cf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x14000d8d8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x1400157f0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x7b], 0
mov qword [rsp + 0x83], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x1400158f2
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x1400158ca
add rax, 1
cmp rax, 0x6b
je 0x1400158e7
cmp byte [rcx + rax], 0
jne 0x1400158c0
movsxd rdx, eax
cmp eax, 0x6a
je 0x1400158e7
add eax, 1
cdqe
mov byte [rsp + rdx + 0x20], 0xa
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov eax, 0x28
mov edx, 0x27
lea rcx, [rsp + 0x20]
jmp 0x1400158db
Function at 0x140015c90
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x1401d0c80], 1
je 0x140015d08
lea rdi, [0x1401d0c80]
mov rcx, rdi
call fcn.140015570
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call fcn.140014e80
mov esi, dword [0x1401d0c80]
test esi, esi
jne 0x140015d18
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x14017a778], eax
cmp eax, 0xffffffff
je 0x140092f16
mov dword [0x1401d0c80], 1
mov rcx, rbp
call fcn.140015170
test rbx, rbx
je 0x140015d08
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp fcn.140015910
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x140015ce8
mov ecx, 2
call qword [fcn.140013430]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140015ce8
call sub.msvcrt.dll_abort
nop

Function at 0x140015d40
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
call fcn.140015a20
cmp qword [0x1401d3048], 0
mov rbx, rax
je 0x140015e58
test rax, rax
je 0x140015e58
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.140015470
cmp eax, 1
je 0x140015e66
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rsi, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, rsi
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je fcn.140092f1c
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x14017a778]
mov rdx, rbx
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140015e6c
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.1400157f0
nop
jmp fcn.140092f1c

Function at 0x140015e80
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140015c90
mov ecx, dword [0x14017a778]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140015ea0
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.140015d40
Function at 0x140016610
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov eax, dword [rcx]
mov rbx, rcx
mov rsi, rdx
test rdx, rdx
je 0x140016738
cmp eax, 1
je 0x14001666b
call fcn.140015570
lea rbp, [rax + 8]
mov rdi, rax
mov rcx, rbp
call fcn.140014e80
mov r12d, dword [rbx]
test r12d, r12d
je 0x140016680
cmp r12d, 1
jne 0x140016710
mov rcx, rbp
call fcn.140015170
test rdi, rdi
je 0x14001666b
mov rcx, rdi
call fcn.140015910
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rax, [0x1400159f0]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.140015c90
mov ecx, dword [0x14017a778]
mov r12, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call r12
test rax, rax
je 0x140016778
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x30], rax
lock or qword [rsp], 0
call fcn.140015c90
mov ecx, dword [0x14017a778]
call r12
test rax, rax
je 0x140016760
lea rdx, [rsp + 0x20]
mov qword [rax + 0x18], rdx
lock or qword [rsp], 0
call rsi
call fcn.140015c90
mov ecx, dword [0x14017a778]
call r12
test rax, rax
je 0x140016750
mov rdx, qword [rsp + 0x30]
mov qword [rax + 0x18], rdx
mov dword [rbx], 1
jmp 0x140016656
mov ecx, 2
call qword [fcn.140013430]
mov r9d, r12d
mov r8, rbx
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140016656
mov eax, 0x16
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.140015d40
test rax, rax
jne 0x1400166f9
jmp 0x140092f35
call fcn.140015d40
test rax, rax
jne 0x1400166d5
jmp 0x140092f4e
call fcn.140015d40
test rax, rax
jne 0x1400166af
jmp 0x140092f44
mov rax, qword [rsp + 0x30]
mov qword [0], rax
ud2
mov rax, qword [pe_dos_header]
ud2
lea rax, [rsp + 0x20]
mov qword [0], rax
ud2

Function at 0x140016a00
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov esi, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.140015c90
mov ecx, dword [0x14017a778]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x140016a78
lea rbp, [rbx + 0x68]
xor r12d, r12d
mov rcx, rbp
call fcn.140015480
cmp esi, dword [rbx + 0x48]
jae 0x140016a53
mov rax, qword [rbx + 0x58]
cmp byte [rax + rsi], 0
je 0x140016a53
mov rax, qword [rbx + 0x50]
mov r12, qword [rax + rsi*8]
mov rcx, rbp
call fcn.1400154c0
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.140015d40
mov rbx, rax
jmp 0x140016a2d
Function at 0x140016a90
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov esi, ecx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
call fcn.140015c90
mov ecx, dword [0x14017a778]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x140016b90
lea r13, [rbx + 0x68]
mov rcx, r13
call fcn.140015480
cmp esi, dword [rbx + 0x48]
jae 0x140016b10
mov rdi, qword [rbx + 0x50]
mov qword [rdi + rsi*8], r12
mov rax, qword [rbx + 0x58]
mov rcx, r13
mov byte [rax + rsi], 1
call fcn.1400154c0
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea r15d, [rsi + 1]
mov rcx, qword [rbx + 0x50]
movsxd r14, r15d
lea rdx, [r14*8]
call sub.msvcrt.dll_realloc
mov rdi, rax
test rax, rax
je 0x140016b9d
mov rcx, qword [rbx + 0x58]
mov rdx, r14
call sub.msvcrt.dll_realloc
mov r14, rax
test rax, rax
je 0x140016b9d
mov eax, dword [rbx + 0x48]
mov edx, r15d
sub edx, eax
lea rcx, [rdi + rax*8]
lea r8, [rdx*8]
xor edx, edx
call sub.msvcrt.dll_memset
mov ecx, dword [rbx + 0x48]
mov r8d, r15d
xor edx, edx
mov rax, rcx
add rcx, r14
sub r8d, eax
call sub.msvcrt.dll_memset
mov qword [rbx + 0x50], rdi
mov qword [rbx + 0x58], r14
mov dword [rbx + 0x48], r15d
jmp 0x140016adf
call fcn.140015d40
mov rbx, rax
jmp 0x140016aca
mov rcx, r13
call fcn.1400154c0
mov eax, 0xc
jmp 0x140016afd

Function at 0x140016c20
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140015c90
mov ecx, dword [0x14017a778]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140016c48
mov rax, qword [rax + 0x30]
add rsp, 0x28
ret
call fcn.140015d40
test rax, rax
jne 0x140016c3a
add rsp, 0x28
ret

Function at 0x140016cb0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140015c90
mov ecx, dword [0x14017a778]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140016cd8
add rax, 0x18
add rsp, 0x28
ret
call fcn.140015d40
test rax, rax
jne 0x140016cca
jmp 0x140016cce

Function at 0x140016df0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov eax, dword [0x1401d0c88]
test eax, eax
jne 0x140016e08
xor eax, eax
add rsp, 0x28
ret
call fcn.140015c90
mov ecx, dword [0x14017a778]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140016e38
mov edx, dword [rax + 0x20]
test edx, edx
jg 0x140016dfe
test byte [rax + 0x40], 3
je 0x140016dfe
mov eax, dword [rax + 0x44]
and eax, 1
jmp 0x140016e00
call fcn.140015d40
test rax, rax
jne 0x140016e1e
jmp 0x140016dfe

Function at 0x140016e50
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, ecx
call fcn.140015c90
mov ecx, dword [0x14017a778]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140016e90
test ebx, ebx
jle 0x140016e80
lock add dword [rax + 0x20], 1
add rsp, 0x20
pop rbx
ret
lock sub dword [rax + 0x20], 1
add rsp, 0x20
pop rbx
ret
call fcn.140015d40
test rax, rax
jne 0x140016e6d
add rsp, 0x20
pop rbx
ret