joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401abb5c
Capabilities:
Connect pipe

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rcx, qword [rcx]
mov rsi, rdx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
xor ebx, ebx
test eax, eax
jne 0x1401abba7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x1401abba7
mov dil, bl
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x38]
mov dword [rsp + 0x38], eax
call fcn.1401ab70c
mov ebx, eax
jmp 0x1401abbaa
mov dil, 1
mov dword [rsi], ebx
mov al, dil
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x1401abbc0
Capabilities:
Create thread

Disassembly:
mov dword [rsp + 0x18], r8d
push rbp
push rbx
push rdi
mov rbp, rsp
sub rsp, 0x50
mov rdi, rdx
mov rbx, rcx
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbp + 0x20], rax
mov ecx, 0x18
call fcn.14016f214
test rax, rax
je 0x1401abc0d
lea rcx, [rbp + 0x30]
mov qword [rax], rcx
lea rcx, [rbp + 0x20]
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rbx
mov qword [rbp + 0x38], rax
lea rcx, [rbp - 0x18]
mov qword [rsp + 0x28], rcx
and dword [rsp + 0x20], 0
mov r9, rax
lea r8, [0x1401ab5a0]
xor edx, edx
xor ecx, ecx
call fcn.140189c2c
mov qword [rbp - 0x20], rax
test rax, rax
je 0x1401abca3
mov rdx, rdi
mov rcx, rbx
call fcn.1401abb5c
mov bl, al
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [rbp - 0x18], 0
je 0x1401abcb2
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [rbp - 0x18], eax
je 0x1401abcbd
movaps xmm0, xmmword [rbp - 0x20]
movdqa xmmword [rbp - 0x10], xmm0
xor edx, edx
lea rcx, [rbp - 0x10]
call fcn.14014ea9c
test eax, eax
jne 0x1401abcc8
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x20], xmm0
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp dword [rbp - 0x18], 0
jne 0x1401abc9d
mov al, bl
add rsp, 0x50
pop rdi
pop rbx
pop rbp
ret
call fcn.14018927c
nop
and dword [rbp - 0x18], 0
mov ecx, 6
call fcn.14014f298
nop
mov ecx, 1
call fcn.14014f298
int3
mov ecx, 5
call fcn.14014f298
int3
mov ecx, 2
call fcn.14014f298
int3
Function at 0x1401abcd4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x30
xor edi, edi
mov dword [r9], 7
cmp qword [rcx], 0xffffffffffffffff
mov rbx, r9
mov rsi, r8
mov rbp, rdx
mov r14, rcx
jne 0x1401abd0a
mov dword [r9], 1
jmp 0x1401abd84
cmp qword [r8], 0x1fffff
jbe 0x1401abd1c
mov dword [r9], 3
jmp 0x1401abd84
mov eax, dword [r8]
lea r9, [rsp + 0x50]
mov rcx, qword [rcx]
lea rdx, [rsp + 0x68]
mov r8d, 4
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x50], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1401abd61
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x50], eax
call fcn.1401ab70c
mov dword [rbx], eax
jmp 0x1401abd84
mov r8d, dword [rsi]
lea r9, [rsp + 0x50]
mov rcx, qword [r14]
mov rdx, rbp
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1401abd49
mov dword [rbx], edi
mov edi, dword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
mov rax, rdi
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
Function at 0x1400227f0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbx
push rsi
push rdi
sub rsp, 0x20
mov rdi, rcx
mov ecx, dword [0x140312328]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
lea rbx, [rdi + 3]
xor esi, esi
shr rbx, 2
test rax, rax
je 0x140022853
mov rax, qword [rax + 8]
test rax, rax
je 0x140022853
mov rcx, qword [rax]
test rcx, rcx
je 0x140022853
mov qword [rax], rsi
movzx eax, byte [rcx]
cmp rax, rbx
jb 0x14002284e
mov byte [rcx + rdi], al
mov rax, rcx
add rsp, 0x20
pop rdi
pop rsi
pop rbx
ret
call fcn.1402193d4
lea rcx, [rbx*4 + 1]
call fcn.140219078
cmp rbx, 0xff
movzx ecx, bl
cmova ecx, esi
mov byte [rax + rdi], cl
add rsp, 0x20
pop rdi
pop rsi
pop rbx
ret

Function at 0x140022880
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbx
push rdi
sub rsp, 0x28
mov rbx, rcx
mov rdi, rdx
mov ecx, dword [0x140312328]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400228ad
mov r8, qword [rax + 8]
jmp 0x1400228b0
xor r8d, r8d
cmp rdi, 0x3fc
ja 0x1400228d4
test r8, r8
je 0x1400228d4
cmp qword [r8], 0
jne 0x1400228d4
movzx eax, byte [rbx + rdi]
mov byte [rbx], al
mov qword [r8], rbx
add rsp, 0x28
pop rdi
pop rbx
ret
mov rcx, rbx
add rsp, 0x28
pop rdi
pop rbx
jmp fcn.1402193d4

Function at 0x140022ae0
Capabilities:
Terminate thread

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [rcx + 0x10]
lea rdx, [rsp + 0x20]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rax, qword [rcx + 8]
mov rbx, rcx
mov r9d, 0xffffffff
mov qword [rsp + 0x28], rax
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
lock xadd dword [0x140312278], eax
mov rcx, qword [rbx + 8]
test eax, eax
je 0x140022b3d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
add rsp, 0x30
pop rbx
ret
mov rdx, rcx
xor r8d, r8d
lea rcx, [fcn.140015220]
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov rcx, qword [rbx + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add rsp, 0x30
pop rbx
ret
Function at 0x140022b70
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor r9d, r9d
mov r14d, r8d
mov rsi, rdx
mov rbp, rcx
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsi + 8], rax
mov rdi, rax
lea r15, [0x1402b2c88]
test rax, rax
jne 0x140022be2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi]
lea edx, [rdi + 1]
mov rcx, rsi
mov ebx, eax
call qword [r8]
test ebx, ebx
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x38], r15
setne byte [rsp + 0x34]
test ebx, ebx
jne 0x140022cef
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp + 0x10], rax
mov qword [rsi + 0x10], rax
cmp qword [rbp + 0x10], 0
jne 0x140022c31
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi]
mov edx, 1
mov rcx, rsi
mov ebx, eax
call qword [r8]
test ebx, ebx
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x38], r15
setne byte [rsp + 0x34]
test ebx, ebx
jne 0x140022d01
xor ecx, ecx
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea r8, [0x140022d20]
mov r9, rsi
mov dword [rsp + 0x20], ecx
mov edx, r14d
mov dword [rsp + 0x68], ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rbp + 8], rax
test rax, rax
jne 0x140022ca8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi]
mov edx, 1
mov rcx, rsi
mov ebx, eax
call qword [r8]
test rdi, rdi
je 0x140022c85
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x140022c94
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x38], r15
setne byte [rsp + 0x34]
test ebx, ebx
jne 0x140022cdd
test rdi, rdi
je 0x140022cc4
mov edx, 0xffffffff
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
lea rdx, str.thread
lea rcx, [rsp + 0x30]
call fcn.1400226b0
int3
lea rdx, str.thread.entry_event
lea rcx, [rsp + 0x30]
call fcn.1400226b0
int3
lea rdx, str.thread.exit_event
lea rcx, [rsp + 0x30]
call fcn.1400226b0
int3
Function at 0x1400233e0
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, 0x50
mov rsi, rdx
mov rdi, rcx
xor ebx, ebx
mov eax, ebx
lock xadd dword [rcx + 0x30], eax
test eax, eax
jne 0x140023440
call fcn.140023550
mov dword [rsp + 0x20], ebx
mov byte [rsp + 0x24], bl
lea rax, [0x1402b2c88]
mov qword [rsp + 0x28], rax
movups xmm0, xmmword [rsp + 0x20]
movups xmmword [rsi], xmm0
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x48], rbx
lea rax, [rcx + 0x28]
test rdi, rdi
cmove rax, rbx
mov qword [rsp + 0x20], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
mov ecx, dword [0x140312328]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x20]
mov ecx, dword [0x140312328]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
mov r8, rsi
mov rcx, rdi
call fcn.140023650
test rax, rax
je 0x1400234bf
nop dword [rax + rax]
lea rax, [rbx + 1]
cmp rbx, 0xffffffffffffffff
cmove rax, rbx
mov rbx, rax
mov r8, rsi
mov rcx, rdi
call fcn.140023650
test rax, rax
jne 0x1400234a0
mov rdx, qword [rsp + 0x30]
mov ecx, dword [0x140312328]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
lea rdi, [rsp + 0x38]
mov esi, 3
nop dword [rax + rax]
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400234ed
call fcn.1402193d4
add rdi, 8
sub rsi, 1
jne 0x1400234e0
mov rax, rbx
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
Function at 0x140023dd0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor ebp, ebp
lea r15, [0x1402b2c88]
mov rdi, r9
mov r14, rdx
mov rsi, rcx
mov ebx, ebp
cmp rcx, 0xffffffffffffffff
je 0x140023f0f
test r8b, r8b
je 0x140023e49
movzx eax, byte [rdx]
test al, 8
je 0x140023e49
or al, 8
mov dword [rsp + 0x60], ebp
xor ecx, ecx
mov byte [rdx], al
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea r9, [rsp + 0x60]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x80
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x38], r15
setne byte [rsp + 0x34]
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
test ebx, ebx
je 0x140023f0f
mov eax, dword [rdi]
cmp eax, 0x2733
jne 0x140023ea4
mov rcx, qword [rdi + 8]
movabs rdx, 0x8fafd21e25c5e09b
cmp qword [rcx + 8], rdx
je 0x140023ebf
jmp 0x140023f25
cmp eax, 0x4d5
jne 0x140023f25
mov rax, qword [rdi + 8]
movabs rdx, 0x8fafd21e25c5e09b
cmp qword [rax + 8], rdx
jne 0x140023f25
lea r8, [rsp + 0x60]
mov dword [rsp + 0x60], ebp
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
and byte [r14], 0xfc
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x38], r15
setne byte [rsp + 0x34]
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
test ebx, ebx
jne 0x140023f25
mov dword [rsp + 0x30], ebp
mov byte [rsp + 0x34], bpl
mov qword [rsp + 0x38], r15
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rdi], xmm0
mov rbp, qword [rsp + 0x70]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x140023f40
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov dword [rsp + 0x20], r9d
push rdi
sub rsp, 0x50
mov rsi, rcx
mov rbx, r8
xor ecx, ecx
mov rdi, rdx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor ebp, ebp
lea r9, [rsp + 0x78]
mov qword [rsp + 0x30], rbp
mov r8d, ebx
mov qword [rsp + 0x28], rbp
mov rdx, rdi
mov rcx, rsi
mov dword [rsp + 0x20], ebp
mov dword [rsp + 0x78], ebp
call qword [sym.imp.WS2_32.dll_WSASend]
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rsp + 0x80]
test eax, eax
mov dword [rsp + 0x40], eax
lea rax, [0x1402b2c88]
setne byte [rsp + 0x44]
mov qword [rsp + 0x48], rax
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rcx], xmm0
mov edx, dword [rcx]
cmp edx, 0x40
jne 0x140023fd2
mov dword [rsp + 0x40], 0x2746
jmp 0x140023fe2
cmp edx, 0x4d2
jne 0x140023ff4
mov dword [rsp + 0x40], 0x274d
mov byte [rsp + 0x44], 1
mov qword [rsp + 0x48], rax
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rcx], xmm0
test ebx, ebx
je 0x140023fff
mov eax, 0xffffffff
jmp 0x140024019
mov qword [rsp + 0x48], rax
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x40], ebp
mov byte [rsp + 0x44], bpl
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rcx], xmm0
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret

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

Disassembly:
push rbx
sub rsp, 0x50
mov rbx, qword [rcx + 8]
lea rax, [rsp + 0x60]
xor ecx, ecx
mov qword [rsp + 0x48], rax
mov byte [rsp + 0x60], 0
mov dword [rsp + 0x40], 1
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
lea r9, [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov rcx, rbx
mov dword [rsp + 0x68], eax
lea r8d, [rax + 1]
mov dword [rsp + 0x20], eax
call qword [sym.imp.WS2_32.dll_WSASend]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
add rsp, 0x50
pop rbx
ret
Function at 0x140030590
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x1e0
mov rax, qword [0x140304470]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
movzx edi, dl
mov rbx, rcx
mov eax, 1
lock xadd dword [0x140312280], eax
inc eax
cmp eax, 1
jne 0x1400305dd
lea ecx, [rax + 1]
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_WSAStartup]
xchg dword [0x140312284], eax
test dil, dil
je 0x1400305f0
xor eax, eax
lock xadd dword [0x140312284], eax
test eax, eax
jne 0x140030614
mov rax, rbx
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.140218dc0
mov rbx, qword [rsp + 0x1f0]
add rsp, 0x1e0
pop rdi
ret
mov dword [rsp + 0x20], eax
lea rdx, str.winsock
lea rax, [0x1402b2c88]
mov byte [rsp + 0x24], 1
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x28], rax
call fcn.1400226b0
int3

Function at 0x1400312c0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r14, rdx
mov rdi, rcx
je case.default.0x1400312f0
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x38], rsi
mov rsi, rbx
mov r9, qword [rax]
test r9, r9
je 0x140031318
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x14003131a
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140031373
test ecx, ecx
jle 0x140031353
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
sub rbx, rbp
add r14, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140031373
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140031373
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov rbp, qword [rsp + 0x30]
sub rsi, rbx
mov rbx, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
or dword [0x175878ed0], esp
Function at 0x1400313a0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push r14
sub rsp, 0x20
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x1400313d1
xor eax, eax
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
cmp qword [rcx + 0x68], 0
je case.default.0x1400313e8
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rdi
mov rdi, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140031410
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140031412
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140031444
cmp rax, rbp
mov rbx, rbp
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rbx
sub rdi, rbx
sub dword [rax], ebx
mov rcx, qword [rsi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
mov rbx, rdi
je 0x1400314e1
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140031482
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rdi, 0xfff
jbe 0x1400314c1
nop dword [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rdi, rax
add r14, rax
mov rbx, rdi
cmp rax, 0xfff
jne 0x140031502
cmp rdi, rax
ja 0x140031490
test rbx, rbx
je 0x1400314e1
mov r9, qword [rsi + 0x80]
mov r8, rdi
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x30]
mov rax, rbp
mov rbp, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
sub rbp, rdi
jmp 0x1400314e4
imul esp, dword cs:[rax + rdi*2 + 0x2e], 0x20323362
or dword [0x175878e89], esp
xor dword [rbp + riz + 0x70], edi
jl 0x140525c3f
invalid
Function at 0x140031920
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140304470]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14003194d
xor eax, eax
jmp 0x140031aa2
mov rdx, qword [rcx + 0x40]
mov rax, qword [rdx]
test rax, rax
je 0x140031978
mov rdx, qword [rcx + 0x58]
movsxd r8, dword [rdx]
add r8, rax
cmp rax, r8
jae 0x140031978
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void____ptr64]
mov byte [rax], dil
mov eax, edi
jmp 0x140031aa2
cmp qword [rcx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140031a95
mov r8, qword [rcx + 0x18]
lea rax, [rcx + 0x70]
cmp qword [r8], rax
jne 0x1400319bb
mov rdx, qword [rcx + 0x90]
mov rcx, qword [rcx + 0x88]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x1400319e6
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140031a9a
lea rax, [rsp + 0x48]
mov byte [rsp + 0x40], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x41]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x40]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140031a55
sub eax, 1
je 0x140031a55
cmp eax, 2
jne 0x140031a95
movsx ecx, byte [rsp + 0x40]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140031a9a
mov rsi, qword [rsp + 0x48]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140031a83
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140031a95
lea rax, [rsp + 0x40]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x50], rax
mov eax, edi
jne 0x140031a9a
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140218dc0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret

Function at 0x140032580
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
movabs rax, 0xcbf29ce484222325
mov r9d, 0
sub r8, rdx
je 0x1400325b4
movabs r10, 0x100000001b3
nop
movzx ecx, byte [r9 + rdx]
inc r9
xor rax, rcx
imul rax, r10
cmp r9, r8
jb 0x1400325a0
ret
Function at 0x140033e60
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140304470]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140033f33
cmp byte [rcx + 0x71], 0
je 0x140033f33
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140033f2f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140033ef4
sub eax, 1
je 0x140033ef8
cmp eax, 2
jne 0x140033f2f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140218dc0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140033f26
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x140033f2f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140033edc
xor al, al
jmp 0x140033edc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140218dc0
add rsp, 0x60
pop rbx
ret

Function at 0x140040f00
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rdx
mov rdi, rcx
mov ecx, dword [0x140312328]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
xor esi, esi
test rax, rax
je 0x140040f50
mov rax, qword [rax + 8]
test rax, rax
je 0x140040f50
mov rdx, qword [rax]
test rdx, rdx
je 0x140040f50
mov qword [rax], rsi
movzx eax, byte [rdx]
cmp al, 0x12
jb 0x140040f48
mov byte [rdx + 0x48], al
jmp 0x140040f61
mov rcx, rdx
call fcn.1402193d4
mov ecx, 0x49
call fcn.140219078
mov rdx, rax
mov byte [rax + 0x48], reloc.WS2_32.dll_select
mov qword [rdx + 0x20], rsi
lea rax, [0x14004bad0]
mov qword [rdx + 0x28], rax
mov qword [rdx], rsi
mov qword [rdx + 8], rsi
mov qword [rdx + 0x10], rsi
mov qword [rdx + 0x18], rsi
mov dword [rdx + 0x30], esi
mov rax, qword [rbx]
mov qword [rdx + 0x38], rax
mov qword [rbx], rsi
mov rax, qword [rdi + 0x18]
mov rcx, qword [rax + 0x10]
lock inc dword [rcx + 0x30]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.1400235c0