joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140067240
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rcx, qword [0x1400b54b0]
xorps xmm0, xmm0
add rcx, 1
js 0x140067261
cvtsi2ss xmm0, rcx
jmp 0x140067276
mov rax, rcx
and ecx, 1
shr rax, 1
or rax, rcx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
divss xmm0, dword [0x1400b54a0]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceilf
movss xmm1, dword [0x140084b94]
xor ecx, ecx
comiss xmm0, xmm1
jb 0x1400672a8
subss xmm0, xmm1
comiss xmm0, xmm1
jae 0x1400672a8
movabs rax, 0x8000000000000000
mov rcx, rax
mov rdx, qword [0x1400b54d8]
cvttss2si rax, xmm0
add rax, rcx
mov ecx, 8
cmp rax, rcx
cmova rcx, rax
cmp rdx, rcx
jae 0x1400672dd
cmp rdx, 0x200
jae 0x1400672da
shl rdx, 3
cmp rdx, rcx
jae 0x1400672dd
mov rdx, rcx
movabs rax, 0xfffffffffffffff
bsr rcx, rax
mov eax, 1
shl rax, cl
cmp rdx, rax
jbe 0x140067306
lea rcx, str.invalid_hash_bucket_count
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
mov rbx, qword [0x1400b54a8]
lea rax, [rdx - 1]
or rax, 1
mov edi, 1
bsr rcx, rax
mov r8, rbx
inc ecx
shl rdi, cl
lea rcx, [0x1400b54b8]
lea rdx, [rdi + rdi]
call fcn.140064bc0
mov rax, qword [0x1400b54a8]
lea r9, [rdi - 1]
mov qword [0x1400b54d0], r9
mov qword [0x1400b54d8], rdi
mov rax, qword [rax]
mov rcx, rax
cmp rax, rbx
je 0x140067454
mov rcx, qword [rcx]
movabs r11, 0xcbf29ce484222325
xor r8d, r8d
movzx edx, byte [rax + r8 + 0x10]
movabs r10, 0x100000001b3
xor r11, rdx
inc r8
imul r11, r10
cmp r8, 4
jb 0x14006736e
mov rdi, qword [0x1400b54b8]
and r11, r9
add r11, r11
cmp qword [rdi + r11*8], rbx
jne 0x1400673ac
mov qword [rdi + r11*8], rax
mov qword [rdi + r11*8 + 8], rax
jmp 0x14006741a
mov r10, qword [rdi + r11*8 + 8]
mov edx, dword [rax + 0x10]
cmp edx, dword [r10 + 0x10]
jne 0x1400673ef
mov r10, qword [r10]
cmp r10, rax
je 0x1400673a5
mov r9, qword [rax + 8]
mov qword [r9], rcx
mov r8, qword [rcx + 8]
mov qword [r8], r10
mov rdx, qword [r10 + 8]
mov qword [rdx], rax
mov qword [r10 + 8], r8
mov qword [rcx + 8], r9
mov qword [rax + 8], rdx
jmp 0x1400673a5
mov r10, qword [r10 + 8]
cmp edx, dword [r10 + 0x10]
je 0x14006742e
cmp qword [rdi + r11*8], r10
jne 0x1400673e5
mov r9, qword [rax + 8]
mov qword [r9], rcx
mov r8, qword [rcx + 8]
mov qword [r8], r10
mov rdx, qword [r10 + 8]
mov qword [rdx], rax
mov qword [r10 + 8], r8
mov qword [rcx + 8], r9
mov qword [rax + 8], rdx
mov qword [rdi + r11*8], rax
mov rax, rcx
cmp rcx, rbx
je 0x140067454
mov r9, qword [0x1400b54d0]
jmp 0x14006735e
mov r10, qword [r10]
mov r9, qword [rax + 8]
mov qword [r9], rcx
mov r8, qword [rcx + 8]
mov qword [r8], r10
mov rdx, qword [r10 + 8]
mov qword [rdx], rax
mov qword [r10 + 8], r8
mov qword [rcx + 8], r9
mov qword [rax + 8], rdx
jmp 0x14006741a
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x14006e9ac
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x14006e9e6
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x14006e9eb
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x14006ea34
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x140074d40]
cmp byte [rcx + rax], 0
je 0x14006ea34
dec r8
sub rdx, 1
jne 0x14006ea1a
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x14006f1f8
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
mov rdx, rcx
mov ecx, 0x105
call fcn.14006eac4
mov ebx, eax
test eax, eax
jne 0x14006f228
and dword [rsp + 0x38], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x3c], eax
jmp 0x14006f28b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14006f282
test al, 0x10
je 0x14006f282
bt eax, 0xa
jae 0x14006f27b
mov r9d, 0x2000000
lea rcx, [rsp + 0x38]
mov r8d, 0x80
mov rdx, rdi
call fcn.14006f29c
mov rcx, qword [rsp + 0x38]
mov edi, eax
cmp rcx, 0xffffffffffffffff
je 0x14006f277
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x14006f277
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
test edi, edi
jne 0x14006f282
and dword [rsp + 0x3c], 0
jmp 0x14006f287
or dword [rsp + 0x3c], 0xffffffff
mov dword [rsp + 0x38], ebx
mov rax, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x140070444
Capabilities:
Parse pe header

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

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x140016f40]
mov rdi, qword [sym.imp.KERNEL32.dll_Sleep]
mov rax, qword gs:[0x30]
mov rsi, qword [rax + 8]
jmp 0x1400011c0
cmp rsi, rax
je 0x140001320
mov ecx, 0x3e8
call rdi
xor eax, eax
lock cmpxchg qword [rbx], rsi
jne 0x1400011b0
mov rsi, qword [0x140016f50]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140001337
mov eax, dword [rsi]
test eax, eax
je 0x1400013a0
mov dword [0x14001a008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14000134c
test edi, edi
je 0x14000136d
mov rax, qword [0x140016eb0]
mov rax, qword [rax]
test rax, rax
je 0x14000121f
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call fcn.14000dcc0
mov rcx, qword [0x140016fd0]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x140016f30]
lea rcx, section..text
mov qword [rdx], rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.14000dad0
mov ebx, dword [0x14001a028]
lea r12d, [rbx + 1]
movsxd r12, r12d
shl r12, 3
mov rcx, r12
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rdi, qword [0x14001a020]
mov rbp, rax
test ebx, ebx
jle 0x1400013c0
sub r12, 8
xor ebx, ebx
nop dword [rax]
mov rcx, qword [rdi + rbx]
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
lea rsi, [rax + rax + 2]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r8, rsi
mov qword [rbp + rbx], rax
mov rdx, qword [rdi + rbx]
mov rcx, rax
add rbx, 8
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
cmp rbx, r12
jne 0x140001280
add rbx, rbp
mov qword [rbx], 0
mov qword [0x14001a020], rbp
call fcn.14000d810
mov rax, qword [0x140016ec0]
mov r8, qword [0x14001a018]
mov ecx, dword [0x14001a028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x14001a020]
call fcn.14000d830
mov ecx, dword [0x14001a00c]
mov dword [0x14001a010], eax
test ecx, ecx
je 0x1400013c8
mov edx, dword [0x14001a008]
test edx, edx
je 0x140001380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x140016f50]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011dd
mov ecx, 0x1f
call fcn.14000f140
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011fc
mov rdx, qword [0x140016f70]
mov rcx, qword [0x140016f60]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov dword [rsi], 2
test edi, edi
jne 0x140001204
xor eax, eax
xchg qword [rbx], rax
jmp 0x140001204
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x14001a010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x140016f90]
mov rcx, qword [0x140016f80]
mov dword [rsi], 1
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
jmp 0x1400011f1
mov rbx, rax
jmp 0x1400012b6
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
nop
Function at 0x1400018a0
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r12, rdx
lea rdx, [0x140011129]
mov rbx, rcx
call fcn.140004680
mov rbp, rax
test rax, rax
je 0x1400019d0
mov edx, dword [r12 + 4]
xor r8d, r8d
mov rcx, rax
add edx, dword [rbx + 0x1000]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
test eax, eax
js 0x1400019a8
mov esi, dword [r12 + 0xc]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r13, rax
test rax, rax
je 0x1400019e6
cmp byte [r12 + 0x10], 1
je 0x140001978
mov rdi, rax
test rsi, rsi
jne 0x140001920
jmp 0x14000198d
add rdi, rbx
sub rsi, rbx
je 0x14000198d
mov ebx, 0x2000
mov r9, rbp
mov r8d, 1
mov rcx, rdi
cmp rsi, rbx
cmovbe rbx, rsi
mov rdx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
test rax, rax
jne 0x140001918
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
lea r9, [r12 + 0x12]
lea r8, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
mov edx, dword [rax]
lea rcx, str.fread
call fcn.140002b20
mov rcx, r13
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor r13d, r13d
jmp 0x14000198d
xor r8d, r8d
mov r9, rax
mov rdx, r12
mov rcx, rbp
call fcn.140001490
test eax, eax
jne 0x140001965
mov rcx, rbp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov rax, r13
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
lea r9, [r12 + 0x12]
lea r8, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
mov edx, dword [rax]
lea rcx, str.fseek
call fcn.140002b20
jmp 0x14000196d
lea rdx, [r12 + 0x12]
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
xor r13d, r13d
call fcn.140002a20
jmp 0x140001995
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rsp + 0x20], esi
lea r9, [r12 + 0x12]
lea r8, str.Failed_to_extract__s:_failed_to_allocate_data_buffer___u_bytes___n
mov edx, dword [rax]
lea rcx, str.malloc
call fcn.140002b20
jmp 0x14000196d
Function at 0x1400078f0
Capabilities:
Create directory

Disassembly:
push r15
mov eax, 0x3038
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14000e8b0
sub rsp, rax
mov rsi, r8
mov r14, rcx
mov rcx, rdx
mov rbx, rdx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rcx, rsi
mov rdi, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea rax, [rdi + rax + 1]
cmp rax, 0xfff
ja 0x1400079f1
mov dword [rsp + 0x20], 0x5c
lea rdi, [rsp + 0x30]
mov r9, rbx
lea r8, str._s_c
mov edx, 0x1000
mov rcx, rdi
mov r12d, 0x1000
lea r13, [rsp + 0x1030]
call fcn.14000ef50
mov edx, 0x5c
mov rcx, rsi
movsxd rbp, eax
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
sub r12, rbp
mov r15, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
add rbp, rdi
mov rbx, rax
test rax, rax
jne 0x1400079a6
jmp 0x140007a00
lea rcx, [rbx + 1]
mov edx, 0x5c
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
mov rbx, rax
test rax, rax
je 0x140007a00
mov qword [rsp + 0x20], rsi
mov r9d, ebx
mov rcx, rbp
mov rdx, r12
sub r9d, esi
lea r8, [0x140012e35]
call fcn.14000ef50
mov rcx, rdi
call fcn.140004640
test eax, eax
jne 0x140007990
mov rdx, r13
mov rcx, rdi
mov r8d, 0x1000
call fcn.140008e20
mov rdx, qword [r14 + 0x3038]
mov rcx, r13
call r15
test eax, eax
jne 0x140007990
mov eax, 0xffffffff
jmp 0x140007a02
xor eax, eax
add rsp, 0x3038
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140007a20
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rdi
mov eax, 0x1020
push rsi
push rbx
call fcn.14000e8b0
sub rsp, rax
mov rsi, rdx
lea rdx, [0x140012e3a]
call fcn.140004680
mov rbx, rax
test rax, rax
je 0x140007b0e
mov rcx, rsi
lea rdx, [0x140012e3d]
call fcn.140004680
mov rsi, rax
test rax, rax
je 0x140007b06
lea rdi, [rsp + 0x20]
jmp 0x140007aaf
mov r8d, 0x1000
mov r9, rbx
mov edx, 1
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov r8, rax
test rax, rax
je 0x140007af0
mov r9, rsi
mov edx, 1
mov rcx, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
test rax, rax
je 0x140007ae0
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
jne 0x140007ae0
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
test eax, eax
je 0x140007a70
xor edi, edi
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov eax, edi
add rsp, 0x1020
pop rbx
pop rsi
pop rdi
ret
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_clearerr
mov edi, 0xffffffff
jmp 0x140007abd
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
je 0x140007abb
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_clearerr
jmp 0x140007ae8
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov edi, 0xffffffff
jmp 0x140007acd
Function at 0x140007b20
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r12, rcx
mov ecx, 0x2000
mov rbp, rdx
mov rdi, r8
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rsi, rax
test rax, rax
je 0x140007c10
xor edx, edx
mov r8d, 2
mov rcx, r12
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
test eax, eax
js 0x140007c10
mov rcx, r12
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
movsxd rbx, eax
cmp rbx, rdi
jb 0x140007c10
mov r15d, 1
sub r15, rdi
mov qword [rsp + 0x28], r15
mov r13d, 0x2000
cmp rbx, r13
cmovae r13, rbx
lea r14, [r13 - 0x2000]
sub rbx, r14
cmp rbx, rdi
jb 0x140007c10
xor r8d, r8d
mov edx, r14d
mov rcx, r12
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
test eax, eax
js 0x140007c10
mov r9, r12
mov r8, rbx
mov edx, 1
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
cmp rax, rbx
jne 0x140007c10
mov rdx, qword [rsp + 0x28]
lea rbx, [rdx + rax]
jmp 0x140007bfa
lea r15, [rbx - 1]
mov r8, rdi
mov rdx, rbp
lea rcx, [rsi + r15]
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
test eax, eax
je 0x140007c30
mov rbx, r15
test rbx, rbx
jne 0x140007be0
lea rbx, [r14 + rdi - 1]
test r14, r14
jne 0x140007b89
nop dword [rax]
xor ebx, ebx
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rax, rbx
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rbx, [r13 + rbx - 0x2001]
jmp 0x140007c12
Function at 0x140007c40
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push r15
mov eax, 0x2288
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14000e8b0
sub rsp, rax
lea r8, str._s
mov edx, 0x1000
lea r14, [rsp + 0x280]
mov qword [rsp + 0x22d0], rcx
mov r9, rcx
mov rcx, r14
call fcn.14000ef90
cmp eax, 0xfff
jg 0x140007da8
lea rsi, [rsp + 0x30]
lea ebx, [rax - 1]
mov r12d, 0x1000
mov rcx, r14
mov rdx, rsi
sub r12d, ebx
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140007da8
movsxd rax, ebx
mov rdi, qword [sym.imp.KERNEL32.dll_FindNextFileW]
lea rbx, [rsp + 0x5c]
lea rbp, [0x140012e5a]
lea rax, [r14 + rax*2]
lea r15, [0x140012e5e]
mov qword [rsp + 0x20], rax
movsxd rax, r12d
mov qword [rsp + 0x28], rax
mov rdx, rbp
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscmp
test eax, eax
je 0x140007d40
mov rdx, r15
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscmp
test eax, eax
je 0x140007d40
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x20]
mov r9, rbx
lea r8, [0x140012e64]
call fcn.14000ef90
cmp eax, r12d
jge 0x140007d40
mov eax, dword [rsp + 0x30]
mov rcx, r14
test al, 0x10
je 0x140007d88
test ah, 4
je 0x140007d39
cmp dword [rsp + 0x54], 0xa000000c
je 0x140007da0
call fcn.140007c40
nop
mov rdx, rsi
mov rcx, r13
call rdi
test eax, eax
jne 0x140007ce3
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rsp + 0x22d0]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp eax, 1
setne al
movzx eax, al
neg eax
add rsp, 0x2288
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdx, rsi
mov rcx, r13
call rdi
test eax, eax
jne 0x140007ce3
jmp 0x140007d4c
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x140007d40
mov eax, 0xffffffff
jmp 0x140007d6e

Function at 0x140008030
Capabilities:
Query environment variable

Disassembly:
push rsi
mov eax, 0x4028
push rbx
call fcn.14000e8b0
sub rsp, rax
xor r8d, r8d
xor edx, edx
call fcn.140008e20
lea rbx, [rsp + 0x20]
mov r8d, 0x1000
mov rcx, rax
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
sub eax, 1
cmp eax, 0xffe
ja 0x1400080a8
lea rsi, [rsp + 0x2020]
mov r8d, 0x1000
mov rcx, rbx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub eax, 1
cmp eax, 0xffe
ja 0x1400080a8
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call fcn.140008d20
add rsp, 0x4028
pop rbx
pop rsi
ret
xor eax, eax
add rsp, 0x4028
pop rbx
pop rsi
ret
Function at 0x140008b70
Capabilities:
Enumerate process modules

Disassembly:
push r15
mov eax, 0x4048
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14000e8b0
sub rsp, rax
mov rbp, rcx
mov dword [rsp + 0x3c], 0
lea rbx, [rsp + 0x3c]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor r8d, r8d
xor edx, edx
mov r9, rbx
mov rcx, rax
mov rsi, rax
call sub.KERNEL32.dll_K32EnumProcessModules
test eax, eax
je 0x140008bc0
mov r12d, dword [rsp + 0x3c]
test r12d, r12d
jne 0x140008bd8
add rsp, 0x4048
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, r12d
mov edx, 1
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
mov rdi, rax
test rax, rax
je 0x140008bc0
mov r9, rbx
mov r8d, r12d
mov rdx, rax
mov rcx, rsi
call sub.KERNEL32.dll_K32EnumProcessModules
test eax, eax
jne 0x140008c20
mov rcx, rdi
add rsp, 0x4048
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sub.api_ms_win_crt_heap_l1_1_0.dll_free
lea r14, [rsp + 0x2040]
lea rcx, [rbp + 0x2022]
mov r8d, 0x1000
mov rdx, r14
call fcn.140008e20
test rax, rax
je 0x140008c02
mov rcx, r14
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x3c]
shr eax, 3
je 0x140008c02
mov rbx, rdi
mov r15, rdi
lea rbp, [rsp + 0x40]
xor r13d, r13d
lea r12d, [rax*8]
add r12, rdi
nop dword [rax]
mov rdx, qword [r15]
mov r9d, 0x1000
mov r8, rbp
mov rcx, rsi
call sub.KERNEL32.dll_K32GetModuleFileNameExW
test eax, eax
je 0x140008cb3
mov r8, qword [rsp + 0x28]
mov rdx, rbp
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x140008cb3
mov rdx, qword [r15]
movsxd rax, r13d
add r13d, 1
mov qword [rdi + rax*8], rdx
add r15, 8
cmp r15, r12
jne 0x140008c78
test r13d, r13d
je 0x140008c02
movsxd r13, r13d
mov r12, qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea r13, [rdi + r13*8]
jmp 0x140008ce5
add rbx, 8
cmp r13, rbx
je 0x140008c02
mov rdx, qword [rbx]
mov r9d, 0x1000
mov r8, rbp
mov rcx, rsi
call sub.KERNEL32.dll_K32GetModuleFileNameExW
test eax, eax
je 0x140008cd8
xor r14d, r14d
jmp 0x140008d0c
test eax, eax
je 0x140008cd8
add r14d, 1
mov rcx, qword [rbx]
call r12
cmp r14d, 0x20
jne 0x140008d08
jmp 0x140008cd8
Function at 0x14000dae0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call fcn.14000ef00
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]

Function at 0x14000db50
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14001d394]
mov rbx, rcx
test esi, esi
jle 0x14000dc80
mov rax, qword [0x14001d398]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000db9b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14000dc25
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14000db80
mov rcx, rbx
call fcn.14000e5d0
mov rdi, rax
test rax, rax
je 0x14000dca2
mov rax, qword [0x14001d398]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.14000e710
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14001d398]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000dc87
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14000dc1e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x14000dc30
add dword [0x14001d394], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14001d398]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000dc1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000dae0
nop dword [rax]
xor esi, esi
jmp 0x14000dba8
mov rax, qword [0x14001d398]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.14000dae0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.14000dae0
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x14000e240
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14001d400]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14001d3e0]
test rbx, rbx
je 0x14000e29c
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 0x14000e293
test eax, eax
jne 0x14000e293
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000e278
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 0x14000e5d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140016e80]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000e5f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000e5f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000e5f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000e64d
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 0x14000e644
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14000e5f0
add rax, 0x28
cmp rax, r9
jne 0x14000e630
xor eax, eax
ret

Function at 0x14000e650
Capabilities:
Parse pe header

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

Function at 0x14000e710
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140016e80]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000e72f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x14000e738
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret