joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400135b0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1400275c0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x140013607
cmp word [rdx], r13w
jne 0x140013607
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14001360c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140013731
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140013752
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140013645
mov rdx, r9
mov word [rbx], cx
jmp 0x14001366c
cmp r9, r8
jae 0x14001367c
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x140013626
jmp 0x140013731
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140013726
cmp dword [rsp + 0x80], esi
je 0x140013726
lea r8, [0x1400275c0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400136fe
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400136ce
mov word [rbx], r13w
jmp 0x14001372e
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1400136db
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14001372e
cmp word [rsp + 0x70], r13w
jne 0x14001370b
cmp rbx, r14
je 0x1400136c8
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1400132e8
cmp word [rsp + 0x70], r13w
je 0x140013731
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1400275c0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14001372b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140013731
Function at 0x140016888
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.1400132e8
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400132e8
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1400169d8
cmp rax, 0xffffffffffffffff
je 0x1400169d8
xor edi, edi
test rbp, rbp
jle 0x140016983
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14000b8d0
mov rbx, rax
test rax, rax
jne 0x140016910
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140016979
mov edx, 0x8000
mov ecx, r14d
call fcn.14000a4b0
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14000cd4c
cmp eax, 0xffffffff
je 0x140016959
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140016920
mov edx, r15d
mov ecx, r14d
call fcn.14000a4b0
jmp 0x140016979
cmp byte [rsi + 0x38], dil
je 0x140016970
cmp dword [rsi + 0x34], 5
jne 0x140016970
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140016979
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14000b948
jmp 0x1400169ec
jns 0x1400169ec
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400132e8
cmp rax, 0xffffffffffffffff
jne 0x1400169a4
cmp byte [rsi + 0x30], dil
je 0x1400169ec
mov edi, dword [rsi + 0x2c]
jmp 0x1400169ec
mov ecx, r14d
call fcn.1400111c0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1400169ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x1400169ec
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1400169e5
mov eax, dword [rsi + 0x2c]
jmp 0x1400169ea
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400132e8
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x1400183d0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400183f8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400183f8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140003840
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x58], rdx
xor edx, edx
test rcx, rcx
mov rbx, r8
je 0x140003874
cmp word [rcx], 0x5a4d
jne 0x140003874
movsxd rax, dword [rcx + 0x3c]
cmp eax, 0x400
jg 0x140003874
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003874
mov edx, dword [rcx + 0x28]
add rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140003780
test eax, eax
jne 0x140003890
xor eax, eax
add rsp, 0x40
pop rbx
ret
mov rcx, rbx
call fcn.1400037f0
test rax, rax
je 0x140003885
mov rcx, qword [rbx]
lea rdx, [rax + 0x10]
mov r9d, 8
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x58]
call fcn.14000406f
not eax
shr eax, 0x1f
add rsp, 0x40
pop rbx
ret

Function at 0x140003f70
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.140003f10
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x14000d580
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 fcn.1400160c0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.1400160c0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x14000d5f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140024f34]
test esi, esi
mov rdi, rcx
mov rbp, rdx
mov rbx, r8
jle 0x14000d780
mov rax, qword [0x140024f38]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rdi, rdx
jb 0x14000d63c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rdi, rdx
jb 0x14000d6c5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x14000d620
mov rcx, rdi
call fcn.14000e150
test rax, rax
mov r12, rax
je 0x14000d7d2
mov rax, qword [0x140024f38]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.14000e290
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x140024f38]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000d7b5
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000d6be
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14000d730
add dword [0x140024f34], 1
cmp ebx, 8
jae 0x14000d6f1
test bl, 4
jne 0x14000d790
test ebx, ebx
je 0x14000d6e6
movzx eax, byte [rbp]
test bl, 2
mov byte [rdi], al
jne 0x14000d7a4
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, ebx
sub ebx, 1
mov rdx, qword [rbp + rax - 8]
cmp ebx, 8
mov qword [rdi + rax - 8], rdx
jb 0x14000d6e6
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, ebx
mov qword [rdi + rdx], rcx
jb 0x14000d70a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov r8d, 4
mov eax, 0x40
mov rcx, qword [rsp + 0x20]
cmovne r8d, eax
mov rdx, qword [rsp + 0x38]
add rsi, qword [0x140024f38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000d6be
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000d580
xor esi, esi
jmp 0x14000d647
mov eax, dword [rbp]
mov ebx, ebx
mov dword [rdi], eax
mov eax, dword [rbp + rbx - 4]
mov dword [rdi + rbx - 4], eax
jmp 0x14000d6e6
mov ebx, ebx
movzx eax, word [rbp + rbx - 2]
mov word [rdi + rbx - 2], ax
jmp 0x14000d6e6
mov rax, qword [0x140024f38]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.14000d580
lea rcx, str.Address__p_has_no_image_section
mov rdx, rdi
call fcn.14000d580
nop
nop dword [rax]
nop word cs:[rax + rax]
Function at 0x14000dda0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140024fa0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140024f80]
test rbx, rbx
je 0x14000ddf4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x14000ddeb
test rsi, rsi
je 0x14000ddeb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000ddd0
lea rcx, [0x140024fa0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x14000e150
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x140020430]
xor edx, edx
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x14000e1bf
mov rcx, r9
call fcn.14000e020
test eax, eax
je 0x14000e1bf
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
lea rdx, [r9 + rax + 0x18]
movzx eax, word [r9 + 6]
test eax, eax
je 0x14000e1bd
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
mov r8d, dword [rdx + 0xc]
cmp rcx, r8
mov rax, r8
jb 0x14000e1b4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x14000e1bf
add rdx, 0x28
cmp rdx, r9
jne 0x14000e1a0
xor edx, edx
mov rax, rdx
add rsp, 0x28
ret
Function at 0x136a14
Capabilities:
Hash data with crc32

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x18
cmp dword [0x00141308], 0
jne 0x136aaf
mov dword [rsp], 0
jmp 0x136a3f
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
cmp dword [rsp], 0x100
jae 0x136aa5
mov eax, dword [rsp]
mov dword [rsp + 4], eax
mov dword [rsp + 0xc], 8
jmp 0x136a63
mov eax, dword [rsp + 0xc]
dec eax
mov dword [rsp + 0xc], eax
cmp dword [rsp + 0xc], 0
jbe 0x136a92
mov eax, dword [rsp + 4]
and eax, 1
test eax, eax
je 0x136a86
mov eax, dword [rsp + 4]
shr eax, 1
xor eax, 0xedb88320
mov dword [rsp + 4], eax
jmp 0x136a90
mov eax, dword [rsp + 4]
shr eax, 1
mov dword [rsp + 4], eax
jmp 0x136a59
mov eax, dword [rsp]
lea rcx, [0x00140f08]
mov edx, dword [rsp + 4]
mov dword [rcx + rax*4], edx
jmp 0x136a37
mov dword [0x00141308], 1
mov dword [rsp + 8], 0xffffffff
mov dword [rsp], 0
jmp 0x136ac8
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x28]
cmp dword [rsp], eax
jae 0x136b00
mov eax, dword [rsp + 8]
shr eax, 8
mov ecx, dword [rsp]
mov rdx, qword [rsp + 0x20]
movzx ecx, byte [rdx + rcx]
xor ecx, dword [rsp + 8]
and ecx, 0xff
mov ecx, ecx
lea rdx, [0x00140f08]
xor eax, dword [rdx + rcx*4]
mov dword [rsp + 8], eax
jmp 0x136ac0
mov eax, dword [rsp + 8]
not eax
add rsp, 0x18
ret
Function at 0x138540
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x68
cmp qword [rsp + 0x70], 0
jne 0x138561
xor eax, eax
jmp 0x1386bc
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x40]
lea rax, [rcx + rax + 0x88]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x20], 0
jmp 0x1385c0
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x18]
cmp dword [rsp + 0x20], eax
jae 0x1386ba
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x20]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x20]
lea rax, [rax + rcx*4]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x28]
call fcn.0013b878
mov edx, eax
mov rcx, qword [rsp + 0x28]
call fcn.00136a14
mov dword [rsp + 0x24], eax
cmp qword [rsp + 0x38], 0
je 0x1386b5
cmp qword [rsp + 0x28], 0
je 0x1386b5
mov eax, dword [rsp + 0x78]
cmp dword [rsp + 0x24], eax
jne 0x1386b5
cmp dword [rsp + 0x80], 0
je 0x13865d
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x70]
call qword [0x00140ca8]
jmp 0x1386bc
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x24]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x20]
lea rax, [rax + rcx*2]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x1c]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x50]
movzx ecx, word [rcx]
lea rax, [rax + rcx*4]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
jmp 0x1386bc
jmp 0x1385b6
xor eax, eax
add rsp, 0x68
ret
Function at 0x13c5f8
Capabilities:
Hash data using fnv

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x18
mov dword [rsp], 0x811c9dc5
mov rax, qword [rsp + 0x20]
mov qword [rsp + 8], rax
jmp 0x13c626
mov rax, qword [rsp + 8]
inc rax
mov qword [rsp + 8], rax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
cmp qword [rsp + 8], rax
jae 0x13c65b
mov rax, qword [rsp + 8]
movsx eax, byte [rax]
mov ecx, dword [rsp]
xor ecx, eax
mov eax, ecx
mov dword [rsp], eax
imul eax, dword [rsp], 0x1000193
mov dword [rsp], eax
jmp 0x13c619
mov eax, dword [rsp]
add rsp, 0x18
ret

Function at 0x13c708
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov dword [rsp + 0x20], 0
jmp 0x13c734
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x58]
cmp dword [rsp + 0x20], eax
jge 0x13c836
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x104]
inc eax
cdq
and edx, 0xff
add eax, edx
and eax, 0xff
sub eax, edx
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x104], eax
mov rax, qword [rsp + 0x40]
movsxd rax, dword [rax + 0x104]
mov rcx, qword [rsp + 0x40]
movzx eax, byte [rcx + rax]
mov rcx, qword [rsp + 0x40]
mov ecx, dword [rcx + 0x108]
add ecx, eax
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
and eax, 0xff
sub eax, edx
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x108], eax
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x40]
mov r8d, dword [rcx + 0x108]
mov rcx, qword [rsp + 0x40]
mov edx, dword [rcx + 0x104]
mov rcx, rax
call fcn.0013c8c4
mov rax, qword [rsp + 0x40]
movsxd rax, dword [rax + 0x104]
mov rcx, qword [rsp + 0x40]
movzx eax, byte [rcx + rax]
mov rcx, qword [rsp + 0x40]
movsxd rcx, dword [rcx + 0x108]
mov rdx, qword [rsp + 0x40]
movzx ecx, byte [rdx + rcx]
add eax, ecx
cdq
and edx, 0xff
add eax, edx
and eax, 0xff
sub eax, edx
cdqe
mov rcx, qword [rsp + 0x40]
movzx eax, byte [rcx + rax]
movsxd rcx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x48]
movzx ecx, byte [rdx + rcx]
xor eax, ecx
movsxd rcx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x50]
mov byte [rdx + rcx], al
jmp 0x13c72a
add rsp, 0x38
ret
Function at 0x140003b70
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x58], rdx
mov rbx, r8
xor edx, edx
test rcx, rcx
je 0x140003ba4
cmp word [rcx], 0x5a4d
jne 0x140003ba4
movsxd rax, dword [rcx + 0x3c]
cmp eax, 0x400
jg 0x140003ba4
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003ba4
mov edx, dword [rcx + 0x28]
add rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140003ab0
test eax, eax
jne 0x140003bc0
xor eax, eax
add rsp, 0x40
pop rbx
ret
mov rcx, rbx
call fcn.140003b20
test rax, rax
je 0x140003bb5
lea rdx, [rax + 0x10]
lea rax, [rsp + 0x38]
mov rcx, qword [rbx]
mov r9d, 8
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x58]
mov qword [rsp + 0x38], 0
call fcn.140004369
not eax
shr eax, 0x1f
add rsp, 0x40
pop rbx
ret

Function at 0x140004270
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.140004210
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x1400046c4
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x14055f558]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x14055f554]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x140004712
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14000470a
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400047f9
inc ebx
add rax, 0x28
jmp 0x1400046ea
mov rcx, r12
call fcn.140004ef1
mov rbp, rax
test rax, rax
jne 0x140004731
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140004660
movsxd rbx, ebx
mov rax, qword [0x14055f558]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call fcn.140004f9f
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14055f558]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140004793
mov rax, qword [0x14055f558]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140004660
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400047f3
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400047f3
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14055f558]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400047f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140004660
inc dword [0x14055f554]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x140004c20
Capabilities:
Get thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rdi, [0x14055f5c0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14055f5a0]
test rbx, rbx
je 0x140004c6c
mov ecx, dword [rbx]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rsi, rsi
je 0x140004c66
test eax, eax
jne 0x140004c66
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
jmp 0x140004c3e
mov rcx, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140004e20
Capabilities:
Parse pe header

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

Function at 0x140004e44
Capabilities:
Enumerate pe sections

Disassembly:
xor r8d, r8d
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
cmp r8d, r9d
jae 0x140004e7e
mov r10d, dword [rax + 0xc]
mov rcx, r10
cmp rdx, r10
jb 0x140004e75
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140004e80
inc r8d
add rax, 0x28
jmp 0x140004e5c
xor eax, eax
ret

Function at 0x140004ef1
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x14055b650]
mov r8, rcx
mov rcx, r9
call fcn.140004e20
test eax, eax
je 0x140004f1d
mov rdx, r8
mov rcx, r9
sub rdx, r9
add rsp, 0x28
jmp fcn.140004e44
xor eax, eax
add rsp, 0x28
ret
Function at 0x1415c9058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1415c91df
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 0x1415c9089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1415c906f
add dl, dl
jne 0x1415c9096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1415c90f6
xor eax, eax
add dl, dl
jne 0x1415c90a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1415c91ad
add dl, dl
jne 0x1415c90b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1415c90c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1415c90d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1415c90dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1415c90ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1415c907e
mov eax, 1
add dl, dl
jne 0x1415c9106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1415c9113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1415c90fb
sub eax, ebx
mov ebx, 1
jne 0x1415c914c
mov ecx, 1
add dl, dl
jne 0x1415c912e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1415c913b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1415c9123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1415c907e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1415c9168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1415c9175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1415c915d
cmp eax, 0x7d00
jae 0x1415c919b
cmp eax, 0x500
jb 0x1415c9196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1415c907e
cmp eax, 0x7f
ja 0x1415c919e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1415c907e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1415c91d2
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 0x1415c907e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20