joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140031580
Capabilities:
Query environment variable

Disassembly:
push r15
mov eax, 0x10088
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.140099700
sub rsp, rax
xor edx, edx
mov rbp, rcx
xor ecx, ecx
mov word [rsp + 0x80], dx
lea r15, [rsp + 0x30]
movzx eax, byte [rbp]
mov word [rsp + 0x30], cx
test al, al
je 0x14003164d
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop word cs:[rax + rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x1400aa8e4
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x14003162e
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x140031620
test rsi, rsi
je 0x1400aa8e4
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x1400315e0
lea rbx, [rsp + 0x80]
mov r8d, 0x10000
mov rcx, r15
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x14003167c
mov rcx, rbx
call sub.msvcrt.dll__wcsdup
add rsp, 0x10088
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140031690
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
movzx eax, byte [rcx]
mov qword [rsp + 0xd8], rdx
xor edx, edx
mov rbp, rcx
lea r15, [rsp + 0x30]
mov word [rsp + 0x30], dx
test al, al
je 0x14003174d
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop dword [rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x1400aa8ea
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x14003172e
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x140031720
test rsi, rsi
je 0x1400aa8ea
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x1400316e0
mov rdx, qword [rsp + 0xd8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140031780
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
xor edx, edx
movzx eax, byte [rcx]
mov word [rsp + 0x30], dx
mov rbp, rcx
lea r15, [rsp + 0x30]
test al, al
je 0x14003183d
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop word cs:[rax + rax]
nop
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x1400aa8f0
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x14003181e
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x140031810
test rsi, rsi
je 0x1400aa8f0
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x1400317d0
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x1400495d0
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rbx, qword [0x1400cfda0]
mov rsi, rcx
test rbx, rbx
je 0x140049650
mov rax, qword [0x1400be980]
mov rcx, qword [rax + 0x48]
cmp rbx, rcx
je 0x140049640
mov rdx, qword [0x1400cffe8]
test rdx, rdx
je 0x140049748
mov rcx, rbx
mov rbx, qword [sym.imp.python38.dll_PyNumber_InPlaceAdd]
call rbx
mov rcx, rax
mov rdx, rsi
mov rax, rbx
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp rax
mov rbx, qword [sym.imp.python38.dll_PyNumber_InPlaceAdd]
jmp 0x140049621
lea r15, str.NUITKA_ONEFILE_BINARY
mov rcx, r15
call fcn.140031580
test rax, rax
je 0x140049768
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
xor ecx, ecx
mov r13, r14
lea r12, [r15 + 0x28]
mov word [rsp + 0x40], cx
lea rbp, [rsp + 0x3a]
lea rdi, [rsp + 0x3c]
mov qword [rsp + 0x28], rax
mov eax, 0x4e
nop
mov rbx, r12
mov r8d, 2
mov rdx, rbp
mov rcx, rdi
sub rbx, r15
mov byte [rsp + 0x3a], al
mov byte [rsp + 0x3b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x1400aa962
cmp word [r13], 0
movzx edx, word [rsp + 0x3c]
mov rax, r13
je 0x1400496ee
nop word [rax + rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x1400496e0
test rbx, rbx
je 0x1400aa962
mov word [rax], dx
add r15, 1
xor edx, edx
add r13, 2
mov word [rax + 2], dx
movzx eax, byte [r15]
test al, al
jne 0x1400496a0
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python38.dll__PyRuntime]
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rax + 0x510]
call fcn.1400494f0
mov rbx, rax
mov qword [0x1400cfda0], rbx
jmp 0x1400495f2
lea rcx, [0x1400bac80]
call qword [sym.imp.python38.dll_PyUnicode_FromString]
mov qword [0x1400cffe8], rax
mov rdx, rax
jmp 0x140049612
mov rbx, qword [0x1400cfdb0]
test rbx, rbx
jne 0x140049736
cmp byte [0x1400cffe2], 0
je 0x1400497a6
mov rdx, 0xffffffffffffffff
lea rcx, [0x1400cfde0]
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
mov qword [0x1400cfdb0], rax
mov rbx, rax
test rax, rax
je 0x1400497b2
add qword [rax], 1
jmp 0x140049736
mov ecx, 1
call fcn.140031ef0
jmp 0x14004977d
call qword [sym.imp.python38.dll_PyErr_Print]
call sub.msvcrt.dll_abort
nop
nop
Function at 0x14004b7b0
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rsi, str.NUITKA_ONEFILE_BINARY
mov ebx, ecx
mov rcx, rsi
call fcn.140031580
test rax, rax
je 0x14004b910
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
xor ecx, ecx
mov r15, r14
lea r12, [rsi + 0x28]
mov word [rsp + 0x40], cx
mov r13, rax
lea rbp, [rsp + 0x3a]
mov eax, 0x4e
lea rdi, [rsp + 0x3c]
nop word cs:[rax + rax]
nop dword [rax]
mov rbx, r12
mov r8d, 2
mov rdx, rbp
mov rcx, rdi
sub rbx, rsi
mov byte [rsp + 0x3a], al
mov byte [rsp + 0x3b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x1400aa976
cmp word [r15], 0
movzx edx, word [rsp + 0x3c]
mov rax, r15
je 0x14004b86e
nop dword [rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x14004b860
test rbx, rbx
je 0x1400aa976
mov word [rax], dx
add rsi, 1
xor edx, edx
add r15, 2
mov word [rax + 2], dx
movzx eax, byte [rsi]
test al, al
jne 0x14004b820
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python38.dll__PyRuntime]
mov rdx, qword [0x1400d0720]
mov rsi, qword [rax + 0x510]
mov rax, qword [0x1400be980]
mov rbx, qword [rax + 0x1d0]
test rdx, rdx
je 0x14004b960
mov r8, rbx
mov rcx, rsi
call fcn.140035d30
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.1400477d0
sub qword [rbx], 1
jne 0x14004b8fc
mov rdx, qword [rbx + 8]
mov qword [rsp + 0x28], rax
mov rcx, rbx
call qword [rdx + 0x30]
mov rax, qword [rsp + 0x28]
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x1400cfda8]
lea rsi, [0x1400cfda8]
test bl, bl
je 0x14004b930
mov rax, qword [0x1400cfdb0]
lea rsi, [0x1400cfdb0]
test rax, rax
jne 0x14004b8fc
cmp byte [0x1400cffe2], 0
je 0x14004b98d
mov rdx, 0xffffffffffffffff
lea rcx, [0x1400cfde0]
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x14004b997
add qword [rax], 1
jmp 0x14004b8fc
mov rdx, qword [0x1400d0698]
mov rdi, qword [rax + 0x1c0]
test rdx, rdx
je 0x14004b9a2
mov r8, rdi
mov rcx, rsi
call fcn.140035d30
mov qword [0x1400d0720], rax
mov rdx, rax
jmp 0x14004b8c6
movzx ecx, bl
call fcn.140031ef0
jmp 0x14004b93e
call qword [sym.imp.python38.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x1400b6f48]
call qword [sym.imp.python38.dll_PyImport_ImportModule]
mov qword [0x1400d0698], rax
mov rdx, rax
test rax, rax
jne 0x14004b973
lea r8, str._Unexpected_failure_of_hard_import_of_os_
lea rdx, str.IMPORT_HARD_OS
lea rcx, str._s_:__s_n
call fcn.1400332d0
call sub.msvcrt.dll_abort
nop
nop
Function at 0x14008fe70
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp byte [0x1400cfd99], 0
mov rbp, rcx
mov rdi, rdx
mov r12, r8
je 0x14008ff18
lea rdx, [0x1400ba532]
mov rcx, r12
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x14008ff80
mov rbx, qword [0x1400cfc38]
jmp 0x14008febd
lea rbx, [rdx + rax + 4]
mov rdx, rbx
mov rcx, r12
call sub.msvcrt.dll_strcmp
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_strlen
lea rdx, [rbx + rax + 1]
mov eax, dword [rdx]
test esi, esi
jne 0x14008feb8
movzx eax, word [rdx + 4]
lea r8, [rdx + 6]
test ax, ax
je 0x14008ff07
lea rbx, [rdi + rax*8]
nop
mov rdx, rdi
mov rcx, rbp
add rdi, 8
call fcn.1400858b0
mov r8, rax
cmp rdi, rbx
jne 0x14008fef0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r8d, 0xa
xor ecx, ecx
mov edx, 3
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
xor ecx, ecx
lea rdx, [rax + 4]
mov qword [0x1400cfc38], rax
mov ebx, dword [rax]
mov qword [0x1400cfc38], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x1400cfc38], rdx
call fcn.14008ef30
cmp eax, ebx
jne 0x140090022
mov byte [0x1400cfd99], 1
jmp 0x14008fe92
cmp byte [0x1400cfd98], 0
jne 0x14008fea9
mov rbx, qword [sym.imp.python38.dll_PyDict_New]
lea rsi, [0x1400cf428]
call rbx
mov qword [0x1400d0928], rax
call rbx
mov qword [0x1400d0920], rax
call rbx
mov qword [0x1400d0918], rax
call rbx
mov qword [0x1400d0910], rax
call rbx
mov qword [0x1400d0908], rax
call rbx
mov qword [0x1400d0900], rax
call rbx
mov qword [0x1400d08f8], rax
call rbx
mov r13, qword [sym.imp.python38.dll_PyLong_FromLong]
mov rbx, 0xfffffffffffffffb
mov qword [0x1400d08f0], rax
nop word cs:[rax + rax]
nop dword [rax]
mov ecx, ebx
call r13
mov qword [rsi + rbx*8], rax
add rbx, 1
cmp rbx, 0x101
jne 0x140090000
mov byte [0x1400cfd98], 1
jmp 0x14008fea9
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop word cs:[rax + rax]
nop

Function at 0x1400983e0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.1400a98f0
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.1400a98f0
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
Function at 0x1400990b2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400d0d88]
test eax, eax
je 0x14009914a
lea rax, [0x1400d0d60]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400d0d90]
mov qword [rbp - 8], rax
jmp 0x14009912e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140099122
cmp qword [rbp - 0x10], 0
je 0x140099122
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400990e8
lea rax, [0x1400d0d60]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14009914b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140099250
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140099278
mov eax, 0
jmp 0x1400992c6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400992a1
mov eax, 0
jmp 0x1400992c6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x1400992c1
mov eax, 0
jmp 0x1400992c6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x1400992cc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x14009934a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140099341
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140099341
mov rax, qword [rbp - 8]
jmp 0x14009935f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140099314
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004b8f80]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004b8f90]
mov dword [rax], 1
mov rax, qword [0x004b8fa0]
mov dword [rax], 1
mov rax, qword [0x004b8f70]
mov dword [rax], 1
mov rax, qword [0x004b8df0]
cmp word [rax], 0x5a4d
je 0x4010d0
mov rax, qword [0x004b8f60]
mov dword [0x004d4008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010c2
mov ecx, 2
call sym.__set_app_type
mov rcx, 0xffffffffffffffff
call dbg._encode_pointer
mov rdx, qword [0x004b8ea0]
mov qword [rdx], rax
mov rdx, qword [0x004b8e90]
mov qword [rdx], rax
mov rax, qword [0x004b8f20]
mov edx, dword [rax]
mov rax, qword [sym.imp.msvcrt.dll__fmode]
mov rax, qword [rax]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004b84e0]
cmp dword [rax], 1
je 0x401120
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401133
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x40e5b0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movsxd rbp, dword [0x004d4064]
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
test ebp, ebp
jle 0x40e6ca
mov rax, qword [0x004d4068]
xor r9d, r9d
add rax, 8
mov r10, qword [rax]
cmp rbx, r10
jb 0x40e5fe
mov rdx, qword [rax + 8]
mov r11d, dword [rdx + 8]
add r10, r11
cmp rbx, r10
jb 0x40e6b0
add r9d, 1
add rax, 0x18
cmp r9d, ebp
jne 0x40e5e2
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40e702
lea rbp, [rbp + rbp*2]
shl rbp, 3
mov r13, rbp
add r13, qword [0x004d4068]
mov qword [r13 + 0x10], rax
mov dword [r13], 0
call dbg._GetPEImageBase
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [r13 + 8], rax
mov rax, qword [0x004d4068]
mov rcx, qword [rax + rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40e6e5
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40e6a9
sub eax, 0x40
and eax, 0xffffffbf
je 0x40e6a9
mov r9, rbp
add r9, qword [0x004d4068]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40e6d1
add dword [0x004d4064], 1
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sym.memcpy
xor ebp, ebp
jmp 0x40e60b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
mov rax, qword [0x004d4068]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbp + 8]
call dbg.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call dbg.__report_error
nop
nop word cs:[rax + rax]

Function at 0x40f2e0
Capabilities:
Parse pe header

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

Function at 0x40f300
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 0x40f341
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x40f338
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x40f343
add rax, 0x28
cmp rax, r9
jne 0x40f324
xor eax, eax
repz ret

Function at 0x40f3f0
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x004b8df0]
cmp word [rbx], 0x5a4d
je 0x40f410
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rsi, rcx
mov rcx, rbx
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40f404
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp dbg._FindPESection
Function at 0x40f660
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004d49c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004d49a0]
test rbx, rbx
je 0x40f6b4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40f6ab
test rsi, rsi
je 0x40f6ab
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40f690
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x004d49c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax

Function at 0x40fe50
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov rdi, rcx
movsxd r12, edx
mov r13, r8
call sym.strlen
mov rsi, rax
lea ebx, [rax + 0xf]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040f890
sub rsp, rax
movsxd r14, esi
movabs rax, 0x656d68732d636367
lea r15, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov r8, r14
mov rdx, rdi
mov qword [rsp + 0x20], rax
mov eax, 0x326d
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
movsxd rbx, ebx
mov byte [rsp + 0x2e], 0x2d
call sym.memcpy
lea rax, [r15 + r14 + 0x10]
lea r14d, [rsi + 0x50]
movabs rdx, 0x6161616161616161
xor ecx, ecx
mov r8, r15
mov qword [rax], rdx
mov qword [rax + 8], rdx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rdx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rdx
mov qword [rax + 0x30], rdx
mov qword [rax + 0x38], rdx
movsxd rax, r14d
xor edx, edx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + rbx + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + rbx + 0x20], 0x2d
mov rdi, rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40ff39
int3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x40ffd8
mov rcx, r12
call sym.malloc
lea r9d, [rsi + 0x10]
mov rbx, rax
mov r10d, 0x40
bt rbx, r10
jae 0x40ff74
mov r11d, r14d
sub r11d, r10d
movsxd r11, r11d
mov byte [r15 + r11], 0x41
sub r10d, 1
jne 0x40ff60
mov dword [rbp - 0x54], r9d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
mov r9d, dword [rbp - 0x54]
je 0x40ffd5
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call dbg.get_ptr_from_atom
cmp rax, rbx
mov rsi, rax
je 0x40fff0
mov rcx, rbx
call sym.free
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
lea rsp, [rbp - 0x48]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
int3
lea r9d, [rsi + 0x10]
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call dbg.get_ptr_from_atom
mov rsi, rax
jmp 0x40ffaf
xor edx, edx
mov r8, r12
mov rcx, rbx
call sym.memset
test r13, r13
je 0x40ffaf
mov rcx, rbx
call r13
jmp 0x40ffaf
Function at 0x417090
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x60
mov rax, rcx
movzx ecx, word [rcx + 0xa]
and cx, 0x7fff
cmp cx, 0x7fff
je 0x417123
movzx ecx, word [rdx + 0xa]
and cx, 0x7fff
cmp cx, 0x7fff
je 0x417152
lea rsi, [rsp + 0x20]
lea rdi, [rsp + 0x40]
mov rcx, rax
mov rbx, rdx
mov rdx, rsi
call dbg.__emovi
mov rdx, rdi
mov rcx, rbx
call dbg.__emovi
movzx r8d, word [rsp + 0x20]
xor eax, eax
lea rcx, [rsi + 2]
cmp r8w, word [rsp + 0x40]
lea rdx, [rdi + 2]
je 0x417170
cmp word [rcx + rax], 0
jne 0x4171b0
cmp word [rdx + rax], 0
jne 0x4171b0
add rax, 2
cmp rax, 0xe
jne 0x4170f9
xor al, al
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
lea r8, [rax + 0xa]
mov rcx, rax
add rcx, 2
cmp word [rcx - 2], 0
jne 0x4171c5
cmp rcx, r8
jne 0x41712a
movzx ecx, word [rdx + 0xa]
and cx, 0x7fff
cmp cx, 0x7fff
jne 0x4170be
lea r8, [rdx + 0xa]
mov rcx, rdx
add rcx, 2
cmp word [rcx - 2], 0
jne 0x4171c5
cmp rcx, r8
jne 0x417159
jmp 0x4170be
cmp r8w, 1
sbb eax, eax
xor ecx, ecx
add rsi, 2
and eax, 2
sub eax, 1
movzx edx, word [rsi + rcx]
add rcx, 2
movzx r8d, word [rdi + rcx]
cmp dx, r8w
jne 0x4171d2
cmp rcx, 0xe
jne 0x417183
xor eax, eax
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
cmp r8w, 1
sbb eax, eax
and eax, 2
sub eax, 1
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
mov eax, 0xfffffffe
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
cmp r8w, dx
setae dl
movzx edx, dl
mov ecx, edx
neg ecx
xor eax, ecx
add eax, edx
jmp 0x41711b

Function at 0x41b620
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_mutex_global_shmem]
lea rcx, str.mutex_global_shmem
mov edx, 8
jmp sym.__shmem_winpthreads_grab

Function at 0x41b640
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_mutex_global_static_shmem]
lea rcx, str.mutex_global_static_shmem
mov edx, 8
jmp sym.__shmem_winpthreads_grab

Function at 0x41b740
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_mxattr_recursive_shmem]
lea rcx, str.mxattr_recursive_shmem
mov edx, 4
jmp sym.__shmem_winpthreads_grab

Function at 0x41b760
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_mxattr_errorcheck_shmem]
lea rcx, str.mxattr_errorcheck_shmem
mov edx, 4
jmp sym.__shmem_winpthreads_grab

Function at 0x41cd60
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x004d5528]
test rbx, rbx
je 0x41cd90
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x004d5528]
test rax, rax
je 0x41cdb4
cmp dword [rax], 0xffffffff
je 0x41cdd5
add rsp, 0x20
pop rbx
ret
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov rbx, rax
mov qword [0x004d5528], rax
jmp 0x41cd71
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004d5528], rax
jmp 0x41cd85
call sym.abort
nop
nop dword [rax + rax]