joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140156ae0
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.1401d0990
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 0x140156ba5
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 0x1401e18a2
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x140156b86
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x140156b78
test rsi, rsi
je 0x1401e18a2
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x140156b38
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 0x140156bd4
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 0x140156bf0
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 0x140156cad
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 0x1401e18a8
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x140156c8e
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x140156c80
test rsi, rsi
je 0x1401e18a8
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x140156c40
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 0x140175ab0
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 [0x1402117d0]
mov rsi, rcx
test rbx, rbx
je 0x140175b30
mov rax, qword [0x1401f6f10]
mov rcx, qword [rax + 0x48]
cmp rbx, rcx
je 0x140175b20
mov rdx, qword [0x140211a08]
test rdx, rdx
je 0x140175c20
mov rcx, rbx
mov rbx, qword [sym.imp.python312.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.python312.dll_PyNumber_InPlaceAdd]
jmp 0x140175b01
lea r15, str.NUITKA_ONEFILE_BINARY
mov rcx, r15
call fcn.140156ae0
test rax, rax
je 0x140175c40
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python312.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 0x1401e1942
cmp word [r13], 0
movzx edx, word [rsp + 0x3c]
mov rax, r13
je 0x140175bce
nop word [rax + rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x140175bc0
test rbx, rbx
je 0x1401e1942
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 0x140175b80
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
call qword [sym.imp.python312.dll_PyThreadState_Get]
mov rdx, qword [rsp + 0x28]
mov rcx, rax
call fcn.140175940
mov rbx, rax
mov qword [0x1402117d0], rbx
jmp 0x140175ad2
lea rcx, [0x1401f3412]
call qword [sym.imp.python312.dll_PyUnicode_FromString]
mov qword [0x140211a08], rax
mov rdx, rax
jmp 0x140175af2
mov rbx, qword [0x1402117e8]
test rbx, rbx
jne 0x140175c11
cmp byte [0x140211a02], 0
je 0x140175c83
mov rdx, 0xffffffffffffffff
lea rcx, [0x140211800]
call qword [sym.imp.python312.dll_PyUnicode_FromWideChar]
mov qword [0x1402117e8], rax
mov rbx, rax
test rax, rax
je 0x140175c8f
mov eax, dword [rax]
add eax, 1
je 0x140175c11
mov dword [rbx], eax
jmp 0x140175c11
mov ecx, 1
call fcn.140157760
jmp 0x140175c55
call qword [sym.imp.python312.dll_PyErr_Print]
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
call sub.msvcrt.dll_abort
nop
Function at 0x140176510
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.140156ae0
test rax, rax
je 0x140176660
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python312.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 [rax + 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 0x1401e195a
cmp word [r15], 0
movzx edx, word [rsp + 0x3c]
mov rax, r15
je 0x1401765c6
nop dword [rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x1401765b8
test rbx, rbx
je 0x1401e195a
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 0x140176578
mov rcx, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
call qword [sym.imp.python312.dll_PyThreadState_Get]
mov rcx, qword [0x140212140]
mov rsi, rax
mov rax, qword [0x1401f6f10]
mov rbx, qword [rax + 0x1c0]
test rcx, rcx
je 0x1401766cd
mov rdx, rbx
call fcn.1401471b0
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.14016a0e0
mov rdx, qword [rbx]
test edx, edx
js 0x140176642
sub rdx, 1
mov qword [rbx], rdx
je 0x1401766b5
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x1402117e0]
lea rsi, [0x1402117e0]
test bl, bl
je 0x140176680
mov rax, qword [0x1402117e8]
lea rsi, [0x1402117e8]
test rax, rax
jne 0x140176642
cmp byte [0x140211a02], 0
je 0x1401766f7
mov rdx, 0xffffffffffffffff
lea rcx, [0x140211800]
call qword [sym.imp.python312.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x140176701
mov edx, dword [rax]
add edx, 1
je 0x140176642
mov dword [rax], edx
jmp 0x140176642
mov qword [rsp + 0x28], rax
mov rcx, rbx
call qword [sym.imp.python312.dll__Py_Dealloc]
mov rax, qword [rsp + 0x28]
jmp 0x140176642
mov rcx, qword [0x1402120b8]
mov rdi, qword [rax + 0x1b0]
test rcx, rcx
je 0x14017670c
mov rdx, rdi
call fcn.1401471b0
mov qword [0x140212140], rax
mov rcx, rax
jmp 0x140176619
movzx ecx, bl
call fcn.140157760
jmp 0x14017668e
call qword [sym.imp.python312.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x1401edff3]
call qword [sym.imp.python312.dll_PyImport_ImportModule]
mov qword [0x1402120b8], rax
mov rcx, rax
test rax, rax
je 0x1401e195a
jmp 0x1401766e0
Function at 0x1401ccf50
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x1402117c1], 0
mov rbp, rcx
mov rdi, rdx
mov r12, r8
je 0x1401ccff8
lea rdx, [0x1401f2cea]
mov rcx, r12
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1401cd060
mov rbx, qword [0x140211660]
jmp 0x1401ccf95
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 0x1401ccf90
movzx eax, word [rdx + 4]
lea r8, [rdx + 6]
test ax, ax
je 0x1401ccfe7
lea rbx, [rdi + rax*8]
nop word cs:[rax + rax]
mov rdx, rdi
mov rcx, rbp
add rdi, 8
call fcn.1401bcf50
mov r8, rax
cmp rdi, rbx
jne 0x1401ccfd0
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
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 [0x140211660], rax
mov ebx, dword [rax]
mov qword [0x140211660], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x140211660], rdx
call fcn.1401cc080
cmp eax, ebx
jne 0x1401cd0c8
mov byte [0x1402117c1], 1
jmp 0x1401ccf70
cmp byte [0x1402117c0], 0
jne 0x1401ccf87
mov rbx, qword [sym.imp.python312.dll_PyDict_New]
call rbx
mov qword [0x140212368], rax
call rbx
mov qword [0x140212360], rax
call rbx
mov qword [0x140212358], rax
call rbx
mov qword [0x140212350], rax
call rbx
mov qword [0x140212348], rax
call rbx
mov qword [0x140212340], rax
call rbx
mov qword [0x140212338], rax
call rbx
mov byte [0x1402117c0], 1
mov qword [0x140212330], rax
jmp 0x1401ccf87
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x1401cf670
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.1401e0e00
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.1401e0e00
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 0x1401d0342
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140212828]
test eax, eax
je 0x1401d03da
lea rax, [0x140212800]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140212830]
mov qword [rbp - 8], rax
jmp 0x1401d03be
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 0x1401d03b2
cmp qword [rbp - 0x10], 0
je 0x1401d03b2
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 0x1401d0378
lea rax, [0x140212800]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1401d03db
nop
add rsp, 0x30
pop rbp
ret

Function at 0x1401d04e0
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 0x1401d0508
mov eax, 0
jmp 0x1401d0556
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 0x1401d0531
mov eax, 0
jmp 0x1401d0556
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 0x1401d0551
mov eax, 0
jmp 0x1401d0556
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x1401d055c
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 0x1401d05da
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x1401d05d1
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 0x1401d05d1
mov rax, qword [rbp - 8]
jmp 0x1401d05ef
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 0x1401d05a4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x4016e8
Capabilities:
Enumerate processes

Disassembly:
push rbp
sub rsp, 0x160
lea rbp, [rsp + 0x80]
mov dword [rbp + 0xf0], ecx
mov edx, 0
mov ecx, 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rbp + 0xd8], rax
cmp qword [rbp + 0xd8], 0xffffffffffffffff
jne 0x401728
mov eax, 0
jmp 0x4017bf
mov eax, 0x130
mov dword [rbp - 0x60], eax
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0xd8]
mov rcx, rax
call sub.KERNEL32.dll_Process32First
test eax, eax
sete al
test al, al
je 0x401766
mov rax, qword [rbp + 0xd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
jmp 0x4017bf
mov eax, dword [rbp - 0x58]
cmp eax, dword [rbp + 0xf0]
jne 0x40178b
mov rax, qword [rbp + 0xd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x4017bf
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0xd8]
mov rcx, rax
call sub.KERNEL32.dll_Process32Next
test eax, eax
setne al
test al, al
jne 0x401766
mov rax, qword [rbp + 0xd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0x160
pop rbp
ret
Function at 0x4017c8
Capabilities:
Create process on windows

Disassembly:
push rbp
push rdi
push rbx
sub rsp, 0x160
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x100], rcx
lea rdx, [rbp - 0x30]
mov eax, 0
mov ecx, 0xd
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rbp - 0x30], 0x68
mov rcx, qword [rbp + 0x100]
call fcn.004259a0
mov rdx, rax
lea rax, [rbp + 0x40]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessW]
call rax
test eax, eax
setne al
test al, al
je 0x401942
mov eax, dword [rbp + 0x50]
mov dword [rbp + 0xdc], eax
lea rax, [rbp + 0x70]
mov edx, dword [rbp + 0xdc]
mov rcx, rax
call fcn.0040165a
lea rax, [rbp + 0x90]
mov r8, qword [rbp + 0x100]
lea rdx, str.Started:
mov rcx, rax
call fcn.00475c70
lea rax, [rbp + 0x80]
lea rdx, [rbp + 0x90]
lea r8, str._with_PID:
mov rcx, rax
call fcn.00475b50
lea rax, [rbp + 0x60]
lea rcx, [rbp + 0x70]
lea rdx, [rbp + 0x80]
mov r8, rcx
mov rcx, rax
call fcn.00475ba0
lea rax, [rbp + 0x60]
mov rcx, rax
call fcn.00401628
lea rax, [rbp + 0x60]
mov rcx, rax
call fcn.004494e0
lea rax, [rbp + 0x80]
mov rcx, rax
call fcn.004494e0
lea rax, [rbp + 0x90]
mov rcx, rax
call fcn.004494e0
lea rax, [rbp + 0x70]
mov rcx, rax
call fcn.004494e0
mov rax, qword [rbp + 0x48]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x40]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [rbp + 0xdc]
jmp 0x401ab7
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, [rbp + 0xb0]
mov rcx, rax
call fcn.0040165a
lea rax, [rbp + 0xd0]
mov r8, qword [rbp + 0x100]
lea rdx, str.Failed_to_start:
mov rcx, rax
call fcn.00475c70
lea rax, [rbp + 0xc0]
lea rdx, [rbp + 0xd0]
lea r8, str.__Error:
mov rcx, rax
call fcn.00475b50
lea rax, [rbp + 0xa0]
lea rcx, [rbp + 0xb0]
lea rdx, [rbp + 0xc0]
mov r8, rcx
mov rcx, rax
call fcn.00475ba0
lea rax, [rbp + 0xa0]
mov rcx, rax
call fcn.00401628
lea rax, [rbp + 0xa0]
mov rcx, rax
call fcn.004494e0
lea rax, [rbp + 0xc0]
mov rcx, rax
call fcn.004494e0
lea rax, [rbp + 0xd0]
mov rcx, rax
call fcn.004494e0
lea rax, [rbp + 0xb0]
mov rcx, rax
call fcn.004494e0
mov eax, 0
jmp 0x401ab7
add rsp, 0x160
pop rbx
pop rdi
pop rbp
ret
Function at 0x40e6d0
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 [0x004b0064]
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
test ebp, ebp
jle 0x40e7ea
mov rax, qword [0x004b0068]
xor r9d, r9d
add rax, 8
mov r10, qword [rax]
cmp rbx, r10
jb 0x40e71e
mov rdx, qword [rax + 8]
mov r11d, dword [rdx + 8]
add r10, r11
cmp rbx, r10
jb 0x40e7d0
add r9d, 1
add rax, 0x18
cmp r9d, ebp
jne 0x40e702
mov rcx, rbx
call fcn.0040f510
test rax, rax
mov r12, rax
je 0x40e822
lea rbp, [rbp + rbp*2]
shl rbp, 3
mov r13, rbp
add r13, qword [0x004b0068]
mov qword [r13 + 0x10], rax
mov dword [r13], 0
call fcn.0040f630
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [r13 + 8], rax
mov rax, qword [0x004b0068]
mov rcx, qword [rax + rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40e805
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40e7c9
sub eax, 0x40
and eax, 0xffffffbf
je 0x40e7c9
mov r9, rbp
add r9, qword [0x004b0068]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40e7f1
add dword [0x004b0064], 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 sub.msvcrt.dll_memcpy
xor ebp, ebp
jmp 0x40e72b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0040e660
mov rax, qword [0x004b0068]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbp + 8]
call fcn.0040e660
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0040e660
nop
nop word cs:[rax + rax]

Function at 0x40f420
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 0x40f461
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 0x40f458
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x40f463
add rax, 0x28
cmp rax, r9
jne 0x40f444
xor eax, eax
repz ret

Function at 0x40f510
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x00493cb0]
cmp word [rbx], 0x5a4d
je 0x40f530
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rsi, rcx
mov rcx, rbx
call fcn.0040f3e0
test eax, eax
je 0x40f524
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.0040f420
Function at 0x40f780
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004b09c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004b09a0]
test rbx, rbx
je 0x40f7d4
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 0x40f7cb
test rsi, rsi
je 0x40f7cb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40f7b0
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x004b09c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax

Function at 0x40ff70
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 sub.msvcrt.dll_strlen
mov rsi, rax
lea ebx, [rax + 0xf]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040feb0
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 sub.msvcrt.dll_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 0x410059
int3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x4100f8
mov rcx, r12
call sub.msvcrt.dll_malloc
lea r9d, [rsi + 0x10]
mov rbx, rax
mov r10d, 0x40
bt rbx, r10
jae 0x410094
mov r11d, r14d
sub r11d, r10d
movsxd r11, r11d
mov byte [r15 + r11], 0x41
sub r10d, 1
jne 0x410080
mov dword [rbp - 0x54], r9d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
mov r9d, dword [rbp - 0x54]
je 0x4100f5
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call fcn.0040fef0
cmp rax, rbx
mov rsi, rax
je 0x410110
mov rcx, rbx
call fcn.0041a508
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 fcn.0040fef0
mov rsi, rax
jmp 0x4100cf
xor edx, edx
mov r8, r12
mov rcx, rbx
call sub.msvcrt.dll_memset
test r13, r13
je 0x4100cf
mov rcx, rbx
call r13
jmp 0x4100cf