joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400021dc
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r15
sub rsp, 0x30
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
xor esi, esi
xor eax, eax
lock cmpxchg qword [0x140004650], rbx
je 0x140002228
cmp rax, rbx
jne 0x14000221b
mov ebx, 1
mov esi, ebx
jmp 0x14000222d
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140002200
mov ebx, 1
mov eax, dword [0x140004658]
cmp eax, ebx
jne 0x140002243
mov ecx, 0x1f
call sub.msvcrt.dll__amsg_exit
jmp 0x1400022a8
mov eax, dword [0x140004658]
test eax, eax
jne 0x1400022a2
mov dword [0x140004658], ebx
lea r15, [0x1400033b0]
lea rdi, [0x140003398]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
cmp rdi, r15
jae 0x140002294
test eax, eax
jne 0x140002298
cmp qword [rdi], 0
je 0x140002289
mov rax, qword [rdi]
mov rcx, qword [0x140003378]
call rcx
mov dword [rsp + 0x20], eax
add rdi, 8
mov qword [rsp + 0x28], rdi
jmp 0x14000226a
test eax, eax
je 0x1400022a8
mov eax, 0xff
jmp 0x140002384
mov dword [0x140004064], ebx
mov eax, dword [0x140004658]
cmp eax, ebx
jne 0x1400022cf
lea rdx, [0x140003390]
lea rcx, [0x140003380]
call sub.msvcrt.dll__initterm
mov dword [0x140004658], 2
test esi, esi
jne 0x1400022dc
xor eax, eax
xchg qword [0x140004650], rax
cmp qword [0x140004660], 0
je 0x140002310
lea rcx, [0x140004660]
call fcn.140002540
test eax, eax
je 0x140002310
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
mov rax, qword [0x140004660]
mov r9, qword [0x140003378]
call r9
mov r8, qword [0x140004078]
mov rdx, qword [0x140004070]
mov ecx, dword [0x140004068]
call fcn.140001800
mov dword [0x140004060], eax
cmp dword [0x140004080], 0
jne 0x140002340
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x140004064], 0
jne 0x140002355
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x140004060]
jmp 0x140002384
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r15
ret
sub rsp, 0x28
call fcn.140134000
add rsp, 0x28
jmp 0x1400021dc

Function at 0x140002450
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14000249c
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140002494
cmp dword [rcx + 0x3c], edx
jl 0x140002494
cmp dword [rcx + 0x3c], 0x10000000
jae 0x140002494
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x14000249c
mov rax, rdx
add rsp, 0x18
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x14000ca60]
mov dword [rax], 1
mov rax, qword [0x14000ca70]
mov dword [rax], 1
mov rax, qword [0x14000ca80]
mov dword [rax], 1
mov rax, qword [0x14000ca00]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
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 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140001f80
Capabilities:
Create directory

Disassembly:
push rdi
mov eax, 0x2020
push rsi
push rbx
call fcn.140004210
sub rsp, rax
mov eax, dword [0x140022100]
mov rsi, rcx
test eax, eax
je 0x140002020
xor ebx, ebx
lea rdi, [0x140020100]
test eax, eax
jg 0x140001fbc
jmp 0x140001fd0
add rbx, 1
cmp dword [0x140022100], ebx
jle 0x140001fd0
mov rdx, qword [rdi + rbx*8]
mov rcx, rsi
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140001fb0
jmp 0x140002007
mov rcx, rsi
call sub.msvcrt.dll_wcslen
cmp rax, 2
jne 0x140001fe5
cmp word [rsi + 2], 0x3a
je 0x140002007
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x140002070
movsxd rbx, dword [0x140022100]
cmp ebx, 0x3ff
jle 0x140002088
mov eax, 1
add rsp, 0x2020
pop rbx
pop rsi
pop rdi
ret
lea rdi, [rsp + 0x20]
lea rbx, str.HOME
mov r8d, 0x1000
mov rdx, rbx
mov rcx, rdi
call fcn.140001720
test al, al
je 0x1400020aa
movsxd rbx, dword [0x140022100]
mov rcx, rdi
lea rdi, [0x140020100]
call sub.msvcrt.dll__wcsdup
mov qword [rdi + rbx*8], rax
mov eax, dword [0x140022100]
add eax, 1
mov dword [0x140022100], eax
jmp 0x140001fa1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140001ff4
xor eax, eax
jmp 0x14000200c
mov rcx, rsi
call sub.msvcrt.dll__wcsdup
add dword [0x140022100], 1
mov rdx, rax
lea rax, [0x140020100]
mov qword [rax + rbx*8], rdx
jmp 0x140002007
mov rcx, rbx
call fcn.140001ee0
nop
nop word cs:[rax + rax]
nop

Function at 0x140002260
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file
Terminate process

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x70
movaps xmmword [rsp + 0x60], xmm6
mov rcx, qword [0x1400190a0]
test rcx, rcx
je 0x14000229b
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1400022c0
mov rcx, qword [0x1400190a0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x14001e0e0], 0
jne 0x1400022d8
movaps xmm6, xmmword [rsp + 0x60]
add rsp, 0x70
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, qword [0x1400190a0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x14000228e
mov edx, 0x414
lea r12, [rsp + 0x20]
lea rsi, [0x14000c1a0]
mov qword [rsp + 0x20], 0
lea rdi, [0x14001e100]
movq xmm0, rsi
mov rcx, r12
mov dword [rsp + 0x28], 3
movq xmm6, rdi
mov word [rsp + 0x40], dx
mov rbp, qword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ebx, 0x14
punpcklqdq xmm6, xmm0
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], rsi
movaps xmmword [rsp + 0x30], xmm6
call rbp
mov r13, qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov r14, qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400023a4
test al, 0x10
je 0x1400022a4
mov ecx, 0x64
call r14
mov eax, 0x414
mov qword [rsp + 0x50], rsi
mov rcx, r12
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x28], 3
mov word [rsp + 0x40], ax
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x48], 0
movaps xmmword [rsp + 0x30], xmm6
call rbp
sub ebx, 1
je 0x1400022a4
mov rcx, rdi
call r13
cmp eax, 0xffffffff
jne 0x140002350
jmp 0x1400022a4
Function at 0x140002ef0
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.140009e40
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.140009e40
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 0x140003bc2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400221e8]
test eax, eax
je 0x140003c5a
lea rax, [0x1400221c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400221f0]
mov qword [rbp - 8], rax
jmp 0x140003c3e
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 0x140003c32
cmp qword [rbp - 0x10], 0
je 0x140003c32
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 0x140003bf8
lea rax, [0x1400221c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140003c5b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140003d60
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 0x140003d88
mov eax, 0
jmp 0x140003dd6
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 0x140003db1
mov eax, 0
jmp 0x140003dd6
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 0x140003dd1
mov eax, 0
jmp 0x140003dd6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x140003ddc
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 0x140003e5a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140003e51
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 0x140003e51
mov rax, qword [rbp - 8]
jmp 0x140003e6f
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 0x140003e24
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140a9b058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x140a9b1df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140a9b089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a9b06f
add dl, dl
jne 0x140a9b096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a9b0f6
xor eax, eax
add dl, dl
jne 0x140a9b0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a9b1ad
add dl, dl
jne 0x140a9b0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a9b0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a9b0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a9b0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140a9b0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140a9b07e
mov eax, 1
add dl, dl
jne 0x140a9b106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a9b113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a9b0fb
sub eax, ebx
mov ebx, 1
jne 0x140a9b14c
mov ecx, 1
add dl, dl
jne 0x140a9b12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a9b13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a9b123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a9b07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140a9b168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a9b175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a9b15d
cmp eax, 0x7d00
jae 0x140a9b19b
cmp eax, 0x500
jb 0x140a9b196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a9b07e
cmp eax, 0x7f
ja 0x140a9b19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a9b07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140a9b1d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x140a9b07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x1400013f0
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rdi, rdx
mov rbx, rcx
add rcx, 0x70
lea rdx, [0x1400180a8]
call fcn.140004300
test rax, rax
je 0x140001467
mov rsi, rax
mov edx, dword [rdi + 4]
add edx, dword [rbx]
mov rcx, rax
xor r8d, r8d
call fcn.14000f460
test eax, eax
js 0x140001481
mov r14d, dword [rdi + 0xc]
mov rcx, r14
call sub.msvcrt.dll_malloc
test rax, rax
je 0x1400014a0
mov rbx, rax
cmp byte [rdi + 0x10], 1
jne 0x1400014bf
mov rcx, rsi
mov rdx, rdi
xor r8d, r8d
mov r9, rbx
call fcn.140001550
test eax, eax
jne 0x14000151e
jmp 0x140001528
add rdi, 0x12
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
mov rdx, rdi
call fcn.140002930
xor ebx, ebx
jmp 0x140001530
add rdi, 0x12
lea rcx, str.fseek
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
mov r8, rdi
call fcn.140002c30
jmp 0x140001526
add rdi, 0x12
lea rcx, [0x140018120]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_data_buffer___u_bytes___n
mov r8, rdi
mov r9d, r14d
call fcn.140002c30
jmp 0x140001526
test r14, r14
je 0x140001528
mov r15, rbx
nop word [rax + rax]
cmp r14, 0x2000
mov r12d, 0x2000
cmovb r12, r14
mov r8d, 1
mov rcx, r15
mov rdx, r12
mov r9, rsi
call sub.msvcrt.dll_fread
test rax, rax
je 0x140001504
add r15, r12
sub r14, r12
jne 0x1400014d0
jmp 0x140001528
add rdi, 0x12
lea rcx, [0x140018236]
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
mov r8, rdi
call fcn.140002c30
mov rcx, rbx
call sub.msvcrt.dll_free
xor ebx, ebx
mov rcx, rsi
call sub.msvcrt.dll_fclose
mov rax, rbx
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
Function at 0x140001550
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
mov r12, r9
mov r14, r8
mov rdi, rdx
mov r15, rcx
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
mov qword [rsp + 0x80], 0
lea rdx, [0x140018325]
lea rcx, [rsp + 0x40]
mov r8d, 0x58
call fcn.14000ad60
test eax, eax
je 0x1400015cf
add rdi, 0x12
lea rcx, str.Failed_to_extract__s:_inflateInit___failed_with_return_code__d__n
mov rdx, rdi
mov r8d, eax
call fcn.140002930
mov ebp, 0xffffffff
jmp 0x1400017b4
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov rsi, rax
test rax, rax
je 0x14000173e
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
je 0x140001752
mov rbx, rax
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x28], rsi
mov eax, dword [rdi + 8]
mov ebp, 0xffffffff
cmp rax, 0x2000
mov esi, 0x2000
mov qword [rsp + 0x30], rax
cmovb rsi, rax
mov edx, 1
mov rcx, qword [rsp + 0x28]
mov r8, rsi
mov r15, qword [rsp + 0x38]
mov r9, r15
call sub.msvcrt.dll_fread
cmp rax, rsi
jne 0x140001795
mov rcx, r15
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x140001795
sub qword [rsp + 0x30], rsi
mov dword [rsp + 0x48], esi
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x40], rax
nop word [rax + rax]
mov dword [rsp + 0x58], 0x2000
mov qword [rsp + 0x50], rbx
lea rcx, [rsp + 0x40]
xor edx, edx
call fcn.14000aec0
mov esi, eax
lea eax, [rsi + 4]
cmp eax, 7
jae 0x1400016a1
mov ecx, 0x47
bt ecx, eax
jb 0x140001772
mov eax, dword [rsp + 0x58]
mov r13d, 0x2000
sub r13, rax
test r14, r14
je 0x1400016f0
mov edx, 1
mov rcx, rbx
mov r8, r13
mov r9, r14
call sub.msvcrt.dll_fwrite
mov r15d, 0xffffffff
cmp rax, r13
jne 0x14000177f
mov rcx, r14
call sub.msvcrt.dll_ferror
test eax, eax
je 0x140001706
jmp 0x14000177f
test r12, r12
je 0x140001714
mov rcx, r12
mov rdx, rbx
mov r8, r13
call sub.msvcrt.dll_memcpy
add r12, r13
mov eax, dword [rsp + 0x58]
test eax, eax
je 0x140001670
jmp 0x14000171f
xor r12d, r12d
test eax, eax
je 0x140001670
cmp esi, 1
mov rax, qword [rsp + 0x30]
je 0x140001732
test rax, rax
jne 0x14000160d
mov r15d, esi
cmp esi, 1
jne 0x14000177f
xor ebp, ebp
jmp 0x140001795
add rdi, 0x12
lea rcx, [0x140018120]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
jmp 0x140001764
add rdi, 0x12
lea rcx, [0x140018120]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
mov r8, rdi
call fcn.140002c30
xor ebx, ebx
xor ebp, ebp
jmp 0x14000179a
mov eax, eax
lea rcx, [0x1400184e4]
mov r15d, dword [rcx + rax*4]
add rdi, 0x12
lea rcx, str.Failed_to_extract__s:_decompression_resulted_in_return_code__d__n
mov rdx, rdi
mov r8d, r15d
call fcn.140002930
mov rsi, qword [rsp + 0x28]
lea rcx, [rsp + 0x40]
call fcn.14000d160
mov rcx, rsi
call sub.msvcrt.dll_free
mov rcx, rbx
call sub.msvcrt.dll_free
mov eax, ebp
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x1400017d0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
mov eax, 0x1038
call fcn.14000ec9c
sub rsp, rax
cmp dword [rcx + 0x5074], 1
jne 0x140001885
mov rbx, rdx
mov r15, rcx
cmp byte [rdx + 0x11], 0x6e
jne 0x14000189b
mov rcx, r15
mov rdx, rbx
call fcn.1400013f0
mov rsi, rax
test rax, rax
je 0x14000185c
add r15, 0x3070
lea rdi, [rbx + 0x12]
mov rcx, r15
mov rdx, rdi
call fcn.140007cc0
test eax, eax
js 0x14000185c
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], 0x5c
lea r8, [0x140018464]
lea rcx, [rsp + 0x30]
mov r9, r15
call fcn.140001e20
cmp eax, 0x1000
jl 0x140001942
mov rcx, rsi
call sub.msvcrt.dll_free
mov eax, 0xffffffff
add rbx, 0x12
lea rcx, str.Failed_to_create_symbolic_link__s__n
mov rdx, rbx
mov esi, eax
call fcn.140002930
mov eax, esi
jmp 0x140001a0f
lea rcx, str.pyi_arch_extract2fs_was_called_before_temporary_directory_was_initialized__n
call fcn.140002930
mov eax, 0xffffffff
jmp 0x140001a0f
lea rcx, [r15 + 0x3070]
lea r14, [rbx + 0x12]
mov rdx, r14
call fcn.140007e20
test rax, rax
je 0x140001909
mov rsi, rax
lea rcx, [r15 + 0x70]
lea rdx, [0x1400180a8]
call fcn.140004300
test rax, rax
je 0x140001929
mov rdi, rax
mov edx, dword [rbx + 4]
add edx, dword [r15]
mov rcx, rax
xor r8d, r8d
call fcn.14000f460
test eax, eax
js 0x140001968
cmp byte [rbx + 0x10], 1
jne 0x140001978
mov rcx, rdi
mov rdx, rbx
mov r8, rsi
xor r9d, r9d
call fcn.140001550
mov ebx, eax
jmp 0x1400019fd
lea rcx, str.fopen
lea rdx, str.Failed_to_extract__s:_failed_to_open_target_file__n
mov r8, r14
call fcn.140002c30
mov eax, 0xffffffff
jmp 0x140001a0f
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
mov rdx, r14
call fcn.140002930
mov ebx, 0xffffffff
jmp 0x140001a05
lea rdx, [rsp + 0x30]
mov rcx, rsi
call fcn.1400043e0
mov edi, eax
mov rcx, rsi
call sub.msvcrt.dll_free
mov eax, edi
test edi, edi
jns 0x140001a0f
jmp 0x140001869
lea rcx, str.fseek
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
jmp 0x1400019f0
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
je 0x1400019e2
mov r15, rax
mov r12d, dword [rbx + 0xc]
test r12, r12
je 0x140001a20
cmp r12, 0x2000
mov ebx, 0x2000
cmovb rbx, r12
mov r8d, 1
mov rcx, r15
mov rdx, rbx
mov r9, rdi
call sub.msvcrt.dll_fread
test rax, rax
je 0x140001a2c
mov r8d, 1
mov rcx, r15
mov rdx, rbx
mov r9, rsi
call sub.msvcrt.dll_fwrite
test rax, rax
je 0x140001a3c
sub r12, rbx
jne 0x140001997
xor ebx, ebx
jmp 0x140001a57
lea rcx, [0x140018120]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_buffer__n
mov r8, r14
call fcn.140002c30
mov ebx, 0xffffffff
mov rcx, rdi
call sub.msvcrt.dll_fclose
mov rcx, rsi
call sub.msvcrt.dll_fclose
mov eax, ebx
add rsp, 0x1038
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov rcx, r15
call sub.msvcrt.dll_free
xor ebx, ebx
jmp 0x1400019fd
lea rcx, [0x140018236]
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
jmp 0x140001a4a
lea rcx, [0x1400184a7]
lea rdx, str.Failed_to_extract__s:_failed_to_write_data_chunk__n
mov r8, r14
call fcn.140002c30
mov ebx, 0xffffffff
mov rcx, r15
call sub.msvcrt.dll_free
jmp 0x1400019fd
Function at 0x140001a70
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rbx, rcx
add rcx, 0x70
lea rdx, [0x1400180a8]
call fcn.140004300
test rax, rax
je 0x140001bb4
mov rsi, rax
mov rax, qword [0x140018500]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
shr eax, 0x18
add al, 0xc
mov byte [rsp + 0x23], al
lea rdx, [rsp + 0x20]
mov r8d, 8
mov rcx, rsi
call fcn.140008420
mov edi, 0xffffffff
test rax, rax
je 0x140001c5c
mov r14, rax
mov rcx, rsi
mov edx, r14d
xor r8d, r8d
call fcn.14000f460
test eax, eax
js 0x140001bbe
lea rcx, [rbx + 0x18]
mov edx, 0x58
mov r8d, 1
mov r9, rsi
call sub.msvcrt.dll_fread
test rax, rax
je 0x140001bd6
mov eax, dword [rbx + 0x20]
mov ecx, dword [rbx + 0x24]
bswap eax
mov dword [rbx + 0x20], eax
bswap ecx
mov dword [rbx + 0x24], ecx
mov edx, dword [rbx + 0x28]
bswap edx
mov dword [rbx + 0x28], edx
mov edx, dword [rbx + 0x2c]
bswap edx
mov dword [rbx + 0x2c], edx
sub r14, rax
add r14, 0x58
mov qword [rbx], r14
mov dword [rbx + 0x5078], 0
mov dword [0x1400220d4], edx
add r14d, ecx
mov rcx, rsi
mov edx, r14d
xor r8d, r8d
call fcn.14000f460
movsxd r14, dword [rbx + 0x28]
mov rcx, r14
call sub.msvcrt.dll_malloc
mov qword [rbx + 8], rax
test rax, rax
je 0x140001beb
mov r8d, 1
mov rcx, rax
mov rdx, r14
mov r9, rsi
call sub.msvcrt.dll_fread
test rax, rax
je 0x140001c00
mov r14, qword [rbx + 8]
movsxd r12, dword [rbx + 0x28]
lea r15, [r14 + r12]
mov qword [rbx + 0x10], r15
mov rcx, rsi
call sub.msvcrt.dll_ferror
test eax, eax
je 0x140001c15
lea rcx, str.Error_on_file._n
call fcn.140002930
jmp 0x140001c5c
mov edi, 0xffffffff
jmp 0x140001c64
lea rcx, str.fseek
lea rdx, str.Failed_to_seek_to_cookie_position__n
call fcn.140002c30
jmp 0x140001c5c
lea rcx, [0x140018236]
lea rdx, str.Failed_to_read_cookie__n
call fcn.140002c30
jmp 0x140001c5c
lea rcx, [0x140018120]
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
call fcn.140002c30
jmp 0x140001c5c
lea rcx, [0x140018236]
lea rdx, str.Could_not_read_full_TOC__n
call fcn.140002c30
jmp 0x140001c5c
xor edi, edi
test r12d, r12d
jle 0x140001c5c
pxor xmm0, xmm0
movdqu xmm1, xmmword [r14]
movdqa xmm2, xmm1
punpckhbw xmm2, xmm0
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm2, xmm2, 0x1b
punpcklbw xmm1, xmm0
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
packuswb xmm1, xmm2
movdqu xmmword [r14], xmm1
movd eax, xmm1
cdqe
add r14, rax
cmp r14, r15
jb 0x140001c20
mov rcx, rsi
call sub.msvcrt.dll_fclose
mov eax, edi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
Function at 0x1400075b0
Capabilities:
Query environment variable

Disassembly:
push rsi
push rdi
mov eax, 0x4028
call fcn.14000ec9c
sub rsp, rax
mov rdx, rcx
xor esi, esi
xor ecx, ecx
xor r8d, r8d
call fcn.140008880
lea rdx, [rsp + 0x20]
mov rcx, rax
mov r8d, 0x2000
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x14000762a
lea rdi, [rsp + 0x20]
lea rdx, [rsp + 0x2020]
mov rcx, rdi
mov r8d, 0x2000
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor esi, esi
xor ecx, ecx
mov rdx, rdi
xor r8d, r8d
call fcn.140008630
test rax, rax
je 0x14000762a
cmp byte [rax], 0
je 0x140007628
mov rcx, rax
call sub.msvcrt.dll__strdup
mov rsi, rax
jmp 0x14000762a
xor esi, esi
mov rax, rsi
add rsp, 0x4028
pop rdi
pop rsi
ret

Function at 0x1400076a0
Capabilities:
Set environment variable

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rdx, rcx
xor ecx, ecx
xor r8d, r8d
call fcn.140008880
mov rsi, rax
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edi, eax
mov rcx, rsi
call sub.msvcrt.dll_free
mov eax, edi
add rsp, 0x28
pop rdi
pop rsi
ret