joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140148300
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
cmp byte [rcx + 0xf1e], 0
movsxd r10, r9d
je 0x140148424
cmp r8d, 0xff
jne 0x140148361
lea eax, [r10 - 0xec]
cmp eax, 0x13
ja 0x14014834b
lea r8, [0x140000000]
mov r9, qword [r8 + r10*8 + 0x1be550]
mov r8, rdx
lea rdx, str._s_IAC__s_n
add rsp, 0x38
jmp fcn.140123dd0
mov r8, rdx
mov r9d, r10d
lea rdx, str._s_IAC__d_n
add rsp, 0x38
jmp fcn.140123dd0
cmp r8d, 0xfb
jne 0x140148373
lea r9, str.WILL
jmp 0x1401483b1
cmp r8d, 0xfc
jne 0x140148385
lea r9, str.WONT
jmp 0x1401483b1
cmp r8d, 0xfd
jne 0x140148397
lea r9, [0x1401bef74]
jmp 0x1401483b1
xor r9d, r9d
lea rax, str.DONT
cmp r8d, 0xfe
cmove r9, rax
test r9, r9
je 0x14014840d
cmp r10d, 0x27
jg 0x1401483e4
lea r8, [0x140000000]
mov r8, qword [r8 + r10*8 + 0x1beb70]
test r8, r8
jne 0x1401483f4
mov r8, rdx
mov dword [rsp + 0x20], r10d
lea rdx, str._s__s__d_n
call fcn.140123dd0
add rsp, 0x38
ret
cmp r10d, 0xff
jne 0x1401483cb
lea r8, str.EXOPL
mov qword [rsp + 0x20], r8
mov r8, rdx
lea rdx, str._s__s__s_n
call fcn.140123dd0
add rsp, 0x38
ret
mov r9d, r8d
mov dword [rsp + 0x20], r10d
mov r8, rdx
lea rdx, str._s__d__d_n
call fcn.140123dd0
add rsp, 0x38
ret

Function at 0x140148770
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x10], 0xff
xor r9d, r9d
mov byte [rax + 0x11], sil
mov rbx, rcx
mov byte [rax + 0x12], dil
mov rcx, qword [rcx + 0x4c0]
lea rdx, [rax + 0x10]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1401487cf
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140123c50
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.140148300
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x140148980
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x140148b28
push rbp
push rdi
push r14
sub rsp, 0x20
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r15
mov rdi, qword [rbp + 0x1e0]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x1401489e5
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x1401489e5
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x1401489e5
mov byte [rax], dl
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx r15d, ax
mov word [rsp + 0x48], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r9, qword [rbx]
movzx ecx, ax
cmp r9, rbx
jae 0x140148a1c
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x140148a72
movzx eax, byte [rsp + 0x49]
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140148a72
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140148a72
shr cx, 8
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140148a72
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140148a72
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rdi + 0x1ec0], r9
lea r8, [rdi + 0x1cba]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.140148430
mov rcx, qword [r14 + 0x4c0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x140148ad4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140123c50
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.140148800
mov rcx, qword [r14 + 0x4c0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140148b20
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140123c50
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x14014a290
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x1401d41f8]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0xa00]
lea rax, [rsp + 0x30]
mov rdi, qword [rcx]
mov r14, rcx
mov dword [rsp + 0x30], 0x80
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
add r8d, 4
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x14014a325
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x150], eax
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], rsi
cmp r8d, 4
jge 0x14014a386
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.140123c50
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.14015e760
add rsp, 0xd0
pop r14
pop rdi
pop rbx
ret
mov rdx, qword [rbx + 0x168]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
sub ecx, 3
je 0x14014a441
sub ecx, 1
je 0x14014a4b4
sub ecx, 1
je 0x14014a3f0
cmp ecx, 1
je 0x14014a3d3
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x1401bc9d0]
call fcn.140123c50
jmp 0x14014a4b4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.140149fc0
test eax, eax
je 0x14014a4b4
jmp 0x14014a35a
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbp, eax
lea rsi, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, rbp
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x14014a4b4
sub rax, rsi
cmp rax, rbp
jae 0x14014a4b4
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.140123dd0
jmp 0x14014a4b4
cmp r8d, 4
jle 0x14014a4b4
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x14014a4b4
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.140123b70
mov esi, eax
test eax, eax
je 0x14014a493
mov edx, 5
mov rcx, rbx
call fcn.14014af80
mov eax, esi
jmp 0x14014a35a
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.1401331e0
mov rcx, r14
call fcn.1401334c0
test eax, eax
je 0x14014a358
mov edx, 5
mov rcx, rbx
call fcn.14014af80
mov eax, Ordinal_45
jmp 0x14014a35a
Function at 0x14015d390
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x14015d3d2
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x14015d419
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x14015d472
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
sub rbp, 1
jne 0x14015d430
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x14015d4b3
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1401c21ea]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1401c21eb]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x14015d480
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x14007fba0
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 sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call fcn.1400813b0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]

Function at 0x14007fc10
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1401590b4]
mov rbx, rcx
test esi, esi
jle 0x14007fd40
mov rax, qword [0x1401590b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14007fc5b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14007fce5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14007fc40
mov rcx, rbx
call fcn.140080680
mov rdi, rax
test rax, rax
je 0x14007fd62
mov rax, qword [0x1401590b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400807c0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1401590b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14007fd47
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14007fcde
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x14007fcf0
add dword [0x1401590b4], 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 [0x1401590b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14007fcde
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14007fba0
nop dword [rax]
xor esi, esi
jmp 0x14007fc68
mov rax, qword [0x1401590b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.14007fba0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.14007fba0
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x1400802f0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140159120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140159100]
test rbx, rbx
je 0x14008034c
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 rsi, rsi
je 0x140080343
test eax, eax
jne 0x140080343
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140080328
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 0x140080680
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140080700
Capabilities:
Parse pe header

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

Function at 0x1400807c0
Capabilities:
Parse pe header

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

Function at 0x140081310
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov ecx, 2
mov r8d, 0x2d
lea rdx, str._buffer_overflow_detected_:_terminated_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll__write
mov ecx, 0x17
call sub.KERNEL32.dll_IsProcessorFeaturePresent
test eax, eax
je 0x140081340
mov ecx, 8
int 0x29
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x140081360
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov ecx, 2
mov r8d, 0x2c
lea rdx, str._stack_smashing_detected_:_terminated_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll__write
mov ecx, 0x17
call sub.KERNEL32.dll_IsProcessorFeaturePresent
test eax, eax
je 0x140081390
mov ecx, 2
int 0x29
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x1400822d0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0xa8
mov rax, qword [0x14014c940]
mov rdx, qword [rax]
mov qword [rsp + 0x98], rdx
xor edx, edx
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x78], 0
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 + 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.api_ms_win_crt_convert_l1_1_0.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x1400823ea
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x1400823c2
add rax, 1
cmp rax, 0x6b
je 0x1400823df
cmp byte [rcx + rax], 0
jne 0x1400823b8
lea edx, [rax + 1]
cmp eax, 0x6a
je 0x1400823df
cdqe
mov byte [rsp + rax + 0x20], 0xa
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov edx, 0x28
mov eax, 0x27
lea rcx, [rsp + 0x20]
jmp 0x1400823d0

Function at 0x140082780
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x140159230], 1
je 0x1400827f8
lea rdi, [0x140159230]
mov rcx, rdi
call fcn.140082060
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call fcn.140081a00
mov esi, dword [0x140159230]
test esi, esi
jne 0x140082808
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140124788], eax
cmp eax, 0xffffffff
je 0x14009a346
mov dword [0x140159230], 1
mov rcx, rbp
call fcn.140081cd0
test rbx, rbx
je 0x1400827f8
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp fcn.140082400
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x1400827d8
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call fcn.140081410
jmp 0x1400827d8
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
Function at 0x140082830
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
call fcn.140082510
cmp qword [0x14015c048], 0
mov rbx, rax
je 0x140082948
test rax, rax
je 0x140082948
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.140085cb0
cmp eax, 1
je 0x140082956
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.14009a34c
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x140124788]
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 0x14008295c
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.1400822d0
nop
jmp fcn.14009a34c

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

Disassembly:
sub rsp, 0x28
call fcn.140082780
mov ecx, dword [0x140124788]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140082990
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.140082830
Function at 0x140083150
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rbp, qword [0x14014c940]
mov rax, qword [rbp]
mov qword [rsp + 0x38], rax
mov eax, dword [rcx]
mov rbx, rcx
mov rsi, rdx
test rdx, rdx
je 0x140083298
cmp eax, 1
je 0x1400831bd
call fcn.140082060
lea r12, [rax + 8]
mov rdi, rax
mov rcx, r12
call fcn.140081a00
mov r13d, dword [rbx]
test r13d, r13d
je 0x1400831e0
cmp r13d, 1
jne 0x140083270
mov rcx, r12
call fcn.140081cd0
test rdi, rdi
je 0x1400831bd
mov rcx, rdi
call fcn.140082400
xor eax, eax
mov rdx, qword [rsp + 0x38]
sub rdx, qword [rbp]
jne 0x1400832eb
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea rax, [0x1400824e0]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.140082780
mov ecx, dword [0x140124788]
mov r13, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call r13
test rax, rax
je 0x1400832d8
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x30], rax
lock or qword [rsp], 0
call fcn.140082780
mov ecx, dword [0x140124788]
call r13
test rax, rax
je 0x1400832c0
lea rdx, [rsp + 0x20]
mov qword [rax + 0x18], rdx
lock or qword [rsp], 0
call rsi
call fcn.140082780
mov ecx, dword [0x140124788]
call r13
test rax, rax
je 0x1400832a8
mov rdx, qword [rsp + 0x30]
mov qword [rax + 0x18], rdx
mov dword [rbx], 1
jmp 0x1400831a8
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, r13d
mov r8, rbx
lea rdx, str._once__p_is__d_n
mov rcx, rax
call fcn.140081410
jmp 0x1400831a8
mov eax, 0x16
jmp 0x1400831bf
call fcn.140082830
test rax, rax
jne 0x140083259
jmp 0x14009a37e
call fcn.140082830
test rax, rax
jne 0x140083235
jmp 0x14009a36f
call fcn.140082830
test rax, rax
jne 0x14008320f
jmp 0x14009a365
call fcn.140081360
nop
nop word cs:[rax + rax]
nop dword [rax]
mov rax, qword [pe_dos_header]
ud2
lea rax, [rsp + 0x20]
mov qword [0], rax
ud2
mov rax, qword [rsp + 0x30]
mov qword [0], rax
ud2

Function at 0x140083570
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.140082780
mov ecx, dword [0x140124788]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x1400835e8
lea rbp, [rbx + 0x68]
xor r12d, r12d
mov rcx, rbp
call fcn.140085cc0
cmp esi, dword [rbx + 0x48]
jae 0x1400835c3
mov rax, qword [rbx + 0x58]
cmp byte [rax + rsi], 0
je 0x1400835c3
mov rax, qword [rbx + 0x50]
mov r12, qword [rax + rsi*8]
mov rcx, rbp
call fcn.140085d00
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.140082830
mov rbx, rax
jmp 0x14008359d
Function at 0x140083600
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.140082780
mov ecx, dword [0x140124788]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x140083700
lea r13, [rbx + 0x68]
mov rcx, r13
call fcn.140085cc0
cmp esi, dword [rbx + 0x48]
jae 0x140083680
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.140085d00
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.api_ms_win_crt_heap_l1_1_0.dll_realloc
mov rdi, rax
test rax, rax
je 0x14008370d
mov rcx, qword [rbx + 0x58]
mov rdx, r14
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
mov r14, rax
test rax, rax
je 0x14008370d
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.api_ms_win_crt_string_l1_1_0.dll_memset
mov ecx, dword [rbx + 0x48]
mov r8d, r15d
xor edx, edx
mov rax, rcx
add rcx, r14
sub r8d, eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov qword [rbx + 0x50], rdi
mov qword [rbx + 0x58], r14
mov dword [rbx + 0x48], r15d
jmp 0x14008364f
call fcn.140082830
mov rbx, rax
jmp 0x14008363a
mov rcx, r13
call fcn.140085d00
mov eax, 0xc
jmp 0x14008366d

Function at 0x140083790
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140082780
mov ecx, dword [0x140124788]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400837b8
mov rax, qword [rax + 0x30]
add rsp, 0x28
ret
call fcn.140082830
test rax, rax
jne 0x1400837aa
add rsp, 0x28
ret

Function at 0x140083820
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140082780
mov ecx, dword [0x140124788]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140083848
add rax, 0x18
add rsp, 0x28
ret
call fcn.140082830
test rax, rax
jne 0x14008383a
jmp 0x14008383e

Function at 0x140083960
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov eax, dword [0x140159238]
test eax, eax
jne 0x140083978
xor eax, eax
add rsp, 0x28
ret
call fcn.140082780
mov ecx, dword [0x140124788]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400839a8
mov edx, dword [rax + 0x20]
test edx, edx
jg 0x14008396e
test byte [rax + 0x40], 3
je 0x14008396e
mov eax, dword [rax + 0x44]
and eax, 1
jmp 0x140083970
call fcn.140082830
test rax, rax
jne 0x14008398e
jmp 0x14008396e