joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001a3c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
movsxd r15, dword [rcx + 0x3c]
mov r9, rcx
mov rbp, rdx
mov r8d, dword [r15 + rcx + 0x88]
add r8, rcx
mov esi, dword [r8 + 0x1c]
mov r11d, dword [r8 + 0x20]
add rsi, rcx
mov r14d, dword [r8 + 0x24]
add r11, rcx
add r14, rcx
xor ecx, ecx
cmp rdx, 0x10000
jae 0x140001ab0
mov r10d, dword [r8 + 0x10]
movzx edx, bp
cmp edx, r10d
jb 0x140001ba9
mov ecx, dword [r8 + 0x14]
add ecx, r10d
cmp edx, ecx
jae 0x140001ba9
sub edx, r10d
mov ecx, dword [rsi + rdx*4]
jmp 0x140001af1
xor eax, eax
cmp dword [r8 + 0x18], eax
jbe 0x140001af4
mov r10d, dword [r11]
mov rdx, rbp
add r10, r9
sub r10, rbp
movzx ebx, byte [rdx]
movzx edi, byte [rdx + r10]
sub ebx, edi
jne 0x140001ad7
inc rdx
test edi, edi
jne 0x140001ac4
test ebx, ebx
je 0x140001ae9
inc eax
add r11, 4
cmp eax, dword [r8 + 0x18]
jb 0x140001ab8
jmp 0x140001af4
movzx ecx, word [r14 + rax*2]
mov ecx, dword [rsi + rcx*4]
add rcx, r9
cmp rcx, r8
jb 0x140001b8d
mov eax, dword [r15 + r9 + 0x8c]
lea rdx, [rax + rax*4]
lea rax, [r8 + rdx*8]
cmp rcx, rax
jae 0x140001b8d
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov rbx, rax
test rax, rax
je 0x140001ba9
mov edx, 0x2e
mov rcx, rax
call fcn.1400021a8
mov rdi, rax
mov byte [rax], 0
mov rax, qword [0x140008068]
test rax, rax
jne 0x140001b69
lea rcx, str.KERNEL32.DLL
call fcn.1400019d8
mov rcx, rax
lea rdx, [0x140005450]
call fcn.140001a3c
mov qword [0x140008068], rax
test rax, rax
je 0x140001ba9
mov rcx, rbx
call rax
mov rcx, rbx
mov rsi, rax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
test rsi, rsi
je 0x140001ba9
lea rdx, [rdi + 1]
mov rcx, rsi
call fcn.140001a3c
mov rcx, rax
mov rax, rcx
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
xor eax, eax
jmp 0x140001b90

Function at 0x140001bf4
Capabilities:
Encode data using xor

Disassembly:
xor r9d, r9d
mov r8, rcx
mov eax, 0x479a4d5e
cmp byte [rcx], r9b
je 0x140001c1e
movzx ecx, word [rcx]
mov edx, eax
ror edx, 8
inc r9d
add edx, ecx
mov ecx, r9d
add rcx, r8
xor eax, edx
cmp byte [rcx], 0
jne 0x140001c04
ret
Function at 0x140001c20
Capabilities:
Access peb ldr_data
Get ntdll base address
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
cmp dword [0x1400087c0], 0
jne 0x140001dbe
mov rax, qword gs:[0x60]
xor edx, edx
mov rcx, qword [rax + 0x18]
mov r8, qword [rcx + 0x10]
mov rax, qword [r8 + 0x30]
test rax, rax
je 0x140001de0
mov r9d, 0x20202020
mov rdi, rax
movsxd rax, dword [rax + 0x3c]
mov ecx, dword [rax + rdi + 0x88]
test ecx, ecx
je 0x140001ca3
lea rdx, [rdi + rcx]
mov ecx, dword [rdx + 0xc]
mov eax, dword [rcx + rdi]
or eax, r9d
cmp eax, 0x6c64746e
jne 0x140001ca3
mov eax, dword [rcx + rdi + 4]
or eax, r9d
cmp eax, 0x6c642e6c
je 0x140001caf
mov r8, qword [r8]
mov rax, qword [r8 + 0x30]
test rax, rax
jne 0x140001c6f
test rdx, rdx
je 0x140001de0
mov r15d, dword [rdx + 0x1c]
mov r14d, dword [rdx + 0x20]
add r15, rdi
mov r12d, dword [rdx + 0x24]
add r14, rdi
mov ebp, dword [rdx + 0x18]
add r12, rdi
xor esi, esi
lea eax, [rbp - 1]
mov ecx, dword [r14 + rax*4]
mov ebp, eax
add rcx, rdi
mov r13d, eax
mov eax, 0x775a
cmp word [rcx], ax
jne 0x140001d27
mov ebx, esi
add rbx, rbx
call fcn.140001bf4
lea rcx, [0x1400087c0]
inc esi
mov dword [rcx + rbx*8 + 8], eax
movzx eax, word [r12 + r13*2]
lea r13, [0x1400087c0]
mov eax, dword [r15 + rax*4]
and qword [r13 + rbx*8 + 0x10], 0
mov dword [r13 + rbx*8 + 0xc], eax
cmp esi, 0x1f4
je 0x140001d32
jmp 0x140001d2e
lea r13, [0x1400087c0]
test ebp, ebp
jne 0x140001cd2
xor r8d, r8d
mov dword [0x1400087c0], esi
lea eax, [rsi - 1]
test eax, eax
je 0x140001dbe
mov eax, esi
xor ecx, ecx
sub eax, r8d
cmp eax, 1
je 0x140001db3
lea r11d, [rcx + 1]
mov r10d, ecx
add r10, r10
mov r9d, r11d
add r9, r9
mov edi, dword [r13 + r10*8 + 0xc]
mov ebx, dword [r13 + r9*8 + 0xc]
cmp edi, ebx
jbe 0x140001da4
mov eax, dword [r13 + r9*8 + 8]
mov edx, dword [r13 + r10*8 + 8]
mov rcx, qword [r13 + r10*8 + 0x10]
mov dword [r13 + r10*8 + 8], eax
mov rax, qword [r13 + r9*8 + 0x10]
mov qword [r13 + r10*8 + 0x10], rax
mov dword [r13 + r10*8 + 0xc], ebx
mov dword [r13 + r9*8 + 8], edx
mov dword [r13 + r9*8 + 0xc], edi
mov qword [r13 + r9*8 + 0x10], rcx
mov esi, dword [0x1400087c0]
mov eax, esi
mov ecx, r11d
sub eax, r8d
dec eax
cmp r11d, eax
jb 0x140001d4e
inc r8d
lea eax, [rsi - 1]
cmp r8d, eax
jb 0x140001d42
mov eax, 1
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
xor eax, eax
jmp 0x140001dc3

Function at 0x140002b0c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002b56
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002b56
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002b56
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002b56
cmp dword [rcx + 0x84], 0xe
jbe 0x140002b56
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002b58
xor al, al
add rsp, 0x28
ret
Function at 0x140004ae0
Capabilities:
Check os version

Disassembly:
sub rsp, 0x38
call qword [sym.imp.KERNEL32.dll_GetVersion]
nop dword [rax + rax]
test eax, eax
js 0x140004b47
cmp al, 6
jb 0x140004b47
lea rcx, str.Kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
nop dword [rax + rax]
test rax, rax
je 0x140004b47
lea rdx, str.HeapSetInformation
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
nop dword [rax + rax]
test rax, rax
je 0x140004b47
movabs r10, 0x93b5969b18548370
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [0x14000c668]
add rsp, 0x38
ret
Function at 0x1400097bc
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0xb8
mov rax, qword [0x1400110e0]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov r8d, 0x40
lea rdx, [rsp + 0x20]
lea rcx, str._MSI_TEST
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop dword [rax + rax]
test eax, eax
je 0x140009824
movzx eax, word [rsp + 0x20]
lea rdx, [rsp + 0x22]
test eax, eax
je 0x140009822
mov ecx, dword [0x140011bb0]
and eax, 0x1f
bts ecx, eax
movzx eax, word [rdx]
lea rdx, [rdx + 2]
test eax, eax
jne 0x14000980b
mov dword [0x140011bb0], ecx
mov al, 1
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.1400014c0
add rsp, 0xb8
ret

Function at 0x14000a270
Capabilities:
Block operations on executable memory pages using arbitrary code guard
Terminate process

Disassembly:
mov rax, rsp
push rbx
sub rsp, 0x50
mov rbx, rcx
mov dword [rax - 0x18], 8
mov dword [rax - 0x14], 0x20
and dword [rax - 0x30], 0
movabs r10, 0xbb5017911ed12170
lea rcx, [rax - 0x18]
mov rax, qword [0x140010058]
call qword [0x14000c668]
and dword [rsp + 0x24], 0
mov dword [rsp + 0x24], 1
mov r8d, 4
lea rdx, [rsp + 0x24]
lea ecx, [r8 + 0xc]
call qword [sym.imp.KERNEL32.dll_SetProcessMitigationPolicy]
nop dword [rax + rax]
mov rcx, rbx
call fcn.140006258
mov ebx, eax
mov dword [rsp + 0x28], eax
jmp 0x14000a2e4
call fcn.14000af30
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x14000adb0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov rdi, rcx
cmp byte [0x1400120da], bl
jne 0x14000ae73
cmp byte [0x140011dc4], bl
je 0x14000ae73
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
je 0x14000ae84
lea rdx, str.GetSystemWow64DirectoryW
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
nop dword [rax + rax]
test rax, rax
jne 0x14000ae26
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
xor edi, edi
jmp 0x14000ae50
movabs r10, 0x9351969e78d6d070
mov edx, 0x105
mov rcx, rdi
call qword [0x14000c668]
mov edi, eax
test eax, eax
jne 0x14000ae52
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop dword [rax + rax]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov eax, edi
jmp 0x14000ae84
mov edx, 0x105
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140001000
Capabilities:
Execute command

Disassembly:
sub rsp, 0x28
mov r8, 0x40
xor rdx, rdx
movabs rcx, 0x140007974
call sub.msvcrt.dll_memset
xor rcx, rcx
call sub.KERNEL32.dll_GetModuleHandleW
mov qword [0x14000797c], rax
xor r8, r8
mov rdx, 0x1000
xor rcx, rcx
call sub.KERNEL32.dll_HeapCreate
mov qword [0x140007974], rax
call fcn.140003550
call fcn.1400021bc
call fcn.1400020b0
movabs rax, str.UDP_Client
mov rcx, rax
call fcn.140003024
and rax, rax
je 0x1400010e0
movabs rcx, 1
call fcn.1400030e8
movabs rdx, 0
movabs rcx, socket
call fcn.140003134
sub rsp, 8
sub rsp, 8
movabs rcx, str.mode_50_20
sub rsp, 0x20
call fcn.1400035c0
add rsp, 0x20
push rax
mov qword [rsp + 0x10], rax
pop rcx
sub rsp, 0x20
call sub.msvcrt.dll_system
add rsp, 0x28
push rax
mov rcx, qword [rsp + 8]
sub rsp, 0x20
call fcn.140003680
add rsp, 0x20
pop rax
add rsp, 8
jmp 0x1400010e5
jmp 0x1400011e3
sub rsp, 8
movabs rax, str.127.0.0.1
push rax
push 0x1388
push 2
push 0x2328
movabs rax, str.127.0.0.1
mov rcx, rax
pop rdx
pop r8
pop r9
sub rsp, 0x20
call fcn.1400024e0
add rsp, 0x30
mov qword [0x1400079ac], rax
movabs rax, str.UDP_Networking__type_q_enter__to_exit
mov rcx, rax
call qword [0x1400070d0]
push rcx
sub rsp, 0x28
call fcn.1400036b0
add rsp, 0x28
pop rcx
push rax
sub rsp, 8
push rcx
sub rsp, 0x28
call fcn.1400036b0
add rsp, 0x28
pop rcx
mov rcx, rax
sub rsp, 0x20
call qword [0x1400070d8]
add rsp, 0x28
lea rcx, [0x1400079a4]
pop rdx
call fcn.140003700
push qword [0x1400079a4]
movabs rcx, 0x14000703e
pop rdx
call fcn.1400037e0
or rax, rax
je 0x14000119c
jmp 0x1400011dc
mov rcx, qword [0x1400079a4]
call fcn.140002080
mov qword [0x140007994], rax
cmp qword [0x140007994], 0
je 0x1400011d7
push qword [0x140007994]
mov rax, qword [0x1400079a4]
mov rdx, rax
mov rcx, qword [0x1400079ac]
pop r8
call fcn.140002984
jmp 0x14000113c
call fcn.1400033ec
jmp 0x1400011e3
call fcn.140001205
call fcn.140003590
mov rcx, qword [0x140007974]
call sub.KERNEL32.dll_HeapDestroy
mov rcx, qword [0x140007984]
call sub.KERNEL32.dll_ExitProcess
Function at 0x1400021bc
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x1c0
mov ebx, send
lea r8, [0x1400020d0]
lea ecx, [rbx + 0x28]
mov edx, ebx
call fcn.140002de8
xor r8d, r8d
xor edx, edx
mov ecx, ebx
mov qword [0x1400079c0], rax
call fcn.140002b1c
xor ebx, ebx
cmp word [0x1400079b8], bx
mov qword [0x140007aa0], rax
jne 0x1400022df
lea rdx, [rsp + 0x20]
mov ecx, 0x101
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea edi, [rbx + 1]
mov word [0x1400079b8], di
test eax, eax
je 0x14000222d
mov word [0x1400079b8], bx
lea rcx, str.ws2_32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x1400079e8], rax
test rax, rax
je 0x1400022df
lea rdx, str.getaddrinfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400079e8]
lea rdx, str.freeaddrinfo
mov qword [0x1400079c8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400079e8]
lea rdx, str.getnameinfo
mov qword [0x1400079d0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400079e8]
lea rdx, str.WSAStringToAddressA
mov qword [0x1400079d8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x1400079c8], rbx
mov qword [0x1400079e0], rax
je 0x1400022df
cmp qword [0x1400079d0], rbx
je 0x1400022df
cmp qword [0x1400079d8], rbx
je 0x1400022df
mov ecx, dword [0x1400079bc]
test rax, rax
cmovne ecx, edi
mov dword [0x1400079bc], ecx
mov rbx, qword [rsp + 0x1d0]
add rsp, 0x1c0
pop rdi
ret
Function at 0x140002984
Capabilities:
Send data
Send data on socket

Disassembly:
sub rsp, 0x38
cmp dword [rcx], 1
mov r10d, r8d
mov r11, rdx
jne 0x1400029a2
mov rcx, qword [rcx + 8]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
jmp 0x1400029e0
cmp byte [rcx + 0x20], 0
lea r8, [rcx + 4]
mov edx, 0x1c
jne 0x1400029b6
mov edx, send
mov rax, qword [rcx + 0x28]
test rax, rax
je 0x1400029c4
mov rcx, qword [rax]
jmp 0x1400029c8
mov rcx, qword [rcx + 0x30]
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], r8
xor r9d, r9d
mov r8d, r10d
mov rdx, r11
call qword [sym.imp.WS2_32.dll_sendto]
cdqe
add rsp, 0x38
ret

Function at 0x140002b1c
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 ebx, ecx
mov rbp, r8
mov rdi, rdx
and ecx, 7
je 0x140002b46
mov eax, 8
sub eax, ecx
add ebx, eax
mov rcx, qword [0x1400079f8]
test rcx, rcx
jne 0x140002b89
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, qword [0x140007974]
movsxd r8, ebx
mov edx, 8
mov dword [0x140007a00], eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140007a00]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x1400079f8]
mov rsi, rcx
movsxd rax, ebx
add rcx, rax
mov qword [0x1400079f8], rcx
mov ecx, dword [0x140007a00]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, qword [0x1400079f8]
mov rcx, qword [0x140007974]
mov r8, rax
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [0x140007a00]
mov rdx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test rdi, rdi
jne 0x140002bdd
test rbp, rbp
je 0x140002c04
lea rcx, [0x1400079f0]
mov edx, 0x28
call fcn.140002fc8
mov qword [rax], rsi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rbp
test rdi, rdi
je 0x140002c04
lea rcx, [rbx + rsi]
call rdi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rax, rsi
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140003024
Capabilities:
Set console window title

Disassembly:
mov edx, 2
jmp 0x140003030
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
cmp dword [0x140007022], 0
mov edi, edx
mov rbx, rcx
jne 0x14000304e
call qword [sym.imp.KERNEL32.dll_AllocConsole]
mov ecx, 0xfffffff6
mov dword [reloc.WS2_32.dll_bind], edi
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff5
mov qword [0x140007ae0], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff4
mov qword [0x140007b00], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, qword [0x140007b00]
lea rdx, [0x140007b20]
mov qword [0x140007b40], rax
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov edi, 1
lea rcx, [0x14000300c]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test rbx, rbx
je 0x1400030c0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
lea rcx, [0x140007b60]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x140007ba0]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov rbx, qword [rsp + 0x30]
mov rax, rdi
add rsp, 0x20
pop rdi
ret
Function at 0x140003030
Capabilities:
Set console window title

Disassembly:
mov edx, 2
jmp 0x140003030
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
cmp dword [0x140007022], 0
mov edi, edx
mov rbx, rcx
jne 0x14000304e
call qword [sym.imp.KERNEL32.dll_AllocConsole]
mov ecx, 0xfffffff6
mov dword [reloc.WS2_32.dll_bind], edi
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff5
mov qword [0x140007ae0], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff4
mov qword [0x140007b00], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, qword [0x140007b00]
lea rdx, [0x140007b20]
mov qword [0x140007b40], rax
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov edi, 1
lea rcx, [0x14000300c]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test rbx, rbx
je 0x1400030c0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
lea rcx, [0x140007b60]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x140007ba0]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov rbx, qword [rsp + 0x30]
mov rax, rdi
add rsp, 0x20
pop rdi
ret

Function at 0x140003414
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
xor edi, edi
mov esi, r8d
mov rbx, rdx
mov rbp, rcx
test r9d, r9d
je 0x14000348b
mov rcx, qword [0x140007974]
add esi, 2
xor edx, edx
lea eax, [rsi + 1]
movsxd r8, eax
add r8, r8
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x14000348b
mov rcx, rax
test rbx, rbx
je 0x14000347c
mov rdx, rbx
call sub.msvcrt.dll_wcscpy
lea rdx, [0x140005388]
mov rcx, rdi
call sub.msvcrt.dll_wcscat
jmp 0x140003488
lea rdx, [0x140005388]
call sub.msvcrt.dll_wcscpy
mov rbx, rdi
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x58]
mov r8d, esi
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x140003515
mov eax, dword [reloc.WS2_32.dll_bind]
cmp eax, 2
je 0x1400034e0
cmp eax, 0x18
je 0x1400034d6
and qword [rsp + 0x20], 0
lea r8d, [rsi + rsi]
lea r9, [rsp + 0x58]
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140003515
mov rcx, rbx
call fcn.140004240
jmp 0x1400034e8
mov rcx, rbx
call fcn.140003ea0
mov rcx, rax
mov rbx, rax
call sub.msvcrt.dll_strlen
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x58]
mov r8, rax
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call fcn.140004230
test rdi, rdi
je 0x14000352c
mov rcx, qword [0x140007974]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x140003550
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r8d, r8d
mov edx, 0x1000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x140007be0], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400070e4], eax
call fcn.140003ad0
add rsp, 0x28
ret
Function at 0x1400036b0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x48
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov ecx, dword [0x1400070e4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsp + 0x30]
add rsp, 0x48
ret

Function at 0x140003700
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov ecx, dword [0x1400070e4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
movsxd rax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x10]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x40]
cmp qword [rax], 0
jne 0x140003766
movsxd rax, dword [rsp + 0x20]
add rax, 0xa
mov r8, rax
xor edx, edx
mov rcx, qword [0x140007be0]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
jmp 0x140003791
movsxd rax, dword [rsp + 0x20]
add rax, 0xa
mov r9, rax
mov rax, qword [rsp + 0x40]
mov r8, qword [rax]
xor edx, edx
mov rcx, qword [0x140007be0]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
movsxd rax, dword [rsp + 0x20]
xor edx, edx
mov ecx, 2
div rcx
movsxd rcx, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x28]
add rcx, qword [rdx]
mov r8d, eax
mov rdx, rcx
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
call fcn.140003ba0
movsxd rax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x10], rax
add rsp, 0x38
ret
Function at 0x140003950
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 0x10], edx
mov dword [rsp + 8], ecx
sub rsp, 0x48
mov ecx, dword [0x1400070e4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
cmp dword [rsp + 0x58], 0xffffffff
jne 0x140003980
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x10]
mov dword [rsp + 0x58], eax
movsxd rax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x10]
lea rax, [rcx + rax*2]
mov dword [rsp + 0x20], eax
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 8]
sub rcx, 4
cmp rax, rcx
jl 0x1400039f2
mov eax, dword [rsp + 0x20]
add eax, 0x4000
cdqe
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
add rax, 0xa
mov r9, rax
mov rax, qword [rsp + 0x28]
mov r8, qword [rax]
xor edx, edx
mov rcx, qword [0x140007be0]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, qword [rsp + 0x28]
mov qword [rcx], rax
jmp 0x140003a50
mov rax, qword [rsp + 0x28]
cmp qword [rax + 8], 0x100000
jle 0x140003a50
cmp dword [rsp + 0x20], 0x100000
jge 0x140003a13
mov dword [rsp + 0x20], 0x100000
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
add rax, 0xa
mov r9, rax
mov rax, qword [rsp + 0x28]
mov r8, qword [rax]
xor edx, edx
mov rcx, qword [0x140007be0]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, qword [rsp + 0x28]
mov qword [rcx], rax
movsxd rax, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x28]
add rax, qword [rcx]
mov qword [rsp + 0x30], rax
movsxd rax, dword [rsp + 0x58]
movsxd rcx, dword [rsp + 0x50]
lea rax, [rax + rcx*2]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x30]
add rsp, 0x48
ret

Function at 0x140003a90
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x1400070e4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov eax, dword [rsp + 0x40]
shl eax, 1
cdqe
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0x10]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
add rsp, 0x38
ret

Function at 0x140003ad0
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x38
mov r8d, 0x18
xor edx, edx
mov rcx, qword [0x140007be0]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x20], rax
mov r8d, send
xor edx, edx
mov rcx, qword [0x140007be0]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rcx, qword [rsp + 0x20]
mov qword [rcx], rax
mov rax, qword [rsp + 0x20]
mov qword [rax + 8], socket
mov rax, qword [rsp + 0x20]
mov qword [rax + 0x10], 0
mov rdx, qword [rsp + 0x20]
mov ecx, dword [0x1400070e4]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
add rsp, 0x38
ret