joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140007a80
Capabilities:
Delete directory

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
mov eax, 0x44a0
call fcn.14000ec9c
sub rsp, rax
mov rdx, rcx
lea rsi, [rsp + 0x2490]
mov r8d, 0x1000
mov rcx, rsi
call fcn.140008880
lea rdi, [rsp + 0x480]
mov rcx, rdi
mov rdx, rsi
call sub.msvcrt.dll_wcscpy
mov rcx, rdi
call sub.msvcrt.dll_wcslen
mov rsi, rax
movzx eax, word [rsp + rax*2 + 0x47e]
cmp eax, 0x2f
je 0x140007af4
cmp eax, 0x5c
je 0x140007af4
lea rdx, [0x14001a4c0]
lea rcx, [rsp + 0x480]
call sub.msvcrt.dll_wcscat
inc rsi
lea rdx, [0x14001a4c4]
lea rdi, [rsp + 0x480]
mov rcx, rdi
call sub.msvcrt.dll_wcscat
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.14000f1a0
cmp rax, 0xffffffffffffffff
je 0x140007bb7
mov rdi, rax
lea rbx, [rsp + 0x250]
lea r14, [rsp + 0x20]
mov r8d, 0x230
mov rcx, rbx
mov rdx, r14
call sub.msvcrt.dll_memcpy
lea rcx, [rsp + 0x480]
mov rdx, rsi
mov r8, rbx
call fcn.140007be0
mov rcx, rdi
mov rdx, r14
call fcn.14000f220
test eax, eax
jne 0x140007bae
lea rbx, [rsp + 0x250]
lea r14, [rsp + 0x20]
lea r15, [rsp + 0x480]
nop word [rax + rax]
mov r8d, 0x230
mov rcx, rbx
mov rdx, r14
call sub.msvcrt.dll_memcpy
mov rcx, r15
mov rdx, rsi
mov r8, rbx
call fcn.140007be0
mov rcx, rdi
mov rdx, r14
call fcn.14000f220
test eax, eax
je 0x140007b80
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__findclose]
lea rcx, [rsp + 0x2490]
call qword [sym.imp.msvcrt.dll__wrmdir]
nop
add rsp, 0x44a0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x140007be0
Capabilities:
Delete directory
Delete file

Disassembly:
push r14
push rsi
push rdi
push rbx
mov eax, 0x1028
call fcn.14000ec9c
sub rsp, rax
mov rdi, r8
mov r14, rdx
mov rsi, rcx
lea rbx, [r8 + 0x24]
lea rdx, [0x14001a686]
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x140007cb2
lea rdx, [0x14001a68a]
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x140007cb2
mov word [rsi + r14*2], 0
mov rcx, rsi
mov rdx, rbx
call sub.msvcrt.dll_wcscat
test byte [rdi], 0x10
jne 0x140007c72
mov rcx, rsi
call qword [sym.imp.msvcrt.dll__wremove]
test eax, eax
je 0x140007cb2
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rsi
add rsp, 0x1028
pop rbx
pop rdi
pop rsi
pop r14
jmp qword [sym.imp.msvcrt.dll__wremove]
mov rcx, rsi
call fcn.140008c20
test eax, eax
je 0x140007c94
mov rcx, rsi
add rsp, 0x1028
pop rbx
pop rdi
pop rsi
pop r14
jmp qword [sym.imp.msvcrt.dll__wrmdir]
lea rdi, [rsp + 0x20]
mov r8d, 0x1000
mov rcx, rdi
mov rdx, rsi
call fcn.140008630
mov rcx, rdi
call fcn.140007a80
nop
add rsp, 0x1028
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x140007f20
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r14
push rsi
push rdi
push rbx
mov eax, 0x1028
call fcn.14000ec9c
sub rsp, rax
mov rsi, r8
mov rbx, rdx
lea rdx, [0x14001a537]
call fcn.140004300
mov rdi, rax
mov rcx, rbx
mov rdx, rsi
call fcn.140007e20
mov rsi, rax
test rdi, rdi
je 0x140007fdc
test rsi, rsi
je 0x140007fdc
mov rcx, rdi
call sub.msvcrt.dll_feof
xor ebx, ebx
test eax, eax
jne 0x140008002
lea r14, [rsp + 0x20]
jmp 0x140007f98
mov rcx, rdi
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x140007ff5
mov rcx, rdi
call sub.msvcrt.dll_feof
test eax, eax
jne 0x140008002
mov edx, 1
mov r8d, 0x1000
mov rcx, r14
mov r9, rdi
call sub.msvcrt.dll_fread
test rax, rax
je 0x140007f80
mov edx, 1
mov rcx, r14
mov r8, rax
mov r9, rsi
call sub.msvcrt.dll_fwrite
mov rcx, rsi
test rax, rax
je 0x140007ff8
call sub.msvcrt.dll_ferror
test eax, eax
je 0x140007f8c
mov rcx, rsi
jmp 0x140007ff8
test rdi, rdi
je 0x140007fe9
mov rcx, rdi
call sub.msvcrt.dll_fclose
mov ebx, 0xffffffff
test rsi, rsi
jne 0x14000800a
jmp 0x140008012
mov rcx, rdi
call sub.msvcrt.dll_clearerr
mov ebx, 0xffffffff
mov rcx, rdi
call sub.msvcrt.dll_fclose
mov rcx, rsi
call sub.msvcrt.dll_fclose
mov eax, ebx
add rsp, 0x1028
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x140008090
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
mov eax, 0x2100
call fcn.14000ec9c
sub rsp, rax
movaps xmmword [rsp + 0x20f0], xmm6
mov rdx, rcx
mov dword [rsp + 0x54], 0
lea rsi, [rsp + 0xf0]
mov r8d, 0x1000
mov rcx, rsi
call fcn.140008880
lea rcx, [0x140008250]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
mov dword [rsp + 0x58], 0x18
mov qword [rsp + 0x60], 0
mov dword [rsp + 0x68], 1
lea rdi, [rsp + 0x88]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
xorps xmm6, xmm6
movups xmmword [rsp + 0x90], xmm6
mov qword [rsp + 0xa0], 0
mov dword [rsp + 0xc4], 0x101
mov word [rsp + 0xc8], 1
mov r14, qword [fcn.14000f590]
xor ebx, ebx
xor ecx, ecx
call r14
mov rcx, rax
call sub.msvcrt.dll__fileno
mov r15, qword [sym.imp.msvcrt.dll__get_osfhandle]
mov ecx, eax
call r15
cmp rax, 0xffffffffffffffff
cmove rax, rbx
mov qword [rsp + 0xd8], rax
mov ecx, 1
call r14
mov rcx, rax
call sub.msvcrt.dll__fileno
mov ecx, eax
call r15
cmp rax, 0xffffffffffffffff
cmove rax, rbx
mov qword [rsp + 0xe0], rax
mov ecx, 2
call r14
mov rcx, rax
call sub.msvcrt.dll__fileno
mov ecx, eax
call r15
cmp rax, 0xffffffffffffffff
cmove rax, rbx
mov qword [rsp + 0xe8], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], rdi
movups xmmword [rsp + 0x30], xmm6
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 1
lea r8, [rsp + 0x58]
mov rcx, rsi
mov rdx, rax
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x140008219
mov rcx, qword [rsp + 0x70]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x70]
lea rdx, [rsp + 0x54]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [rsp + 0x54]
jmp 0x140008231
lea rcx, [0x14001a53a]
lea rdx, str.Error_creating_child_process__n
call fcn.140002af0
mov eax, 0xffffffff
movaps xmm6, xmmword [rsp + 0x20f0]
add rsp, 0x2100
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x140008420
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rbx, r8
mov r14, rdx
mov rdi, rcx
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov rsi, rax
test rax, rax
je 0x14000846f
mov rcx, rdi
xor edx, edx
mov r8d, 2
call fcn.14000f460
test eax, eax
js 0x14000846f
mov rcx, rdi
call fcn.14000f470
movsxd rbp, eax
cmp rbp, rbx
jae 0x14000848e
xor r15d, r15d
mov rcx, rsi
call sub.msvcrt.dll_free
mov rax, r15
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x30], rdi
lea rax, [rbx - 1]
mov qword [rsp + 0x28], rax
mov rax, rbx
neg rax
mov qword [rsp + 0x20], rax
xor r15d, r15d
jmp 0x1400084c4
mov rax, qword [rsp + 0x28]
lea rbp, [rax + r12]
test r12, r12
mov r15d, 0
je 0x140008472
lea r12, [rbp - 0x2000]
cmp rbp, 0x2000
cmovb r12, r15
mov r13, rbp
sub r13, r12
mov rdi, r13
sub rdi, rbx
jb 0x140008472
mov r15, qword [rsp + 0x30]
mov rcx, r15
mov edx, r12d
xor r8d, r8d
call fcn.14000f460
test eax, eax
js 0x14000846f
mov edx, 1
mov rcx, rsi
mov r8, r13
mov r9, r15
call sub.msvcrt.dll_fread
cmp rax, r13
jne 0x14000846f
inc rdi
je 0x1400084b0
add rbp, qword [rsp + 0x20]
lea rdi, [r12 - 1]
mov r13, rsi
sub r13, r12
mov rcx, r13
add rcx, rbp
mov rdx, r14
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x140008552
dec rbp
cmp rdi, rbp
jne 0x140008530
jmp 0x1400084b0
mov r15, rbp
jmp 0x140008472

Function at 0x140008bc0
Capabilities:
Create directory

Disassembly:
sub rsp, 0x38
mov rax, qword [0x140023380]
test rax, rax
je 0x140008bfb
mov dword [rsp + 0x20], 0x18
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], rax
lea rdx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, eax
xor eax, eax
cmp ecx, 1
sbb eax, eax
jmp 0x140008c0c
lea rcx, str.Security_descriptor_is_not_initialized__n
call fcn.140002a10
mov eax, 0xffffffff
add rsp, 0x38
ret
Function at 0x14000ea70
Capabilities:
Write file on windows

Disassembly:
push rsi
sub rsp, 0x30
mov rsi, rcx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], r8
mov qword [rsp + 0x58], r9
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov ecx, 2
call fcn.14000f590
lea rcx, str.Mingw_w64_runtime_failure:_n
mov edx, 0x1b
mov r8d, 1
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 2
call fcn.14000f590
mov r8, qword [rsp + 0x28]
mov rcx, rax
mov rdx, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
int3

Function at 0x14000ede0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rsi, rdx
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_AreFileApisANSI]
xor ebx, ebx
test eax, eax
sete bl
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
movups xmmword [rdi + 0x10], xmm0
movzx eax, byte [rsi]
cmp eax, 0x5c
je 0x14000ee1a
cmp eax, 0x2f
jne 0x14000eea9
movzx ecx, byte [rsi + 1]
cmp ecx, 0x5c
je 0x14000ee2c
cmp ecx, 0x2f
jne 0x14000eea9
movzx edx, byte [rsi + 2]
add rsi, 2
test dl, dl
je 0x14000eec1
xor r15d, r15d
mov r14, qword [sym.imp.KERNEL32.dll_IsDBCSLeadByteEx]
xor ecx, ecx
xor ebp, ebp
jmp 0x14000ee6e
mov ecx, ebx
call r14
mov ecx, 1
test eax, eax
je 0x14000ee78
xor eax, eax
movzx edx, byte [rsi + 1]
inc rsi
mov r15d, eax
test dl, dl
je 0x14000eec1
test ecx, ecx
je 0x14000ee50
xor eax, eax
xor ecx, ecx
jmp 0x14000ee60
movzx eax, byte [rsi]
cmp al, 0x2f
sete dl
cmp al, 0x5c
sete cl
or cl, dl
movzx eax, cl
test r15d, r15d
jne 0x14000ee74
test cl, cl
je 0x14000ee74
mov eax, 1
mov ecx, 0
cmp ebp, 1
mov ebp, 1
jne 0x14000ee60
jmp 0x14000eec1
lea ecx, [rax - 0x41]
cmp cl, 0x19
jbe 0x14000eeb7
add al, 0x9f
cmp al, 0x19
ja 0x14000eec4
cmp byte [rsi + 1], 0x3a
jne 0x14000eec4
add rsi, 2
mov qword [rdi], rsi
movzx edx, byte [rsi]
test dl, dl
je 0x14000ef69
xor r15d, r15d
mov r14, qword [sym.imp.KERNEL32.dll_IsDBCSLeadByteEx]
xor ecx, ecx
jmp 0x14000eef5
mov qword [rdi + 0x18], r10
mov eax, r9d
movzx edx, byte [rsi + 1]
inc rsi
mov r15d, eax
test dl, dl
je 0x14000ef69
test ecx, ecx
mov ecx, 0
jne 0x14000ef0c
mov ecx, ebx
call r14
mov ecx, 1
test eax, eax
je 0x14000ef34
test r15d, r15d
setne r8b
xor eax, eax
mov dl, 1
test r8b, r8b
je 0x14000eee7
test dl, dl
je 0x14000eee7
mov rdx, qword [rdi + 0x18]
mov qword [rdi + 8], rdx
mov qword [rdi + 0x10], rsi
xor r10d, r10d
mov r9d, eax
jmp 0x14000eee0
movzx eax, byte [rsi]
cmp al, 0x2f
sete cl
cmp al, 0x5c
sete al
or al, cl
movzx eax, al
mov edx, eax
xor dl, 1
xor ecx, ecx
test r15d, r15d
setne r8b
jne 0x14000ef17
mov r9d, 1
mov r10, rsi
test dl, dl
je 0x14000eee0
jmp 0x14000ef17
mov qword [rdi + 0x20], rsi
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x14000f9a0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rax, qword [0x140018008]
movzx edx, word [rax]
cmp edx, 0x5a4d
jne 0x14000fa0b
movsxd rdx, dword [rax + 0x3c]
cmp dword [rax + rdx], 0x4550
jne 0x14000fa0b
add rax, rdx
movzx edx, word [rax + 0x18]
cmp edx, 0x20b
jne 0x14000fa0b
movzx edx, word [rax + 6]
test edx, edx
je 0x14000fa0b
sub rcx, qword [0x140018008]
movzx r8d, word [rax + 0x14]
add rax, r8
add rax, 0x18
jmp 0x14000f9f8
add rax, 0x28
dec edx
je 0x14000fa0b
mov r8d, dword [rax + 0xc]
cmp rcx, r8
jb 0x14000f9f0
add r8d, dword [rax + 8]
cmp rcx, r8
jae 0x14000f9f0
ret
xor eax, eax
ret

Function at 0x14000fa10
Capabilities:
Parse pe header

Disassembly:
mov rcx, qword [0x140018008]
movzx edx, word [rcx]
xor eax, eax
cmp edx, 0x5a4d
jne 0x14000fa45
movsxd rdx, dword [rcx + 0x3c]
cmp dword [rcx + rdx], 0x4550
jne 0x14000fa45
movzx r8d, word [rcx + rdx + 0x18]
cmp r8d, 0x20b
jne 0x14000fa45
movzx eax, word [rcx + rdx + 6]
ret

Function at 0x14000fac0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140018008]
movzx ecx, word [rax]
cmp ecx, 0x5a4d
jne 0x14000faec
movsxd rcx, dword [rax + 0x3c]
cmp dword [rax + rcx], 0x4550
jne 0x14000faec
movzx ecx, word [rax + rcx + 0x18]
cmp ecx, 0x20b
je 0x14000faee
xor eax, eax
ret
Function at 0x140011180
Capabilities:
Terminate process

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x14001e330]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov rax, qword gs:[0x30]
mov rsi, qword [rax + 8]
jmp 0x1400111c0
cmp rsi, rax
je 0x140011320
mov ecx, 0x3e8
call rbp
mov rax, rdi
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x1400111b0
mov rsi, qword [0x14001e340]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140011337
mov eax, dword [rsi]
test eax, eax
je 0x1400113a0
mov dword [0x140021008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14001134c
test edi, edi
je 0x14001136d
mov rax, qword [0x14001e290]
mov rax, qword [rax]
test rax, rax
je 0x140011223
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call fcn.140014f30
mov rcx, qword [0x14001e3d0]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x14001e320]
lea rcx, [0x140011000]
mov qword [rdx], rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.140014d40
mov ebx, dword [0x140021028]
lea edi, [rbx + 1]
movsxd rdi, edi
shl rdi, 3
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r12, qword [0x140021020]
mov rbp, rax
test ebx, ebx
jle 0x1400113c0
sub rdi, 8
xor ebx, ebx
mov rcx, qword [r12 + rbx]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea rsi, [rax + 1]
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 [r12 + rbx]
mov rcx, rax
add rbx, 8
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
cmp rdi, rbx
jne 0x140011280
add rdi, rbp
mov qword [rdi], 0
mov qword [0x140021020], rbp
call fcn.140014b40
mov rax, qword [0x14001e2b0]
mov r8, qword [0x140021018]
mov ecx, dword [0x140021028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x140021020]
call fcn.14001b1d0
mov ecx, dword [0x14002100c]
mov dword [0x140021010], eax
test ecx, ecx
je 0x1400113c8
mov edx, dword [0x140021008]
test edx, edx
je 0x140011380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x14001e340]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400111e1
mov ecx, 0x1f
call fcn.14001ad70
mov eax, dword [rsi]
cmp eax, 1
jne 0x140011200
mov rdx, qword [0x14001e370]
mov rcx, qword [0x14001e360]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov dword [rsi], 2
test edi, edi
jne 0x140011208
xor eax, eax
xchg qword [rbx], rax
jmp 0x140011208
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x140021010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x14001e390]
mov rcx, qword [0x14001e380]
mov dword [rsi], 1
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
jmp 0x1400111f5
mov rdi, rax
jmp 0x1400112b5
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
nop
sub rsp, 0x28
mov rax, qword [0x14001e2d0]
mov dword [rax], 1
call fcn.140011180
nop
nop
add rsp, 0x28
ret
Function at 0x140011890
Capabilities:
Query environment variable

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rdx
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
test rax, rax
je 0x1400118b8
mov rdx, rbx
mov rcx, rax
add rsp, 0x20
pop rbx
jmp fcn.140011740
add rsp, 0x20
pop rbx
ret
Function at 0x1400123c0
Capabilities:
Query environment variable

Disassembly:
mov r9d, 1
jmp fcn.140011e10
Function at 0x140014540
Capabilities:
Delete file

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov edx, dword [rcx + 0x18]
mov rbx, rcx
test edx, edx
jle 0x14001455a
mov rax, qword [rcx + 0x80]
call qword [rax + 0x18]
mov edx, dword [rbx + 0x2c]
test edx, edx
jle 0x14001456e
mov rax, qword [rbx + 0x80]
mov rcx, rbx
call qword [rax + 0x18]
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x14001457c
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov rcx, qword [rbx + 0x68]
test rcx, rcx
je 0x14001458a
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
cmp qword [rbx + 0x40], 0
je 0x140014620
mov edx, dword [rbx + 0x28]
test edx, edx
jne 0x140014610
mov rcx, qword [rbx + 0x38]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, qword [rbx + 0x40]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, qword [rbx + 0x48]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [rbx + 0x70]
test eax, eax
jle 0x1400145ec
xor esi, esi
mov rax, qword [rbx + 0x78]
mov rcx, qword [rax + rsi*8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll_remove
mov rax, qword [rbx + 0x78]
mov rcx, qword [rax + rsi*8]
add rsi, 1
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
cmp dword [rbx + 0x70], esi
jg 0x1400145c0
mov rcx, qword [rbx + 0x78]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rax, qword [rbx + 0x80]
mov rax, qword [rax + 0x40]
test rax, rax
je 0x140014601
mov rcx, rbx
call rax
mov rcx, rbx
add rsp, 0x38
pop rbx
pop rsi
jmp sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, qword [rbx + 0x20]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
jmp 0x14001459c
and dword [rbx], 0xfffffffe
lea r9, [rsp + 0x24]
lea r8, [rsp + 0x28]
mov rcx, rbx
mov edx, 1
call fcn.140013920
jmp 0x140014595

Function at 0x1400148b0
Capabilities:
Get common file path

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rax, qword [0x140021120]
test rax, rax
je 0x1400148d0
add rsp, 0x28
pop rbx
pop rsi
ret
mov rsi, qword [sym.imp.KERNEL32.dll_GetTempPathA]
xor edx, edx
xor ecx, ecx
call rsi
mov ebx, eax
test eax, eax
jne 0x140014900
mov rax, qword [0x140021120]
test rax, rax
je 0x140014930
add rsp, 0x28
pop rbx
pop rsi
ret
mov ecx, eax
call fcn.1400136c0
mov ecx, ebx
mov qword [0x140021120], rax
mov rdx, rax
call rsi
test eax, eax
jne 0x1400148e3
mov rcx, qword [0x140021120]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [0x140021120], 0
lea rcx, [0x14001db28]
call fcn.140013790
mov qword [0x140021120], rax
jmp 0x1400148c2

Function at 0x140014d50
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.14001abe0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]
Function at 0x140014dc0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140021194]
mov rbx, rcx
test esi, esi
jle 0x140014ef0
mov rax, qword [0x140021198]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140014e0b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140014e95
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140014df0
mov rcx, rbx
call fcn.140015810
mov rdi, rax
test rax, rax
je 0x140014f12
mov rax, qword [0x140021198]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140015950
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140021198]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140014ef7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140014e8e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140014ea0
add dword [0x140021194], 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 [0x140021198]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140014e8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140014d50
nop dword [rax]
xor esi, esi
jmp 0x140014e18
mov rax, qword [0x140021198]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140014d50
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140014d50
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140015480
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140021200]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400211e0]
test rbx, rbx
je 0x1400154dc
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 eax, eax
jne 0x1400154d3
test rsi, rsi
je 0x1400154d3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400154b8
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 0x140015810
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140015890
Capabilities:
Parse pe header

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

Function at 0x140015950
Capabilities:
Parse pe header

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

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

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, edx
test rcx, rcx
je 0x140015d00
cmp edx, 7
ja 0x140015d00
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140015d0d
xor edx, edx
test al, 0x10
jne 0x140015cdd
test al, 1
je 0x140015cdd
and ebx, 2
mov edx, ebx
jne 0x140015cea
mov eax, edx
add rsp, 0x20
pop rbx
ret
cmp eax, 5
jne 0x140015d00
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [rax], 0xd
or edx, 0xffffffff
jmp 0x140015cdd
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [rax], 0x16
jmp 0x140015cf5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
ja 0x140015ce5
cmp eax, 1
jbe 0x140015d00
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [rax], 2
jmp 0x140015cf5