joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400130ac
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x1c0
xor ebx, ebx
mov edi, 1
cmp dword [0x140d2dbf0], ebx
jne 0x1400130e7
lea r8, [0x140012fc0]
lea edx, [rdi + 0xf]
lea ecx, [rdi + 0x37]
mov dword [0x140d2dbf0], edi
call fcn.140014f1c
mov qword [0x140d2dbc8], rax
cmp word [0x140d2dbd4], bx
jne 0x1400131a0
lea rdx, [rsp + 0x20]
mov ecx, 0x101
call qword [sym.imp.WSOCK32.DLL_WSAStartup]
mov word [0x140d2dbd4], di
test eax, eax
je 0x140013116
mov word [0x140d2dbd4], bx
lea rcx, str.ws2_32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x140d2dbc0], rax
test rax, rax
je 0x1400131a0
lea rdx, str.getaddrinfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140d2dbc0]
lea rdx, str.freeaddrinfo
mov qword [0x140d2dbd8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140d2dbc0]
lea rdx, str.getnameinfo
mov qword [0x140d2dbe0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x140d2dbd8], rbx
mov qword [0x140d2dbe8], rax
je 0x1400131a0
cmp qword [0x140d2dbe0], rbx
je 0x1400131a0
mov ecx, dword [0x140d2dbd0]
test rax, rax
cmovne ecx, edi
mov dword [0x140d2dbd0], ecx
movsx rax, word [0x140d2dbd4]
mov rbx, qword [rsp + 0x1d0]
add rsp, 0x1c0
pop rdi
ret

Function at 0x1400131bc
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov edx, ecx
mov ebx, 0x400
xor edi, edi
mov ecx, ebx
call fcn.140016dd0
mov edx, ebx
mov rcx, rax
mov rsi, rax
call qword [sym.imp.WSOCK32.DLL_gethostname]
test eax, eax
jne 0x1400131f8
mov rcx, rsi
call sub.msvcrt.dll_strlen
mov rdi, rax
sub ebx, edi
mov ecx, ebx
call fcn.1400171d0
mov rbx, qword [rsp + 0x30]
movsxd r11, edi
mov byte [r11 + rsi], 0
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x1400136c8
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 0x140013772
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.WSOCK32.DLL_select]
test eax, eax
js 0x14001376b
je 0x1400137f1
lea rdx, [rsp + 0x40]
mov rcx, rdi
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x1400137f1
lea r8, [rbp + 0x970]
mov edx, 0x4004667f
mov rcx, rdi
call qword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x14001376b
cmp dword [rbp + 0x970], ebx
je 0x14001376b
lea ebx, [rax + 2]
jmp 0x1400137f1
mov ebx, 4
jmp 0x1400137f1
mov rcx, qword [rcx + 0x18]
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], 0x10
mov qword [rsp + 0x20], rax
call qword [sym.imp.WSOCK32.DLL_recvfrom]
mov dword [rbp + 0x970], eax
test eax, eax
jle 0x1400137f1
mov rcx, qword [0x140d2da50]
movsxd r8, eax
xor edx, edx
mov ebx, 2
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
movsxd rcx, dword [rbp + 0x970]
mov dword [rdi + 0x28], ecx
mov r8, rcx
lea rdx, [rbp + 0x150]
mov rcx, rax
mov qword [rdi + 0x20], rax
mov qword [rdi + 0x30], rax
call sub.msvcrt.dll_memcpy
movsxd rax, ebx
add rsp, 0xa50
pop rdi
pop rbx
pop rbp
ret

Function at 0x140013800
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 0x14001382d
mov rcx, qword [rcx + 8]
xor r9d, r9d
call qword [sym.imp.WSOCK32.DLL_recv]
mov esi, eax
jmp 0x140013875
cmp qword [rcx + 0x20], rsi
je 0x140013875
cmp r8d, dword [rcx + 0x28]
mov rdx, qword [rcx + 0x30]
mov esi, r8d
cmovg esi, dword [rcx + 0x28]
mov rcx, rax
movsxd rbx, esi
mov r8, rbx
call sub.msvcrt.dll_memcpy
sub dword [rdi + 0x28], esi
add qword [rdi + 0x30], rbx
cmp dword [rdi + 0x28], 0
jne 0x140013875
mov r8, qword [rdi + 0x20]
mov rcx, qword [0x140d2da50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
and qword [rdi + 0x20], 0
mov rbx, qword [rsp + 0x30]
movsxd rax, esi
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x1400139a8
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
cmp dword [rcx], 1
mov edi, r8d
mov rsi, rdx
mov rbx, rcx
jne 0x1400139d4
mov rcx, qword [rcx + 8]
xor r9d, r9d
call qword [sym.imp.WSOCK32.DLL_send]
jmp 0x140013a27
mov eax, 2
mov word [rsp + 0x30], ax
mov eax, dword [rcx + 4]
movzx ecx, word [rcx + 8]
mov dword [rsp + 0x34], eax
call qword [sym.imp.WSOCK32.DLL_htons]
mov rcx, qword [rbx + 0x10]
mov word [rsp + 0x32], ax
test rcx, rcx
je 0x140013a02
mov rcx, qword [rcx]
jmp 0x140013a06
mov rcx, qword [rbx + 0x18]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov r8d, edi
mov rdx, rsi
mov dword [rsp + 0x28], 0x10
mov qword [rsp + 0x20], rax
call qword [sym.imp.WSOCK32.DLL_sendto]
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
cdqe
add rsp, 0x40
pop rdi
ret

Function at 0x140013ad8
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rbp
lea rbp, [rsp - 0x170]
sub rsp, 0x270
or rbx, 0xffffffffffffffff
test rcx, rcx
je 0x140013c11
cmp byte [rcx], 0
je 0x140013c11
mov rdx, rcx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call sub.msvcrt.dll_strncpy
lea rcx, [rsp + 0x20]
mov byte [rbp + 0x24], 0
call sub.msvcrt.dll_strlen
mov r11, rax
cdqe
lea rcx, [rsp + rax + 0x1f]
cmp r11d, 2
je 0x140013b3a
cmp r11d, 3
jne 0x140013b6e
cmp byte [rsp + 0x21], 0x3a
jne 0x140013b6e
cmp r11d, 2
jne 0x140013b58
lea rdx, [0x14001b26c]
lea rcx, [rsp + 0x20]
call sub.msvcrt.dll_strcat
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 1
jbe 0x140013c11
jmp 0x140013be9
cmp byte [rcx], 0x5c
je 0x140013b78
cmp byte [rcx], 0x2f
jne 0x140013b80
mov byte [rcx], 0
dec rcx
jmp 0x140013b6e
lea rdx, [rbp + 0x30]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rcx, rax
cmp rax, rbx
je 0x140013bbb
test byte [rbp + 0x30], 0x10
je 0x140013ba6
mov rbx, 0xfffffffffffffffe
jmp 0x140013bb3
mov ebx, dword [rbp + 0x4c]
mov eax, dword [rbp + 0x50]
shl rbx, 0x20
or rbx, rax
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x140013c11
cmp byte [rsp + 0x20], 0x5c
mov al, byte [rsp + 0x21]
jne 0x140013bca
cmp al, 0x5c
je 0x140013bd5
cmp byte [rsp + 0x20], 0x2e
jne 0x140013c11
cmp al, 0x2e
jne 0x140013c11
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140013bf2
test al, 0x10
je 0x140013c11
mov rbx, 0xfffffffffffffffe
jmp 0x140013c11
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov rcx, rbx
mov rbx, 0xfffffffffffffffe
cmp eax, 1
cmova rcx, rbx
mov rbx, rcx
mov rax, rbx
mov rbx, qword [rsp + 0x280]
add rsp, 0x270
pop rbp
ret

Function at 0x140013c28
Capabilities:
Delete file

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
je 0x140013c53
test dl, 2
je 0x140013c46
mov edx, pe_nt_image_headers64
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
cdqe
jmp 0x140013c55
xor eax, eax
add rsp, 0x20
pop rbx
ret
Function at 0x140013c64
Capabilities:
Move file

Disassembly:
sub rsp, 0x28
test rcx, rcx
je 0x140013c7c
test rdx, rdx
je 0x140013c7c
call qword [sym.imp.KERNEL32.dll_MoveFileA]
cdqe
jmp 0x140013c7e
xor eax, eax
add rsp, 0x28
ret

Function at 0x140013ca0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edx, ecx
mov ebx, 0x104
mov ecx, ebx
call fcn.140016dd0
mov ecx, ebx
mov rdx, rax
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
lea rcx, str.Kernel32.DLL
mov edi, eax
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbp, rax
test rax, rax
je 0x140013d12
lea rdx, str.GetLongPathNameA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140013d09
mov r8d, ebx
mov rdx, rsi
mov rcx, rsi
call rax
mov edi, eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
sub ebx, edi
mov ecx, ebx
call fcn.1400171d0
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
movsxd r11, edi
mov byte [r11 + rsi], 0
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140013d40
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 0x140013d86
mov r8d, dword [rcx + 0x10]
mov rdx, qword [rcx + 8]
lea r9, [rsp + 0x40]
sub r8d, dword [rcx + 0x14]
mov rcx, qword [rcx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r11d, dword [rbx + 0x10]
movsxd rax, dword [rsp + 0x40]
mov dword [rbx + 0x14], r11d
add rsp, 0x30
pop rbx
ret
cdqe
add rsp, 0x30
pop rbx
ret

Function at 0x140014490
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdx, rcx
mov rcx, qword [0x140d2de00]
xor ebx, ebx
mov dword [rsp + 0x50], ebx
call fcn.140014dcc
mov rdi, rax
test rax, rax
je 0x140014534
cmp qword [rax + 8], rbx
je 0x1400144f7
lea r8d, [rbx + 1]
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.140014700
test rax, rax
je 0x1400144e4
inc dword [rdi + 0x14]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov ebx, 1
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x58]
lea rdx, [rsp + 0x48]
mov r8d, 1
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140014546
cmp dword [rsp + 0x58], ebx
je 0x140014546
mov rcx, qword [rdi]
mov r9d, 1
xor r8d, r8d
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [rsp + 0x50]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
or ebx, 0xffffffff
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x140014670
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 rsi, rdx
mov dword [rsp + 0x48], ebx
test rdx, rdx
je 0x1400146e8
test r8d, r8d
je 0x1400146e8
mov rdx, rcx
mov rcx, qword [0x140d2de00]
call fcn.140014dcc
test rax, rax
je 0x1400146e4
mov r8d, edi
mov rdx, rsi
cmp qword [rax + 8], rbx
je 0x1400146d1
mov rcx, rax
call fcn.140014c10
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 0x140014700
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x30
xor r12d, r12d
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
cmp dword [rcx + 0x1c], r12d
jne 0x140014734
call fcn.140013d40
mov dword [rbx + 0x1c], 1
mov dword [rbx + 0x14], r12d
movsxd rcx, dword [rbx + 0x14]
mov eax, dword [rbx + 0x18]
sub eax, ecx
mov rbp, rcx
cmp rcx, rdi
jl 0x140014799
movsxd rcx, eax
mov rax, rdi
add rcx, qword [rbx + 8]
dec rax
je 0x14001478f
dec rax
je 0x140014781
cmp rax, 2
je 0x140014775
mov rdx, rcx
mov r8, rdi
mov rcx, rsi
call sub.msvcrt.dll_memcpy
movsxd rax, edi
jmp 0x140014814
mov eax, dword [rcx]
mov dword [rsi], eax
movsxd rax, edi
jmp 0x140014814
movzx eax, word [rcx]
mov word [rsi], ax
movsxd rax, edi
jmp 0x140014814
movzx eax, byte [rcx]
mov byte [rsi], al
movsxd rax, edi
jmp 0x140014814
movsxd rdx, eax
mov r8, rcx
mov rcx, rsi
add rdx, qword [rbx + 8]
call sub.msvcrt.dll_memcpy
movsxd r8, dword [rbx + 0x10]
mov rcx, qword [rbx]
sub rdi, rbp
add rsi, rbp
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x50]
cmp rdi, r8
jl 0x1400147e1
mov r8d, edi
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x50]
mov dword [rbx + 0x14], r12d
add eax, ebp
cdqe
jmp 0x140014817
mov rdx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd r11, dword [rsp + 0x50]
mov rdx, qword [rbx + 8]
cmp rdi, r11
mov rcx, rsi
mov dword [rbx + 0x14], r11d
cmovg rdi, r11
mov dword [rbx + 0x18], r11d
mov r8, rdi
call sub.msvcrt.dll_memcpy
lea eax, [rbp + rdi]
cdqe
sub dword [rbx + 0x14], edi
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
Function at 0x140014830
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 [0x140d2da50]
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 0x140014a03
movzx edx, word [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
nop dword [rax]
cmp rbp, 0xffffffffffffffff
je 0x1400148a2
test rbp, rbp
je 0x140014964
dec rbp
cmp qword [rsi + 8], 0
lea rdx, [rsp + 0x30]
je 0x1400148c2
mov r8d, 2
mov rcx, rsi
call fcn.140014700
mov dword [rsp + 0x34], eax
jmp 0x1400148df
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 0x140014964
test dx, dx
je 0x1400148fa
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 0x140014940
mov rcx, qword [0x140d2da50]
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 0x140014964
mov edi, 0
test r13d, r13d
jne 0x140014890
cmp dx, 0xd
je 0x140014969
cmp dx, 0xa
je 0x14001496f
jmp 0x140014890
test r13d, r13d
jne 0x140014973
cmp dx, 0xa
jne 0x14001498e
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 0x140014a06
cmp dx, 0xd
jne 0x140014973
sub rbx, 2
cmp qword [rsi + 8], 0
lea rdx, [rsp + 0x30]
je 0x1400149ba
mov r8d, 2
mov rcx, rsi
call fcn.140014700
xor edi, edi
mov dword [rsp + 0x34], eax
jmp 0x1400149d3
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 0x140014975
cmp qword [rsi + 8], 0
je 0x1400149e8
add dword [rsi + 0x14], 2
jmp 0x140014975
mov rcx, qword [rsi]
mov r9d, 1
xor r8d, r8d
lea edx, [r9 - 3]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140014975
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 0x140014a30
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 [0x140d2da50]
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 0x140014be5
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
cmp rsi, 0xffffffffffffffff
je 0x140014a9a
test rsi, rsi
je 0x140014b57
dec rsi
lea rdx, [rsp + 0x30]
cmp qword [rdi + 8], r15
je 0x140014ab9
mov r8d, 1
mov rcx, rdi
call fcn.140014700
mov dword [rsp + 0x34], eax
jmp 0x140014ad6
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 0x140014b57
test r8b, r8b
je 0x140014af2
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 0x140014b34
mov rcx, qword [0x140d2da50]
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 0x140014b57
test r12d, r12d
jne 0x140014a88
cmp r8b, 0xd
je 0x140014b5c
cmp r8b, 0xa
jne 0x140014a88
dec rbx
jmp 0x140014bcf
test r12d, r12d
jne 0x140014bcf
cmp r8b, 0xa
jne 0x140014b67
dec rbx
jmp 0x140014bcf
cmp r8b, 0xd
jne 0x140014bcf
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rdi + 8], r15
je 0x140014b8f
mov r8d, 1
mov rcx, rdi
call fcn.140014700
mov dword [rsp + 0x34], eax
jmp 0x140014ba8
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 0x140014bcf
cmp qword [rdi + 8], r15
je 0x140014bba
inc dword [rdi + 0x14]
jmp 0x140014bcf
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 0x140014be8
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 0x140014c10
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
cmp dword [rcx + 0x1c], 1
movsxd rdi, r8d
mov rsi, rdx
mov rbx, rcx
mov dword [rsp + 0x50], 0
jne 0x140014c5a
mov edx, dword [rcx + 0x14]
mov rcx, qword [rcx]
mov r9d, 1
neg edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x1c], 0
mov dword [rbx + 0x14], eax
mov ecx, dword [rbx + 0x14]
cmp ecx, edi
jle 0x140014c96
mov eax, dword [rbx + 0x10]
mov edx, edi
sub eax, ecx
movsxd rcx, eax
add rcx, qword [rbx + 8]
dec edx
je 0x140014c8f
dec edx
je 0x140014c87
cmp edx, 2
je 0x140014c81
mov rdx, rsi
jmp 0x140014ce4
mov eax, dword [rsi]
mov dword [rcx], eax
jmp 0x140014cec
movzx eax, word [rsi]
mov word [rcx], ax
jmp 0x140014cec
movzx eax, byte [rsi]
mov byte [rcx], al
jmp 0x140014cec
mov rcx, rbx
call fcn.140013d40
mov r11d, dword [rbx + 0x10]
mov rdx, rsi
cmp edi, r11d
jl 0x140014cd9
mov rcx, qword [rbx]
lea r9, [rsp + 0x50]
mov r8d, edi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
sub r11d, dword [rbx + 0x14]
movsxd rcx, r11d
add rcx, qword [rbx + 8]
mov r8, rdi
call sub.msvcrt.dll_memcpy
sub dword [rbx + 0x14], edi
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
mov rax, rdi
add rsp, 0x30
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 [0x140d2dc00]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x14001507a
mov r8, qword [0x140d2dc10]
mov rcx, qword [0x140d2da50]
lea edx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140d2dc00]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x140d2dc08]
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 [0x140d2dc10]
test rcx, rcx
jne 0x1400150fd
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, qword [0x140d2da50]
movsxd r8, ebx
mov edx, 8
mov dword [0x140d2dc00], eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x140d2dc00]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x140d2dc10]
mov rdi, rcx
movsxd rax, ebx
add rcx, rax
mov qword [0x140d2dc10], rcx
mov ecx, dword [0x140d2dc00]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, qword [0x140d2dc10]
mov rcx, qword [0x140d2da50]
mov r8, rax
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [0x140d2dc00]
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, [0x140d2dc08]
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 [0x140d2de10], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff4
mov qword [0x140d2de20], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, qword [0x140d2de20]
lea rdx, [0x140d2de30]
mov qword [0x140d2de50], 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, [0x140d2de60]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x140d2de90]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, 1
add rsp, 0x20
pop rbx
ret
xor ecx, ecx
jmp 0x1400160bc