joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140292870
Capabilities:
Get common file path

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x468
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x30], 2
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov r8d, 0x200
mov eax, 2
mov qword [rsp + 0x20], rax
xor esi, esi
mov r14d, 0xffffffff
xor edi, edi
xor r15d, r15d
cmp r8, 0x201
jae 0x1402928f0
jmp 0x1402928df
jae 0x140292994
cmp r8, 0x201
jae 0x1402928f0
mov r12d, 0x200
lea r13, [rsp + 0x68]
mov rbp, r8
jmp 0x140292937
sub r8, r15
sub rdi, r15
cmp rdi, r8
jae 0x140292917
lea rcx, [rsp + 0x30]
mov rdx, r15
call fcn.140291c00
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov rsi, qword [rsp + 0x38]
cmp rsi, r14
mov r15d, 0xffffffff
cmovb r15, rsi
mov qword [rsp + 0x40], r15
mov rdi, rsi
mov r12, r15
mov r13, qword [rsp + 0x20]
mov rbp, r15
xor ecx, ecx
call sub.kernel32.dll_SetLastError
mov ecx, ebp
mov rdx, r13
call sub.kernel32.dll_GetCurrentDirectoryW
mov ebx, eax
test eax, eax
jne 0x14029295b
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x1402929ed
mov r8d, ebx
cmp rbp, r8
jne 0x1402928d0
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x140292a0d
add rbp, rbp
cmp rbp, r14
cmovae rbp, r14
mov r8, rbp
cmp r8, 0x201
jb 0x1402928df
jmp 0x1402928f0
cmp r12, r8
jb 0x140292a27
lea rcx, [rsp + 0x48]
mov rdx, r13
call fcn.140293370
movups xmm0, xmmword [rsp + 0x48]
movups xmm1, xmmword [rsp + 0x58]
mov rax, qword [rsp + 0x28]
movups xmmword [rax + 0x10], xmm1
movups xmmword [rax], xmm0
test rsi, rsi
je 0x1402929d8
mov rcx, qword [0x1403f6548]
xor edx, edx
mov r8, qword [rsp + 0x20]
call fcn.140302ad4
nop
add rsp, 0x468
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call sub.kernel32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov rcx, qword [rsp + 0x28]
mov qword [rcx], rax
mov byte [rcx + 0x18], 2
test rsi, rsi
jne 0x1402929c5
jmp 0x1402929d8
lea rcx, str.internal_error:_entered_unreachable_code_m__
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.140137ef0
jmp 0x140292a3c
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, r12
mov r8, rax
call fcn.140137b60
ud2
Function at 0x140294ba0
Capabilities:
Read file via mapping

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x88
mov rax, r8
mov rdi, rcx
mov dword [rsp + 0x60], 0
mov word [rsp + 0x64], 0
mov dword [rsp + 0x40], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], 7
mov byte [rsp + 0x60], 1
lea r8, [rsp + 0x40]
mov rcx, rdx
mov rdx, rax
call fcn.1402adff0
mov rsi, rdx
test rax, rax
je 0x140294c63
mov eax, esi
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x140294c57
test rax, rax
je 0x140294c57
mov rax, rsi
dec rsi
mov rbx, qword [rax - 1]
mov r14, qword [rax + 7]
mov rcx, rbx
call qword [r14]
cmp qword [r14 + 8], 0
je 0x140294c46
cmp qword [r14 + 0x10], 0x11
jb 0x140294c35
mov rbx, qword [rbx - 8]
mov rcx, qword [0x1403f6548]
xor edx, edx
mov r8, rbx
call fcn.140302ad4
mov rcx, qword [0x1403f6548]
xor edx, edx
mov r8, rsi
call fcn.140302ad4
mov qword [rdi], 0
jmp 0x140294dd7
lea rcx, [rsp + 0x40]
mov rdx, rsi
call fcn.1402ae210
cmp dword [rsp + 0x40], 2
jne 0x140294cf5
mov rax, qword [rsp + 0x48]
mov ecx, eax
and ecx, 3
lea rdx, [rcx - 2]
cmp rdx, 2
jb 0x140294cd6
test rcx, rcx
je 0x140294cd6
lea rbx, [rax - 1]
mov r14, qword [rax - 1]
mov r15, qword [rax + 7]
mov rcx, r14
call qword [r15]
cmp qword [r15 + 8], 0
je 0x140294cc5
cmp qword [r15 + 0x10], 0x11
jb 0x140294cb4
mov r14, qword [r14 - 8]
mov rcx, qword [0x1403f6548]
xor edx, edx
mov r8, r14
call fcn.140302ad4
mov rcx, qword [0x1403f6548]
xor edx, edx
mov r8, rbx
call fcn.140302ad4
mov qword [rdi], 0
mov rcx, rsi
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp sub.kernel32.dll_CloseHandle
mov r12, qword [rsp + 0x78]
test rsi, rsi
je 0x140294d47
mov qword [rsp + 0x40], 0
call sub.kernel32.dll_GetCurrentProcess
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov rcx, rax
mov rdx, rsi
mov r8, rax
call sub.kernel32.dll_DuplicateHandle
test eax, eax
je 0x140294dc3
mov rbx, qword [rsp + 0x40]
jmp 0x140294d49
xor ebx, ebx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, rbx
xor edx, edx
mov r8d, 2
xor r9d, r9d
call sub.kernel32.dll_CreateFileMappingA
test rax, rax
je 0x140294db2
mov r14, rax
mov qword [rsp + 0x20], r12
mov rcx, rax
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call sub.kernel32.dll_MapViewOfFile
mov r15, rax
mov rcx, r14
call sub.kernel32.dll_CloseHandle
test r15, r15
je 0x140294db2
mov qword [rdi + 8], rbx
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], r12
mov qword [rdi], 1
jmp 0x140294dcf
mov qword [rdi], 0
mov rcx, rbx
call sub.kernel32.dll_CloseHandle
jmp 0x140294dcf
call sub.kernel32.dll_GetLastError
mov qword [rdi], 0
mov rcx, rsi
call sub.kernel32.dll_CloseHandle
nop
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
Function at 0x1402b1e10
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x1403a8c48]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, rdx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call sub.ntdll.dll_NtReadFile
cmp eax, 0x103
jne 0x1402b1e7a
mov rcx, rdi
mov edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [rsp + 0x60]
cmp eax, 0xc0000011
jne 0x1402b1e89
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x1402b1ec0
cmp eax, 0x103
je 0x1402b1eca
test eax, eax
js 0x1402b1ea6
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x1402b1ec0
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
add rsp, 0xa8
pop rdi
pop rsi
ret
mov byte [rsp + 0x5c], 0
mov dword [rsp + 0x58], 0
lea rax, [0x1403a8cb0]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.14028e2b0
mov rcx, rax
call fcn.14028e3b0
mov ecx, 7
int 0x29
ud2

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

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov ecx, dword [0x1403058f8]
test ecx, ecx
je 0x1402b4d20
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x1402b4d39
mov rdi, rax
cmp qword [rax + 8], 0
je 0x1402b4d39
add rdi, 0x10
jmp 0x1402b4e2e
lea rcx, [0x1403058e0]
call fcn.14028f0b0
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
ja 0x1402b4d0d
mov ecx, dword [0x1403058f8]
test ecx, ecx
je 0x1402b4e0f
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x1402b4e2c
mov rsi, rax
test rax, rax
jne 0x1402b4dde
mov qword [rsp + 0x28], 0
lea rax, [0x1403058e0]
mov qword [rsp + 0x20], rax
movzx eax, byte [0x1403f6a90]
mov rcx, qword [0x1403f6548]
test rcx, rcx
jne 0x1402b4da0
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1402b4e48
mov rcx, rax
mov qword [0x1403f6548], rax
mov r8d, 0x18
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x1402b4e48
mov rsi, rax
mov rax, qword [rsp + 0x30]
mov qword [rsi + 0x10], rax
movups xmm0, xmmword [rsp + 0x20]
movups xmmword [rsi], xmm0
mov ecx, dword [0x1403058f8]
test ecx, ecx
je 0x1402b4e38
dec ecx
mov rdx, rsi
call sub.kernel32.dll_TlsSetValue
lea rdi, [rsi + 0x10]
mov rcx, qword [rsi + 0x10]
cmp qword [rsi + 8], 0
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], 0
je 0x1402b4e2e
test rcx, rcx
je 0x1402b4e2e
lock dec qword [rcx]
jne 0x1402b4e2e
call fcn.1402c4d70
jmp 0x1402b4e2e
lea rcx, [0x1403058e0]
call fcn.14028f0b0
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jne 0x1402b4d58
xor edi, edi
mov rax, rdi
add rsp, 0x38
pop rdi
pop rsi
ret
lea rcx, [0x1403058e0]
call fcn.14028f0b0
mov ecx, eax
jmp 0x1402b4dd6
mov ecx, 8
mov edx, 0x18
call fcn.1400eb190
ud2
Function at 0x1402b58d0
Capabilities:
Resolve dns

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x1e0
mov rsi, rcx
mov r14, qword [rdx]
mov rbx, qword [rdx + 8]
movzx edi, word [rdx + 0x10]
mov rax, qword [0x1403f6550]
cmp rax, 3
jne 0x1402b5a97
cmp rbx, 0x17f
ja 0x1402b5aa9
lea r15, [rsp + 0x60]
mov rcx, r15
mov rdx, r14
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov byte [rsp + rbx + 0x60], 0
lea rax, [rbx + 1]
cmp rbx, 0xe
ja 0x1402b5948
xor edx, edx
nop
cmp byte [rsp + rdx + 0x60], 0
je 0x1402b5a04
inc rdx
cmp rax, rdx
jne 0x1402b5930
jmp 0x1402b5a5e
lea rcx, [rsp + 0x67]
and rcx, 0xfffffffffffffff8
sub rcx, r15
je 0x1402b597e
je 0x1402b597e
xor edx, edx
nop word [rax + rax]
cmp byte [rsp + rdx + 0x60], 0
je 0x1402b5a04
inc rdx
cmp rcx, rdx
jne 0x1402b5960
lea rdx, [rbx - 0xf]
cmp rcx, rdx
jbe 0x1402b5984
jmp 0x1402b59d5
lea rdx, [rbx - 0xf]
xor ecx, ecx
movabs r8, 0xfefefefefefefeff
movabs r9, 0x8080808080808080
nop dword [rax + rax]
mov r10, qword [rsp + rcx + 0x60]
mov r11, r10
not r11
add r10, r8
and r11, r9
test r11, r10
jne 0x1402b59d5
mov r10, qword [rsp + rcx + 0x68]
mov r11, r10
not r11
add r10, r8
and r11, r9
test r11, r10
jne 0x1402b59d5
add rcx, 0x10
cmp rcx, rdx
jbe 0x1402b59a0
sub rax, rcx
je 0x1402b5a5e
lea r8, [rsp + rcx]
add r8, 0x60
xor edx, edx
nop dword [rax + rax]
cmp byte [r8 + rdx], 0
je 0x1402b5a01
inc rdx
cmp rax, rdx
jne 0x1402b59f0
jmp 0x1402b5a5e
add rdx, rcx
cmp rdx, rbx
jne 0x1402b5a5e
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x40], xmm0
mov dword [rsp + 0x38], 1
mov qword [rsp + 0x28], 0
lea rcx, [rsp + 0x60]
lea r8, [rsp + 0x30]
lea r9, [rsp + 0x28]
xor edx, edx
call sub.ws2_32.dll_getaddrinfo
test eax, eax
je 0x1402b5a72
call sub.ws2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
jmp 0x1402b5a85
lea rax, str.file_name_contained_an_unexpected_NUL_byte
mov qword [rsi + 8], rax
mov qword [rsi], 1
jmp 0x1402b5a88
mov rax, qword [rsp + 0x28]
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rax
mov word [rsi + 0x18], di
xor eax, eax
mov qword [rsi], rax
add rsp, 0x1e0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
call fcn.1402b5f40
cmp rbx, 0x17f
jbe 0x1402b590a
mov rcx, rsi
mov rdx, r14
mov r8, rbx
mov r9d, edi
add rsp, 0x1e0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
jmp fcn.1402b5fb0
Function at 0x1402b5fb0
Capabilities:
Resolve dns

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x60
mov rbx, r8
inc rbx
sete bpl
je 0x1402b6214
js 0x1402b622e
mov edi, r9d
mov r14, r8
mov r15, rdx
mov rsi, rcx
movzx eax, byte [0x1403f6a90]
mov rcx, qword [0x1403f6548]
test rcx, rcx
jne 0x1402b600b
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1402b6205
mov rcx, rax
mov qword [0x1403f6548], rax
xor edx, edx
mov r8, rbx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x1402b6205
mov r12, rax
mov rcx, rax
mov rdx, r15
mov r8, r14
call sub.msvcrt.dll_memcpy
cmp r14, 0x10
jae 0x1402b6058
test r14, r14
je 0x1402b6113
xor eax, eax
cmp byte [r15 + rax], 0
je 0x1402b6190
inc rax
cmp r14, rax
jne 0x1402b6040
jmp 0x1402b6113
lea rax, [r15 + 7]
and rax, 0xfffffffffffffff8
sub rax, r15
je 0x1402b609e
cmp rax, r14
cmovae rax, r14
test rax, rax
je 0x1402b609e
xor ecx, ecx
nop word cs:[rax + rax]
cmp byte [r15 + rcx], 0
je 0x1402b6190
inc rcx
cmp rax, rcx
jne 0x1402b6080
lea rcx, [r14 - 0x10]
cmp rax, rcx
jbe 0x1402b60a4
jmp 0x1402b60f4
lea rcx, [r14 - 0x10]
xor eax, eax
movabs rdx, 0xfefefefefefefeff
movabs r8, 0x8080808080808080
nop dword [rax + rax]
mov r9, qword [r15 + rax]
mov r10, r9
not r10
add r9, rdx
and r10, r8
test r10, r9
jne 0x1402b60f4
mov r9, qword [r15 + rax + 8]
mov r10, r9
not r10
add r9, rdx
and r10, r8
test r10, r9
jne 0x1402b60f4
add rax, 0x10
cmp rax, rcx
jbe 0x1402b60c0
cmp rax, r14
je 0x1402b6113
nop dword [rax]
cmp byte [r15 + rax], 0
je 0x1402b6190
inc rax
cmp r14, rax
jne 0x1402b6100
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], r14
lea rcx, [rsp + 0x30]
call fcn.1400eb2d0
mov rbx, rax
mov r14, rdx
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x40], xmm0
mov dword [rsp + 0x38], 1
mov qword [rsp + 0x28], 0
lea r8, [rsp + 0x30]
lea r9, [rsp + 0x28]
mov rcx, rax
xor edx, edx
call sub.ws2_32.dll_getaddrinfo
test eax, eax
je 0x1402b61c6
call sub.ws2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
mov byte [rbx], 0
test r14, r14
jne 0x1402b61e4
jmp 0x1402b61f5
lea rax, str.file_name_contained_an_unexpected_NUL_byte
mov qword [rsi + 8], rax
mov qword [rsi], 1
test bpl, bpl
jne 0x1402b61f5
mov rcx, qword [0x1403f6548]
xor edx, edx
mov r8, r12
add rsp, 0x60
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp fcn.140302ad4
mov rax, qword [rsp + 0x28]
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rax
mov word [rsi + 0x18], di
xor eax, eax
mov qword [rsi], rax
mov byte [rbx], 0
test r14, r14
je 0x1402b61f5
mov rcx, qword [0x1403f6548]
xor edx, edx
mov r8, rbx
call fcn.140302ad4
nop
add rsp, 0x60
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov ecx, 1
mov rdx, rbx
call fcn.1400eb190
ud2
lea rcx, str.called__Option::unwrap____on_a__None__value
lea r8, str.library_alloc_src_ffic_str.rs
mov edx, 0x2b
call fcn.140137ef0
ud2
call fcn.1400eb150
ud2
Function at 0x1402b7790
Capabilities:
Create thread

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x38
mov rdi, r8
mov rbx, rdx
mov r14, rcx
movzx eax, byte [0x1403f6a90]
mov rcx, qword [0x1403f6548]
test rcx, rcx
jne 0x1402b77cd
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1402b787d
mov rcx, rax
mov qword [0x1403f6548], rax
mov r8d, 0x10
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x1402b787d
mov rsi, rax
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10000
lea r8, [0x1402b78e0]
xor edi, edi
xor ecx, ecx
mov rdx, r14
mov r9, rax
call sub.kernel32.dll_CreateThread
mov rdx, rax
test rax, rax
jne 0x1402b7870
mov rdi, qword [rsi]
mov rbx, qword [rsi + 8]
mov rcx, rdi
call qword [rbx]
cmp qword [rbx + 8], 0
je 0x1402b784b
cmp qword [rbx + 0x10], 0x11
jb 0x1402b783a
mov rdi, qword [rdi - 8]
mov rcx, qword [0x1403f6548]
xor edx, edx
mov r8, rdi
call fcn.140302ad4
mov rcx, qword [0x1403f6548]
xor edx, edx
mov r8, rsi
call fcn.140302ad4
call sub.kernel32.dll_GetLastError
mov edx, eax
shl rdx, 0x20
or rdx, 2
mov edi, 1
mov rax, rdi
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
ret
mov ecx, 8
mov edx, 0x10
call fcn.1400eb190
ud2

Function at 0x1402b79c0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rsi
sub rsp, 0x80
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x30]
mov edx, 0x10
call sub.ADVAPI32.dll_SystemFunction036
test al, al
je 0x1402b79f6
mov rax, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
add rsp, 0x80
pop rsi
ret
call sub.kernel32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x28]
mov qword [rsp + 0x40], rax
lea rax, [fcn.1402af6e0]
mov qword [rsp + 0x48], rax
lea rax, str.fallback_RNG_broken:
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 1
mov qword [rsp + 0x70], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
lea rdx, str.library_std_src_syswindows_rand.rs
lea rcx, [rsp + 0x50]
call fcn.140136bd0
ud2
Function at 0x1402bd2d0
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x50
mov rbx, r8
mov rsi, rcx
test rdx, rdx
je 0x1402bd2fb
mov qword [rsi + 8], rbx
mov qword [rsi], 1
add rsp, 0x50
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
ret
mov rax, qword [0x1403f6550]
cmp rax, 3
jne 0x1402bd477
cmp word [rbx], 0
mov eax, 2
mov ebp, 0x17
cmove ebp, eax
mov dword [rsp + 0x28], 0x81
mov dword [rsp + 0x20], 0
mov ecx, ebp
mov edx, 2
xor r8d, r8d
xor r9d, r9d
call sub.ws2_32.dll_WSASocketW
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1402bd370
cmp word [rbx], 0
je 0x1402bd3e6
movups xmm0, xmmword [rbx + 4]
mov eax, dword [rbx + 0x14]
mov edx, dword [rbx + 0x18]
movzx ecx, word [rbx + 0x1c]
mov r8d, 0x1c
mov r9w, 0x17
jmp 0x1402bd3fb
call sub.ws2_32.dll_WSAGetLastError
cmp eax, 0x2739
je 0x1402bd38a
mov r14d, eax
cmp eax, 0x2726
jne 0x1402bd466
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
mov ecx, ebp
mov edx, 2
xor r8d, r8d
xor r9d, r9d
call sub.ws2_32.dll_WSASocketW
cmp rax, 0xffffffffffffffff
je 0x1402bd45e
mov rdi, rax
mov rcx, rax
mov edx, 1
xor r8d, r8d
call sub.kernel32.dll_SetHandleInformation
test eax, eax
jne 0x1402bd348
call sub.kernel32.dll_GetLastError
mov r14d, eax
mov rcx, rdi
call fcn.1403028b4
jmp 0x1402bd466
mov eax, dword [rbx + 2]
movzx ecx, word [rbx + 6]
mov r8d, 0x10
mov r9w, 2
xorps xmm0, xmm0
rol cx, 8
mov word [rsp + 0x34], r9w
mov word [rsp + 0x36], cx
mov dword [rsp + 0x38], eax
movups xmmword [rsp + 0x3c], xmm0
mov dword [rsp + 0x4c], edx
lea rdx, [rsp + 0x34]
mov rcx, rdi
call sub.ws2_32.dll_bind
cmp eax, 0xffffffff
je 0x1402bd439
mov qword [rsi + 8], rdi
mov qword [rsi], 0
jmp 0x1402bd2f0
call sub.ws2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
mov rcx, rdi
call fcn.1403028b4
jmp 0x1402bd2f0
call sub.ws2_32.dll_WSAGetLastError
mov r14d, eax
shl r14, 0x20
or r14, 2
mov qword [rsi + 8], r14
jmp 0x1402bd2e9
call fcn.1402b5f40
jmp 0x1402bd30c
Function at 0x1402bd4d0
Capabilities:
Generate random numbers via winapi
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x30
mov ecx, dword [0x140305918]
test ecx, ecx
je 0x1402bd4fd
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x1402bd516
cmp qword [rax + 8], 0
je 0x1402bd516
add rax, 0x10
add rsp, 0x30
pop rsi
ret
lea rcx, [0x140305900]
call fcn.14028f0b0
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
ja 0x1402bd4ec
mov ecx, dword [0x140305918]
test ecx, ecx
je 0x1402bd5fd
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x1402bd61a
mov rsi, rax
test rax, rax
jne 0x1402bd5ab
movzx eax, byte [0x1403f6a90]
mov rcx, qword [0x1403f6548]
test rcx, rcx
jne 0x1402bd568
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1402bd635
mov rcx, rax
mov qword [0x1403f6548], rax
mov r8d, 0x20
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x1402bd635
mov rsi, rax
lea rax, [0x140305900]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x140305918]
test ecx, ecx
je 0x1402bd622
dec ecx
mov rdx, rsi
call sub.kernel32.dll_TlsSetValue
xorps xmm0, xmm0
movaps xmmword [rsp + 0x20], xmm0
lea rdx, [rsp + 0x20]
xor ecx, ecx
mov r8d, 0x10
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
js 0x1402bd5db
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
jmp 0x1402bd5e3
call fcn.1402b79c0
mov rcx, rax
mov qword [rsi + 8], 1
lea rax, [rsi + 0x10]
mov qword [rsi + 0x10], rcx
mov qword [rsi + 0x18], rdx
add rsp, 0x30
pop rsi
ret
lea rcx, [0x140305900]
call fcn.14028f0b0
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jne 0x1402bd535
xor eax, eax
add rsp, 0x30
pop rsi
ret
lea rcx, [0x140305900]
call fcn.14028f0b0
mov ecx, eax
jmp 0x1402bd5a3
mov ecx, 8
mov edx, 0x20
call fcn.1400eb190
ud2
Function at 0x1402c1e90
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x40
mov rsi, rcx
mov ecx, dword [0x140305a80]
test ecx, ecx
je 0x1402c1ec1
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x1402c1eda
cmp qword [rax + 8], 0
je 0x1402c1eda
add rax, 0x10
jmp 0x1402c1f8e
lea rcx, [0x140305a68]
call fcn.14028f0b0
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
ja 0x1402c1eb1
mov ecx, dword [0x140305a80]
test ecx, ecx
je 0x1402c20e1
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x1402c1f95
mov rdi, rax
test rax, rax
jne 0x1402c1f6f
movzx eax, byte [0x1403f6a90]
mov rcx, qword [0x1403f6548]
test rcx, rcx
jne 0x1402c1f2c
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1402c212f
mov rcx, rax
mov qword [0x1403f6548], rax
mov r8d, 0x38
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x1402c212f
mov rdi, rax
lea rax, [0x140305a68]
mov qword [rdi], rax
mov qword [rdi + 8], 0
mov ecx, dword [0x140305a80]
test ecx, ecx
je 0x1402c211c
dec ecx
mov rdx, rdi
call sub.kernel32.dll_TlsSetValue
mov qword [rdi + 8], 1
lea rax, [rdi + 0x10]
xorps xmm0, xmm0
movups xmmword [rdi + 0x10], xmm0
movups xmmword [rdi + 0x20], xmm0
mov qword [rdi + 0x30], 0
mov qword [rax], 0
mov rax, qword [0x140305920]
cmp rax, 2
jne 0x1402c2088
lea rbx, [0x140305930]
mov rcx, rbx
call sub.kernel32.dll_AcquireSRWLockExclusive
mov rax, qword [0x1403f6a78]
shl rax, 1
test rax, rax
jne 0x1402c2092
xor edi, edi
movzx eax, byte [0x140305938]
test al, al
jne 0x1402c20ac
mov rbx, qword [rsi]
mov rsi, qword [0x140305950]
mov rcx, rsi
cmp rsi, qword [0x140305948]
jne 0x1402c1ffe
mov rcx, rsi
call fcn.1402c21a0
mov rcx, qword [0x140305950]
mov rax, qword [0x140305940]
mov qword [rax + rcx*8], rbx
inc rcx
mov qword [0x140305950], rcx
mov rcx, qword [rax + rsi*8]
test rsi, rsi
je 0x1402c2042
nop dword [rax]
lea r8, [rsi - 1]
mov rdx, r8
shr rdx, 1
mov r9, qword [rax + rdx*8]
cmp r9, rcx
jbe 0x1402c204f
mov qword [rax + rsi*8], r9
mov rsi, rdx
cmp r8, 1
ja 0x1402c2020
jmp 0x1402c2044
xor edx, edx
mov qword [rax + rdx*8], rcx
test dil, dil
jne 0x1402c2075
jmp 0x1402c205b
mov rdx, rsi
mov qword [rax + rdx*8], rcx
test dil, dil
jne 0x1402c2075
movabs rax, 0x7fffffffffffffff
mov rcx, qword [0x1403f6a78]
test rcx, rax
jne 0x1402c2103
lea rcx, [0x140305930]
add rsp, 0x40
pop rbx
pop rdi
pop rsi
jmp sub.kernel32.dll_ReleaseSRWLockExclusive
call fcn.1402c2140
jmp 0x1402c1fa6
call fcn.140294b10
mov edi, eax
xor dil, 1
movzx eax, byte [0x140305938]
test al, al
je 0x1402c1fd9
mov qword [rsp + 0x30], rbx
mov byte [rsp + 0x38], dil
lea rax, [0x1403aa898]
mov qword [rsp + 0x20], rax
lea rcx, str.called__Result::unwrap____on_an__Err__value
lea r9, [0x1403aa7c0]
lea r8, [rsp + 0x30]
mov edx, 0x2b
call fcn.14013bd80
ud2
lea rcx, [0x140305a68]
call fcn.14028f0b0
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jne 0x1402c1ef9
jmp 0x1402c1f95
call fcn.140294b10
test al, al
jne 0x1402c2075
mov byte [0x140305938], 1
jmp 0x1402c2075
lea rcx, [0x140305a68]
call fcn.14028f0b0
mov ecx, eax
jmp 0x1402c1f67
mov ecx, 8
mov edx, 0x38
call fcn.1400eb190
ud2