joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002564
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [0x140032a80]
call fcn.1400057e8
mov rsi, rax
or edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
xor ebp, ebp
mov rdx, rax
movzx r8d, word [rax]
test r8w, r8w
je 0x14000269b
mov rcx, qword [rsp + 0x30]
jmp 0x1400025b5
add rdx, 2
movzx r8d, word [rdx]
cmp r8w, 0x20
je 0x1400025ad
mov r11d, 1
cmp r8w, 0x22
jne 0x140002604
add rdx, 2
mov r9, rdx
movzx r8d, word [rdx]
test r8w, r8w
je 0x140002663
movzx eax, r8w
movzx r8d, ax
cmp ax, 0x22
je 0x1400025fe
add rdx, 2
movzx r8d, word [rdx]
movzx eax, r8w
test r8w, r8w
jne 0x1400025e2
test r8w, r8w
jmp 0x140002663
test r8w, r8w
je 0x140002673
mov r9, rdx
movzx r10d, r8w
cmp r8w, 0x20
je 0x14000265f
add rdx, 2
movzx r8d, word [rdx]
cmp r8w, 0x22
jne 0x140002655
add rdx, 2
movzx r8d, word [rdx]
test r8w, r8w
je 0x140002655
movzx eax, r8w
movzx r8d, ax
cmp ax, 0x22
je 0x140002655
add rdx, 2
movzx r8d, word [rdx]
movzx eax, r8w
test r8w, r8w
jne 0x140002639
movzx r10d, r8w
test r8w, r8w
jne 0x14000260d
test r10w, r10w
lea rax, [rdx + 2]
mov rcx, rdx
cmove rax, rdx
mov rdx, rax
jmp 0x140002679
mov r11d, ebp
mov r9, rbp
cmp dword [rsi], edi
jne 0x140002682
test rbx, rbx
jne 0x1400026a5
movzx r8d, word [rdx]
lea eax, [rdi + 1]
test r11d, r11d
cmove eax, edi
mov edi, eax
test r8w, r8w
jne 0x1400025b5
test rbx, rbx
jne 0x1400026b9
movsxd rax, edi
jmp 0x1400026be
test r9, r9
je 0x1400026b9
sub rcx, r9
mov rax, r9
sar rcx, 1
mov dword [rbx], ecx
inc dword [rsi]
jmp 0x1400026be
mov dword [rbx], ebp
mov rax, rdx
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x1400026d4
Capabilities:
Get thread local storage value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov ebx, ecx
xor ebp, ebp
mov rcx, qword [0x140032a80]
mov esi, edx
mov dword [rax + 8], ebp
call fcn.1400057e8
test ebx, ebx
js 0x140002703
mov dword [rax], ebx
lea rcx, [rsp + 0x30]
call fcn.140002564
mov edi, dword [rsp + 0x30]
mov edx, esi
mov ecx, edi
mov rbx, rax
call fcn.140006bb0
mov ecx, ebp
jmp 0x14000273f
test edi, edi
je 0x140002744
movzx edx, word [rbx]
cmp dx, 0x22
jne 0x140002732
inc ecx
jmp 0x140002739
mov word [rax], dx
add rax, 2
add rbx, 2
dec edi
cmp word [rbx], bp
jne 0x140002721
mov word [rax], bp
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
jmp fcn.140006c60
Function at 0x140002a3c
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x1c0
mov ebx, reloc.WS2_32.dll_recv
lea r8, [fcn.140002958]
mov edx, ebx
lea ecx, [rbx + 0x28]
call fcn.14000a0e8
xor r8d, r8d
mov qword [0x140032af0], rax
xor edx, edx
mov ecx, ebx
call fcn.140005880
xor ebx, ebx
mov qword [0x140032b00], rax
cmp word [0x140032ae8], bx
jne 0x140002b5f
mov ecx, 0x101
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea edi, [rbx + 1]
test eax, eax
jne 0x140002aa4
movzx eax, di
jmp 0x140002aa6
mov eax, ebx
lea rcx, str.ws2_32.dll
mov word [0x140032ae8], ax
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x140032af8], rax
test rax, rax
je 0x140002b5f
lea rdx, str.getaddrinfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140032af8]
lea rdx, str.freeaddrinfo
mov qword [0x140032ac8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140032af8]
lea rdx, str.getnameinfo
mov qword [0x140032ad0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140032af8]
lea rdx, str.WSAStringToAddressA
mov qword [0x140032ad8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x140032ac8], rbx
mov qword [0x140032ae0], rax
je 0x140002b5f
cmp qword [0x140032ad0], rbx
je 0x140002b5f
cmp qword [0x140032ad8], rbx
je 0x140002b5f
mov ecx, dword [0x140032aec]
test rax, rax
cmovne ecx, edi
mov dword [0x140032aec], ecx
mov rbx, qword [rsp + 0x1d0]
add rsp, 0x1c0
pop rdi
ret
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 [0x140032af0]
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 [0x140032af0]
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 [0x1400324f8]
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 [0x140032b00]
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 [0x1400324f8]
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 [0x1400324f8]
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 [0x1400324f8]
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 [0x140032b60], 0
jne 0x140003a9a
lea rcx, [0x140032b60]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x140003a86
movabs rax, 0x20c49ba5e353f7cf
lea rcx, [0x140032b68]
imul qword [0x140032b60]
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [0x140032b60], rdx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
cmp qword [0x140032b60], 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 [0x140032b68]
cqo
idiv qword [0x140032b60]
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 [0x140032b74], 0
jne 0x1400041d8
call fcn.140004140
mov ecx, dword [0x140032b70]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r11, rax
test rax, rax
jne 0x140004200
call fcn.140004140
mov ecx, dword [0x140032b70]
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 [0x140032b98]
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 [0x1400324f8]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140032b98]
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 [0x140032b98]
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 [0x140032cc0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x140005869
mov r8, qword [0x140032cb8]
lea edx, [rax + 8]
mov rcx, qword [0x1400324f8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140032cc0]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140032cb0]
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 [0x140032cb8]
test rbx, rbx
jne 0x1400058f0
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, qword [0x1400324f8]
lea edx, [rbx + 8]
movsxd rdi, edi
mov r8, rdi
mov dword [0x140032cc0], eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140032cc0]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140032cb8]
jmp 0x1400058f3
movsxd rdi, edi
mov ecx, dword [0x140032cc0]
lea rax, [rdi + rbx]
mov qword [0x140032cb8], rax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, qword [0x140032cb8]
mov edx, 8
mov rcx, qword [0x1400324f8]
mov r8, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [0x140032cc0]
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, [0x140032cb0]
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 [0x140031a44]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, qword [0x140032cd8]
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 [0x140031a44]
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 [0x140031a44]
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 [0x140032cd8], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140031a44], eax
add rsp, 0x28
jmp fcn.14000be40