joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140014930
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rsi, rcx
mov rcx, qword [0x140276de8]
mov rbp, r8
mov r13d, edx
mov r8d, 0x1000
xor edx, edx
mov r15, r9
xor edi, edi
mov r14d, 0x800
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r12, rax
test rax, rax
je 0x140014b03
movzx edx, word [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
nop dword [rax]
cmp rbp, 0xffffffffffffffff
je 0x1400149a2
test rbp, rbp
je 0x140014a64
dec rbp
cmp qword [rsi + 8], 0
lea rdx, [rsp + 0x30]
je 0x1400149c2
mov r8d, 2
mov rcx, rsi
call fcn.140014800
mov dword [rsp + 0x34], eax
jmp 0x1400149df
mov rcx, qword [rsi]
lea r9, [rsp + 0x34]
mov r8d, 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x34]
movzx edx, word [rsp + 0x30]
cmp eax, 2
jne 0x140014a64
test dx, dx
je 0x1400149fa
mov word [rbx], dx
movzx edx, word [rsp + 0x30]
add rbx, 2
mov rdi, rbx
lea eax, [r14 - 1]
sub rdi, r12
movsxd rcx, eax
sar rdi, 1
cmp rdi, rcx
jle 0x140014a40
mov rcx, qword [0x140276de8]
add r14d, 0x800
mov r8, r12
movsxd r9, r14d
mov edx, 8
add r9, r9
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx edx, word [rsp + 0x30]
mov r12, rax
movsxd rax, edi
lea rbx, [r12 + rax*2]
test dx, dx
je 0x140014a64
mov edi, 0
test r13d, r13d
jne 0x140014990
cmp dx, 0xd
je 0x140014a69
cmp dx, 0xa
je 0x140014a6f
jmp 0x140014990
test r13d, r13d
jne 0x140014a73
cmp dx, 0xa
jne 0x140014a8e
sub rbx, 2
xor edi, edi
mov rax, rbx
sub rax, r12
sar rax, 1
mov qword [r15], rax
mov word [rbx], di
mov rbx, qword [rsp + 0x70]
mov rax, r12
jmp 0x140014b06
cmp dx, 0xd
jne 0x140014a73
sub rbx, 2
cmp qword [rsi + 8], 0
lea rdx, [rsp + 0x30]
je 0x140014aba
mov r8d, 2
mov rcx, rsi
call fcn.140014800
xor edi, edi
mov dword [rsp + 0x34], eax
jmp 0x140014ad3
mov rcx, qword [rsi]
xor edi, edi
lea r9, [rsp + 0x34]
lea r8d, [rdi + 2]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [rsp + 0x30], 0xa
je 0x140014a75
cmp qword [rsi + 8], 0
je 0x140014ae8
add dword [rsi + 0x14], 2
jmp 0x140014a75
mov rcx, qword [rsi]
mov r9d, 1
xor r8d, r8d
lea edx, [r9 - 3]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140014a75
mov rax, rdi
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140014b30
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rdi, rcx
mov rcx, qword [0x140276de8]
mov rsi, r8
mov r12d, edx
mov r13d, 0x1000
xor edx, edx
mov r8d, r13d
mov r14, r9
xor r15d, r15d
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x140014ce5
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
cmp rsi, 0xffffffffffffffff
je 0x140014b9a
test rsi, rsi
je 0x140014c57
dec rsi
lea rdx, [rsp + 0x30]
cmp qword [rdi + 8], r15
je 0x140014bb9
mov r8d, 1
mov rcx, rdi
call fcn.140014800
mov dword [rsp + 0x34], eax
jmp 0x140014bd6
mov rcx, qword [rdi]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x34]
movzx r8d, byte [rsp + 0x30]
cmp eax, 1
jne 0x140014c57
test r8b, r8b
je 0x140014bf2
mov byte [rbx], r8b
movzx r8d, byte [rsp + 0x30]
inc rbx
lea eax, [r13 - 1]
mov rdx, rbx
movsxd rcx, eax
sub rdx, rbp
cmp rdx, rcx
jle 0x140014c34
mov rcx, qword [0x140276de8]
add r13d, 0x1000
mov r8, rbp
mov edx, 8
movsxd r9, r13d
sub ebx, ebp
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx r8d, byte [rsp + 0x30]
movsxd rbx, ebx
mov rbp, rax
add rbx, rax
test r8b, r8b
je 0x140014c57
test r12d, r12d
jne 0x140014b88
cmp r8b, 0xd
je 0x140014c5c
cmp r8b, 0xa
jne 0x140014b88
dec rbx
jmp 0x140014ccf
test r12d, r12d
jne 0x140014ccf
cmp r8b, 0xa
jne 0x140014c67
dec rbx
jmp 0x140014ccf
cmp r8b, 0xd
jne 0x140014ccf
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rdi + 8], r15
je 0x140014c8f
mov r8d, 1
mov rcx, rdi
call fcn.140014800
mov dword [rsp + 0x34], eax
jmp 0x140014ca8
mov rcx, qword [rdi]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [rsp + 0x30], 0xa
je 0x140014ccf
cmp qword [rdi + 8], r15
je 0x140014cba
inc dword [rdi + 0x14]
jmp 0x140014ccf
mov rcx, qword [rdi]
mov r9d, 1
xor r8d, r8d
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rax, rbx
sub rax, rbp
mov qword [r14], rax
mov byte [rbx], r15b
mov rbx, qword [rsp + 0x70]
mov rax, rbp
jmp 0x140014ce8
mov rax, r15
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140014ff8
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 [0x140277000]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x14001507a
mov r8, qword [0x140277010]
mov rcx, qword [0x140276de8]
lea edx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140277000]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140277008]
jmp 0x140015066
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x140015063
mov rax, qword [rbx + 0x10]
lea rcx, [rdi + rax]
call rdx
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140015050
lea rcx, [0x140014fa4]
mov rdx, rdi
call fcn.140017e04
mov rbx, qword [rsp + 0x30]
lea rax, [rdi + rsi]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x140015090
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
and ecx, 7
mov rbp, r8
mov rsi, rdx
je 0x1400150ba
mov eax, 8
sub eax, ecx
add ebx, eax
mov rcx, qword [0x140277010]
test rcx, rcx
jne 0x1400150fd
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, qword [0x140276de8]
movsxd r8, ebx
mov edx, 8
mov dword [0x140277000], eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140277000]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x140277010]
mov rdi, rcx
movsxd rax, ebx
add rcx, rax
mov qword [0x140277010], rcx
mov ecx, dword [0x140277000]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, qword [0x140277010]
mov rcx, qword [0x140276de8]
mov r8, rax
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [0x140277000]
mov rdx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test rsi, rsi
jne 0x140015151
test rbp, rbp
je 0x140015178
lea rcx, [0x140277008]
mov edx, 0x28
call fcn.1400159dc
mov qword [rax], rdi
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rbp
test rsi, rsi
je 0x140015178
lea rcx, [rbx + rdi]
call rsi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rax, rdi
add rsp, 0x20
pop rdi
ret
Function at 0x1400160bc
Capabilities:
Set console window title

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [0x14001c01a], 0
mov rbx, rcx
jne 0x1400160d4
call qword [sym.imp.KERNEL32.dll_AllocConsole]
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff5
mov qword [0x140277210], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff4
mov qword [0x140277220], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, qword [0x140277220]
lea rdx, [0x140277230]
mov qword [0x140277250], rax
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
lea rcx, [0x1400160a4]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test rbx, rbx
je 0x14001613e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
lea rcx, [0x140277260]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x140277290]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, 1
add rsp, 0x20
pop rbx
ret
xor ecx, ecx
jmp 0x1400160bc

Function at 0x140016164
Capabilities:
Set console window title

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [0x14001c01a], 0
mov rbx, rcx
jne 0x1400160d4
call qword [sym.imp.KERNEL32.dll_AllocConsole]
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff5
mov qword [0x140277210], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff4
mov qword [0x140277220], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, qword [0x140277220]
lea rdx, [0x140277230]
mov qword [0x140277250], rax
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
lea rcx, [0x1400160a4]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test rbx, rbx
je 0x14001613e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
lea rcx, [0x140277260]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x140277290]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, 1
add rsp, 0x20
pop rbx
ret
xor ecx, ecx
jmp 0x1400160bc

Function at 0x14001647c
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
and qword [rsp + 0x20], 0
mov ebx, edx
mov r8d, edx
mov rdx, rcx
mov rdi, rcx
mov rcx, qword [0x140277220]
lea r9, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
test eax, eax
jne 0x1400164cb
mov rcx, qword [0x140277220]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov r8d, ebx
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x140016810
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 [0x1402772c0], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140275f98], eax
call fcn.140017400
add rsp, 0x28
ret
Function at 0x140016970
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 [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x28], rax
mov ecx, dword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsp + 0x28]
add rsp, 0x48
ret

Function at 0x140016a30
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov ecx, dword [0x140275f98]
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 0x140016a96
movsxd rax, dword [rsp + 0x20]
add rax, 5
mov r8, rax
xor edx, edx
mov rcx, qword [0x1402772c0]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
jmp 0x140016ac1
movsxd rax, dword [rsp + 0x20]
add rax, 5
mov r9, rax
mov rax, qword [rsp + 0x40]
mov r8, qword [rax]
xor edx, edx
mov rcx, qword [0x1402772c0]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
movsxd rax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
add rax, qword [rcx]
mov r8d, dword [rsp + 0x20]
mov rdx, rax
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
call fcn.140017380
movsxd rax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x10], rax
add rsp, 0x38
ret

Function at 0x140016b60
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
add rsp, 0x38
ret

Function at 0x140016b90
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
add rsp, 0x38
ret

Function at 0x140016bc0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
cmp dword [0x140275f98], 0xffffffff
jne 0x140016bef
call fcn.140016810
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, rax
lea rcx, [0x140016c30]
call fcn.140017e04
jmp 0x140016c20
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x140016c20
call fcn.140017400
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, rax
lea rcx, [0x140016c30]
call fcn.140017e04
add rsp, 0x28
ret

Function at 0x140016d20
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
inc rax
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
add rsp, 0x38
ret
Function at 0x140016d50
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x28]
add rax, qword [rcx + 0x10]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
add rsp, 0x38
ret

Function at 0x140016da0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 0x10]
add rsp, 0x38
ret

Function at 0x140016dd0
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 0x10], edx
mov dword [rsp + 8], ecx
sub rsp, 0x48
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x30], rax
cmp dword [rsp + 0x58], 0xffffffff
jne 0x140016e00
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x10]
mov dword [rsp + 0x58], eax
movsxd rax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x30]
add rax, qword [rcx + 0x10]
mov dword [rsp + 0x28], eax
movsxd rax, dword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 8]
sub rcx, 4
cmp rax, rcx
jl 0x140016e6c
mov eax, dword [rsp + 0x28]
add eax, 0x4000
cdqe
mov rcx, qword [rsp + 0x30]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 8]
add rax, 5
mov r9, rax
mov rax, qword [rsp + 0x30]
mov r8, qword [rax]
xor edx, edx
mov rcx, qword [0x1402772c0]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, qword [rsp + 0x30]
mov qword [rcx], rax
movsxd rax, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x30]
add rax, qword [rcx]
mov qword [rsp + 0x20], rax
movsxd rax, dword [rsp + 0x58]
movsxd rcx, dword [rsp + 0x50]
add rax, rcx
mov rcx, qword [rsp + 0x30]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x20]
add rsp, 0x48
ret

Function at 0x1400171d0
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
movsxd rax, dword [rsp + 0x40]
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 0x140017210
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx]
mov byte [rax + rcx], 0
add rsp, 0x38
ret
Function at 0x1400172b0
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx]
add rsp, 0x38
ret

Function at 0x1400172e0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
cmp qword [rsp + 0x40], rax
jb 0x14001733b
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 0x10]
cmp qword [rsp + 0x40], rax
ja 0x14001733b
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
inc rax
jmp 0x14001733d
xor eax, eax
add rsp, 0x38
ret

Function at 0x140017350
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx]
lea rax, [rcx + rax - 1]
add rsp, 0x38
ret

Function at 0x140017400
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x38
mov r8d, 0x18
xor edx, edx
mov rcx, qword [0x1402772c0]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x20], rax
mov r8d, 0x10
xor edx, edx
mov rcx, qword [0x1402772c0]
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], 0x10
mov rax, qword [rsp + 0x20]
mov qword [rax + 0x10], 0
mov rdx, qword [rsp + 0x20]
mov ecx, dword [0x140275f98]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
add rsp, 0x38
ret
Function at 0x140006ad0
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x140006af8
add rsp, 0x20
pop r15
pop rdi
pop rbx
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 + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x140006b1e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140006b20
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140006b79
test ecx, ecx
jle 0x140006b59
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140006b79
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140006b79
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x140006ba0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140006bc2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140006bd8
add rsp, 0x30
pop r14
pop rsi
pop rbp
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 + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140006bf4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140006bf6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140006c32
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x140006cce
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140006c6d
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 rbx, 0xfff
jbe 0x140006cae
nop word [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]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x140006cce
cmp rbx, rax
ja 0x140006c80
test rbx, rbx
je 0x140006cce
mov r9, qword [rsi + 0x80]
mov r8, rbx
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 + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
Function at 0x140007130
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000715d
xor eax, eax
jmp 0x1400072c9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140007197
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140007197
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x1400072c9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400072bc
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400071da
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
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 0x140007205
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 0x1400072c1
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
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 0x140007274
sub eax, 1
je 0x140007274
cmp eax, 2
jne 0x1400072bc
movsx ecx, byte [rsp + 0x50]
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 0x1400072c1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x1400072a2
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 0x1400072bc
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400072c1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140018780
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret