joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140a71058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.140a711df
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 0x140a71089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a7106f
add dl, dl
jne 0x140a71096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a710f6
xor eax, eax
add dl, dl
jne 0x140a710a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a711ad
add dl, dl
jne 0x140a710b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a710c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a710d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a710dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140a710ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140a7107e
mov eax, 1
add dl, dl
jne 0x140a71106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a71113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a710fb
sub eax, ebx
mov ebx, 1
jne 0x140a7114c
mov ecx, 1
add dl, dl
jne 0x140a7112e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a7113b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a71123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a7107e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140a71168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a71175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a7115d
cmp eax, 0x7d00
jae 0x140a7119b
cmp eax, 0x500
jb 0x140a71196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a7107e
cmp eax, 0x7f
ja 0x140a7119e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a7107e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140a711d2
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 0x140a7107e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x2fc4d3020
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 sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x2fc4d3a22
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4f6108]
test eax, eax
je 0x2fc4d3aba
lea rax, [0x2fc4f60e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4f6110]
mov qword [rbp - 8], rax
jmp 0x2fc4d3a9e
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 0x2fc4d3a92
cmp qword [rbp - 0x10], 0
je 0x2fc4d3a92
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 0x2fc4d3a58
lea rax, [0x2fc4f60e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d3abb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d3bc0
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 0x2fc4d3be8
mov eax, 0
jmp 0x2fc4d3c36
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 0x2fc4d3c11
mov eax, 0
jmp 0x2fc4d3c36
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 0x2fc4d3c31
mov eax, 0
jmp 0x2fc4d3c36
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d3c3c
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 0x2fc4d3cba
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4d3cb1
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 0x2fc4d3cb1
mov rax, qword [rbp - 8]
jmp 0x2fc4d3ccf
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 0x2fc4d3c84
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x401560
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
push rdi
mov eax, 0x1068
call fcn.00402d10
sub rsp, rax
lea rbp, [rsp + 0x80]
call fcn.00401890
lea rdx, section..rdata
lea rcx, str.config.txt
call sub.msvcrt.dll_fopen
mov qword [rbp + 0xfd0], rax
cmp qword [rbp + 0xfd0], 0
jne 0x4015b6
lea rcx, [0x0040400d]
call sub.msvcrt.dll_puts
mov eax, 1
jmp 0x4017cc
mov qword [rbp - 0x60], 0
mov qword [rbp - 0x58], 0
lea rdx, [rbp - 0x50]
mov eax, 0
mov ecx, 0x1fe
mov rdi, rdx
rep stosq qword [rdi], rax
mov rdx, qword [rbp + 0xfd0]
lea rax, [rbp - 0x60]
mov r8, rdx
mov edx, 0x1000
mov rcx, rax
call sub.msvcrt.dll_fgets
test rax, rax
jne 0x40161f
lea rcx, [0x00404029]
call sub.msvcrt.dll_puts
mov rax, qword [rbp + 0xfd0]
mov rcx, rax
call sub.msvcrt.dll_fclose
mov eax, 1
jmp 0x4017cc
mov rax, qword [rbp + 0xfd0]
mov rcx, rax
call sub.msvcrt.dll_fclose
lea rax, [rbp - 0x60]
mov rcx, rax
call sub.msvcrt.dll_strlen
mov qword [rbp + 0xfc8], rax
mov rax, qword [rbp + 0xfc8]
sub rax, 1
movzx eax, byte [rbp + rax - 0x60]
cmp al, 0xa
jne 0x401665
mov rax, qword [rbp + 0xfc8]
sub rax, 1
mov byte [rbp + rax - 0x60], 0
mov rax, qword [rbp + 0xfc8]
shr rax, 2
mov qword [rbp + 0xfc0], rax
mov rax, qword [rbp + 0xfc0]
mov rcx, rax
call sub.msvcrt.dll_malloc
mov qword [rbp + 0xfb8], rax
cmp qword [rbp + 0xfb8], 0
jne 0x4016ad
lea rcx, str.
call sub.msvcrt.dll_puts
mov eax, 1
jmp 0x4017cc
mov qword [rbp + 0xfd8], 0
jmp 0x4016fc
mov rdx, qword [rbp + 0xfb8]
mov rax, qword [rbp + 0xfd8]
lea rcx, [rdx + rax]
mov rax, qword [rbp + 0xfd8]
lea rdx, [rax*4]
lea rax, [rbp - 0x60]
add rax, rdx
mov r8, rcx
lea rdx, str.x_2hhx
mov rcx, rax
call sub.msvcrt.dll_sscanf
add qword [rbp + 0xfd8], 1
mov rax, qword [rbp + 0xfd8]
cmp rax, qword [rbp + 0xfc0]
jb 0x4016ba
mov rax, qword [rbp + 0xfc0]
mov r9d, 0x40
mov r8d, 0x3000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0xfb0], rax
cmp qword [rbp + 0xfb0], 0
jne 0x401763
lea rcx, str.Shellcode
call sub.msvcrt.dll_puts
mov rax, qword [rbp + 0xfb8]
mov rcx, rax
call sub.msvcrt.dll_free
mov eax, 1
jmp 0x4017cc
mov rcx, qword [rbp + 0xfc0]
mov rdx, qword [rbp + 0xfb8]
mov rax, qword [rbp + 0xfb0]
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp + 0xfb0]
mov qword [rbp + 0xfa8], rax
mov rax, qword [rbp + 0xfa8]
call rax
mov rax, qword [rbp + 0xfb0]
mov r8d, 0x8000
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFree]
call rax
mov rax, qword [rbp + 0xfb8]
mov rcx, rax
call sub.msvcrt.dll_free
mov eax, 0
add rsp, 0x1068
pop rdi
pop rbp
ret
Function at 0x401c90
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.00402e20
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.00402e20
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 0x401d00
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00407614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x401ea8
mov rax, qword [0x00407618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x401d4c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401dd7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x401d30
mov rcx, r12
call fcn.00402a60
mov rbp, rax
test rax, rax
je 0x401ee2
mov rax, qword [0x00407618]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.00402b90
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00407618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401ef1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401dd0
sub eax, 4
and eax, 0xfffffffb
jne 0x401e60
add dword [0x00407614], 1
cmp ebx, 8
jae 0x401e08
test bl, 4
jne 0x401eb0
test ebx, ebx
je 0x401df9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x401ed0
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 0x401df9
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 0x401e3a
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 [0x00407618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401dd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00401c90
nop dword [rax]
xor edi, edi
jmp 0x401d57
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x401df9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x401df9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00401c90
mov rax, qword [0x00407618]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.00401c90
nop
nop dword [rax]
Function at 0x4026d0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00407900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004078e0]
test rbx, rbx
je 0x402724
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 0x40271b
test r12, r12
je 0x40271b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402700
lea rcx, [0x00407900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x402a60
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x00404410]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x402ad9
mov rcx, r10
call fcn.00402930
test eax, eax
je 0x402ad9
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 0x402ad6
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 0x402acd
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x402ad9
add r8, 0x28
cmp r8, r9
jne 0x402ab8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret
Function at 0x140001490
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
pxor xmm0, xmm0
lea r14, [rsp + 0x40]
mov r13, rcx
mov r12, rdx
movaps xmmword [rsp + 0x70], xmm0
mov qword [rsp + 0x100], r8
lea rdx, section..rdata
mov r8d, 0x58
mov rcx, r14
mov qword [rsp + 0x108], r9
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
call fcn.14000a640
test eax, eax
mov ebx, eax
jne 0x1400016d3
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
mov rdi, rax
je 0x140001710
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
mov rbp, rax
je 0x1400016f1
mov r15d, dword [r12 + 8]
mov ebx, 0x2000
mov r9, r13
mov edx, 1
cmp r15, rbx
mov rcx, rdi
cmovbe rbx, r15
mov r8, rbx
call sub.msvcrt.dll_fread
cmp rax, rbx
jne 0x1400015bf
mov rcx, r13
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400015bf
mov dword [rsp + 0x48], ebx
mov esi, eax
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x28], rbx
xor edx, edx
mov rcx, r14
mov qword [rsp + 0x50], rbp
mov dword [rsp + 0x58], 0x2000
call fcn.14000a710
cmp eax, 0xffffffff
mov ebx, eax
jge 0x1400015a0
cmp eax, 0xfffffffc
jl 0x1400015f8
mov r10d, eax
jmp 0x1400015ab
cmp eax, 2
jne 0x1400015f8
mov r10d, 0xfffffffd
lea rdx, [r12 + 0x12]
mov r8d, r10d
lea rcx, str.Failed_to_extract__s:_decompression_resulted_in_return_code__d__n
call fcn.140002b00
mov ebx, 0xffffffff
mov rcx, r14
call fcn.14000c4c0
mov rcx, rdi
call sub.msvcrt.dll_free
mov rcx, rbp
call sub.msvcrt.dll_free
mov eax, ebx
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [rsp + 0x58]
mov r8d, 0x2000
sub r8, rax
mov r9, rax
cmp qword [rsp + 0x100], 0
je 0x140001690
mov r9, qword [rsp + 0x100]
mov edx, 1
mov rcx, rbp
mov qword [rsp + 0x30], r8
call sub.msvcrt.dll_fwrite
mov r8, qword [rsp + 0x30]
cmp rax, r8
jne 0x1400016c8
mov rcx, qword [rsp + 0x100]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400016c8
mov r9d, dword [rsp + 0x58]
test r9d, r9d
je 0x140001574
mov eax, esi
mov esi, ebx
mov rbx, qword [rsp + 0x28]
sub r15, rbx
cmp esi, 1
je 0x14000172f
test r15, r15
jne 0x140001534
cmp esi, 1
mov r10d, esi
mov ebx, eax
je 0x1400015c4
jmp 0x1400015ab
cmp qword [rsp + 0x108], 0
je 0x140001651
mov rcx, qword [rsp + 0x108]
mov rdx, rbp
mov qword [rsp + 0x30], r8
mov dword [rsp + 0x3c], eax
call sub.msvcrt.dll_memcpy
mov r8, qword [rsp + 0x30]
mov r9d, dword [rsp + 0x3c]
add qword [rsp + 0x108], r8
jmp 0x140001651
mov r10d, 0xffffffff
jmp 0x1400015ab
lea rdx, [r12 + 0x12]
mov r8d, eax
mov ebx, 0xffffffff
lea rcx, str.Failed_to_extract__s:_inflateInit___failed_with_return_code__d__n
call fcn.140002b00
jmp 0x1400015dc
lea r8, [r12 + 0x12]
xor ebp, ebp
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
lea rcx, str.malloc
call fcn.140002c80
jmp 0x1400015c4
lea r8, [r12 + 0x12]
xor ebp, ebp
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
lea rcx, str.malloc
call fcn.140002c80
jmp 0x1400015c4
mov ebx, eax
jmp 0x1400015c4
Function at 0x140001780
Capabilities:
Read file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
lea rcx, [rcx + 0x70]
lea rdx, [0x140019129]
call fcn.1400042e0
test rax, rax
mov rbp, rax
je 0x1400018b0
mov edx, dword [r12 + 4]
xor r8d, r8d
mov rcx, rax
add edx, dword [rbx]
call fcn.14000f280
test eax, eax
js 0x140001890
mov esi, dword [r12 + 0xc]
mov rcx, rsi
call sub.msvcrt.dll_malloc
test rax, rax
mov r13, rax
je 0x1400018c6
cmp byte [r12 + 0x10], 1
je 0x140001870
test rsi, rsi
mov rdi, rax
jne 0x140001808
jmp 0x140001850
add rdi, rbx
sub rsi, rbx
je 0x140001850
mov ebx, 0x2000
mov r9, rbp
mov r8d, 1
cmp rsi, rbx
mov rcx, rdi
cmovbe rbx, rsi
mov rdx, rbx
call sub.msvcrt.dll_fread
test rax, rax
jne 0x140001800
lea r8, [r12 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
lea rcx, str.fread
call fcn.140002c80
mov rcx, r13
call sub.msvcrt.dll_free
xor r13d, r13d
mov rcx, rbp
call sub.msvcrt.dll_fclose
mov rax, r13
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor r8d, r8d
mov r9, rax
mov rdx, r12
mov rcx, rbp
call fcn.140001490
test eax, eax
je 0x140001850
jmp 0x140001845
lea r8, [r12 + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
lea rcx, str.fseek
call fcn.140002c80
jmp 0x14000184d
lea rdx, [r12 + 0x12]
xor r13d, r13d
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
call fcn.140002b00
jmp 0x140001858
lea r8, [r12 + 0x12]
mov r9d, esi
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_data_buffer___u_bytes___n
lea rcx, str.malloc
call fcn.140002c80
jmp 0x14000184d
Function at 0x140001990
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [rcx + 0x5074], 1
mov rsi, rcx
mov rbx, rdx
jne 0x140001b90
cmp byte [rdx + 0x11], 0x6e
je 0x140001ab0
lea r13, [rdx + 0x12]
lea rcx, [rcx + 0x3070]
mov rdx, r13
call fcn.140008250
test rax, rax
mov r12, rax
je 0x140001ba6
lea rcx, [rsi + 0x70]
lea rdx, [0x140019129]
call fcn.1400042e0
test rax, rax
mov rbp, rax
je 0x140001b20
mov edx, dword [rbx + 4]
xor r8d, r8d
mov rcx, rax
add edx, dword [rsi]
call fcn.14000f280
test eax, eax
js 0x140001b70
cmp byte [rbx + 0x10], 1
je 0x140001ad0
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
mov rdi, rax
je 0x140001bbe
mov esi, dword [rbx + 0xc]
test rsi, rsi
jne 0x140001a66
jmp 0x140001b40
mov r9, r12
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_fwrite
test rax, rax
je 0x140001b50
sub rsi, rbx
je 0x140001b40
mov ebx, 0x2000
mov r9, rbp
mov r8d, 1
cmp rsi, rbx
mov rcx, rdi
cmovbe rbx, rsi
mov rdx, rbx
call sub.msvcrt.dll_fread
test rax, rax
jne 0x140001a40
lea rdx, str.Failed_to_extract__s:_failed_to_read_data_chunk__n
mov r8, r13
lea rcx, str.fread
call fcn.140002c80
mov esi, 0xffffffff
mov rcx, rdi
call sub.msvcrt.dll_free
jmp 0x140001ae3
call fcn.1400018f0
test eax, eax
mov esi, eax
js 0x140001b08
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor r9d, r9d
mov r8, r12
mov rdx, rbx
mov rcx, rbp
call fcn.140001490
mov esi, eax
mov rcx, rbp
call sub.msvcrt.dll_fclose
mov rcx, r12
call sub.msvcrt.dll_fclose
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea rdx, [rbx + 0x12]
lea rcx, str.Failed_to_create_symbolic_link__s__n
call fcn.140002b00
jmp 0x140001abb
lea rcx, str.Failed_to_extract__s:_failed_to_open_archive_file__n
mov rdx, r13
mov esi, 0xffffffff
call fcn.140002b00
jmp 0x140001aeb
xor esi, esi
jmp 0x140001aa6
lea rdx, str.Failed_to_extract__s:_failed_to_write_data_chunk__n
mov r8, r13
lea rcx, str.fwrite
call fcn.140002c80
jmp 0x140001aa1
lea rdx, str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
mov r8, r13
lea rcx, str.fseek
call fcn.140002c80
mov esi, 0xffffffff
jmp 0x140001ae3
lea rcx, str.pyi_arch_extract2fs_was_called_before_temporary_directory_was_initialized__n
call fcn.140002b00
mov esi, 0xffffffff
jmp 0x140001abb
lea rdx, str.Failed_to_extract__s:_failed_to_open_target_file__n
mov r8, r13
lea rcx, str.fopen
call fcn.140002c80
jmp 0x140001b9c
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_buffer__n
mov r8, r13
lea rcx, str.malloc
call fcn.140002c80
jmp 0x140001b86
Function at 0x140001be0
Capabilities:
Read file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
lea rdx, [0x140019129]
mov rsi, rcx
lea rcx, [rcx + 0x70]
call fcn.1400042e0
test rax, rax
mov rbx, rax
je 0x140001e01
mov rax, qword [0x14001f2e0]
lea rdx, [rsp + 0x28]
mov r8d, 8
mov rcx, rbx
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
shr rax, 0x18
add eax, 0xc
mov byte [rsp + 0x2b], al
call fcn.140008870
test rax, rax
mov rdi, rax
jne 0x140001c58
mov edi, 0xffffffff
mov rcx, rbx
call sub.msvcrt.dll_fclose
mov eax, edi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
xor r8d, r8d
mov edx, eax
mov rcx, rbx
call fcn.14000f280
test eax, eax
js 0x140001db0
lea rcx, [rsi + 0x18]
mov r9, rbx
mov r8d, 1
mov edx, 0x58
call sub.msvcrt.dll_fread
test rax, rax
je 0x140001dd0
mov eax, dword [rsi + 0x20]
add rdi, 0x58
mov dword [rsi + 0x5078], 0
mov edx, dword [rsi + 0x24]
mov ecx, dword [rsi + 0x28]
mov r8d, dword [rsi + 0x2c]
bswap eax
movd xmm0, eax
mov eax, eax
bswap edx
movd xmm2, edx
sub rdi, rax
punpckldq xmm0, xmm2
bswap ecx
movq qword [rsi + 0x20], xmm0
movd xmm0, ecx
bswap r8d
movd xmm3, r8d
add edx, edi
mov qword [rsi], rdi
punpckldq xmm0, xmm3
mov dword [0x140022040], r8d
mov rcx, rbx
xor r8d, r8d
movq qword [rsi + 0x28], xmm0
call fcn.14000f280
movsxd rdi, dword [rsi + 0x28]
mov rcx, rdi
call sub.msvcrt.dll_malloc
test rax, rax
mov rcx, rax
mov qword [rsi + 8], rax
je 0x140001e0b
mov r9, rbx
mov r8d, 1
mov rdx, rdi
call sub.msvcrt.dll_fread
test rax, rax
je 0x140001d98
movsxd rax, dword [rsi + 0x28]
mov rcx, rbx
add rax, qword [rsi + 8]
mov qword [rsi + 0x10], rax
call sub.msvcrt.dll_ferror
test eax, eax
mov edi, eax
jne 0x140001df0
mov rax, qword [rsi + 8]
mov r9, qword [rsi + 0x10]
cmp rax, r9
jae 0x140001c40
nop dword [rax]
mov ecx, dword [rax + 4]
mov edx, dword [rax]
mov r8d, dword [rax + 8]
bswap ecx
movd xmm0, ecx
mov ecx, dword [rax + 0xc]
bswap edx
mov dword [rax], edx
movsxd rdx, edx
bswap r8d
movd xmm1, r8d
punpckldq xmm0, xmm1
movq qword [rax + 4], xmm0
bswap ecx
mov dword [rax + 0xc], ecx
add rax, rdx
cmp rax, r9
jb 0x140001d58
jmp 0x140001c40
lea rdx, str.Could_not_read_full_TOC__n
lea rcx, str.fread
call fcn.140002c80
jmp 0x140001c3b
lea rdx, str.Failed_to_seek_to_cookie_position__n
lea rcx, str.fseek
call fcn.140002c80
jmp 0x140001c3b
lea rdx, str.Failed_to_read_cookie__n
lea rcx, str.fread
call fcn.140002c80
jmp 0x140001c3b
lea rcx, str.Error_on_file._n
call fcn.140002b00
jmp 0x140001c3b
mov edi, 0xffffffff
jmp 0x140001c48
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
lea rcx, str.malloc
call fcn.140002c80
jmp 0x140001c3b
Function at 0x140007b10
Capabilities:
Query environment variable

Disassembly:
push rbx
mov eax, 0x4020
call fcn.14000e740
sub rsp, rax
xor r8d, r8d
lea rbx, [rsp + 0x20]
mov rdx, rcx
xor ecx, ecx
call fcn.140008d50
mov r8d, 0x2000
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x140007b58
xor eax, eax
add rsp, 0x4020
pop rbx
ret
lea rdx, [rsp + 0x2020]
mov r8d, 0x2000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ecx, ecx
xor r8d, r8d
mov rdx, rbx
call fcn.140008b80
test rax, rax
mov rcx, rax
je 0x140007b46
cmp byte [rax], 0
je 0x140007b46
call sub.msvcrt.dll__strdup
add rsp, 0x4020
pop rbx
ret

Function at 0x140007c00
Capabilities:
Set environment variable

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