joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41dec0
Capabilities:
Hijack thread execution

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4f8
mov rsi, rcx
call sym.__pth_gpointer_locked
test rax, rax
mov rbx, rax
je 0x41dee9
mov rcx, qword [rax + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x41df00
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rdi, [rsp + 0x20]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x41dee9
lea rbp, [rbx + 0x38]
mov rcx, rbp
call sym.pthread_mutex_lock
call sym.__pthread_self_lite
test rax, rax
je 0x41e0a5
mov rax, qword [rax + 0x1c8]
cmp rsi, rax
je 0x41dfa3
mov eax, dword [rbx + 0x44]
and eax, 3
cmp eax, 3
movzx eax, byte [rbx + 0x40]
je 0x41e000
test al, 3
jne 0x41df8a
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
mov rax, qword [0x004a8540]
test rax, rax
je 0x41e0ac
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41df7b
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbp
call sym.pthread_mutex_unlock
xor eax, eax
jmp 0x41deee
mov rcx, rbp
call sym.pthread_mutex_unlock
test byte [rbx + 0x40], 0xc
jne 0x41dee9
xor eax, eax
jmp 0x41deee
movzx eax, byte [rbx + 0x40]
test al, 3
jne 0x41df8a
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
mov rax, qword [0x004a8540]
test rax, rax
je 0x41e0cc
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41dfd7
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rbx + 0x44]
and eax, 3
cmp eax, 3
jne 0x41df7b
movzx eax, byte [rbx + 0x40]
and dword [rbx + 0x44], 0xfffffffe
mov rcx, rbp
and eax, 0xfffffff3
or eax, 4
mov byte [rbx + 0x40], al
call sym.pthread_mutex_unlock
call sym._pthread_invoke_cancel
test al, 0xc
jne 0x41df8a
test al, 0xf
jne 0x41dee9
mov rcx, qword [rbx + 0x28]
mov dword [rsp + 0x50], 0x100001
call qword [sym.imp.KERNEL32.dll_SuspendThread]
xor edx, edx
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x41df7b
mov rcx, qword [rbx + 0x28]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
lea rax, [sym._pthread_invoke_cancel]
mov rcx, qword [rbx + 0x28]
mov rdx, rdi
mov qword [rsp + 0x118], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
movzx eax, byte [rbx + 0x40]
and dword [rbx + 0x44], 0xfffffffe
and eax, 0xfffffff0
or eax, 5
mov byte [rbx + 0x40], al
mov rax, qword [0x004a8540]
test rax, rax
je 0x41e0ec
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41e08e
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbp
call sym.pthread_mutex_unlock
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x41df7b
xor eax, eax
jmp 0x41df33
lea rcx, str._pthread_cancelling_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004a8540], rax
jmp 0x41df68
lea rcx, str._pthread_cancelling_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004a8540], rax
jmp 0x41dfc4
lea rcx, str._pthread_cancelling_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004a8540], rax
jmp 0x41e07b
Function at 0x41e110
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [0x004a84f8]
mov edi, edx
test rcx, rcx
je 0x41e1f0
call sym.pthread_mutex_lock
mov rcx, rbx
call sym.__pthread_get_pointer
test rax, rax
je 0x41e14a
mov rsi, qword [rax + 0x1c8]
cmp rsi, rbx
je 0x41e170
mov rcx, qword [0x004a84f8]
test rcx, rcx
je 0x41e1c0
mov ebx, 3
call sym.pthread_mutex_unlock
mov eax, ebx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
test byte [rax + 0x40], 0xc
jne 0x41e14a
mov ebx, dword [rax + 0xb4]
test ebx, ebx
jne 0x41e14a
mov rax, qword [rax + 0x28]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x41e14a
mov rcx, qword [0x004a84f8]
test rcx, rcx
je 0x41e217
call sym.pthread_mutex_unlock
test edi, edi
je 0x41e160
sub edi, 2
mov ebx, 0x16
cmp edi, 0x15
ja 0x41e160
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp sym.pthread_cancel
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov rcx, rax
mov qword [0x004a84f8], rax
jmp 0x41e156
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov rcx, rax
mov qword [0x004a84f8], rax
jmp 0x41e12c
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov rcx, rax
mov qword [0x004a84f8], rax
jmp 0x41e19a
Function at 0x41e490
Capabilities:
Create thread
Resume thread

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov r14, rcx
mov r12, rdx
mov rsi, r8
mov rdi, r9
call sym.pop_pthread_mem
test rax, rax
mov rbx, rax
je 0x41e641
test r14, r14
je 0x41e4ca
mov rax, qword [rax + 0x1c8]
mov qword [r14], rax
mov r13, qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rbx + 8], rdi
mov rdi, qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x10], rsi
mov esi, 1
mov dword [rbx + 0xb4], 0
mov dword [rbx + 0x44], 1
mov qword [rbx + 0x28], 0xffffffffffffffff
mov rbp, r13
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
call rdi
test rax, rax
mov qword [rbx + 0x30], rax
jne 0x41e6f0
cmp esi, 1
jne 0x41e530
xor ecx, ecx
call r13
add esi, 1
jmp 0x41e501
mov ecx, 0x14
call rbp
cmp esi, 5
jne 0x41e527
mov rax, qword [rbx + 0x30]
mov qword [rbx + 0x38], 0xffffffffffffffff
mov qword [rbx + 0x60], 0xffffffffffffffff
mov dword [rbx], 0xbab1f00d
mov dword [rbx + 0xb8], 0
mov dword [rbx + 0xb0], 0
test rax, rax
je 0x41e627
test r12, r12
je 0x41e730
mov eax, dword [r12]
mov rsi, qword [r12 + 0x10]
test al, 8
mov dword [rbx + 0x44], eax
jne 0x41e6c0
mov eax, dword [r12 + 0x18]
mov edx, esi
mov dword [rbx + 0xb8], eax
xor ecx, ecx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 4
mov r9, rbx
lea r8, [sym.pthread_create_wrapper]
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov rsi, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x41e5f7
mov edx, dword [rbx + 0xb8]
cmp edx, 0xfffffff2
jl 0x41e655
cmp edx, 0xffffffff
jl 0x41e6e0
cmp edx, 0xe
jg 0x41e720
cmp edx, 2
mov eax, 2
cmovge edx, eax
jmp 0x41e65a
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41e606
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
mov qword [rbx + 0x60], 0xffffffffffffffff
mov qword [rbx + 0x30], 0
mov qword [rbx + 0x28], 0
test r14, r14
je 0x41e633
mov qword [r14], 0
cmp qword [rbx + 0x1c0], 0
je 0x41e737
mov eax, 0xb
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov edx, 0xfffffff1
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, qword [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test byte [rbx + 0x44], 4
je 0x41e6b0
mov rcx, rsi
mov qword [rbx + 0x28], 0
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov qword [rbx + 0x28], rsi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x41e68d
call sym.__pthread_self_lite
mov eax, dword [rax + 0xb8]
mov edx, esi
mov dword [rbx + 0xb8], eax
jmp 0x41e59d
mov edx, 0xfffffffe
jmp 0x41e65a
mov qword [rbx + 0x38], 0xffffffffffffffff
mov qword [rbx + 0x60], 0xffffffffffffffff
mov dword [rbx], 0xbab1f00d
mov dword [rbx + 0xb8], 0
mov dword [rbx + 0xb0], 0
jmp 0x41e573
mov edx, 0xf
jmp 0x41e65a
xor edx, edx
jmp 0x41e59d
mov rcx, rbx
call sym.push_pthread_mem.part.0
jmp 0x41e641
Function at 0x41ec70
Capabilities:
Check mutex on windows

Disassembly:
lea rcx, str.dummy_concurrency_level_shmem
xor r8d, r8d
mov edx, 4
jmp sym.__shmem_winpthreads_grab

Function at 0x41eed0
Capabilities:
Check mutex on windows

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

Function at 0x41ff70
Capabilities:
Check mutex on windows

Disassembly:
lea rcx, str.global_lock_spinlock
xor r8d, r8d
mov edx, 4
jmp sym.__shmem_winpthreads_grab

Function at 0x4201d0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x80]
mov rdi, rcx
movsxd r12, edx
mov r13, r8
call sym.strlen
mov r14, rax
lea ebx, [rax + 0xf]
lea eax, [rax + 0x51]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040f8a0
sub rsp, rax
movsxd r15, r14d
movabs rax, 0x656d68732d636367
lea rsi, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov r8, r15
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, [rsi + r15 + 0x10]
lea r15d, [r14 + 0x50]
movabs rdx, 0x6161616161616161
xor ecx, ecx
mov r8, rsi
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, r15d
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 0x4202b9
int3
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x420352
mov rcx, r12
add r14d, 0x10
call sym.malloc
mov r10d, 0x40
mov rbx, rax
bt rbx, r10
jae 0x4202f4
mov r11d, r15d
sub r11d, r10d
movsxd r11, r11d
mov byte [rsi + r11], 0x41
sub r10d, 1
jne 0x4202e0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
je 0x42034f
mov rdx, rsi
movzx ecx, ax
mov r9d, r14d
mov r8d, r15d
call sym.get_ptr_from_atom_1
cmp rax, rbx
mov rsi, rax
je 0x420369
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 - 0x58]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
int3
lea r9d, [r14 + 0x10]
mov rdx, rsi
movzx ecx, ax
mov r8d, r15d
call sym.get_ptr_from_atom_1
mov rsi, rax
jmp 0x420329
xor edx, edx
mov r8, r12
mov rcx, rbx
call sym.memset
test r13, r13
je 0x420329
mov rcx, rbx
call r13
jmp 0x420329

Function at 0x420a60
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_rwl_global_shmem]
lea rcx, str.rwl_global_shmem
mov edx, 8
jmp sym.__shmem_winpthreads_grab
Function at 0x420b30
Capabilities:
Check mutex on windows

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

Function at 0x421570
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_init_init]
lea rcx, str.init
mov edx, 8
jmp dbg.__shmem_grab

Function at 0x421590
Capabilities:
Check mutex on windows

Disassembly:
lea rcx, str.eh_globals
xor r8d, r8d
mov edx, 0x10
jmp dbg.__shmem_grab

Function at 0x421c40
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_init___terminate_handler_sh]
lea rcx, str.__terminate_handler_sh
mov edx, 8
jmp dbg.__shmem_grab

Function at 0x421c60
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_init___unexpected_handler_sh]
lea rcx, str.__unexpected_handler_sh
mov edx, 8
jmp dbg.__shmem_grab

Function at 0x422f20
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9, qword [rcx + 0x40]
mov rsi, rdx
mov rbx, rcx
mov edx, 1
mov rcx, rsi
call sym.fread
test rax, rax
jle 0x422f51
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret
mov dword [rbx + 0x48], 0xffffffff
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x4238a0
Capabilities:
Write file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
cmp byte [0x00487090], 0
jne 0x423967
mov byte [0x00487090], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x4239fa
mov rbx, qword [rax + 8]
xor eax, eax
lea r9, [rsp + 0x2c]
cmp byte [rbx], 0x2a
mov dword [rsp + 0x2c], 0xffffffff
sete al
xor r8d, r8d
xor edx, edx
add rbx, rax
mov rcx, rbx
call sym.__cxa_demangle
mov rsi, qword [sym.imp.msvcrt.dll___iob_func]
mov rdi, rax
call rsi
lea rcx, str.terminate_called_after_throwing_an_instance_of_
lea r9, [rax + 0x60]
mov r8d, 0x30
mov edx, 1
call sym.fwrite
cmp dword [rsp + 0x2c], 0
je 0x423957
call rsi
lea rdx, [rax + 0x60]
mov rcx, rbx
call sym.fputs
call rsi
lea rcx, [0x00489621]
lea r9, [rax + 0x60]
mov r8d, 2
mov edx, 1
call sym.fwrite
cmp dword [rsp + 0x2c], 0
je 0x42398d
call sym.__cxa_rethrow
call rsi
lea rdx, [rax + 0x60]
mov rcx, rdi
call sym.fputs
jmp 0x42392e
call qword [sym.imp.msvcrt.dll___iob_func]
lea rcx, str.terminate_called_recursively_n
lea r9, [rax + 0x60]
mov r8d, 0x1d
mov edx, 1
call sym.fwrite
call sym.abort
mov rcx, rdi
call sym.free
jmp 0x423952
call sym.abort
call qword [sym.imp.msvcrt.dll___iob_func]
lea rcx, str.terminate_called_without_an_active_exception_n
lea r9, [rax + 0x60]
mov r8d, 0x2d
mov edx, 1
call sym.fwrite
jmp 0x4239f5

Function at 0x451d20
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rbp, rcx
mov rdi, rdx
mov esi, r8d
mov rcx, rbp
call method.std::__basic_file_char_.fd__
mov r8d, esi
mov rdx, rdi
mov ecx, eax
call sym.read
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
je 0x451d70
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call r12
cmp dword [rax], 4
je 0x451d3a
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x401550
Capabilities:
Create directory

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x268
xor eax, eax
mov byte [0x00409ae0], 0
mov esi, 1
lea r14, [0x00409ae0]
mov rbp, rcx
mov ecx, 0x1f
mov r12, rdx
mov qword [rsp + 0x150], 0
lea rdi, [rsp + 0x158]
cmp dword [rbp], 1
mov r13, r8
rep stosq qword [rdi], rax
lea r15, [rsp + 0x150]
mov dword [rdi], 0
lea rdi, str._p2x_debug
jg 0x4015d4
jmp 0x401760
lea rdx, [rbx + 0xb]
mov rcx, r14
call sub.msvcrt.dll_strcpy
add esi, 1
cmp dword [rbp], esi
jle 0x401617
mov rdx, qword [r12]
movsxd rax, esi
mov rbx, qword [rdx + rax*8]
mov rdx, rdi
mov rcx, rbx
call sub.msvcrt.dll_strstr
test rax, rax
jne 0x4015c0
lea rdx, str._p2x_exe
mov rcx, rbx
call sub.msvcrt.dll_strstr
test rax, rax
je 0x4015cc
lea rdx, [rbx + 9]
mov rcx, r15
add esi, 1
call sub.msvcrt.dll_strcpy
cmp dword [rbp], esi
jg 0x4015d4
movzx esi, byte [rsp + 0x150]
lea rbx, [rsp + 0x40]
xor ecx, ecx
mov r8d, 0x104
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test sil, sil
je 0x40164a
lea rdx, [rsp + 0x150]
mov rcx, rbx
call sub.msvcrt.dll_strcpy
mov rcx, rbx
call fcn.00402a10
mov rbx, rax
xor eax, eax
test rbx, rbx
je 0x4016b7
lea r14, [rsp + 0x34]
mov rcx, rbx
call fcn.00401b00
lea r12, [rsp + 0x3c]
lea rbp, [rsp + 0x38]
lea r15, str.P2XDLL_
jmp 0x401697
mov ecx, 7
mov rsi, rax
mov rdi, r15
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
je 0x4016d0
mov r9, r14
mov r8, r12
mov rdx, rbp
mov rcx, rbx
call fcn.00402060
test rax, rax
jne 0x401680
mov rcx, rbx
call fcn.004018d0
xor eax, eax
add rsp, 0x268
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rsi, [rax + 7]
call fcn.00401bb0
mov rcx, rax
call sub.msvcrt.dll__mkdir
mov r12d, dword [rsp + 0x34]
mov ebp, dword [rsp + 0x3c]
mov edi, dword [rsp + 0x38]
call fcn.00401bb0
mov r8, rsi
mov rcx, rbx
mov rdx, rax
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], ebp
mov r9d, edi
call fcn.00402770
call fcn.00401bb0
mov rcx, r13
mov rdx, rax
call sub.msvcrt.dll_strcpy
mov rcx, r13
call sub.msvcrt.dll_strlen
cmp byte [r13 + rax - 1], 0x5c
jne 0x401750
mov rdx, rsi
mov rcx, r13
call sub.msvcrt.dll_strcat
mov rcx, rbx
call fcn.004018d0
mov eax, 1
jmp 0x4016b7
mov edx, 0x5c
mov word [r13 + rax], dx
jmp 0x40172d
lea rbx, [rsp + 0x40]
mov r8d, 0x104
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
jmp 0x40164a
Function at 0x401bb0
Capabilities:
Query environment variable

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x00409068]
test rbx, rbx
je 0x401bd0
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rcx, str.P2XDIR
call sub.msvcrt.dll_getenv
test rax, rax
mov qword [0x00409068], rax
je 0x401c70
call fcn.00401b40
mov rdi, qword [0x00409068]
mov ebp, eax
mov rcx, rdi
call sub.msvcrt.dll_strlen
lea rcx, [rax + 0x63]
mov rsi, rax
call sub.msvcrt.dll_malloc
mov r8, rsi
mov rdx, rdi
mov rcx, rax
mov rbx, rax
call sub.msvcrt.dll_memcpy
mov eax, 0x5c
mov r8d, ebp
lea rdx, str.p2xtmp__d
mov word [rbx + rsi], ax
lea rcx, [rbx + rsi + 1]
call sub.msvcrt.dll_sprintf
mov rax, qword [0x004068b0]
mov qword [0x00409068], rbx
mov edx, dword [rax]
test edx, edx
je 0x401bc4
lea rcx, str.GetTempDir:_returning__s_n
mov rdx, rbx
call sub.msvcrt.dll_printf
mov rbx, qword [0x00409068]
jmp 0x401bc4
lea rcx, str.TEMP
call sub.msvcrt.dll_getenv
test rax, rax
mov qword [0x00409068], rax
jne 0x401bec
lea rcx, [0x00406101]
call sub.msvcrt.dll_getenv
test rax, rax
mov qword [0x00409068], rax
jne 0x401bec
lea rcx, str.WINDIR
call sub.msvcrt.dll_getenv
test rax, rax
jne 0x401cc0
lea rax, [0x0040610c]
mov qword [0x00409068], rax
jmp 0x401bec

Function at 0x401cd0
Capabilities:
Query environment variable

Disassembly:
push rbx
mov eax, 0x1130
call fcn.004041e0
sub rsp, rax
lea rax, [rsp + 0x1148]
mov qword [rsp + 0x1148], rdx
mov r10, rcx
lea rbx, [rsp + 0x130]
mov qword [rsp + 0x1150], r8
mov qword [rsp + 0x1158], r9
mov rdx, rbx
mov byte [rsp + 0x130], 0
mov qword [rsp + 0x28], rax
mov r8d, dword [rdx]
add rdx, 4
lea eax, [r8 - 0x1010101]
not r8d
and eax, r8d
and eax, 0x80808080
je 0x401d19
mov ecx, eax
mov r8, qword [rsp + 0x28]
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea rcx, [rdx + 2]
cmove rdx, rcx
mov ecx, eax
add cl, al
sbb rdx, 3
mov rcx, rdx
mov rdx, r10
call sub.msvcrt.dll_vsprintf
mov eax, dword [0x00405020]
test eax, eax
je 0x401d83
cmp byte [rsp + 0x130], 0
mov dword [0x00405020], 0
jne 0x401e15
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str.SERVER_SOFTWARE
call sub.msvcrt.dll_getenv
test rax, rax
je 0x401de0
mov rcx, rbx
call sub.msvcrt.dll_printf
mov ecx, 1
call qword [fcn.004045a0]
mov rcx, rax
call sub.msvcrt.dll_fflush
lea rcx, str.SERVER_SOFTWARE
call sub.msvcrt.dll_getenv
test rax, rax
je 0x401dd5
lea rcx, str._br_
call fcn.00404498
nop
add rsp, 0x1130
pop rbx
ret
lea rcx, [rsp + 0x30]
mov edx, 0x100
call qword [sym.imp.KERNEL32.dll_GetConsoleTitleA]
test eax, eax
jne 0x401d9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x401d9c
xor r9d, r9d
mov rdx, rbx
xor ecx, ecx
lea r8, str.Perl2Exe
call qword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x401db7
lea rcx, str.SERVER_SOFTWARE
call sub.msvcrt.dll_getenv
test rax, rax
je 0x401d83
lea rcx, str.Content_type:_text_html_n_n
call fcn.00401cd0
jmp 0x401d83
Function at 0x401e40
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
movsxd rbp, r8d
mov r12, rdx
mov r8d, 1
mov dword [rsp + 0x80], ecx
xor edx, edx
mov r14, rbp
call sub.msvcrt.dll__lseek
mov ecx, 0xc800
mov dword [rsp + 0x2c], eax
call sub.msvcrt.dll_malloc
mov rbx, rax
nop
mov ecx, dword [rsp + 0x80]
mov r8d, 0xc800
mov rdx, rbx
call sub.msvcrt.dll__read
cmp eax, 0xffffffff
mov r13d, eax
je 0x401f45
cmp eax, r14d
jle 0x401f45
sub eax, r14d
xor r15d, r15d
lea esi, [rax - 1]
test eax, eax
jg 0x401ecc
jmp 0x401f14
lea rax, [r15 + 1]
cmp r15, rsi
je 0x401f14
mov r15, rax
lea rcx, [rbx + r15]
mov r8, rbp
mov rdx, r12
call sub.msvcrt.dll_memcmp
mov edi, r15d
test eax, eax
jne 0x401ec0
add edi, dword [rsp + 0x2c]
xor r8d, r8d
mov ecx, dword [rsp + 0x80]
lea edx, [r14 + rdi]
call sub.msvcrt.dll__lseek
mov rcx, rbx
call sub.msvcrt.dll_free
mov eax, edi
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp r13d, 0xc800
jne 0x401e80
mov ecx, dword [rsp + 0x80]
mov r8d, 1
mov edx, 0xfffffc18
call sub.msvcrt.dll__lseek
add dword [rsp + 0x2c], 0xc418
jmp 0x401e80
mov rcx, rbx
mov edi, 0xffffffff
call sub.msvcrt.dll_free
jmp 0x401f01

Function at 0x401f60
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov esi, r8d
mov edi, ecx
mov rbx, rdx
mov r8d, 1
xor edx, edx
call sub.msvcrt.dll__lseek
mov r8d, esi
mov rdx, rbx
mov ecx, edi
mov r12d, eax
call sub.msvcrt.dll__read
cmp eax, 0xffffffff
mov esi, eax
je 0x401fc5
lea rdx, [0x0040616a]
mov rcx, rbx
call sub.msvcrt.dll_strstr
test rax, rax
mov rbp, rax
je 0x401fd2
sub rax, rbx
xor r8d, r8d
mov ecx, edi
lea edx, [r12 + rax + 2]
mov esi, eax
call sub.msvcrt.dll__lseek
mov byte [rbp], 0
mov eax, esi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov edx, 0xa
mov rcx, rbx
call sub.msvcrt.dll_strchr
test rax, rax
mov rbp, rax
je 0x402010
sub rax, rbx
xor r8d, r8d
mov ecx, edi
lea edx, [r12 + rax + 1]
mov esi, eax
call sub.msvcrt.dll__lseek
mov eax, esi
mov byte [rbp], 0
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
xor r8d, r8d
mov edx, r12d
mov ecx, edi
call sub.msvcrt.dll__lseek
xor esi, esi
mov eax, esi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x402560
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rdi
push rsi
push rbx
xor eax, eax
mov ebx, edx
nop word [rax + rax]
mov byte [r8 + rax], al
add rax, 1
cmp rax, 0x100
jne 0x402570
xor eax, eax
mov r10, r8
xor r11d, r11d
mov word [r8 + 0x100], ax
lea rsi, [r8 + 0x100]
xor eax, eax
nop dword [rax]
movzx edi, byte [r10]
movzx edx, al
add eax, 1
add r10, 1
movzx r9d, byte [rcx + rdx]
movzx edx, dil
add r11d, edx
add r9d, r11d
movzx r11d, r9b
movzx r9d, r9b
add r9, r8
movzx edx, byte [r9]
mov byte [r10 - 1], dl
cdq
idiv ebx
cmp rsi, r10
mov byte [r9], dil
movzx eax, dl
jne 0x4025a0
pop rbx
pop rsi
pop rdi
ret

Function at 0x4025f0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push r14
push rdi
push rsi
push rbx
movzx edi, byte [r8 + 0x100]
movzx r11d, byte [r8 + 0x101]
test edx, edx
jle 0x40265e
lea eax, [rdx - 1]
mov edx, edi
lea rbx, [rcx + rax + 1]
mov rsi, rax
sub edx, ecx
nop dword [rax + rax]
lea r9d, [rdx + rcx + 1]
movzx r9d, r9b
add r9, r8
movzx eax, byte [r9]
add r11d, eax
movzx r10d, r11b
add r10, r8
movzx r14d, byte [r10]
mov byte [r9], r14b
mov byte [r10], al
add al, byte [r9]
movzx eax, al
movzx eax, byte [r8 + rax]
xor byte [rcx], al
add rcx, 1
cmp rcx, rbx
jne 0x402620
lea edi, [rdi + rsi + 1]
mov byte [r8 + 0x100], dil
mov byte [r8 + 0x101], r11b
pop rbx
pop rsi
pop rdi
pop r14
ret