joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18003ad50
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x18028e030]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor r15d, r15d
mov r14d, edx
xor edx, edx
mov qword [rcx], r15
mov rbx, rcx
mov qword [rcx + 8], r15
mov ebp, r8d
mov edi, r15d
lea ecx, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x18003aef9
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
je 0x18003ae96
lea edi, [r15 + 1]
nop
cmp dword [rsp + 0x20], 0x10
jb 0x18003ae50
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [rsp + 0x2c], eax
jne 0x18003ae50
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rsp + 0x28], eax
je 0x18003ae50
mov rdx, qword [rbx]
test rdx, rdx
jne 0x18003ae12
mov rcx, qword [0x180295a40]
mov r8d, 0x200
mov dword [rbx + 8], 0x80
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx], rax
mov rdx, rax
test rax, rax
je 0x18003ae79
jmp 0x18003ae43
mov eax, dword [rbx + 8]
cmp dword [rbx + 0xc], eax
jb 0x18003ae43
mov rcx, qword [0x180295a40]
add eax, eax
mov r9d, eax
mov r8, rdx
shl r9, 2
xor edx, edx
mov dword [rbx + 8], eax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rdx, rax
test rax, rax
je 0x18003ae79
mov qword [rbx], rax
mov ecx, dword [rbx + 0xc]
mov eax, dword [rsp + 0x28]
mov dword [rdx + rcx*4], eax
inc dword [rbx + 0xc]
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x18003adc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x18003ae96
mov r8, qword [rbx]
mov edi, r15d
test r8, r8
je 0x18003ae96
mov rcx, qword [0x180295a40]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rbx], r15
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x18003aef9
cmp qword [rbx], r15
je 0x18003aef4
mov edi, r15d
cmp dword [rbx + 0xc], r15d
jbe 0x18003aef4
mov rax, qword [rbx]
xor edx, edx
mov ecx, edi
mov r8d, dword [rax + rcx*4]
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x18003aeed
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov r8d, ebp
mov edx, r14d
mov rcx, rsi
call fcn.18003aba0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [rbx + 0xc]
jb 0x18003aeb1
mov eax, r15d
jmp 0x18003aefe
mov eax, 9
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.18004e310
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x18003af20
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rax, qword [0x18028e030]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov eax, ecx
lea r9, [rsp + 0x20]
imul rbx, rax, 0x38
mov esi, edx
add rbx, qword [0x180295e00]
mov r8, qword [rbx]
movzx eax, byte [rbx + 0x20]
and al, 1
movzx ecx, al
lea rdi, [r8 - 5]
cmove rdi, r8
mov r8d, 0x40
lea rbp, [rcx*2 + 5]
mov rcx, rdi
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x18003af93
mov eax, 0xa
jmp 0x18003b022
test esi, esi
je 0x18003afb5
mov byte [rdi], 0xe9
mov eax, dword [rbx + 8]
sub eax, edi
sub eax, 5
mov dword [rdi + 1], eax
test byte [rbx + 0x20], 1
je 0x18003afd8
mov rax, qword [rbx]
mov word [rax], 0xf9eb
jmp 0x18003afd8
mov eax, dword [rbx + 0x18]
test byte [rbx + 0x20], 1
mov dword [rdi], eax
je 0x18003afd1
movzx eax, word [rbx + 0x1c]
mov word [rdi + 4], ax
movzx eax, byte [rbx + 0x1e]
mov byte [rdi + 6], al
jmp 0x18003afd8
movzx eax, byte [rbx + 0x1c]
mov byte [rdi + 4], al
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8, rbp
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
and byte [rbx + 0x20], 0xfd
and sil, 1
movzx eax, sil
shl sil, 2
add al, al
or al, byte [rbx + 0x20]
and al, 0xfb
or al, sil
mov byte [rbx + 0x20], al
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.18004e310
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x18003b050
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
sub rsp, 0x30
mov r8d, dword [0x180295e0c]
mov esi, ecx
xor ecx, ecx
mov ebx, ecx
test r8d, r8d
je 0x18003b097
mov rax, qword [0x180295e00]
add rax, 0x20
nop word [rax + rax]
movzx edx, byte [rax]
shr edx, 1
and edx, 1
cmp edx, esi
jne 0x18003b0a4
inc ebx
add rax, 0x38
cmp ebx, r8d
jb 0x18003b080
mov eax, ecx
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret
cmp ebx, 0xffffffff
je 0x18003b097
test esi, esi
mov qword [rsp + 0x48], rdi
mov edx, 0xffffffff
setne cl
mov r8d, ecx
lea rcx, [rsp + 0x20]
call fcn.18003ad50
mov edi, eax
test eax, eax
jne 0x18003b18d
mov r9d, dword [0x180295e0c]
cmp ebx, r9d
jae 0x18003b11c
nop dword [rax + rax]
mov ecx, ebx
imul rdx, rcx, 0x38
mov rcx, qword [0x180295e00]
movzx r8d, byte [rdx + rcx + 0x20]
shr r8d, 1
and r8d, 1
cmp r8d, esi
je 0x18003b115
mov edx, esi
mov ecx, ebx
call fcn.18003af20
mov edi, eax
test eax, eax
jne 0x18003b11c
mov r9d, dword [0x180295e0c]
inc ebx
cmp ebx, r9d
jb 0x18003b0e0
cmp qword [rsp + 0x20], 0
je 0x18003b18b
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x18003b177
mov rbx, qword [rsp + 0x20]
mov qword [rsp + 0x40], rbp
mov ebp, eax
nop dword [rax + rax]
mov r8d, dword [rbx]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x18003b168
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 4
sub rbp, 1
jne 0x18003b140
mov rbp, qword [rsp + 0x40]
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x180295a40]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret
Function at 0x18003b520
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
push r14
push r15
sub rsp, 0x30
xor r15d, r15d
mov edi, 1
mov r14d, r15d
mov ebx, r15d
xor eax, eax
lock cmpxchg dword [0x180295a38], edi
je 0x18003b569
cmp rbx, 0x20
jae 0x18003b552
xor ecx, ecx
jmp 0x18003b554
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x180295a38], edi
jne 0x18003b548
cmp qword [0x180295a40], r14
mov qword [rsp + 0x60], r13
je 0x18003b70b
mov ecx, dword [0x180295e0c]
mov ebx, r15d
test ecx, ecx
je 0x18003b5a1
mov rdx, qword [0x180295e00]
mov rax, rdx
cmp qword [rax], r14
je 0x18003b5ac
inc ebx
add rax, 0x38
cmp ebx, ecx
jb 0x18003b592
mov r14d, 4
jmp 0x18003b711
cmp ebx, 0xffffffff
je 0x18003b5a1
mov eax, ebx
imul r13, rax, 0x38
test byte [rdx + r13 + 0x20], 2
je 0x18003b670
xor r8d, r8d
lea rcx, [rsp + 0x20]
mov edx, ebx
call fcn.18003ad50
mov r14d, eax
test eax, eax
jne 0x18003b711
xor edx, edx
mov ecx, ebx
call fcn.18003af20
mov r14d, eax
cmp qword [rsp + 0x20], r15
je 0x18003b660
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x18003b64c
mov rdi, qword [rsp + 0x20]
mov qword [rsp + 0x50], rbp
mov ebp, eax
mov qword [rsp + 0x58], rsi
nop dword [rax]
mov r8d, dword [rdi]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x18003b638
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rdi, 4
sub rbp, 1
jne 0x18003b610
mov rsi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x50]
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x180295a40]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test r14d, r14d
jne 0x18003b711
mov rdx, qword [0x180295e00]
mov rcx, qword [rdx + r13 + 0x10]
call fcn.18003a360
mov edx, dword [0x180295e0c]
dec edx
cmp ebx, edx
jae 0x18003b6bf
mov eax, edx
imul rcx, rax, 0x38
mov rax, qword [0x180295e00]
movups xmm0, xmmword [rcx + rax]
movups xmmword [rax + r13], xmm0
movups xmm1, xmmword [rcx + rax + 0x10]
movups xmmword [rax + r13 + 0x10], xmm1
movups xmm0, xmmword [rcx + rax + 0x20]
movups xmmword [rax + r13 + 0x20], xmm0
movsd xmm1, qword [rcx + rax + 0x30]
movsd qword [rax + r13 + 0x30], xmm1
mov ecx, dword [0x180295e08]
mov eax, ecx
mov dword [0x180295e0c], edx
shr eax, 1
cmp eax, 0x20
jb 0x18003b711
cmp eax, edx
jb 0x18003b711
mov r8, qword [0x180295e00]
mov eax, ecx
mov rcx, qword [0x180295a40]
xor edx, edx
shr rax, 1
imul r9, rax, 0x38
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
test rax, rax
je 0x18003b711
shr dword [0x180295e08], 1
mov qword [0x180295e00], rax
jmp 0x18003b711
mov r14d, 2
xchg dword [0x180295a38], r15d
mov r13, qword [rsp + 0x60]
mov eax, r14d
mov rbx, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x18003b730
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r15
sub rsp, 0x30
xor r15d, r15d
mov esi, edx
mov ebx, r15d
xor eax, eax
mov rdi, rcx
mov ebp, 1
lock cmpxchg dword [0x180295a38], ebp
je 0x18003b787
cmp rbx, 0x20
jae 0x18003b770
xor ecx, ecx
jmp 0x18003b772
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x180295a38], ebp
jne 0x18003b766
cmp qword [0x180295a40], r15
je 0x18003b881
test rdi, rdi
jne 0x18003b7a7
mov ecx, esi
call fcn.18003b050
mov edi, eax
jmp 0x18003b886
mov ecx, dword [0x180295e0c]
mov ebx, r15d
test ecx, ecx
je 0x18003b7cf
mov rdx, qword [0x180295e00]
mov rax, rdx
nop
cmp rdi, qword [rax]
je 0x18003b7d9
inc ebx
add rax, 0x38
cmp ebx, ecx
jb 0x18003b7c0
mov edi, 4
jmp 0x18003b886
cmp ebx, 0xffffffff
je 0x18003b7cf
mov eax, ebx
imul rcx, rax, 0x38
movzx eax, byte [rcx + rdx + 0x20]
shr eax, 1
and eax, ebp
cmp eax, esi
je 0x18003b878
mov r8d, ebp
lea rcx, [rsp + 0x20]
mov edx, ebx
call fcn.18003ad50
mov edi, eax
test eax, eax
jne 0x18003b886
mov edx, esi
mov ecx, ebx
call fcn.18003af20
mov edi, eax
cmp qword [rsp + 0x20], r15
je 0x18003b886
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x18003b862
mov rbx, qword [rsp + 0x20]
mov ebp, eax
nop dword [rax + rax]
mov r8d, dword [rbx]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x18003b858
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 4
sub rbp, 1
jne 0x18003b830
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x180295a40]
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18003b886
neg esi
sbb edi, edi
add edi, 6
jmp 0x18003b886
mov edi, 2
xchg dword [0x180295a38], r15d
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop r15
ret
Function at 0x18003bfe0
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, rcx
cmp edx, 1
jne 0x18003c03a
mov qword [rsp + 0x40], rdi
call qword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
xor edi, edi
lea r8, [0x18003bf80]
mov qword [rsp + 0x28], rdi
mov r9, rbx
xor edx, edx
mov dword [rsp + 0x20], edi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r9, rbx
mov qword [rsp + 0x28], rdi
lea r8, [0x18003bf90]
mov dword [rsp + 0x20], edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdi, qword [rsp + 0x40]
mov eax, 1
add rsp, 0x30
pop rbx
ret

Function at 0x18004c9bc
Capabilities:
Read file on windows

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, 0x20
mov rbp, r8
mov r14, rdx
mov rdi, rcx
test r8, r8
jg 0x18004c9ea
xor eax, eax
jmp 0x18004cad0
cmp qword [rcx + 0x68], 0
je 0x18004c9fb
call fcn.18003ed20
jmp 0x18004cad0
mov rax, qword [rcx + 0x38]
mov rsi, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x18004ca12
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x18004ca14
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x18004ca46
cmp rax, rbp
mov rbx, rbp
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call fcn.1800508d0
mov rax, qword [rdi + 0x50]
add r14, rbx
sub rsi, rbx
sub dword [rax], ebx
mov rcx, qword [rdi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rdi + 0x80], 0
je 0x18004caca
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x18004ca7d
mov rcx, qword [rdi + 0x88]
mov rdx, qword [rdi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
mov ebx, 0xfff
jmp 0x18004caa6
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.18005acbc
add r14, rax
sub rsi, rax
cmp rax, rbx
jne 0x18004caca
cmp rsi, rbx
ja 0x18004ca84
test rsi, rsi
je 0x18004caca
mov r9, qword [rdi + 0x80]
mov r8, rsi
mov edx, 1
mov rcx, r14
call fcn.18005acbc
sub rsi, rax
sub rbp, rsi
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
Function at 0x180059138
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.18004f210
sub rsp, rax
mov rax, qword [0x18028e030]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.180069934
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x180059187
mov rax, rbp
jmp 0x18005928f
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x180000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x295160]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.18006ae7c
mov r13, rax
lea rax, [0x180000000]
mov rcx, qword [rax + rbx*8 + 0x295160]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x18005928b
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18005928b
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.18006ae7c
test rax, rax
js 0x18005928b
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x18005928b
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x18005927d
lea r8, [0x180000000]
cmp rcx, rdx
jae 0x18005927d
cmp byte [rcx], 0xd
jne 0x180059263
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x180059272
cmp byte [rcx + 1], 0xa
jne 0x180059272
inc rcx
jmp 0x180059272
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x28e420]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x180059245
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x18005928f
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.18004e310
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x18006af28
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x180295160]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x18006af86
cmp word [rdx], r12w
jne 0x18006af86
or byte [rax + r8*8 + 0x38], cl
jmp 0x18006af8c
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x18006b0e7
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x18006b0c2
lea r9, [rcx + 2]
cmp ax, r13w
je 0x18006afc5
mov rcx, r9
jmp 0x18006afe8
cmp r9, rdx
jae 0x18006afff
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x18006afa9
jmp 0x18006b0e7
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18006b0bc
cmp dword [rsp + 0x80], edi
je 0x18006b0bc
mov rdx, r14
lea r11, [0x180295160]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x18006b095
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x18006b068
mov word [rbx], r12w
jmp 0x18006b0e3
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x18006b071
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x18006b0e3
cmp word [rsp + 0x70], r12w
jne 0x18006b0a2
cmp rbx, rsi
je 0x18006b062
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.18006ae84
cmp word [rsp + 0x70], r12w
je 0x18006b0e7
mov word [rbx], r13w
jmp 0x18006b0e3
lea r11, [0x180295160]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x18006b0df
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x18006b0e7
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x18006dfbc
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov rsi, rcx
test rcx, rcx
jne 0x18006dfee
call fcn.180061d98
mov dword [rax], 0x16
call fcn.180055334
jmp 0x18006e10d
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x18006e10d
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x18006e10d
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x18006e01d
lock or dword [rcx + 0x14], 0x10
jmp 0x18006e10d
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x18006e031
call fcn.18006e70c
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.180069934
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.18006b3d4
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x18006e0fb
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x18006e0c6
mov rcx, rsi
call fcn.180069934
cmp eax, edi
je 0x18006e0b1
mov rcx, rsi
call fcn.180069934
cmp eax, 0xfffffffe
je 0x18006e0b1
mov rcx, rsi
call fcn.180069934
movsxd rbx, eax
lea r14, [0x180295160]
mov rcx, rsi
sar rbx, 6
call fcn.180069934
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x18006e0b8
lea rdx, [0x18028e3d0]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x18006e0c6
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x18006e0ea
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x18006e0ea
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x18006e0ea
mov dword [rsi + 0x20], 0x1000
mov rax, qword [rsi]
add dword [rsi + 0x10], edi
movzx edi, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x18006e110
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rsi + 0x14], eax
and dword [rsi + 0x10], 0
or edi, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret
Function at 0x1800711f8
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 0x180071228
xor eax, eax
jmp 0x1800712eb
mov rbp, rbx
cmp word [rax], si
je 0x18007124d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x180071234
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x180071230
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.18006f97c
movsxd r14, eax
test eax, eax
jne 0x18007128b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x180071221
mov rcx, r14
call fcn.180068618
mov rdi, rax
test rax, rax
jne 0x1800712a4
xor ecx, ecx
call fcn.180068564
jmp 0x180071280
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.18006f97c
test eax, eax
jne 0x1800712d5
mov rcx, rdi
call fcn.180068564
jmp 0x1800712df
xor ecx, ecx
call fcn.180068564
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 0x1800789f4
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.18006ae84
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.18006ae84
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x180078b44
cmp rax, 0xffffffffffffffff
je 0x180078b44
xor edi, edi
test rbp, rbp
jle 0x180078aef
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1800685a0
mov rbx, rax
test rax, rax
jne 0x180078a7c
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x180078ae5
mov edx, 0x8000
mov ecx, r14d
call fcn.18007887c
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.18006cf70
cmp eax, 0xffffffff
je 0x180078ac5
cdqe
sub rbp, rax
test rbp, rbp
jg 0x180078a8c
mov edx, r15d
mov ecx, r14d
call fcn.18007887c
jmp 0x180078ae5
cmp byte [rsi + 0x38], dil
je 0x180078adc
cmp dword [rsi + 0x34], 5
jne 0x180078adc
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x180078ae5
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.180068564
jmp 0x180078b58
jns 0x180078b58
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.18006ae84
cmp rax, 0xffffffffffffffff
jne 0x180078b10
cmp byte [rsi + 0x30], dil
je 0x180078b58
mov edi, dword [rsi + 0x2c]
jmp 0x180078b58
mov ecx, r14d
call fcn.180075a7c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x180078b58
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x180078b58
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x180078b51
mov eax, dword [rsi + 0x2c]
jmp 0x180078b56
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.18006ae84
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret