joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002b8c
Capabilities:
Set socket configuration

Disassembly:
xor r9d, r9d
jmp 0x140002b94
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], r9
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov r12d, edx
mov rbx, rcx
mov rdx, rcx
xor edi, edi
mov rcx, qword [0x140032b70]
mov r14d, r8d
mov ebp, edi
call fcn.140009ec8
mov rsi, rax
test rax, rax
je 0x140002ce0
cmp r12d, 0xffff
ja 0x140002cc9
mov r15d, r14d
mov r13d, r14d
btr r15d, 0x1c
and r13d, 0x10000000
mov eax, r13d
cmove r15d, r14d
neg eax
lea eax, [rdi + 1]
sbb ecx, ecx
and ecx, 0x15
add ecx, 2
test r15d, r15d
cmove r15d, eax
xor r8d, r8d
mov edx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140002cc9
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], 1
mov edx, 0x8004667e
mov rcx, rax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jle 0x140002cc0
mov rax, qword [rsp + 0x88]
lea r8, [rsi + 8]
mov ecx, edi
mov dword [rsp + 0x28], r12d
test r13d, r13d
mov qword [rsp + 0x20], rax
mov r9, r8
mov rdx, r14
setne cl
call fcn.14000a66c
test eax, eax
je 0x140002cc0
lea r12d, [rdi + 1]
cmp r15d, r12d
jne 0x140002c9c
lea edx, [rdi + 0x64]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
cmove ebp, r12d
test rbp, rbp
je 0x140002cc0
test r13d, r13d
mov qword [rsi], r14
mov word [rsi + 0x24], r15w
mov rbp, rsi
setne dil
cmp rbx, 0xffffffffffffffff
mov word [rsi + 0x26], di
cmove rbx, rsi
mov qword [rsi + 0x28], rbx
jmp 0x140002ce0
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [0x140032b70]
cmp rbx, 0xffffffffffffffff
cmove rbx, rsi
mov rdx, rbx
call fcn.14000a07c
lea r11, [rsp + 0x40]
mov rax, rbp
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140002ed4
Capabilities:
Get socket status
Receive data
Receive data on socket
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x940]
sub rsp, 0xa40
xor ebx, ebx
mov rdi, rcx
cmp dword [rcx], 1
jne 0x140002f80
movsxd rcx, dword [rcx + 8]
lea rax, [rbp + 0x958]
mov rdi, rcx
mov qword [rsp + 0x38], rcx
inc ecx
mov dword [rsp + 0x30], 1
xor r9d, r9d
mov qword [rbp + 0x958], rbx
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x140002f79
je 0x140002fe9
lea rdx, [rsp + 0x30]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140002fe9
lea r8, [rbp + 0x950]
mov edx, 0x4004667f
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x140002f79
cmp dword [rbp + 0x950], ebx
lea ebx, [rax + 2]
jne 0x140002fe9
mov ebx, 4
jmp 0x140002fe9
mov rcx, qword [rcx + 0x30]
lea rdx, [rbp + 0x140]
mov qword [rsp + 0x28], rbx
xor r9d, r9d
mov r8d, 0x800
mov qword [rsp + 0x20], rbx
call qword [sym.imp.WS2_32.dll_recvfrom]
mov dword [rbp + 0x950], eax
test eax, eax
jle 0x140002fe9
mov rcx, qword [0x140032568]
xor edx, edx
movsxd r8, eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
movsxd rcx, dword [rbp + 0x950]
lea rdx, [rbp + 0x140]
mov dword [rdi + 0x40], ecx
mov r8, rcx
mov rcx, rax
mov qword [rdi + 0x38], rax
mov qword [rdi + 0x48], rax
call fcn.140006d60
mov ebx, 2
lea r11, [rsp + 0xa40]
mov rax, rbx
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
Function at 0x1400030dc
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x760]
sub rsp, 0x860
mov rdi, rcx
xor esi, esi
mov rcx, qword [0x140032b80]
mov r15d, esi
call fcn.1400057e8
mov rcx, qword [rdi]
lea r12d, [rsi + 1]
mov r14, rax
cmp word [rdi + 0x24], r12w
jne 0x140003165
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WS2_32.dll_accept]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400032e3
lea rcx, [rdi + 0x30]
lea edx, [rsi + 0x28]
call fcn.140006910
mov rcx, rax
mov r15d, r12d
mov dword [rax], r12d
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rdi
mov rax, qword [rdi + 0x28]
mov qword [r14 + 8], rax
mov qword [r14], rcx
jmp 0x1400032e3
xor r9d, r9d
lea rdx, [rsp + 0x60]
mov ebx, reloc.WS2_32.dll_recv
mov r8d, 0x800
cmp word [rdi + 0x26], si
je 0x14000319b
lea rax, [rbp + 0x7a0]
mov dword [rbp + 0x7a0], 0x1c
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
jmp 0x1400031b2
lea rax, [rbp + 0x7a8]
mov dword [rbp + 0x7a8], ebx
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
mov r12d, eax
test eax, eax
jle 0x1400032e3
mov rsi, qword [rdi + 0x30]
mov r15d, 2
xor eax, eax
test rsi, rsi
je 0x140003216
lea rcx, [rsi + 0x14]
cmp word [rdi + 0x26], ax
je 0x1400031f1
movsxd r8, dword [rbp + 0x7a0]
lea rdx, [rsp + 0x40]
jmp 0x1400031fd
movsxd r8, dword [rbp + 0x7a8]
lea rdx, [rsp + 0x30]
call fcn.14000a960
test eax, eax
je 0x14000320b
mov rsi, qword [rsi]
jmp 0x1400031d2
mov rax, rsi
add rbx, rax
test rsi, rsi
jne 0x140003265
mov edx, 0x60
lea rcx, [rdi + 0x30]
call fcn.140006910
mov rbx, rax
xor r8d, r8d
mov dword [rax], r15d
mov qword [rax + 0x28], rdi
mov al, byte [rdi + 0x26]
mov byte [rbx + 0x20], al
cmp word [rdi + 0x26], r8w
je 0x14000325b
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rbx + 4], xmm0
movsd xmm1, qword [rsp + 0x50]
movsd qword [rbx + 0x14], xmm1
mov eax, dword [rsp + 0x58]
mov dword [rbx + 0x1c], eax
jmp 0x140003265
movups xmm0, xmmword [rsp + 0x30]
movdqu xmmword [rbx + 4], xmm0
mov r8, qword [rbx + 0x38]
movsxd rsi, r12d
test r8, r8
jne 0x1400032a1
mov rcx, qword [0x140032568]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r8, rsi
mov dword [rbx + 0x40], r12d
mov rcx, rax
mov qword [rbx + 0x38], rax
lea rdx, [rsp + 0x60]
mov qword [rbx + 0x48], rax
call fcn.140006d60
jmp 0x1400032d8
mov ecx, dword [rbx + 0x40]
mov edx, 8
add ecx, r12d
movsxd r9, ecx
mov rcx, qword [0x140032568]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movsxd rcx, dword [rbx + 0x40]
lea rdx, [rsp + 0x60]
add rcx, rax
mov qword [rbx + 0x38], rax
mov r8, rsi
call fcn.140006d60
add dword [rbx + 0x40], r12d
mov qword [r14], rbx
mov rcx, qword [rdi + 0x28]
mov qword [r14 + 8], rcx
mov rbx, qword [rsp + 0x8b0]
mov eax, r15d
add rsp, 0x860
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140003808
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
xor esi, esi
mov rax, rdx
cmp dword [rcx], 1
mov rdi, rcx
jne 0x140003835
mov rcx, qword [rcx + 8]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
mov esi, eax
jmp 0x14000387d
cmp qword [rcx + 0x38], rsi
je 0x14000387d
cmp r8d, dword [rcx + 0x40]
mov esi, r8d
mov rdx, qword [rcx + 0x48]
cmovg esi, dword [rcx + 0x40]
mov rcx, rax
movsxd rbx, esi
mov r8, rbx
call fcn.140006d60
sub dword [rdi + 0x40], esi
add qword [rdi + 0x48], rbx
cmp dword [rdi + 0x40], 0
jne 0x14000387d
mov r8, qword [rdi + 0x38]
xor edx, edx
mov rcx, qword [0x140032568]
call qword [sym.imp.KERNEL32.dll_HeapFree]
and qword [rdi + 0x38], 0
mov rbx, qword [rsp + 0x30]
movsxd rax, esi
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

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

Disassembly:
sub rsp, 0x38
cmp dword [rcx], 1
mov r10, rdx
jne 0x1400038ab
mov rcx, qword [rcx + 8]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
jmp 0x1400038e3
mov al, byte [rcx + 0x20]
lea r9, [rcx + 4]
neg al
mov rax, qword [rcx + 0x28]
sbb edx, edx
and edx, 0xc
add edx, 0x10
test rax, rax
je 0x1400038ca
mov rcx, qword [rax]
jmp 0x1400038ce
mov rcx, qword [rcx + 0x30]
mov dword [rsp + 0x28], edx
mov rdx, r10
mov qword [rsp + 0x20], r9
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_sendto]
cdqe
add rsp, 0x38
ret

Function at 0x140003a34
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
sub rsp, 0x28
cmp qword [0x140032be0], 0
jne 0x140003a9a
lea rcx, [0x140032be0]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x140003a86
movabs rax, 0x20c49ba5e353f7cf
lea rcx, [0x140032be8]
imul qword [0x140032be0]
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [0x140032be0], rdx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
cmp qword [0x140032be0], 0
jne 0x140003a9a
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, eax
jmp 0x140003ac0
and qword [rsp + 0x30], 0
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x30]
sub rax, qword [0x140032be8]
cqo
idiv qword [0x140032be0]
add rsp, 0x28
ret
Function at 0x1400041b0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
cmp rdx, rcx
mov rdi, rcx
mov rbx, rcx
cmovbe rdi, rdx
sub rbx, rdi
cmp dword [0x140032bf4], 0
jne 0x1400041d8
call fcn.140004140
mov ecx, dword [0x140032bf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r11, rax
test rax, rax
jne 0x140004200
call fcn.140004140
mov ecx, dword [0x140032bf0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r11, rax
movsxd r9, dword [r11 + 4]
mov eax, reloc.WS2_32.dll_recv
movsxd r10, dword [r11]
mov r8d, dword [r11 + r10*4 + 0x4c]
mov edx, dword [r11 + r10*4 + 8]
ror r8d, 0xd
add r8d, dword [r11 + r9*4 + 0x4c]
ror edx, 5
add edx, dword [r11 + r9*4 + 8]
mov dword [r11 + r10*4 + 8], r8d
mov dword [r11 + r10*4 + 0x4c], edx
sub r10d, 1
cmovs r10d, eax
sub r9d, 1
mov dword [r11], r10d
cmovs r9d, eax
mov dword [r11 + 4], r9d
mov r9d, r8d
mov r8d, edx
add rbx, 1
je 0x140004288
mov rdx, rbx
mov ecx, ebx
shr rdx, 0x20
mov rax, rdx
imul rax, r8
imul rcx, r9
imul rdx, r9
shr rax, 0x20
shr rcx, 0x20
add rax, rcx
add rax, rdx
add rax, rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rbx, qword [rsp + 0x30]
shl r9, 0x20
and r9, r8
lea rax, [rdi + r9]
add rsp, 0x20
pop rdi
ret

Function at 0x140004508
Capabilities:
Create directory

Disassembly:
push rbx
sub rsp, 0x230
xor ebx, ebx
test rcx, rcx
je 0x140004592
mov rdx, rcx
mov r8d, 0x104
lea rcx, [rsp + 0x20]
call fcn.140007488
lea rcx, [rsp + 0x20]
mov word [rsp + 0x228], bx
call fcn.14000a1b8
lea rcx, [rsp + 0x20]
lea rcx, [rcx + rax*2]
lea rax, [rsp + 0x20]
cmp rcx, rax
jbe 0x14000457e
lea rdx, [rcx - 2]
movzx eax, word [rdx]
sub ax, 0x20
cmp ax, 0x3c
ja 0x14000457e
movabs r8, 0x1000000000008001
bt r8, rax
jae 0x14000457e
lea rax, [rsp + 0x20]
mov rcx, rdx
cmp rdx, rax
ja 0x140004550
mov word [rcx], bx
xor edx, edx
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cdqe
jmp 0x140004594
xor eax, eax
add rsp, 0x230
pop rbx
ret

Function at 0x1400045a0
Capabilities:
Delete file
Set file attributes

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
je 0x1400045cb
test dl, 2
je 0x1400045be
mov edx, 0x80
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cdqe
jmp 0x1400045cd
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x140004a60
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
xor eax, eax
mov rbx, rcx
mov dword [rsp + 0x40], eax
cmp dword [rcx + 0x1c], eax
jne 0x140004aa4
mov r8d, dword [rcx + 0x10]
lea r9, [rsp + 0x40]
sub r8d, dword [rcx + 0x14]
mov rdx, qword [rcx + 8]
mov rcx, qword [rcx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x14], eax
movsxd rax, dword [rsp + 0x40]
add rsp, 0x30
pop rbx
ret
cdqe
add rsp, 0x30
pop rbx
ret
Function at 0x140004ab0
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0x30
mov rdi, rcx
cmp rcx, 0xffffffffffffffff
mov rcx, qword [0x140032c18]
jne 0x140004ad0
add rsp, 0x30
pop rdi
jmp fcn.14000a634
mov rdx, rdi
mov qword [rsp + 0x48], rbx
call fcn.140009f98
mov rbx, rax
test rax, rax
je 0x140004b45
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x140004b2d
xor eax, eax
mov dword [rsp + 0x40], eax
cmp dword [rbx + 0x1c], eax
jne 0x140004b1a
mov r8d, dword [rbx + 0x10]
lea r9, [rsp + 0x40]
sub r8d, dword [rbx + 0x14]
mov rcx, qword [rbx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x14], eax
mov r8, qword [rbx + 8]
xor edx, edx
mov rcx, qword [0x140032568]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140032c18]
mov rdx, rdi
call fcn.14000a07c
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret

Function at 0x140005040
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
xor ebx, ebx
mov edi, r8d
mov dword [rsp + 0x48], ebx
mov rsi, rdx
test rdx, rdx
je 0x1400050b8
test r8d, r8d
je 0x1400050b8
mov rdx, rcx
mov rcx, qword [0x140032c18]
call fcn.140009f98
test rax, rax
je 0x1400050b4
mov r8d, edi
mov rdx, rsi
cmp qword [rax + 8], rbx
je 0x1400050a1
mov rcx, rax
call fcn.14000af50
mov ebx, eax
cdqe
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
mov ecx, dword [0x140032d40]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x140005869
mov r8, qword [0x140032d38]
lea edx, [rax + 8]
mov rcx, qword [0x140032568]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140032d40]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140032d30]
jmp 0x140005855
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x140005852
mov rcx, qword [rbx + 0x10]
add rcx, rdi
call rdx
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140005840
mov rdx, rdi
lea rcx, [0x140005984]
call fcn.14000b694
mov rbx, qword [rsp + 0x30]
lea rax, [rdi + rsi]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140005880
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, ecx
mov rbp, r8
mov rsi, rdx
and ecx, 7
je 0x1400058aa
mov eax, 8
sub eax, ecx
add edi, eax
mov rbx, qword [0x140032d38]
test rbx, rbx
jne 0x1400058f0
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, qword [0x140032568]
lea edx, [rbx + 8]
movsxd rdi, edi
mov r8, rdi
mov dword [0x140032d40], eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140032d40]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140032d38]
jmp 0x1400058f3
movsxd rdi, edi
mov ecx, dword [0x140032d40]
lea rax, [rdi + rbx]
mov qword [0x140032d38], rax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, qword [0x140032d38]
mov edx, 8
mov rcx, qword [0x140032568]
mov r8, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [0x140032d40]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test rsi, rsi
jne 0x140005942
test rbp, rbp
je 0x140005969
mov edx, 0x28
lea rcx, [0x140032d30]
call fcn.140006910
mov qword [rax], rbx
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rbp
test rsi, rsi
je 0x140005969
lea rcx, [rdi + rbx]
call rsi
mov rbp, qword [rsp + 0x38]
mov rax, rbx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140006000
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov r14, rcx
movsxd rbx, edx
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, qword [0x140032d58]
xor edx, edx
mov rsi, rax
mov rax, qword [r14]
mov r8d, dword [rsi + 0x10]
sub r8d, ebx
movsxd rdi, r8d
lea r9, [rdi + 0xa]
test rax, rax
jne 0x140006054
mov r8, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x14000605d
mov r8, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [r14], rax
mov rcx, rax
mov rdx, qword [rsi]
shr rdi, 1
add rdx, rbx
mov r8d, edi
call fcn.140009e90
mov rdi, qword [rsp + 0x40]
mov qword [rsi + 0x10], rbx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret

Function at 0x1400060d0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
sub rsp, 0x28
mov ecx, dword [0x140031ab4]
cmp ecx, 0xffffffff
jne 0x1400060e6
call fcn.1400062d0
jmp 0x1400060f6
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x140006115
call fcn.14000be40
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, rax
lea rcx, [0x140006090]
add rsp, 0x28
jmp fcn.14000b694
add rsp, 0x28
ret

Function at 0x1400062d0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
sub rsp, 0x28
xor r8d, r8d
mov edx, 0x1000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x140032d58], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140031ab4], eax
add rsp, 0x28
jmp fcn.14000be40
Function at 0x140006330
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rax, qword [rax]
add rsp, 0x28
ret

Function at 0x140006370
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140031ab4]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rbx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x1400063b0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add qword [rax + 0x10], 2
add rsp, 0x28
ret

Function at 0x1400063d0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rax + 0x10], rbx
mov rax, qword [rax]
add rax, rbx
add rsp, 0x20
pop rbx
ret

Function at 0x140006bb0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
movsxd rbp, ecx
mov esi, edx
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
cmp esi, 0xffffffff
jne 0x140006be0
mov esi, dword [rax + 0x10]
mov eax, dword [rax + 0x10]
mov r8, qword [rbx + 8]
lea edx, [rax + rbp*2]
movsxd rax, edx
lea rcx, [r8 - 4]
cmp rax, rcx
jl 0x140006c01
lea eax, [rdx + 0x4000]
movsxd r9, eax
jmp 0x140006c13
mov eax, 0x100000
cmp r8, rax
jle 0x140006c30
cmp edx, eax
cmovl edx, eax
mov r9d, edx
mov r8, qword [rbx]
xor edx, edx
mov qword [rbx + 8], r9
add r9, 0xa
mov rcx, qword [0x140032d58]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [rbx], rax
mov rax, qword [rbx]
movsxd rdx, esi
mov rsi, qword [rsp + 0x40]
add rax, rdx
lea rcx, [rdx + rbp*2]
mov rbp, qword [rsp + 0x38]
mov qword [rbx + 0x10], rcx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x140006c60
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, ecx
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ecx, [rbx + rbx]
movsxd rdx, ecx
sub qword [rax + 0x10], rdx
add rsp, 0x20
pop rbx
ret

Function at 0x140006c90
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, qword [rax]
cmp rbx, rcx
jb 0x140006cc4
mov rdx, qword [rax + 0x10]
add rdx, rcx
cmp rbx, rdx
ja 0x140006cc4
sub ebx, ecx
lea eax, [rbx + 1]
add rsp, 0x20
pop rbx
ret
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x140006cd0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
dec rbx
mov rax, qword [rax]
add rax, rbx
add rsp, 0x20
pop rbx
ret
Function at 0x140006d00
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
xor edx, edx
mov qword [rax + 0x10], rbx
mov rax, qword [rax]
mov word [rbx + rax], dx
add rsp, 0x20
pop rbx
ret

Function at 0x140009e60
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140031ab4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add rbx, qword [rax]
mov rax, rbx
add rsp, 0x20
pop rbx
ret

Function at 0x14000aae8
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov dword [rax + 0x10], edx
push rdi
sub rsp, 0x20
xor ebx, ebx
movsxd rdi, ecx
mov rsi, r8
cmp edx, 0xffffffff
jne 0x14000ab1e
lea r8, [rax + 0x10]
mov edx, 0x4004667f
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [rsp + 0x38]
test edx, edx
je 0x14000ab61
mov r8d, edx
mov r9d, 2
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x14000ab55
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xffffd8bb
and eax, 0xfffffffa
neg eax
sbb ebx, ebx
not ebx
and ebx, 0xfffffffe
jmp 0x14000ab61
test eax, eax
mov ecx, 0xfffffffe
cmove eax, ecx
mov ebx, eax
mov rsi, qword [rsp + 0x40]
movsxd rax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x14000af50
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push r14
sub rsp, 0x38
xor ebp, ebp
movsxd rbx, r8d
mov r14, rdx
mov rsi, rcx
mov dword [rsp + 0x60], ebp
cmp dword [rcx + 0x24], ebp
jne 0x14000b04a
cmp dword [rcx + 0x1c], 1
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x30], r15
jne 0x14000afab
mov eax, dword [rcx + 0x14]
lea r9d, [rbp + 1]
mov rcx, qword [rcx]
lea r8, [rsp + 0x7c]
neg eax
cdqe
mov edx, eax
mov qword [rsp + 0x78], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [rsi + 0x10]
mov dword [rsi + 0x14], eax
mov dword [rsi + 0x1c], ebp
mov ecx, dword [rsi + 0x14]
cmp ecx, ebx
jle 0x14000b00c
mov eax, dword [rsi + 0x10]
mov edx, ebx
sub eax, ecx
movsxd rcx, eax
add rcx, qword [rsi + 8]
sub edx, 1
je 0x14000b004
sub edx, 1
je 0x14000affb
cmp edx, 2
je 0x14000aff4
mov r8, rbx
mov rdx, r14
call fcn.140006d60
sub dword [rsi + 0x14], ebx
mov rax, rbx
mov rdi, qword [rsp + 0x68]
mov r15, qword [rsp + 0x30]
add rsp, 0x38
pop r14
pop rsi
pop rbp
pop rbx
ret
mov eax, dword [r14]
mov dword [rcx], eax
jmp 0x14000afda
movzx eax, word [r14]
mov word [rcx], ax
jmp 0x14000afda
movzx eax, byte [r14]
mov byte [rcx], al
jmp 0x14000afda
mov rcx, rsi
call fcn.140004a60
mov eax, dword [rsi + 0x10]
mov rdx, r14
cmp ebx, eax
jl 0x14000b03b
mov rcx, qword [rsi]
lea r9, [rsp + 0x60]
mov r8d, ebx
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x60]
jmp 0x14000afe0
sub eax, dword [rsi + 0x14]
mov r8, rbx
movsxd rcx, eax
add rcx, qword [rsi + 8]
jmp 0x14000afd5
movsxd rax, ebp
add rsp, 0x38
pop r14
pop rsi
pop rbp
pop rbx
ret