joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18001d6e0
Capabilities:
Get system information on windows

Disassembly:
mov r11, rsp
sub rsp, 0x68
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor eax, eax
lea rcx, [r11 - 0x48]
mov qword [r11 - 0x48], rax
mov qword [r11 - 0x40], rax
mov qword [r11 - 0x38], rax
mov qword [r11 - 0x30], rax
mov qword [r11 - 0x28], rax
mov qword [r11 - 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x68
ret

Function at 0x18001d730
Capabilities:
Check os version
Extract resource via kernel32 functions

Disassembly:
push rbx
sub rsp, 0x170
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov rbx, rcx
xor edx, edx
add rcx, 4
mov r8d, 0x118
call sub.VCRUNTIME140.dll_memset
mov rcx, rbx
mov dword [rbx], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x18001d892
cmp dword [rbx + 4], 6
mov qword [rsp + 0x188], rdi
ja 0x18001d794
jne 0x18001d835
cmp dword [rbx + 8], 2
jb 0x18001d835
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
test rax, rax
je 0x18001d835
mov edx, 1
mov rcx, rax
lea r8d, [rdx + 0xf]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
je 0x18001d835
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x18001d835
movups xmm0, xmmword [0x1800e0f50]
mov rcx, rax
movups xmm1, xmmword [0x1800e0f60]
movups xmmword [rsp + 0x140], xmm0
movups xmmword [rsp + 0x150], xmm1
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdi, rax
test rax, rax
je 0x18001d835
lea rcx, [rax + 6]
lea rdx, [rsp + 0x140]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x18001d835
cmp word [rdi + 2], ax
jbe 0x18001d835
movzx edx, word [rdi + 0x32]
movzx eax, word [rdi + 0x30]
movzx ecx, word [rdi + 0x36]
mov dword [rbx + 4], edx
mov dword [rbx + 8], eax
mov dword [rbx + 0xc], ecx
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.RtlGetVersion
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
test rax, rax
je 0x18001d886
xor edx, edx
lea rcx, [rsp + 0x24]
mov r8d, 0x118
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x11c
call rdi
test eax, eax
jne 0x18001d886
mov eax, dword [rsp + 0x2c]
mov dword [rbx + 0xc], eax
mov rdi, qword [rsp + 0x188]
mov al, 1
jmp 0x18001d894
xor al, al
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x170
pop rbx
ret
Function at 0x180021a00
Capabilities:
Set file attributes

Disassembly:
push rdi
sub rsp, 0x50
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rsi
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov edi, edx
mov rbx, rcx
and edi, 0xffffb1af
cmp qword [rcx + 0x18], 8
jb 0x180021a3d
mov rcx, qword [rcx]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x180021a50
mov al, 1
jmp 0x180021afe
xor esi, esi
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x40], 7
mov word [rsp + 0x28], si
lea rdx, [rsp + 0x28]
mov rcx, rbx
call fcn.1800221e0
test al, al
je 0x180021aa1
lea rcx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rcx, qword [rsp + 0x28]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x180021aa1
mov bl, 1
jmp 0x180021aa3
xor bl, bl
mov rdx, qword [rsp + 0x40]
cmp rdx, 8
jb 0x180021ae8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180021ae3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180021ae3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800c8534
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x40], 7
mov word [rsp + 0x28], si
movzx eax, bl
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1800c8510
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret

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

Disassembly:
push rdi
sub rsp, 0x50
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rsi
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rbx, rcx
cmp qword [rcx + 0x18], 8
jb 0x180021b55
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp eax, 0xffffffff
jne 0x180021c06
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x38], xmm0
movdqa xmm1, xmmword [0x1800e7190]
movdqu xmmword [rsp + 0x38], xmm1
xor esi, esi
mov word [rsp + 0x28], si
lea rdx, [rsp + 0x28]
mov rcx, rbx
call fcn.1800221e0
test al, al
je 0x180021bae
lea rcx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
mov rdx, qword [rsp + 0x40]
cmp rdx, 8
jb 0x180021bf3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180021bee
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180021bee
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800c8534
movdqa xmm0, xmmword [0x1800e7190]
movdqu xmmword [rsp + 0x38], xmm0
mov word [rsp + 0x28], si
mov eax, edi
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1800c8510
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x180021f70
Capabilities:
Get common file path

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x240
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x230], rax
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
xor edx, edx
mov r8d, 0x20c
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll_memset
cmp qword [rdi + 0x18], 8
jb 0x180021fb2
mov rdi, qword [rdi]
cmp qword [rbx + 0x18], 8
jb 0x180021fbc
mov rbx, qword [rbx]
lea r9, [rsp + 0x20]
xor r8d, r8d
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x18002200c
xor eax, eax
mov r8, 0xffffffffffffffff
mov word [rsp + 0x22a], ax
lea rax, [rsp + 0x20]
nop word [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x180021ff0
lea rdx, [rsp + 0x20]
mov rcx, rsi
call fcn.180007980
mov al, 1
jmp 0x18002200e
xor al, al
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x240
pop rdi
pop rsi
pop rbx
ret

Function at 0x180023650
Capabilities:
Check os version

Disassembly:
push rbx
sub rsp, 0x150
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rbx, rcx
mov ecx, 1
call fcn.1800c87e0
mov qword [rbx], rax
lea rcx, [rsp + 0x24]
xor edx, edx
mov r8d, 0x118
mov byte [rax], 0
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
mov rax, rbx
je 0x1800236b7
cmp dword [rsp + 0x24], 6
mov rcx, qword [rbx]
setae dl
mov byte [rcx], dl
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x150
pop rbx
ret
Function at 0x180027960
Capabilities:
Get disk information

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0xb8], rbx
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov ebp, r8d
mov r14, rdx
mov r15, rcx
xor r12d, r12d
mov qword [rsp + 0x48], r12
mov ebx, r12d
mov qword [rsp + 0x48], rbx
lea r13, [r12 - 1]
cmp r8d, 0x3fe
jbe 0x180027a33
lea ecx, [rbp + 2]
mov eax, 2
mul rcx
cmovo rax, r13
mov rcx, rax
call fcn.1800c9074
mov r14, rax
mov rbx, rax
mov qword [rsp + 0x48], rax
mov rdx, rax
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
test eax, eax
je 0x1800279ff
cmp eax, ebp
ja 0x1800279ff
mov ecx, eax
mov word [rbx + rcx*2], r12w
lea ecx, [rax + 1]
mov word [rbx + rcx*2], r12w
mov ebp, eax
jmp 0x180027a62
test r14, r14
je 0x180027a0c
mov rcx, r14
call fcn.1800c8534
xor al, al
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1800c8510
mov rbx, qword [rsp + 0xb8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rax, rbp
add rax, rax
cmp rax, 0x800
jae 0x180027b96
mov word [rax + rdx], r12w
lea ecx, [rbp + 1]
add rcx, rcx
cmp rcx, 0x800
jae 0x180027b90
mov word [rcx + rdx], r12w
mov eax, r12d
mov edi, r12d
test ebp, ebp
je 0x180027b75
mov rsi, r14
cmp word [rsi], 0
jne 0x180027b67
cmp eax, edi
je 0x180027b67
lea rdx, [r14 + rax*2]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], 7
mov word [rsp + 0x20], r12w
mov r8, r13
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x180027ab0
lea rcx, [rsp + 0x20]
call fcn.180007980
nop
mov rdx, qword [r15 + 8]
cmp qword [r15 + 0x10], rdx
je 0x180027b04
mov qword [rdx + 0x10], r12
mov qword [rdx + 0x18], r12
movups xmm0, xmmword [rsp + 0x20]
movups xmmword [rdx], xmm0
movups xmm1, xmmword [rsp + 0x30]
movups xmmword [rdx + 0x10], xmm1
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], 7
mov word [rsp + 0x20], r12w
add qword [r15 + 8], 0x20
jmp 0x180027b12
lea r8, [rsp + 0x20]
mov rcx, r15
call fcn.18001b010
nop
mov rdx, qword [rsp + 0x38]
cmp rdx, 8
jb 0x180027b50
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180027b4b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180027b89
call fcn.1800c8534
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], 7
mov word [rsp + 0x20], r12w
lea eax, [rdi + 1]
inc edi
add rsi, 2
cmp edi, ebp
jb 0x180027a73
test rbx, rbx
je 0x180027b82
mov rcx, rbx
call fcn.1800c8534
mov al, 1
jmp 0x180027a0e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800c864c
int3
call fcn.1800c864c
int3
Function at 0x1800288d0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rdi
sub rsp, 0x450
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x440], rax
lea rax, [rsp + 0x30]
mov rdi, rax
xor eax, eax
mov ecx, 0x410
rep stosb byte [rdi], al
mov qword [rsp + 0x20], 0
lea r8, [rsp + 0x20]
mov edx, dword [rsp + 0x460]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x180028929
xor al, al
jmp 0x18002897b
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
jne 0x180028954
cmp qword [rsp + 0x20], 0
je 0x180028950
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
xor al, al
jmp 0x18002897b
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x468]
call fcn.180007480
cmp qword [rsp + 0x20], 0
je 0x180028979
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov al, 1
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x450
pop rdi
ret
Function at 0x18002a690
Capabilities:
Check os version

Disassembly:
sub rsp, 0x158
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x140], rax
xor edx, edx
mov dword [rsp + 0x20], VarUI4FromDisp
mov r8d, VarUI4FromDisp
lea rcx, [rsp + 0x24]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x18002a6fe
mov eax, dword [rsp + 0x24]
cmp eax, 5
ja 0x18002a6e4
jne 0x18002a6fe
cmp dword [rsp + 0x28], 0
jbe 0x18002a6fe
mov al, 1
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x158
ret
xor al, al
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x158
ret

Function at 0x18002a720
Capabilities:
Check os version

Disassembly:
sub rsp, 0x158
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x140], rax
xor edx, edx
mov dword [rsp + 0x20], VarUI4FromDisp
mov r8d, VarUI4FromDisp
lea rcx, [rsp + 0x24]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x18002a77a
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x158
ret
cmp dword [rsp + 0x24], 6
setae al
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x158
ret

Function at 0x18002a7a0
Capabilities:
Check os version

Disassembly:
sub rsp, 0x158
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x140], rax
xor edx, edx
mov dword [rsp + 0x20], VarUI4FromDisp
mov r8d, VarUI4FromDisp
lea rcx, [rsp + 0x24]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x18002a80e
mov eax, dword [rsp + 0x24]
cmp eax, 6
ja 0x18002a7f4
jb 0x18002a80e
cmp dword [rsp + 0x28], 1
jb 0x18002a80e
mov al, 1
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x158
ret
xor al, al
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1800c8510
add rsp, 0x158
ret

Function at 0x18002a860
Capabilities:
Get session user name

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x250
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x240], rax
xor edi, edi
mov rbx, rcx
mov qword [rcx], rdi
cmp qword [0x1801222a0], rdi
jne 0x18002a8eb
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x20a
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x104
lea rcx, [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea rax, [rsp + 0x30]
mov word [rsp + 0x236], di
mov r8, 0xffffffffffffffff
nop
inc r8
cmp word [rax + r8*2], di
jne 0x18002a8d0
lea rdx, [rsp + 0x30]
lea rcx, [0x180122290]
call fcn.180007980
mov rax, rbx
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1800c8510
mov rbx, qword [rsp + 0x268]
add rsp, 0x250
pop rdi
ret
Function at 0x18002a990
Capabilities:
Check os version
Get session user name

Disassembly:
mov rax, rsp
push rsi
push rdi
push r14
sub rsp, 0x260
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov rsi, rcx
mov eax, dword [0x18012468c]
test eax, eax
jle 0x18002a9dd
inc eax
mov dword [0x18012468c], eax
mov al, 1
jmp 0x18002ab3d
xor bpl, bpl
xor r14d, r14d
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r14d
lea ecx, [r14 + 1]
call fcn.1800c87e0
mov rbx, rax
mov qword [rsp + 0x30], rax
mov byte [rax], bpl
xor edx, edx
mov r8d, 0x118
lea rcx, [rsp + 0x44]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x40], 0x11c
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x18002aa34
cmp dword [rsp + 0x44], 6
setae al
mov byte [rbx], al
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x28]
call fcn.180024720
movzx ebx, al
lea rcx, [rsp + 0x30]
call fcn.1800236d0
test bl, bl
je 0x18002ab26
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
test rax, rax
je 0x18002ab26
lea rdx, str.ImpersonateLoggedOnUser
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, qword [rsp + 0x28]
mov rcx, rbx
call rax
test eax, eax
je 0x18002ab1b
inc dword [0x18012468c]
mov rcx, qword [rsi]
test rcx, rcx
je 0x18002aaa7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi], rbx
mov rbx, r14
mov bpl, 1
cmp qword [0x1801222c0], rbx
jne 0x18002ab1b
xor edx, edx
mov r8d, 0x20a
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x20], 0x104
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
mov word [rsp + 0x246], r14w
lea rax, [rsp + 0x40]
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp word [rax + r8*2], bx
jne 0x18002ab00
lea rdx, [rsp + 0x40]
lea rcx, [0x1801222b0]
call fcn.180007980
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x18002ab2b
mov rbx, qword [rsp + 0x28]
test rbx, rbx
je 0x18002ab39
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, bpl
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.1800c8510
lea r11, [rsp + 0x260]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
Function at 0x18002f780
Capabilities:
Extract resource via kernel32 functions

Disassembly:
test rcx, rcx
je 0x18002f925
push rdi
push r14
push r15
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], rsi
mov r15d, r9d
mov rbx, rdx
mov r14, rcx
test rdx, rdx
je 0x18002f90d
movzx edx, r8w
lea r8, [0x1800e1848]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
jne 0x18002f7df
xor ebx, ebx
jmp 0x18002f8e2
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
test eax, eax
jne 0x18002f7f8
xor ebx, ebx
jmp 0x18002f8e2
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x18002f810
xor ebx, ebx
jmp 0x18002f8e2
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbx, rax
test rax, rax
je 0x18002f8e2
mov rdx, rbp
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rsi, rax
test rax, rax
jne 0x18002f842
xor ebx, ebx
jmp 0x18002f8e2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalLock]
test rax, rax
jne 0x18002f860
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
xor ebx, ebx
jmp 0x18002f8e2
mov r8, rbp
mov rdx, rbx
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor ebx, ebx
mov qword [rsp + 0x50], rbx
lea r8, [rsp + 0x50]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x18002f8d9
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x18002f8d9
call fcn.18002aca0
mov rdi, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rcx]
call qword [rdx + 0x10]
test rdi, rdi
je 0x18002f8d4
mov ecx, dword [rdi + 0x10]
mov dword [rdi + 0x10], ebx
test ecx, ecx
je 0x18002f8d4
mov rax, qword [rdi]
lea edx, [rbx + 1]
mov rcx, rdi
call qword [rax]
mov edi, ebx
mov rbx, rdi
jmp 0x18002f8e2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov qword [rsp + 0x28], rbx
test rbx, rbx
je 0x18002f8fb
mov r8d, r15d
mov rdx, rbx
mov rcx, r14
call fcn.18002f5c0
nop
test rbx, rbx
je 0x18002f90d
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax]
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x18003f660
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r14
sub rsp, 0x460
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x450], rax
mov rbx, rdx
mov r14d, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x30], rdx
xor esi, esi
mov qword [rdx + 0x10], rsi
mov rax, rdx
cmp qword [rdx + 0x18], 8
jb 0x18003f6a4
mov rax, qword [rdx]
mov word [rax], si
call fcn.18003f780
movzx edi, al
mov byte [rsp + 0x20], al
jmp 0x18003f6c9
test dil, dil
jne 0x18003f749
cmp r14d, 0x1a
jne 0x18003f749
mov qword [rbx + 0x10], rsi
mov rax, rbx
cmp qword [rbx + 0x18], 8
jb 0x18003f6e5
mov rax, qword [rbx]
mov word [rax], si
xor edx, edx
mov r8d, 0x410
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x207
lea rdx, [rsp + 0x40]
lea rcx, str.APPDATA
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea rax, [rsp + 0x40]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp word [rax + r8*2], 0
jne 0x18003f720
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.180007980
movzx edi, dil
mov eax, 1
cmp qword [rbx + 0x10], 0
cmovne edi, eax
movzx eax, dil
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.1800c8510
mov rbx, qword [rsp + 0x490]
add rsp, 0x460
pop r14
pop rdi
pop rsi
ret

Function at 0x18003fa30
Capabilities:
Query environment variable

Disassembly:
mov rdx, rcx
mov ecx, 0x1a
jmp fcn.18003f660

Function at 0x18003fcc0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x40
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov rsi, rdx
mov rdi, rcx
mov rcx, qword [rcx]
xor ebp, ebp
test rcx, rcx
je 0x18003fcfe
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi], rbp
mov word [rdi + 8], bp
mov qword [rsp + 0x28], rbp
lea rcx, [rsp + 0x28]
call fcn.18004b290
nop
mov rbx, qword [rsp + 0x28]
cmp qword [rbx], 0
lea rcx, [rbx + 0x10]
jne 0x18003fd24
mov rcx, rbp
cmp qword [rsi + 0x10], 0
je 0x18003fd37
cmp qword [rsi + 0x18], 8
jb 0x18003fd3a
mov rsi, qword [rsi]
jmp 0x18003fd3a
mov rsi, rbp
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rdi], rax
test rax, rax
je 0x18003fd5e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x18003fd5e
mov byte [rdi + 9], 1
cmp qword [rdi], 0
setne sil
mov rdi, qword [rbx]
test rdi, rdi
je 0x18003fd85
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rbx], rbp
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x18003fd98
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbx + 8], rbp
mov edx, 0x58
mov rcx, rbx
call fcn.1800c8534
mov qword [rsp + 0x28], rbp
movzx eax, sil
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1800c8510
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
Function at 0x18003fdd0
Capabilities:
Check mutex on windows

Disassembly:
push rsi
push rdi
push r14
sub rsp, 0x40
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbp
mov rax, qword [0x180122010]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov rsi, rdx
mov rdi, rcx
mov rcx, qword [rcx]
xor r14d, r14d
test rcx, rcx
je 0x18003fe15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi], r14
mov word [rdi + 8], r14w
mov qword [rsp + 0x28], r14
lea rcx, [rsp + 0x28]
call fcn.18004b3b0
nop
mov rbx, qword [rsp + 0x28]
cmp qword [rbx], 0
lea rbp, [rbx + 0x10]
jne 0x18003fe3c
mov rbp, r14
cmp qword [rsi + 0x10], 0
je 0x18003fe52
mov r8, rsi
cmp qword [rsi + 0x18], 8
jb 0x18003fe55
mov r8, qword [rsi]
jmp 0x18003fe55
mov r8, r14
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rdi], rax
test rax, rax
jne 0x18003fea3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x18003fea3
lea ecx, [rax + 5]
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp qword [rsi + 0x10], 0
je 0x18003fe8f
cmp qword [rsi + 0x18], 8
jb 0x18003fe92
mov rsi, qword [rsi]
jmp 0x18003fe92
mov rsi, r14
mov r8, rsi
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rdi], rax
mov rax, qword [rdi]
test rax, rax
je 0x18003feca
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x18003febc
mov byte [rdi + 9], 1
mov rcx, qword [rdi]
call fcn.180024c20
mov rax, qword [rdi]
test rax, rax
setne sil
mov rdi, qword [rbx]
test rdi, rdi
je 0x18003feed
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rbx], r14
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x18003ff00
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbx + 8], r14
mov edx, 0x58
mov rcx, rbx
call fcn.1800c8534
mov qword [rsp + 0x28], r14
movzx eax, sil
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1800c8510
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret