joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140044e08
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
mov r10d, dword [rsp + 0x68]
movsxd rsi, dword [rcx + 0x160]
mov ebx, r8d
mov r12, rdx
mov r11, rcx
test r10d, r10d
je 0x140044ecf
mov eax, dword [rsp + 0x50]
mov ecx, ebx
mov ebp, ebx
shl eax, 2
imul ecx, dword [rsp + 0x58]
movsxd r13, eax
mov eax, esi
imul eax, r9d
mov r9d, dword [rsp + 0x48]
neg ebp
movsxd rdi, eax
mov qword [rsp + 0x28], rdi
mov eax, dword [r11 + 0x158]
movsxd r8, ecx
add r8, r13
add r8, r12
imul eax, r9d
movsxd rdx, eax
add rdx, qword [r11 + 0x150]
add rdx, rdi
cmp dword [rsp + 0x60], 0
jle 0x140044eb4
mov edi, dword [rsp + 0x60]
mov al, byte [r8 + 2]
xor byte [rdx + 2], al
mov al, byte [r8 + 1]
xor byte [rdx + 1], al
mov al, byte [r8]
lea r8, [r8 + 4]
xor byte [rdx], al
add rdx, rsi
dec rdi
jne 0x140044e90
mov rdi, qword [rsp + 0x28]
dec r10d
inc r9d
cmp dword [r11 + 0x174], 0
jne 0x140044ec8
add ecx, ebp
jmp 0x140044eca
add ecx, ebx
test r10d, r10d
jne 0x140044e64
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
pop r14
pop r13
pop r12
pop rdi
ret

Function at 0x140045c70
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
mov r11d, dword [rsp + 0x68]
movsxd rsi, dword [rcx + 0x160]
mov edi, r8d
mov r12, rdx
mov rbx, rcx
test r11d, r11d
je 0x140045d39
mov eax, dword [rsp + 0x50]
mov ecx, r8d
mov ebp, r8d
lea r10d, [rax + rax*2]
mov eax, esi
imul ecx, dword [rsp + 0x58]
movsxd r13, r10d
imul eax, r9d
mov r9d, dword [rsp + 0x48]
movsxd r10, eax
mov qword [rsp + 0x28], r10
neg ebp
mov eax, dword [rbx + 0x158]
movsxd r8, ecx
add r8, r13
add r8, r12
imul eax, r9d
movsxd rdx, eax
add rdx, qword [rbx + 0x150]
add rdx, r10
cmp dword [rsp + 0x60], 0
jle 0x140045d1f
mov r10d, dword [rsp + 0x60]
mov al, byte [r8 + 2]
xor byte [rdx + 2], al
mov al, byte [r8 + 1]
xor byte [rdx + 1], al
mov al, byte [r8]
lea r8, [r8 + 3]
xor byte [rdx], al
add rdx, rsi
dec r10
jne 0x140045cfb
mov r10, qword [rsp + 0x28]
dec r11d
inc r9d
cmp dword [rbx + 0x174], 0
jne 0x140045d32
add ecx, ebp
jmp 0x140045d34
add ecx, edi
test r11d, r11d
jne 0x140045ccf
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x1400111ef
Capabilities:
Terminate process

Disassembly:
jmp 0x140013250
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret
Function at 0x14001126c
Capabilities:
Create thread

Disassembly:
jmp 0x140011a80
push rbp
push rdi
sub rsp, 0x158
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x1a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x14001e0b8]
xor rax, rbp
mov qword [rbp + 0x118], rax
lea rcx, [0x1400230a2]
call fcn.140011375
mov qword [rbp + 8], 0
mov qword [rbp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
lea rcx, str._i__Injecting_Shellcode_The_Local_Process_Of_Pid:__d__n
call fcn.140011195
lea rcx, str.___Press__Enter__To_Decrypt_...
call fcn.140011195
call qword [sym.imp.ucrtbased.dll_getchar]
lea rcx, str._i__Decrypting_...
call fcn.140011195
mov r9d, 0x110
lea r8, [rbp + 8]
mov edx, 0x12
lea rcx, section..data
call fcn.1400113ac
test eax, eax
jne 0x140011b28
mov eax, 0xffffffff
jmp 0x140011c61
lea rcx, str.___DONE_Decrypting___n
call fcn.140011195
mov r8d, 0x110
mov rdx, qword [rbp + 8]
lea rcx, str._i__Deobfuscated_Payload_At_:_0x_p_Of_Size_:__d__n
call fcn.140011195
lea rcx, str.___Press__Enter__To_Allocate_...
call fcn.140011195
call qword [sym.imp.ucrtbased.dll_getchar]
mov r9d, 4
mov r8d, 0x3000
mov edx, 0x110
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rbp + 0x48], rax
cmp qword [rbp + 0x48], 0
jne 0x140011b9e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____VirtualAlloc_Failed_With_Error_:__d__n
call fcn.140011195
mov eax, 0xffffffff
jmp 0x140011c61
mov rdx, qword [rbp + 0x48]
lea rcx, str._i__Allocated_Memory_At_:_0x_p__n
call fcn.140011195
lea rcx, str.___Press__Enter__To_Write_Payload_...
call fcn.140011195
call qword [sym.imp.ucrtbased.dll_getchar]
mov r8d, 0x110
mov rdx, qword [rbp + 8]
mov rcx, qword [rbp + 0x48]
call fcn.1400111b3
mov r8d, 0x110
xor edx, edx
mov rcx, qword [rbp + 8]
call fcn.1400112bc
lea rcx, str.___Press__Enter__To_Run_...
call fcn.140011195
call qword [sym.imp.ucrtbased.dll_getchar]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rbp + 0x48]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
test rax, rax
jne 0x140011c38
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____CreateThread_Failed_With_Error_:__d__n
call fcn.140011195
mov eax, 0xffffffff
jmp 0x140011c61
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp + 8]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rcx, str.___Press__Enter__To_Quit_...
call fcn.140011195
call qword [sym.imp.ucrtbased.dll_getchar]
xor eax, eax
mov rdi, rax
lea rcx, [rbp - 0x30]
lea rdx, [0x14001aff0]
call fcn.14001130c
mov rax, rdi
mov rcx, qword [rbp + 0x118]
xor rcx, rbp
call fcn.1400111ae
lea rsp, [rbp + 0x128]
pop rdi
pop rbp
ret
Function at 0x140011276
Capabilities:
Parse pe header

Disassembly:
jmp 0x1400145a0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x1400145c0
xor al, al
jmp 0x140014641
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400145d3
xor al, al
jmp 0x140014641
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x1400145fd
xor al, al
jmp 0x140014641
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140014611
xor al, al
jmp 0x140014641
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140014623
xor al, al
jmp 0x140014641
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001463f
xor al, al
jmp 0x140014641
mov al, 1
add rsp, 0x38
ret
Function at 0x140003917
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp - 8], 0
cmp qword [rbp + 0x18], 0
je 0x140003947
mov rax, qword [rbp + 0x18]
mov rcx, rax
call fcn.1400038d9
mov rcx, rax
jmp 0x14000394c
mov ecx, 0
mov rdx, qword [rbp + 0x10]
mov rax, qword [rbp + 0x18]
mov r9, rdx
mov r8, rcx
mov edx, 1
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov qword [rbp - 8], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sub.msvcrt.dll_fflush
mov dword [rbp - 0xc], eax
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14000fec0
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.140015f00
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.140015f00
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 0x14000ff30
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140024204]
mov rbx, rcx
test esi, esi
jle 0x140010060
mov rax, qword [0x140024208]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000ff7b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140010005
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14000ff60
mov rcx, rbx
call fcn.140010980
mov rdi, rax
test rax, rax
je 0x140010082
mov rax, qword [0x140024208]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140010ac0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140024208]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140010067
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000fffe
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140010010
add dword [0x140024204], 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 [0x140024208]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000fffe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000fec0
nop dword [rax]
xor esi, esi
jmp 0x14000ff88
mov rax, qword [0x140024208]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.14000fec0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.14000fec0
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x1400105f0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140024260]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140024240]
test rbx, rbx
je 0x14001064c
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 0x140010643
test rsi, rsi
je 0x140010643
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140010628
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 0x140010980
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14001e3e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400109a0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400109a8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400109a0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400109fd
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 0x1400109f4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400109a0
add rax, 0x28
cmp rax, r9
jne 0x1400109e0
xor eax, eax
ret

Function at 0x140010a00
Capabilities:
Parse pe header

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

Function at 0x140010ac0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14001e3e0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140010adf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140010ae8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140016fa0
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 0x1400170a2
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x14001707a
add rax, 1
cmp rax, 0x6b
je 0x140017097
cmp byte [rcx + rax], 0
jne 0x140017070
movsxd rdx, eax
cmp eax, 0x6a
je 0x140017097
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 0x14001708b

Function at 0x140017440
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x140024d60], 1
je 0x1400174b8
lea rdi, [0x140024d60]
mov rcx, rdi
call fcn.140016d20
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call fcn.1400166a0
mov esi, dword [0x140024d60]
test esi, esi
jne 0x1400174c8
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x14001c3b8], eax
cmp eax, 0xffffffff
je 0x14001be86
mov dword [0x140024d60], 1
mov rcx, rbp
call fcn.140016990
test rbx, rbx
je 0x1400174b8
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp fcn.1400170c0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x140017498
mov ecx, 2
call qword [fcn.140015f00]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140017498
call sub.msvcrt.dll_abort
nop
Function at 0x1400174f0
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
call fcn.1400171d0
cmp qword [0x140026048], 0
mov rbx, rax
je 0x140017608
test rax, rax
je 0x140017608
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.14001a770
cmp eax, 1
je 0x140017616
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.14001be8c
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x14001c3b8]
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 0x14001761c
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.140016fa0
nop
jmp fcn.14001be8c

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

Disassembly:
sub rsp, 0x28
call fcn.140017440
mov ecx, dword [0x14001c3b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140017650
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.1400174f0
Function at 0x140017dc0
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 0x140017ee8
cmp eax, 1
je 0x140017e1b
call fcn.140016d20
lea rbp, [rax + 8]
mov rdi, rax
mov rcx, rbp
call fcn.1400166a0
mov r12d, dword [rbx]
test r12d, r12d
je 0x140017e30
cmp r12d, 1
jne 0x140017ec0
mov rcx, rbp
call fcn.140016990
test rdi, rdi
je 0x140017e1b
mov rcx, rdi
call fcn.1400170c0
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rax, [0x1400171a0]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.140017440
mov ecx, dword [0x14001c3b8]
mov r12, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call r12
test rax, rax
je 0x140017f28
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x30], rax
lock or qword [rsp], 0
call fcn.140017440
mov ecx, dword [0x14001c3b8]
call r12
test rax, rax
je 0x140017f10
lea rdx, [rsp + 0x20]
mov qword [rax + 0x18], rdx
lock or qword [rsp], 0
call rsi
call fcn.140017440
mov ecx, dword [0x14001c3b8]
call r12
test rax, rax
je 0x140017f00
mov rdx, qword [rsp + 0x30]
mov qword [rax + 0x18], rdx
mov dword [rbx], 1
jmp 0x140017e06
mov ecx, 2
call qword [fcn.140015f00]
mov r9d, r12d
mov r8, rbx
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140017e06
mov eax, 0x16
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.1400174f0
test rax, rax
jne 0x140017ea9
jmp 0x14001bea5
call fcn.1400174f0
test rax, rax
jne 0x140017e85
jmp 0x14001bebe
call fcn.1400174f0
test rax, rax
jne 0x140017e5f
jmp 0x14001beb4
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 0x1400181b0
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.140017440
mov ecx, dword [0x14001c3b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x140018228
lea rbp, [rbx + 0x68]
xor r12d, r12d
mov rcx, rbp
call fcn.14001a780
cmp esi, dword [rbx + 0x48]
jae 0x140018203
mov rax, qword [rbx + 0x58]
cmp byte [rax + rsi], 0
je 0x140018203
mov rax, qword [rbx + 0x50]
mov r12, qword [rax + rsi*8]
mov rcx, rbp
call fcn.14001a7c0
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.1400174f0
mov rbx, rax
jmp 0x1400181dd
Function at 0x140018240
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.140017440
mov ecx, dword [0x14001c3b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x140018340
lea r13, [rbx + 0x68]
mov rcx, r13
call fcn.14001a780
cmp esi, dword [rbx + 0x48]
jae 0x1400182c0
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.14001a7c0
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 0x14001834d
mov rcx, qword [rbx + 0x58]
mov rdx, r14
call sub.msvcrt.dll_realloc
mov r14, rax
test rax, rax
je 0x14001834d
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 0x14001828f
call fcn.1400174f0
mov rbx, rax
jmp 0x14001827a
mov rcx, r13
call fcn.14001a7c0
mov eax, 0xc
jmp 0x1400182ad

Function at 0x1400183d0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140017440
mov ecx, dword [0x14001c3b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400183f8
mov rax, qword [rax + 0x30]
add rsp, 0x28
ret
call fcn.1400174f0
test rax, rax
jne 0x1400183ea
add rsp, 0x28
ret

Function at 0x140018460
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140017440
mov ecx, dword [0x14001c3b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140018488
add rax, 0x18
add rsp, 0x28
ret
call fcn.1400174f0
test rax, rax
jne 0x14001847a
jmp 0x14001847e

Function at 0x1400185a0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov eax, dword [0x140024d68]
test eax, eax
jne 0x1400185b8
xor eax, eax
add rsp, 0x28
ret
call fcn.140017440
mov ecx, dword [0x14001c3b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400185e8
mov edx, dword [rax + 0x20]
test edx, edx
jg 0x1400185ae
test byte [rax + 0x40], 3
je 0x1400185ae
mov eax, dword [rax + 0x44]
and eax, 1
jmp 0x1400185b0
call fcn.1400174f0
test rax, rax
jne 0x1400185ce
jmp 0x1400185ae

Function at 0x140018600
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, ecx
call fcn.140017440
mov ecx, dword [0x14001c3b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140018640
test ebx, ebx
jle 0x140018630
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.1400174f0
test rax, rax
jne 0x14001861d
add rsp, 0x20
pop rbx
ret
Function at 0x140018730
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
call fcn.140017440
mov ecx, dword [0x14001c3b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x1400187a8
test byte [rbx + 0x40], 0xc
jne 0x14001875f
mov eax, dword [0x140024d68]
test eax, eax
jne 0x140018770
add rsp, 0x28
pop rbx
pop rsi
ret
lea rsi, [rbx + 0x38]
mov rcx, rsi
call fcn.1400166a0
movzx eax, byte [rbx + 0x40]
test al, 3
je 0x140018793
mov edx, dword [rbx + 0x44]
test dl, 1
je 0x140018793
mov ecx, dword [rbx + 0x20]
test ecx, ecx
jle 0x1400187bc
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.140016990
call fcn.1400174f0
mov rbx, rax
test rax, rax
jne 0x14001874f
add rsp, 0x28
pop rbx
pop rsi
ret
and eax, 0xfffffff3
mov rcx, qword [rbx + 0x30]
and edx, 0xfffffffe
or eax, 4
mov dword [rbx + 0x44], edx
mov byte [rbx + 0x40], al
test rcx, rcx
je 0x1400187da
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rsi
call fcn.140016990
call fcn.140018650
nop
nop dword [rax + rax]
push rdi
push rsi
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x140018860
call fcn.140019910
mov rsi, rax
mov eax, 0xfffffffe
cmp rax, rsi
jb 0x140018898
call fcn.140017440
mov ecx, dword [0x14001c3b8]
mov edi, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x1400188f0
test esi, esi
je 0x140018876
call fcn.140018730
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x1400188d0
mov edx, edi
call fcn.1400199c0
call fcn.140018730
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.140017440
mov ecx, dword [0x14001c3b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400188e0
call fcn.140018730
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.140018730
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.140017440
mov ecx, dword [0x14001c3b8]
mov edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
jne 0x140018835
call fcn.1400174f0
mov rbx, rax
jmp 0x140018835
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001884e
call fcn.1400174f0
jmp 0x140018876
call fcn.1400174f0
mov rbx, rax
jmp 0x140018831