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

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00528920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00528900]
test rbx, rbx
je 0x40d304
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x40d2fb
test r12, r12
je 0x40d2fb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40d2e0
lea rcx, [0x00528920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x40d530
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
jne 0x40d540
jmp sym._ValidateImageBase.part.0
xor eax, eax
ret

Function at 0x40d550
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d595
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x40d58c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40d597
add rax, 0x28
cmp rax, r9
jne 0x40d578
xor eax, eax
ret

Function at 0x40d640
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x004f2ee0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x40d6b9
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d6b9
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x40d6b6
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x40d6ad
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x40d6b9
add r8, 0x28
cmp r8, r9
jne 0x40d698
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x40d7a0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004f2ee0]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40d80f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d80f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x40d80d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x40d804
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d818
add rax, 0x28
cmp rax, r9
jne 0x40d7f0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x40d830
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004f2ee0]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x40d8a8
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d8a8
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x40d8a8
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d8a8
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x40d89c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x40d8b0
add rdx, 0x28
cmp rdx, r10
jne 0x40d888
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x40d8c0
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x40d8ce
mov edx, dword [rax + 0xc]
test edx, edx
je 0x40d8a5
test r8d, r8d
jg 0x40d8b8
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret

Function at 0x40d9b0
Capabilities:
Allocate thread local storage

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x40d9e0
mov rdx, r12
mov dword [rbx], eax
add rsp, 0x28
pop rbx
pop r12
jmp dbg.__mingwthr_key_dtor
add rsp, 0x28
pop rbx
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x40da20
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12d, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x40da60
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40da78
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x41c640
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9, qword [rcx + 0x40]
mov rsi, rdx
mov rbx, rcx
mov edx, 1
mov rcx, rsi
call sym.fread
mov edx, 0xffffffff
test rax, rax
jle 0x41c66c
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x41d2e0
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x30
cmp byte [0x004ebf60], 0
jne 0x41d3ea
mov byte [0x004ebf60], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x41d3c0
mov r12, qword [rax + 8]
xor eax, eax
lea r9, [rsp + 0x2c]
cmp byte [r12], 0x2a
mov dword [rsp + 0x2c], 0xffffffff
sete al
xor r8d, r8d
xor edx, edx
add r12, rax
mov rcx, r12
call sym.__cxa_demangle
mov ecx, 2
mov rbx, qword [dbg.__acrt_iob_func]
mov r13, rax
call rbx
mov edx, 1
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r8d, 0x30
mov r9, rax
call sym.fwrite
mov edx, dword [rsp + 0x2c]
mov ecx, 2
test edx, edx
je 0x41d3b1
call rbx
mov rcx, r12
mov rdx, rax
call sym.fputs
mov ecx, 2
call rbx
mov r8d, 2
mov edx, 1
lea rcx, [0x004edc71]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x41d3ac
mov rcx, r13
call sym.free
call sym.__cxa_rethrow
call rbx
mov rcx, r13
mov rdx, rax
call sym.fputs
jmp 0x41d37b
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x2d
mov edx, 1
lea rcx, str.terminate_called_without_an_active_exception_n
mov r9, rax
call sym.fwrite
call sym.abort
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x1d
mov edx, 1
lea rcx, str.terminate_called_recursively_n
mov r9, rax
call sym.fwrite
call sym.abort
sub rdx, 1
mov rcx, rax
jne 0x41d47f
call sym.__cxa_begin_catch
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov r12, rax
call rbx
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
call rbx
mov rdx, rax
mov rcx, r12
call sym.fputs
mov ecx, 2
call rbx
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x41d3e5
call sym.__cxa_begin_catch
call sym.__cxa_end_catch
jmp 0x41d3e5

Function at 0x481340
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
jmp 0x481367
call rbp
cmp dword [rax], 4
jne 0x481384
mov rcx, rdi
call method.std::__basic_file_char_.fd__
mov r8d, ebx
mov rdx, rsi
mov ecx, eax
call sym.read
movsxd r12, eax
cmp eax, 0xffffffff
je 0x481360
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x1400037f0
Capabilities:
Encode data using xor

Disassembly:
push rsi
sub rsp, 0x80
xor eax, eax
mov dword [rsp + 0x6c], 0x6669cab2
mov r9d, dword [rsp + 0x6c]
xor r9d, 0x6669cab2
mov r10d, r8d
xor r10d, 0xffffffff
mov dword [rsp + 0x7c], r10d
cmp r8d, r9d
mov qword [rsp + 0x60], rdx
mov dword [rsp + 0x5c], r8d
mov qword [rsp + 0x50], rcx
mov dword [rsp + 0x4c], eax
je 0x1400038a4
mov eax, dword [rsp + 0x4c]
lea rcx, [0x1400252c0]
mov edx, eax
and edx, 0xf
mov edx, edx
mov r8d, edx
mov edx, dword [rsp + 0x6c]
xor edx, 0x6669cab3
mov r9, qword [rsp + 0x50]
mov qword [rsp + 0x40], rcx
mov rcx, r9
mov r10, qword [rsp + 0x60]
mov dword [rsp + 0x3c], edx
mov rdx, r10
mov qword [rsp + 0x30], r8
mov r8d, eax
mov r11, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x30]
movzx r9d, byte [r11 + rsi]
mov dword [rsp + 0x2c], eax
call sym.MFC42u.dll_Ordinal_910
mov eax, dword [rsp + 0x2c]
mov r8d, dword [rsp + 0x3c]
add eax, r8d
mov r8d, dword [rsp + 0x5c]
cmp eax, r8d
mov dword [rsp + 0x4c], eax
jne 0x140003832
add rsp, 0x80
pop rsi
ret

Function at 0x140003980
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x48
mov eax, 0x173a69d7
mov edx, 0x4223d576
mov dword [rsp + 0x3c], 0x25b1be8b
sub edx, dword [rsp + 0x3c]
mov dword [rsp + 0x38], edx
mov edx, dword [rsp + 0x38]
add edx, 0x496e9615
mov r8d, dword [rcx + 0x3c]
mov qword [rsp + 0x40], 0x3a880ee1
movsxd r9, r8d
mov r10, rcx
add r10, r9
mov r8d, dword [rcx + r9]
cmp eax, edx
mov qword [rsp + 0x30], r10
mov dword [rsp + 0x2c], r8d
jae 0x1400039f3
xor eax, eax
mov ecx, dword [rsp + 0x2c]
sub ecx, 0x4550
mov edx, eax
mov r8, qword [rsp + 0x30]
cmove rdx, r8
mov rax, rdx
mov dword [rsp + 0x28], ecx
add rsp, 0x48
ret
mov rax, qword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, 0x3a59ad19
call rax
xor ecx, ecx
mov eax, ecx
add rsp, 0x48
ret
Function at 0x14000145c
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov dil, byte [0x140025d80]
mov rbx, rcx
call fcn.140004940
cmp qword [rbx + 0x18], 0xf
jbe 0x140001484
mov rdx, qword [rbx]
mov rcx, rdx
jmp 0x14000148a
mov rcx, rbx
mov rdx, rbx
mov r8, qword [rbx + 0x10]
add r8, rcx
mov rcx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x14000149e
mov rcx, qword [rbx]
cmp rcx, r8
je 0x1400014b6
sub rdx, rcx
mov al, dil
xor al, byte [rcx]
mov byte [rdx + rcx], al
inc rcx
cmp rcx, r8
jne 0x1400014a6
mov rax, rbx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x1400043e4
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rbx, rcx
lea rcx, str.user32.dll
call qword [rbx]
lea rcx, str.advapi32.dll
mov rbp, rax
call qword [rbx]
lea rcx, str.shell32.dll
mov rdi, rax
call qword [rbx]
mov rsi, rax
test rbp, rbp
je 0x14000451f
test rdi, rdi
je 0x14000451f
test rax, rax
je 0x14000451f
lea rdx, str.MessageBoxA
mov rcx, rbp
call qword [rbx + 8]
lea rdx, str.RegOpenKeyExA
mov rcx, rdi
mov r14, rax
call qword [rbx + 8]
lea rdx, str.ShellExecuteA
mov rcx, rsi
mov rdi, rax
call qword [rbx + 8]
mov rbx, rax
test r14, r14
je 0x14000451f
test rdi, rdi
je 0x14000451f
test rax, rax
je 0x14000451f
mov ebp, 0x40
lea r9, [rsp + 0x40]
mov r8d, ebp
mov rcx, r14
lea r15d, [rbp - 0x3e]
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x40]
mov esi, 0x9090
mov edx, r15d
mov rcx, r14
mov word [r14], si
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea r9, [rsp + 0x40]
mov r8d, ebp
mov edx, r15d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x40]
mov edx, r15d
mov word [rdi], si
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea r9, [rsp + 0x40]
mov r8d, ebp
mov edx, r15d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x40]
mov edx, r15d
mov word [rbx], si
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret

Function at 0x140004538
Capabilities:
Check for debugger via api

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
jne 0x140004595
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CheckRemoteDebuggerPresent]
cmp dword [rsp + 0x30], 0
jne 0x140004595
call fcn.140001680
test al, al
jne 0x14000458e
call fcn.1400022cc
test al, al
jne 0x14000458e
call fcn.1400025c4
call fcn.140002bdc
call fcn.140003ddc
xor eax, eax
add rsp, 0x28
ret
mov eax, 1
jmp 0x140004589
mov ecx, 1
call fcn.14000acd0
int3
Function at 0x1400045fc
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
mov r8d, dword [0x140025d90]
lea rdi, [0x140025d90]
mov r9d, 0x270
cmp r8d, r9d
jne 0x140004673
lea r8, [0x140025d98]
mov r10d, 0x7fffffff
mov r11d, 0x9908b0df
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
and edx, r10d
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r9, 1
jne 0x140004632
mov r8d, dword [0x140025d90]
jmp 0x140004747
cmp r8d, 0x4e0
jb 0x140004747
xor r8d, r8d
mov r10d, 0x7fffffff
mov ebx, r8d
mov r11d, 0x9908b0df
mov r9d, 0x38c
mov eax, dword [rbx + rdi + 0x9c4]
mov edx, eax
xor edx, dword [rbx + rdi + 0x9c8]
and edx, r10d
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [rbx + rdi + 0xff8]
xor ecx, edx
mov dword [rbx + rdi + 4], ecx
add rbx, 4
cmp rbx, r9
jb 0x140004698
mov eax, dword [r9 + rdi + 0x9c4]
mov edx, eax
xor edx, dword [r9 + rdi + 0x9c8]
and edx, r10d
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, dword [r9 + rdi - 0x388]
xor ecx, edx
mov dword [r9 + rdi + 4], ecx
add r9, 4
cmp r9, 0x9bc
jb 0x1400046d0
mov edx, dword [0x140027110]
xor edx, dword [0x140025d94]
and edx, r10d
mov dword [0x140025d90], r8d
xor edx, dword [0x140027110]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, r11d
xor ecx, edx
xor ecx, dword [0x1400263c4]
mov dword [0x140026750], ecx
mov rbx, qword [rsp + 8]
mov eax, r8d
mov ecx, dword [rdi + rax*4 + 4]
inc eax
mov rdi, qword [rsp + 0x10]
mov dword [0x140025d90], eax
mov eax, ecx
shr eax, 0xb
and eax, dword [0x140027114]
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
ret

Function at 0x140005bec
Capabilities:
Parse pe header

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

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x14000ab3b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000ab3b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000ab3b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000ab3b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000ab3b
cmp dword [rcx + 0x84], 0xe
jbe 0x14000ab3b
cmp dword [rcx + 0xf8], 0
je 0x14000ab3b
mov ecx, ebx
call fcn.14000abec
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.14000a9c8
nop
cmp dword [rbp + 0x20], 0
je 0x14000ab89
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000ab94
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000aacc

Function at 0x14000acd0
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x14000ab3b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000ab3b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000ab3b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000ab3b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000ab3b
cmp dword [rcx + 0x84], 0xe
jbe 0x14000ab3b
cmp dword [rcx + 0xf8], 0
je 0x14000ab3b
mov ecx, ebx
call fcn.14000abec
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.14000a9c8
nop
cmp dword [rbp + 0x20], 0
je 0x14000ab89
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000ab94
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000aacc
Function at 0x14000ff28
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 0x14000ff58
xor eax, eax
jmp 0x14001001b
mov rbp, rbx
cmp word [rax], si
je 0x14000ff7d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000ff64
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000ff60
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.14000fe48
movsxd r14, eax
test eax, eax
jne 0x14000ffbb
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000ff51
mov rcx, r14
call fcn.14000e624
mov rdi, rax
test rax, rax
jne 0x14000ffd4
xor ecx, ecx
call fcn.14000c92c
jmp 0x14000ffb0
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.14000fe48
test eax, eax
jne 0x140010005
mov rcx, rdi
call fcn.14000c92c
jmp 0x14001000f
xor ecx, ecx
call fcn.14000c92c
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 0x140013678
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.14000d7dc
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140013702
cmp byte [rbp - 0x21], r15b
je 0x1400136fd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140013738
call fcn.14000e254
test eax, eax
jne 0x140013724
cmp byte [rbp - 0x21], r15b
je 0x14001371c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140013738
cmp byte [rbp - 0x21], r15b
je 0x140013735
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.14000d660
test eax, eax
jne 0x1400137d8
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14000d7dc
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140013777
cmp byte [rbp - 0x21], r15b
je 0x1400137ac
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400137ac
call fcn.14000e254
test eax, eax
jne 0x140013798
cmp byte [rbp - 0x21], r15b
je 0x140013791
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400137ac
cmp byte [rbp - 0x21], r15b
je 0x1400137a9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.14000d660
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400137d8
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400137db
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400137e9
mov rcx, rdi
call fcn.14000c92c
cmp byte [rbp + 0x3f], r15b
je 0x1400137f8
mov rcx, qword [rbp + 0x27]
call fcn.14000c92c
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140016580
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400165a8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400165a8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140011098
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x1400110d6
cmp word [rcx], 0x5a4d
jne 0x1400110d6
movsxd rdx, dword [rcx + 0x3c]
cmp edx, 0x400
jg 0x1400110d6
call fcn.1400075c9
mov rcx, qword [0x140ddd3f0]
mov rbx, rax
call fcn.140015130
cmp byte [rax], 0
jne 0x1400110d6
cmp dword [rbx], 0x4550
je 0x1400110d8
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
ret

Function at 0x140014c40
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140ddd440]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [0x140ddd420]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140014c78
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140014c80
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

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

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

Function at 0x140014e00
Capabilities:
Parse pe header

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

Function at 0x140014ec0
Capabilities:
Parse pe header

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