joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140026c34
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.14001b564
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001b564
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140026d84
cmp rax, 0xffffffffffffffff
je 0x140026d84
xor edi, edi
test rbp, rbp
jle 0x140026d2f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.140016e58
mov rbx, rax
test rax, rax
jne 0x140026cbc
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140026d25
mov edx, 0x8000
mov ecx, r14d
call fcn.140013774
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.140018530
cmp eax, 0xffffffff
je 0x140026d05
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140026ccc
mov edx, r15d
mov ecx, r14d
call fcn.140013774
jmp 0x140026d25
cmp byte [rsi + 0x38], dil
je 0x140026d1c
cmp dword [rsi + 0x34], 5
jne 0x140026d1c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140026d25
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140016ed0
jmp 0x140026d98
jns 0x140026d98
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001b564
cmp rax, 0xffffffffffffffff
jne 0x140026d50
cmp byte [rsi + 0x30], dil
je 0x140026d98
mov edi, dword [rsi + 0x2c]
jmp 0x140026d98
mov ecx, r14d
call fcn.14001f980
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140026d98
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 0x140026d98
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140026d91
mov eax, dword [rsi + 0x2c]
jmp 0x140026d96
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001b564
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

Function at 0x1400279b0
Capabilities:
Parse pe header

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

Disassembly:
push rbp
push rsi
push r14
mov eax, 0x2f0
call fcn.14000b4d0
sub rsp, rax
mov rax, qword [0x140010010]
xor rax, rsp
mov qword [rsp + 0x2e0], rax
mov ebp, dword [0x1400107d8]
lea rcx, str.mapi32.dll
mov r14, r8
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x140001aae
lea rdx, str.MAPISendMailW
mov qword [rsp + 0x310], rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400018ce
mov r9d, ebp
mov dword [rsp + 0x20], 0
mov r8, r14
xor edx, edx
xor ecx, ecx
call rax
mov ebx, eax
jmp 0x140001a99
xor edx, edx
lea rcx, [rsp + 0xd0]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x30]
mov byte [rsp + 0x30], 0
lea rdx, [rsp + 0xd0]
mov rcx, 0xffffffff80000001
call fcn.1400030e0
test al, al
jne 0x14000193c
lea r9, [rsp + 0x30]
mov rcx, 0xffffffff80000002
lea rdx, [rsp + 0xd0]
call fcn.1400030e0
test al, al
jne 0x14000193c
lea r8, [0x14000c738]
mov edx, 0x104
lea rcx, [rsp + 0xd0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
lea rdx, str.mapi32.dll
mov qword [rsp + 0x318], rdi
lea rcx, [rsp + 0xd0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140001a37
lea rdx, [0x14000c738]
lea rcx, [rsp + 0xd0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400019e2
mov r8d, 0x4000
lea rdx, [rsp + 0x40]
lea rcx, str.mapisvc.inf
call qword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 0xffffffff
jne 0x1400019a8
xor edx, edx
xor ecx, ecx
call fcn.140002d60
test al, al
je 0x140001a37
mov edx, 0x104
lea rcx, [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
dec eax
cmp eax, 0x102
ja 0x140001a37
lea r8, str.mapi32x.dll
mov edx, 0x104
lea rcx, [rsp + 0xd0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
test eax, eax
jne 0x140001a37
lea rcx, [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
test rax, rax
je 0x140001a37
lea rdx, str.MAPISendMailW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140001a2e
mov r9d, ebp
mov dword [rsp + 0x20], 0
mov r8, r14
xor edx, edx
xor ecx, ecx
call rax
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x140001a91
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebx, 2
bt ebp, 0x12
jb 0x140001a91
movzx r8d, byte [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, r14
call fcn.1400025d0
test eax, eax
js 0x140001a91
lea rdx, str.MAPISendMail
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, qword [rsp + 0x38]
test rax, rax
je 0x140001a89
mov r9d, ebp
mov dword [rsp + 0x20], 0
mov r8, rdi
xor edx, edx
xor ecx, ecx
call rax
mov ebx, eax
mov rcx, rdi
call fcn.140001cd0
mov rdi, qword [rsp + 0x318]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, ebx
mov rbx, qword [rsp + 0x310]
jmp 0x140001ab3
mov eax, 2
mov rcx, qword [rsp + 0x2e0]
xor rcx, rsp
call fcn.140009e30
add rsp, 0x2f0
pop r14
pop rsi
pop rbp
ret
Function at 0x140002d60
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
mov eax, 0x270
call fcn.14000b4d0
sub rsp, rax
mov rax, qword [0x140010010]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov esi, edx
lea rax, [rsp + 0x48]
mov rdi, rcx
mov qword [rsp + 0x20], rax
xor r14d, r14d
lea rdx, str.SOFTWAREMicrosoftWindows_Messaging_SubsystemMSMapiApps
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x48], r14
mov r9d, 0x20019
xor r8d, r8d
xor bpl, bpl
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140002e5f
mov qword [rsp + 0x2a0], rbx
mov ebx, r14d
mov dword [rsp + 0x40], 0x100
test rdi, rdi
je 0x140002e03
test esi, esi
je 0x140002e03
lea ecx, [rsi - 1]
lea eax, [rcx + rcx]
mov word [rdi + rcx*2], r14w
mov dword [rsp + 0x50], eax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
jmp 0x140002e0d
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x54]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x20], r14
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
inc ebx
test eax, eax
jne 0x140002e4c
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002dd2
mov bpl, 1
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbx, qword [rsp + 0x2a0]
movzx eax, bpl
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.140009e30
mov rbp, qword [rsp + 0x2a8]
add rsp, 0x270
pop r14
pop rdi
pop rsi
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140006690]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400066a0]
mov dword [rax], 1
mov rax, qword [0x1400066b0]
mov dword [rax], 1
mov rax, qword [0x140006650]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140006680]
mov dword [0x14000900c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x140006760]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140006740]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140006600]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x140001180
Capabilities:
Terminate process

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x1400066e0]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov rax, qword gs:[0x30]
mov rsi, qword [rax + 8]
jmp 0x1400011c0
cmp rsi, rax
je 0x140001320
mov ecx, 0x3e8
call rbp
mov rax, rdi
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x1400011b0
mov rsi, qword [0x1400066f0]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140001337
mov eax, dword [rsi]
test eax, eax
je 0x1400013a0
mov dword [0x140009008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14000134c
test edi, edi
je 0x14000136d
mov rax, qword [0x140006640]
mov rax, qword [rax]
test rax, rax
je 0x140001223
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call dbg._pei386_runtime_relocator
mov rcx, qword [dbg._gnu_exception_handler]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x1400066d0]
lea rcx, [dbg.__mingw_invalidParameterHandler]
mov qword [rdx], rax
call sym._set_invalid_parameter_handler
call dbg._fpreset
mov ebx, dword [0x140009028]
lea edi, [rbx + 1]
movsxd rdi, edi
shl rdi, 3
mov rcx, rdi
call sym.malloc
mov r12, qword [0x140009020]
mov rbp, rax
test ebx, ebx
jle 0x1400013c0
sub rdi, 8
xor ebx, ebx
mov rcx, qword [r12 + rbx]
call sym.strlen
lea rsi, [rax + 1]
mov rcx, rsi
call sym.malloc
mov r8, rsi
mov qword [rbp + rbx], rax
mov rdx, qword [r12 + rbx]
mov rcx, rax
add rbx, 8
call sym.memcpy
cmp rdi, rbx
jne 0x140001280
add rdi, rbp
mov qword [rdi], 0
mov qword [0x140009020], rbp
call dbg.__main
mov rax, qword [0x140006660]
mov r8, qword [0x140009018]
mov ecx, dword [0x140009028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x140009020]
call sym.main
mov ecx, dword [0x14000900c]
mov dword [0x140009010], eax
test ecx, ecx
je 0x1400013c8
mov edx, dword [0x140009008]
test edx, edx
je 0x140001380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x1400066f0]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011e1
mov ecx, 0x1f
call dbg._amsg_exit
mov eax, dword [rsi]
cmp eax, 1
jne 0x140001200
mov rdx, qword [0x140006710]
mov rcx, qword [0x140006700]
call sym._initterm
mov dword [rsi], 2
test edi, edi
jne 0x140001208
xor eax, eax
xchg qword [rbx], rax
jmp 0x140001208
call sym._cexit
mov eax, dword [0x140009010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x140006730]
mov rcx, qword [0x140006720]
mov dword [rsi], 1
call sym._initterm
jmp 0x1400011f5
mov rdi, rax
jmp 0x1400012b5
mov ecx, eax
call sym.exit
nop

Function at 0x140001730
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 sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call dbg.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x1400017a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140009094]
mov rbx, rcx
test esi, esi
jle 0x1400018d0
mov rax, qword [0x140009098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400017eb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001875
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400017d0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x1400018f2
mov rax, qword [0x140009098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140009098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400018d7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000186e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001880
add dword [0x140009094], 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 [0x140009098]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000186e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x1400017f8
mov rax, qword [0x140009098]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140001e60
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140009100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400090e0]
test rbx, rbx
je 0x140001ebc
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 0x140001eb3
test rsi, rsi
je 0x140001eb3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001e98
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 0x1400020d0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400020e8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400020f0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x140002100
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14000214d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140002144
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000214f
add rax, 0x28
cmp rax, r9
jne 0x140002130
xor eax, eax
ret

Function at 0x140002150
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400021e0
mov rdx, qword [0x140006650]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400021ce
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400021ce
cmp word [rax + 0x18], 0x20b
jne 0x1400021ce
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400021e0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x1400021b9
add rbx, 0x28
cmp rbx, rdi
je 0x1400021e0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x1400021b0
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

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

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

Function at 0x140002270
Capabilities:
Parse pe header

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

Function at 0x1400022b0
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140006650]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400022d0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400022d8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400022d0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140002320
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140002317
test rcx, rcx
je 0x1400022d0
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x140002308
xor eax, eax
ret
Function at 0x140002330
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x140006650]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002390
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002398
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002390
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140002390
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x1400023e4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x1400023f0
add rdx, 0x28
cmp r9, rdx
jne 0x1400023d0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x140006650]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140002422
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140002430
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002422
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140002422
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140002422
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140002485
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002498
add rdx, 0x28
cmp rdx, r10
jne 0x140002470
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x1400024a7
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x1400024b7
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14000248e
test ecx, ecx
jg 0x1400024a0
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140002a30
Capabilities:
Get file version info
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov rax, qword [str.powershell.exe]
lea rdx, [rbp - 0x1c]
mov rcx, rax
call sym.GetFileVersionInfoSizeA
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0
jne 0x140002a8f
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov ebx, eax
mov ecx, 2
mov rax, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
call rax
mov rcx, rax
mov r8d, ebx
lea rax, str.GetFileVersionInfoSizeA_failed_with_error__lu_n
mov rdx, rax
call dbg.fprintf
mov eax, 0
jmp 0x140002b6f
mov eax, dword [rbp - 4]
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x140002ada
mov ecx, 2
mov rax, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x19
mov edx, 1
lea rax, str.Memory_allocation_failed_n
mov rcx, rax
call sym.fwrite
mov eax, 0
jmp 0x140002b6f
mov edx, dword [rbp - 0x1c]
mov rax, qword [str.powershell.exe]
mov r8, qword [rbp - 0x10]
mov ecx, dword [rbp - 4]
mov r9, r8
mov r8d, ecx
mov rcx, rax
call sym.GetFileVersionInfoA
test eax, eax
je 0x140002b5e
lea rcx, [rbp - 0x2c]
lea rdx, [rbp - 0x28]
mov rax, qword [rbp - 0x10]
mov r9, rcx
mov r8, rdx
lea rdx, [0x1400061c1]
mov rcx, rax
call sym.VerQueryValueA
test eax, eax
je 0x140002b5e
mov rax, qword [rbp - 0x28]
mov eax, dword [rax + 0x10]
shr eax, 0x10
movzx eax, ax
mov dword [rbp - 0x14], eax
mov rax, qword [rbp - 0x28]
mov eax, dword [rax + 0x10]
movzx eax, ax
mov dword [rbp - 0x18], eax
cmp dword [rbp - 0x14], 4
ja 0x140002b4b
cmp dword [rbp - 0x14], 4
jne 0x140002b5e
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.free
mov eax, 1
jmp 0x140002b6f
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.free
mov eax, 0
add rsp, 0x58
pop rbx
pop rbp
ret

Function at 0x140002b80
Capabilities:
Create process on windows

Disassembly:
push rbp
push rdi
sub rsp, 0x98
lea rbp, [rsp + 0x90]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov dword [rbp + 0x30], r8d
lea rdx, [rbp - 0x70]
mov eax, 0
mov ecx, 0xe
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rbp - 0x70], 0x70
mov dword [rbp - 0x6c], 0x40
mov qword [rbp - 0x68], 0
lea rax, str.open
mov qword [rbp - 0x60], rax
mov rax, qword [rbp + 0x20]
mov qword [rbp - 0x58], rax
mov rax, qword [rbp + 0x28]
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 0
mov dword [rbp + 0x30], 0
mov dword [rbp - 0x40], 0
mov qword [rbp - 0x38], 0
lea rax, [rbp - 0x70]
mov rcx, rax
mov rax, qword [sym.imp.SHELL32.dll_ShellExecuteExA]
call rax
test eax, eax
je 0x140002c40
mov rax, qword [rbp - 8]
mov edx, 0xfff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x140002c45
mov eax, 0
add rsp, 0x98
pop rdi
pop rbp
ret
Function at 0x140002c50
Capabilities:
Execute command

Disassembly:
push rbp
sub rsp, 0x140
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xd0], rcx
mov qword [rbp + 0xd8], rdx
lea rax, [0x14000615e]
mov rdx, rax
lea rax, str.tmp.vbs
mov rcx, rax
call sym.fopen
mov qword [rbp + 0xb8], rax
mov r8, qword [rbp + 0xd8]
mov rcx, qword [rbp + 0xd0]
mov rax, qword [rbp + 0xb8]
mov rdx, qword [rbp + 0xd8]
mov qword [rsp + 0x28], rdx
mov rdx, qword [rbp + 0xd8]
mov qword [rsp + 0x20], rdx
mov r9, r8
mov r8, rcx
lea rdx, str.Function_un___n_tSet_a__CreateObject__Shell.Application___n_tSet_b__CreateObject__Scripting.FileSystemObject___n_tSet_c__a.Namespace___s___n_tSet_d__a.Namespace___s___n_tIf_Not_c_Is_Nothing_Then_n_tIf_Not_b.FolderExists___s___Then_n_t_tb.CreateFolder___s___n_tEnd_If_n_td.CopyHere_c.Items_n_tEnd_If_nEnd_Function_nun
mov rcx, rax
call dbg.fprintf
mov rax, qword [rbp + 0xb8]
mov rcx, rax
call sym.fclose
lea rax, str.cscript_tmp.vbs
mov rcx, rax
call sym.system
nop
add rsp, 0x140
pop rbp
ret

Function at 0x140002d00
Capabilities:
Get file attributes

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
mov dword [rbp - 4], eax
mov dword [rbp - 4], 0xffffffff
mov eax, 0
add rsp, 0x30
pop rbp
ret