joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000dff0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push r12
push r13
push r15
sub rsp, 0x28
xor r15d, r15d
mov r13d, r9d
mov r12d, edx
mov ebp, r15d
cmp edx, 1
jl 0x14000e154
mov qword [rsp + 0x50], rbx
test rcx, rcx
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x20], r14
lea r14, [0x14009208c]
mov rbx, r14
mov edi, r15d
cmovne rbx, rcx
test r8, r8
cmovne r14, r8
mov rsi, rbx
movzx ecx, word [r14]
test cx, cx
je 0x14000e120
cmp word [r14 + 2], di
je 0x14000e120
or rax, 0xffffffffffffffff
nop
inc rax
cmp word [r14 + rax*2], di
jne 0x14000e060
movsxd r15, eax
nop dword [rax]
mov r8, r15
mov rdx, r14
mov rcx, rbx
call sub.msvcrt.dll_wcsncmp
test eax, eax
je 0x14000e08d
cmp word [rbx], bp
je 0x14000e08d
add rbx, 2
jmp 0x14000e070
inc edi
cmp edi, r12d
je 0x14000e0a2
cmp word [rbx], bp
je 0x14000e0ab
lea rbx, [rbx + r15*2]
mov rsi, rbx
jmp 0x14000e070
mov rbp, rbx
sub rbp, rsi
sar rbp, 1
xor r15d, r15d
mov rcx, rbx
call fcn.140019f20
mov r14, qword [rsp + 0x20]
mov edi, eax
test eax, eax
je 0x14000e0da
mov ecx, r13d
call fcn.14001a180
movsxd r8, ebp
mov rdx, rsi
mov rcx, rax
add r8, r8
call sub.msvcrt.dll_memmove
mov edx, r13d
mov ecx, ebp
call fcn.140019f90
test edi, edi
mov rdi, qword [rsp + 0x60]
mov rbx, rax
jne 0x14000e0fe
movsxd r8, ebp
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_wcsncpy
mov rsi, qword [rsp + 0x58]
movsxd rcx, ebp
mov word [rbx + rcx*2], r15w
mov rbx, qword [rsp + 0x50]
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
ret
movzx eax, word [rbx]
cmp ax, cx
je 0x14000e12d
test ax, ax
jne 0x14000e140
inc edi
cmp edi, edx
je 0x14000e146
test ax, ax
je 0x14000e0ae
lea rsi, [rbx + 2]
add rbx, 2
jmp 0x14000e120
mov rbp, rbx
sub rbp, rsi
sar rbp, 1
jmp 0x14000e0ae
mov ecx, r9d
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
jmp fcn.14001a1b0

Function at 0x14000e170
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov esi, 0x40
mov ecx, esi
call fcn.140019f90
mov rdx, rbx
mov rcx, rax
mov rdi, rax
call fcn.14007a68c
or rdx, 0xffffffffffffffff
inc rdx
cmp word [rdi + rdx*2], 0
jne 0x14000e1a0
sub esi, edx
mov ecx, esi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.14001a1f0
Function at 0x14000eb58
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x20
mov rdi, rcx
mov rcx, qword [0x1408a6ec0]
call fcn.140017ab4
xor ebp, ebp
or esi, 0xffffffff
mov r14, rax
mov ebx, ebp
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
movzx edx, word [rax]
test dx, dx
je 0x14000ec55
mov rcx, qword [rsp + 0x40]
mov r9w, 0x22
cmp dx, 0x20
jne 0x14000ebaf
add rax, 2
cmp word [rax], 0x20
je 0x14000eba5
movzx edx, word [rax]
mov r8d, 1
cmp dx, r9w
jne 0x14000ebed
add rax, 2
mov rbx, rax
movzx ecx, word [rax]
test cx, cx
je 0x14000ec2d
cmp cx, r9w
je 0x14000ebdf
add rax, 2
movzx ecx, word [rax]
test cx, cx
jne 0x14000ebcd
cmp word [rax], bp
je 0x14000ec2d
mov rcx, rax
add rax, 2
jmp 0x14000ec35
test dx, dx
je 0x14000ec32
mov rbx, rax
cmp dx, 0x20
je 0x14000ebdf
add rax, 2
cmp word [rax], r9w
jne 0x14000ec23
add rax, 2
movzx ecx, word [rax]
test cx, cx
je 0x14000ec2d
cmp cx, r9w
je 0x14000ec23
add rax, 2
movzx ecx, word [rax]
test cx, cx
jne 0x14000ec11
movzx edx, word [rax]
test dx, dx
jne 0x14000ebf5
jmp 0x14000ebdf
mov rcx, rax
jmp 0x14000ec35
mov r8d, ebp
cmp dword [r14], esi
jne 0x14000ec3f
test rdi, rdi
jne 0x14000ec5f
test r8d, r8d
je 0x14000ec46
inc esi
movzx edx, word [rax]
mov rbx, rbp
test dx, dx
jne 0x14000eb9f
test rdi, rdi
jne 0x14000ec74
movsxd rax, esi
jmp 0x14000ec76
test rbx, rbx
je 0x14000ec74
sub rcx, rbx
mov rax, rbx
sar rcx, 1
mov dword [rdi], ecx
inc dword [r14]
jmp 0x14000ec76
mov dword [rdi], ebp
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret

Function at 0x14000ed20
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
mov rcx, qword [0x1408a6ec0]
xor ebp, ebp
mov esi, edx
mov dword [rax + 8], ebp
call fcn.140017ab4
test ebx, ebx
js 0x14000ed4f
mov dword [rax], ebx
lea rcx, [rsp + 0x30]
call fcn.14000eb58
mov edi, dword [rsp + 0x30]
mov edx, esi
mov ecx, edi
mov rbx, rax
call fcn.140019f90
mov ecx, ebp
jmp 0x14000ed8b
test edi, edi
je 0x14000ed90
movzx edx, word [rbx]
cmp dx, 0x22
jne 0x14000ed7e
inc ecx
jmp 0x14000ed85
mov word [rax], dx
add rax, 2
add rbx, 2
dec edi
cmp word [rbx], bp
jne 0x14000ed6d
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.14001a1f0
Function at 0x14000f7fc
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
xor edi, edi
mov r13, r8
mov rbx, rdx
lea eax, [rdi + 1]
mov r15, rcx
mov r12d, edi
cmp dword [rcx + 0x10], eax
jne 0x14000f9b3
test rdx, rdx
je 0x14000f9b3
mov qword [rsp + 0x30], rdi
lea r8d, [rdi + 7]
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x14000f9b3
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, qword [0x1408a11f8]
xor edx, edx
mov eax, eax
mov r8d, 0x200000
mov qword [rsp + 0xc8], rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x14000f9aa
call fcn.140050d60
mov rsi, rax
test rax, rax
je 0x14000f998
lea rdx, [rsp + 0x40]
mov rcx, rbx
call sub.msvcrt.dll__wstat
mov edx, 0x1a4
mov rcx, rsi
call fcn.1400512c0
lea rdx, [rsp + 0x40]
mov rcx, rsi
call fcn.1400518b0
mov rax, qword [r15 + 0x38]
mov ecx, dword [rax + 0x10]
dec ecx
test ecx, 0xfffffffd
je 0x14000f8f6
mov rdx, r13
mov rcx, rsi
call fcn.140050830
jmp 0x14000f914
mov rcx, r13
call fcn.14007b110
mov rcx, rsi
mov rdx, rax
mov rbx, rax
call fcn.1400512b0
mov rcx, rbx
call fcn.14007b100
mov r13, qword [rsp + 0xc8]
mov rcx, rsi
mov rdx, r13
call fcn.140051310
mov edx, 0x8000
mov rcx, rsi
call fcn.140051100
mov rcx, qword [r15]
mov rdx, rsi
call fcn.140051a60
jmp 0x14000f95a
mov rcx, qword [r15]
movsxd r8, eax
mov rdx, r14
movsxd rbx, eax
call fcn.1400519e0
cmp rax, rbx
jne 0x14000f984
add r12, rbx
lea r9, [rsp + 0xb0]
mov r8d, 0x200000
mov rdx, r14
mov rcx, rbp
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0xb0]
test eax, eax
jg 0x14000f941
cmp r12, r13
mov eax, 1
mov rcx, rsi
cmove rdi, rax
call fcn.140050ad0
mov rcx, qword [0x1408a11f8]
mov r8, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rdi
mov rbx, qword [rsp + 0xb8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140010394
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x1c0
mov ebx, reloc.WS2_32.dll_recv
lea r8, [0x1400102a0]
lea ecx, [rbx + 0x28]
mov edx, ebx
call fcn.140017de0
xor r8d, r8d
xor edx, edx
mov ecx, ebx
mov qword [0x1408a16a8], rax
call fcn.140017b4c
xor ebx, ebx
cmp word [0x1408a16a0], bx
mov qword [0x1408a7000], rax
jne 0x1400104bf
lea rdx, [rsp + 0x20]
mov ecx, 0x101
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea edi, [rbx + 1]
mov word [0x1408a16a0], di
test eax, eax
je 0x140010405
mov word [0x1408a16a0], bx
lea rcx, str.ws2_32.dll
xor edx, edx
mov r8d, 0x800
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov qword [0x1408a16d0], rax
test rax, rax
je 0x1400104bf
lea rdx, str.getaddrinfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1408a16d0]
lea rdx, str.freeaddrinfo
mov qword [0x1408a16b0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1408a16d0]
lea rdx, str.getnameinfo
mov qword [0x1408a16b8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1408a16d0]
lea rdx, str.WSAStringToAddressA
mov qword [0x1408a16c0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x1408a16b0], rbx
mov qword [0x1408a16c8], rax
je 0x1400104bf
cmp qword [0x1408a16b8], rbx
je 0x1400104bf
cmp qword [0x1408a16c0], rbx
je 0x1400104bf
mov ecx, dword [0x1408a16a4]
test rax, rax
cmovne ecx, edi
mov dword [0x1408a16a4], ecx
mov rbx, qword [rsp + 0x1d0]
add rsp, 0x1c0
pop rdi
ret
Function at 0x140010f90
Capabilities:
Send data
Send data on socket

Disassembly:
sub rsp, 0x38
cmp dword [rcx], 1
mov r10d, r8d
mov r11, rdx
jne 0x140010fae
mov rcx, qword [rcx + 8]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
jmp 0x140010fec
cmp byte [rcx + 0x20], 0
lea r8, [rcx + 4]
mov edx, 0x1c
jne 0x140010fc2
mov edx, reloc.WS2_32.dll_recv
mov rax, qword [rcx + 0x28]
test rax, rax
je 0x140010fd0
mov rcx, qword [rax]
jmp 0x140010fd4
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 0x140010ff4
Capabilities:
Get socket status
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x950]
sub rsp, 0xa50
xor ebx, ebx
cmp dword [rcx], 1
mov rdi, rcx
jne 0x14001109e
movsxd rcx, dword [rcx + 8]
lea rax, [rbp + 0x980]
lea rdx, [rsp + 0x40]
mov rdi, rcx
mov qword [rsp + 0x48], rcx
xor r9d, r9d
xor r8d, r8d
inc ecx
mov dword [rsp + 0x40], 1
mov qword [rbp + 0x980], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x140011097
je 0x14001111d
lea rdx, [rsp + 0x40]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x14001111d
lea r8, [rbp + 0x970]
mov edx, 0x4004667f
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x140011097
cmp dword [rbp + 0x970], ebx
je 0x140011097
lea ebx, [rax + 2]
jmp 0x14001111d
mov ebx, 4
jmp 0x14001111d
mov rcx, qword [rcx + 0x30]
lea rax, [rbp + 0x978]
lea rdx, [rbp + 0x150]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
xor r9d, r9d
mov r8d, 0x800
mov dword [rbp + 0x978], reloc.WS2_32.dll_recv
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
mov dword [rbp + 0x970], eax
test eax, eax
jle 0x14001111d
mov rcx, qword [0x1408a11f8]
movsxd r8, eax
xor edx, edx
mov ebx, 2
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
movsxd rcx, dword [rbp + 0x970]
mov dword [rdi + 0x40], ecx
mov r8, rcx
lea rdx, [rbp + 0x150]
mov rcx, rax
mov qword [rdi + 0x38], rax
mov qword [rdi + 0x48], rax
call sub.msvcrt.dll_memcpy
movsxd rax, ebx
add rsp, 0xa50
pop rdi
pop rbx
pop rbp
ret

Function at 0x14001112c
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
cmp dword [rcx], 1
mov rax, rdx
mov rdi, rcx
jne 0x140011159
mov rcx, qword [rcx + 8]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
mov esi, eax
jmp 0x1400111a1
cmp qword [rcx + 0x38], rsi
je 0x1400111a1
cmp r8d, dword [rcx + 0x40]
mov rdx, qword [rcx + 0x48]
mov esi, r8d
cmovg esi, dword [rcx + 0x40]
mov rcx, rax
movsxd rbx, esi
mov r8, rbx
call sub.msvcrt.dll_memcpy
sub dword [rdi + 0x40], esi
add qword [rdi + 0x48], rbx
cmp dword [rdi + 0x40], 0
jne 0x1400111a1
mov r8, qword [rdi + 0x38]
mov rcx, qword [0x1408a11f8]
xor edx, edx
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 0x140011414
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
sub rsp, 0x28
cmp qword [0x1408a16e0], 0
jne 0x14001147a
lea rcx, [0x1408a16e0]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x140011466
movabs rax, 0x20c49ba5e353f7cf
lea rcx, [0x1408a16e8]
imul qword [0x1408a16e0]
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [0x1408a16e0], rdx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
cmp qword [0x1408a16e0], 0
jne 0x14001147a
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, eax
jmp 0x1400114a0
and qword [rsp + 0x30], 0
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x30]
sub rax, qword [0x1408a16e8]
cqo
idiv qword [0x1408a16e0]
add rsp, 0x28
ret
Function at 0x1400115a4
Capabilities:
Check os version

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x298]
sub rsp, 0x380
lea rcx, [rbp + 0x40]
mov ebx, 0xc8
xor r14d, r14d
xor edi, edi
xor r15d, r15d
mov dword [rbp + 0x40], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x14001177f
mov eax, dword [rbp + 0x50]
dec eax
je 0x14001175d
dec eax
jne 0x14001177f
lea r8d, [rbx + 0x54]
lea rcx, [rsp + 0x20]
xor edx, edx
xor esi, esi
call sub.msvcrt.dll_memset
lea rcx, str.ntdll.dll
mov dword [rsp + 0x20], 0x11c
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140011650
lea rdx, str.RtlGetVersion
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140011650
lea rcx, [rsp + 0x20]
call rax
xor ecx, ecx
test eax, eax
sete cl
jmp 0x140011652
xor ecx, ecx
test ecx, ecx
je 0x140011672
mov r14d, dword [rsp + 0x24]
mov edi, dword [rsp + 0x28]
mov r15d, dword [rsp + 0x2c]
mov eax, 1
cmp byte [rbp + 0x3a], al
jne 0x1400116a2
mov esi, eax
jmp 0x1400116a2
lea rcx, [rbp + 0x160]
mov dword [rbp + 0x160], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x1400116a2
mov r14d, dword [rbp + 0x44]
mov edi, dword [rbp + 0x48]
mov eax, 1
cmp byte [rbp + 0x27a], al
cmove esi, eax
sub r14d, 3
je 0x140011756
dec r14d
je 0x14001174f
dec r14d
je 0x140011729
dec r14d
je 0x1400116e5
cmp r14d, 4
jne 0x14001177f
test edi, edi
jne 0x14001177f
cmp r15d, 0x55f0
sbb ebx, ebx
and ebx, 0xfffffff6
add ebx, 0x78
jmp 0x14001177f
test edi, edi
je 0x14001171d
dec edi
je 0x140011711
dec edi
je 0x140011705
dec edi
jne 0x14001177f
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x69
jmp 0x14001177f
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x5f
jmp 0x14001177f
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x55
jmp 0x14001177f
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x4b
jmp 0x14001177f
test edi, edi
je 0x140011748
dec edi
je 0x140011741
dec edi
jne 0x14001177f
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x41
jmp 0x14001177f
mov ebx, 0x3c
jmp 0x14001177f
mov ebx, gethostbyname
jmp 0x14001177f
mov ebx, reloc.WS2_32.dll_sendto
jmp 0x14001177f
mov ebx, 5
jmp 0x14001177f
mov eax, dword [rbp + 0x48]
test eax, eax
je 0x14001177a
cmp eax, 0xa
je 0x140011773
cmp eax, 0x5a
jne 0x14001177f
lea ebx, [rax - 0x32]
jmp 0x14001177f
mov ebx, 0x1e
jmp 0x14001177f
mov ebx, 0xa
lea r11, [rsp + 0x380]
movsxd rax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x1400118e0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [0x1408a16f4], 0
jne 0x140011905
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1408a16f4], 1
mov dword [0x1408a16f8], eax
mov rcx, qword [0x1408a11f8]
xor edx, edx
mov r8d, 0x90
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x1408a16f8]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, eax
mov ecx, ebx
add rsp, 0x20
pop rbx
jmp 0x140011ac0
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp dword [0x1408a16f4], 0
mov ebx, ecx
jne 0x140011ae4
call fcn.1400118e0
mov ecx, dword [0x1408a16f8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x140011b0c
call fcn.1400118e0
mov ecx, dword [0x1408a16f8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
lea rdx, [rdi + 8]
mov r8d, reloc.WS2_32.dll_recvfrom
nop word [rax + rax]
imul eax, ebx, 0x53a9b4fb
mov ecx, 1
mov ebx, 1
sub ecx, eax
lea rdx, [rdx + 4]
mov dword [rdx + 0x40], ecx
imul eax, ecx, 0x53a9b4fb
sub ebx, eax
mov dword [rdx - 4], ebx
dec r8
jne 0x140011b20
lea esi, [r8 + 0x1f]
mov dword [rdi], r8d
mov dword [rdi + 4], 0xa
lea ebp, [rsi - 0xf]
nop word [rax + rax]
movsxd r11, dword [rdi]
movsxd rbx, dword [rdi + 4]
mov r10d, dword [rdi + rbx*4 + 8]
mov r9d, dword [rdi + r11*4 + 8]
mov eax, dword [rdi + r11*4 + 0x4c]
ror r9d, 5
lea rcx, [rdi + r11*4]
lea r8, [rdi + r11*4]
ror eax, 0xd
add r9d, r10d
add eax, dword [rdi + rbx*4 + 0x4c]
dec r11d
mov dword [r8 + 0x4c], r9d
cmovs r11d, ebp
dec ebx
mov dword [rcx + 8], eax
cmovs ebx, ebp
mov dword [rdi], r11d
mov dword [rdi + 4], ebx
dec rsi
jne 0x140011b60
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140011ac0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [0x1408a16f4], 0
jne 0x140011905
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1408a16f4], 1
mov dword [0x1408a16f8], eax
mov rcx, qword [0x1408a11f8]
xor edx, edx
mov r8d, 0x90
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x1408a16f8]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, eax
mov ecx, ebx
add rsp, 0x20
pop rbx
jmp 0x140011ac0
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp dword [0x1408a16f4], 0
mov ebx, ecx
jne 0x140011ae4
call fcn.1400118e0
mov ecx, dword [0x1408a16f8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x140011b0c
call fcn.1400118e0
mov ecx, dword [0x1408a16f8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
lea rdx, [rdi + 8]
mov r8d, reloc.WS2_32.dll_recvfrom
nop word [rax + rax]
imul eax, ebx, 0x53a9b4fb
mov ecx, 1
mov ebx, 1
sub ecx, eax
lea rdx, [rdx + 4]
mov dword [rdx + 0x40], ecx
imul eax, ecx, 0x53a9b4fb
sub ebx, eax
mov dword [rdx - 4], ebx
dec r8
jne 0x140011b20
lea esi, [r8 + 0x1f]
mov dword [rdi], r8d
mov dword [rdi + 4], 0xa
lea ebp, [rsi - 0xf]
nop word [rax + rax]
movsxd r11, dword [rdi]
movsxd rbx, dword [rdi + 4]
mov r10d, dword [rdi + rbx*4 + 8]
mov r9d, dword [rdi + r11*4 + 8]
mov eax, dword [rdi + r11*4 + 0x4c]
ror r9d, 5
lea rcx, [rdi + r11*4]
lea r8, [rdi + r11*4]
ror eax, 0xd
add r9d, r10d
add eax, dword [rdi + rbx*4 + 0x4c]
dec r11d
mov dword [r8 + 0x4c], r9d
cmovs r11d, ebp
dec ebx
mov dword [rcx + 8], eax
cmovs ebx, ebp
mov dword [rdi], r11d
mov dword [rdi + 4], ebx
dec rsi
jne 0x140011b60
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140011bc0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [0x1408a16f4], 0
mov rbx, rcx
jne 0x140011bd7
call fcn.1400118e0
mov ecx, dword [0x1408a16f8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, rax
test rax, rax
jne 0x140011bff
call fcn.1400118e0
mov ecx, dword [0x1408a16f8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, rax
movsxd r8, dword [r9]
movsxd rdx, dword [r9 + 4]
mov eax, reloc.WS2_32.dll_recv
mov r10d, dword [r9 + r8*4 + 0x4c]
mov r11d, dword [r9 + r8*4 + 8]
ror r10d, 0xd
add r10d, dword [r9 + rdx*4 + 0x4c]
ror r11d, 5
add r11d, dword [r9 + rdx*4 + 8]
mov dword [r9 + r8*4 + 8], r10d
mov dword [r9 + r8*4 + 0x4c], r11d
dec r8d
mov ecx, r11d
cmovs r8d, eax
dec edx
cmovs edx, eax
mov dword [r9], r8d
mov dword [r9 + 4], edx
inc rbx
je 0x140011c78
mov edx, r10d
mov r8, rbx
mov eax, ebx
shr r8, 0x20
imul rax, rdx
shr rax, 0x20
imul rcx, r8
imul rdx, r8
shr rcx, 0x20
add rax, rcx
add rax, rdx
add rsp, 0x20
pop rbx
ret
mov eax, r10d
shl rax, 0x20
and rax, rcx
add rsp, 0x20
pop rbx
ret
Function at 0x140013830
Capabilities:
Check if file exists

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
mov rax, qword [0x1408a1708]
xor r13d, r13d
mov rsi, r8
mov r15, rdx
mov rdi, rcx
mov r14d, r13d
test rax, rax
jne 0x140013882
lea r8, [fcn.1400139a4]
lea edx, [rax + 0x10]
mov ecx, 0x260
call fcn.140017de0
mov qword [0x1408a1708], rax
mov rdx, rdi
mov rcx, rax
call fcn.140017d18
mov rbx, rax
test rax, rax
je 0x140013983
test r15, r15
lea rbp, [0x14009208c]
cmovne rbp, r15
test rsi, rsi
je 0x1400138b2
cmp word [rsi], r13w
jne 0x1400138b9
lea rsi, [0x140092c08]
mov rcx, rbp
call sub.msvcrt.dll_wcslen
mov rcx, rsi
mov r12, rax
call sub.msvcrt.dll_wcslen
mov rcx, qword [0x1408a11f8]
add eax, 2
xor edx, edx
add eax, r12d
movsxd r8, eax
add r8, r8
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x14001396c
mov rdx, rbp
mov rcx, rax
call sub.msvcrt.dll_wcscpy
test r12d, r12d
je 0x140013919
movsxd rax, r12d
cmp word [rbp + rax*2 - 2], 0x5c
je 0x140013919
lea rdx, [0x140092c10]
mov rcx, r15
call sub.msvcrt.dll_wcscat
mov rdx, rsi
mov rcx, r15
call sub.msvcrt.dll_wcscat
lea rdx, [rbx + 0xc]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov qword [rbx], rax
cmp rax, 0xffffffffffffffff
je 0x140013940
mov dword [rbx + 8], r13d
jmp 0x140013952
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x140013955
mov dword [rbx + 8], 1
mov r14, rbx
mov rcx, qword [0x1408a11f8]
mov r8, r15
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test r14, r14
jne 0x140013983
mov rcx, qword [0x1408a1708]
cmp rdi, 0xffffffffffffffff
cmove rdi, rbx
mov rdx, rdi
call fcn.140017c4c
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rax, r14
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret

Function at 0x140013b04
Capabilities:
Create directory

Disassembly:
push rbx
sub rsp, 0x230
xor ebx, ebx
test rcx, rcx
je 0x140013b8e
mov rdx, rcx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call sub.msvcrt.dll_wcsncpy
lea rcx, [rsp + 0x20]
mov word [rsp + 0x228], bx
call sub.msvcrt.dll_wcslen
lea rcx, [rsp + 0x20]
lea rcx, [rcx + rax*2]
lea rax, [rsp + 0x20]
cmp rcx, rax
jbe 0x140013b7a
lea rdx, [rcx - 2]
movzx eax, word [rdx]
sub ax, 0x20
cmp ax, 0x3c
ja 0x140013b7a
movabs r8, 0x1000000000008001
bt r8, rax
jae 0x140013b7a
lea rax, [rsp + 0x20]
mov rcx, rdx
cmp rdx, rax
ja 0x140013b4c
mov word [rcx], bx
lea rcx, [rsp + 0x20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cdqe
jmp 0x140013b90
xor eax, eax
add rsp, 0x230
pop rbx
ret

Function at 0x140013ba4
Capabilities:
Delete file
Set file attributes

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