joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400119b5
Capabilities:
Parse pe header

Disassembly:
jmp 0x14002feb0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x14002fed0
xor al, al
jmp 0x14002ff51
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x14002fee3
xor al, al
jmp 0x14002ff51
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14002ff0d
xor al, al
jmp 0x14002ff51
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x14002ff21
xor al, al
jmp 0x14002ff51
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x14002ff33
xor al, al
jmp 0x14002ff51
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14002ff4f
xor al, al
jmp 0x14002ff51
mov al, 1
add rsp, 0x38
ret
Function at 0x140011a82
Capabilities:
Enumerate processes

Disassembly:
jmp 0x14001fa80
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x428
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0xa2
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x448]
mov rax, qword [0x140044018]
xor rax, rbp
mov qword [rbp + 0x3f8], rax
lea rcx, [0x14004c104]
call fcn.140011e0b
xor edx, edx
mov ecx, 2
call fcn.1400116c7
mov qword [rbp + 8], rax
mov dword [rbp + 0x30], 0x238
lea rdx, [rbp + 0x30]
mov rcx, qword [rbp + 8]
call fcn.140011889
mov rdx, qword [rbp + 0x420]
lea rcx, [rbp + 0x5c]
call qword [sym.imp.ucrtbased.dll__wcsicmp]
test eax, eax
jne 0x14001fb06
mov al, 1
jmp 0x14001fb34
lea rdx, [rbp + 0x30]
mov rcx, qword [rbp + 8]
call fcn.140011bf9
test eax, eax
je 0x14001fb32
mov rdx, qword [rbp + 0x420]
lea rcx, [rbp + 0x5c]
call qword [sym.imp.ucrtbased.dll__wcsicmp]
test eax, eax
jne 0x14001fb30
mov al, 1
jmp 0x14001fb34
jmp 0x14001fb06
xor al, al
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x14003a190]
call fcn.140011b90
mov rax, rdi
mov rcx, qword [rbp + 0x3f8]
xor rcx, rbp
call fcn.1400116ef
lea rsp, [rbp + 0x408]
pop rdi
pop rbp
ret
Function at 0x140011db1
Capabilities:
Enumerate processes

Disassembly:
jmp 0x1400266c0
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x688
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x10a
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x6a8]
mov rax, qword [0x140044018]
xor rax, rbp
mov qword [rbp + 0x658], rax
lea rcx, [0x14004c103]
call fcn.140011e0b
mov dword [rbp + 4], 0
xor edx, edx
mov ecx, 2
call fcn.1400116c7
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0xffffffffffffffff
jne 0x1400267c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x518]
call fcn.1400114f1
mov qword [rbp + 0x638], rax
mov rax, qword [rbp + 0x638]
mov qword [rbp + 0x640], rax
mov r8, qword [rbp + 0x640]
lea rdx, str.Failed_to_create_snapshot:
lea rcx, [rbp + 0x558]
call fcn.140011e60
mov qword [rbp + 0x648], rax
mov rax, qword [rbp + 0x648]
mov qword [rbp + 0x650], rax
mov rdx, qword [rbp + 0x650]
lea rcx, [rbp + 0x4e8]
call fcn.14001153c
lea rdx, [0x140043c30]
lea rcx, [rbp + 0x4e8]
call fcn.140011f50
nop
lea rcx, [rbp + 0x558]
call fcn.1400112c1
lea rcx, [rbp + 0x518]
call fcn.1400112c1
nop
mov dword [rbp + 0x50], 0x238
lea rdx, [rbp + 0x50]
mov rcx, qword [rbp + 0x28]
call fcn.140011889
test eax, eax
jne 0x140026886
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x5c8]
call fcn.1400114f1
mov qword [rbp + 0x638], rax
mov rax, qword [rbp + 0x638]
mov qword [rbp + 0x640], rax
mov r8, qword [rbp + 0x640]
lea rdx, str.Failed_to_get_first_process:
lea rcx, [rbp + 0x608]
call fcn.140011e60
mov qword [rbp + 0x648], rax
mov rax, qword [rbp + 0x648]
mov qword [rbp + 0x650], rax
mov rdx, qword [rbp + 0x650]
lea rcx, [rbp + 0x598]
call fcn.14001153c
lea rdx, [0x140043c30]
lea rcx, [rbp + 0x598]
call fcn.140011f50
nop
lea rcx, [rbp + 0x608]
call fcn.1400112c1
lea rcx, [rbp + 0x5c8]
call fcn.1400112c1
nop
mov rcx, qword [rbp + 0x688]
call fcn.1400114b0
mov rdx, rax
lea rcx, [rbp + 0x7c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x1400268ab
mov eax, dword [rbp + 0x58]
mov dword [rbp + 4], eax
jmp 0x1400268bc
lea rdx, [rbp + 0x50]
mov rcx, qword [rbp + 0x28]
call fcn.140011bf9
test eax, eax
jne 0x140026886
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rbp + 4]
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x1400397b0]
call fcn.140011b90
mov rax, rdi
mov rcx, qword [rbp + 0x658]
xor rcx, rbp
call fcn.1400116ef
lea rsp, [rbp + 0x668]
pop rdi
pop rbp
ret
Function at 0x140011dcf
Capabilities:
Write file on windows

Disassembly:
jmp 0x140020db0
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x1e8
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x3e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x208]
mov rax, qword [0x140044018]
xor rax, rbp
mov qword [rbp + 0x1a8], rax
lea rcx, [0x14004c0fe]
call fcn.140011e0b
mov rax, qword [rbp + 0x1d0]
cmp qword [rax + 0x68], 0
je 0x140020e16
mov rax, qword [rbp + 0x1d0]
movzx eax, byte [rax + 0x71]
test eax, eax
jne 0x140020e1d
mov al, 1
jmp 0x140020f8f
mov rax, qword [rbp + 0x1d0]
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x198], rax
call fcn.1400113d9
mov dword [rbp + 0x1a0], eax
mov edx, dword [rbp + 0x1a0]
mov rcx, qword [rbp + 0x1d0]
call qword [rbp + 0x198]
mov dword [rbp + 0x164], eax
call fcn.1400113d9
mov dword [rbp + 0x184], eax
lea rdx, [rbp + 0x164]
lea rcx, [rbp + 0x184]
call fcn.140011bb3
movzx eax, al
test eax, eax
je 0x140020e82
xor al, al
jmp 0x140020f8f
mov qword [rbp + 8], 0x20
mov rax, qword [rbp + 0x1d0]
mov rax, qword [rax + 0x68]
mov qword [rbp + 0x198], rax
lea rax, [rbp + 0x48]
mov rcx, qword [rbp + 0x1d0]
add rcx, 0x74
lea rdx, [rbp + 0x68]
mov qword [rsp + 0x20], rdx
mov r9, rax
lea r8, [rbp + 0x28]
mov rdx, rcx
mov rcx, qword [rbp + 0x198]
call qword [sym.imp.MSVCP140D.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
mov dword [rbp + 0x1a0], eax
cmp dword [rbp + 0x1a0], 0
je 0x140020ef5
cmp dword [rbp + 0x1a0], 1
je 0x140020f00
cmp dword [rbp + 0x1a0], 3
je 0x140020f7e
jmp 0x140020f8d
mov rax, qword [rbp + 0x1d0]
mov byte [rax + 0x71], 0
lea rax, [rbp + 0x28]
mov rcx, qword [rbp + 0x68]
sub rcx, rax
mov rax, rcx
mov qword [rbp + 0x88], rax
cmp qword [rbp + 0x88], 0
jbe 0x140020f50
mov rax, qword [rbp + 0x1d0]
mov r9, qword [rax + 0x80]
mov r8, qword [rbp + 0x88]
mov edx, 1
lea rcx, [rbp + 0x28]
call qword [sym.imp.ucrtbased.dll_fwrite]
cmp qword [rbp + 0x88], rax
je 0x140020f50
xor al, al
jmp 0x140020f8f
mov rax, qword [rbp + 0x1d0]
movzx eax, byte [rax + 0x71]
test eax, eax
jne 0x140020f6b
mov dword [rbp + 0x194], 1
jmp 0x140020f75
mov dword [rbp + 0x194], 0
movzx eax, byte [rbp + 0x194]
jmp 0x140020f8f
mov rax, qword [rbp + 0x1d0]
mov byte [rax + 0x71], 0
mov al, 1
jmp 0x140020f8f
xor al, al
mov rdi, rax
lea rcx, [rbp - 0x30]
lea rdx, [0x14003b920]
call fcn.140011b90
mov rax, rdi
mov rcx, qword [rbp + 0x1a8]
xor rcx, rbp
call fcn.1400116ef
lea rsp, [rbp + 0x1b8]
pop rdi
pop rbp
ret
Function at 0x140002608
Capabilities:
Parse pe header

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

Function at 0x140005684
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 0x1400056f3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400056f3
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400056f3
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400056f3
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400056f3
cmp dword [rcx + 0x84], 0xe
jbe 0x1400056f3
cmp dword [rcx + 0xf8], 0
je 0x1400056f3
mov ecx, ebx
call fcn.1400057a4
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.140005580
nop
cmp dword [rbp + 0x20], 0
je 0x140005741
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000574c
int3
xor r8d, r8d
xor edx, edx
jmp 0x140005684

Function at 0x140005888
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 0x1400056f3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400056f3
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400056f3
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400056f3
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400056f3
cmp dword [rcx + 0x84], 0xe
jbe 0x1400056f3
cmp dword [rcx + 0xf8], 0
je 0x1400056f3
mov ecx, ebx
call fcn.1400057a4
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.140005580
nop
cmp dword [rbp + 0x20], 0
je 0x140005741
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000574c
int3
xor r8d, r8d
xor edx, edx
jmp 0x140005684
Function at 0x140010840
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, [0x1400297d0]
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 0x140010897
cmp word [rdx], r13w
jne 0x140010897
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14001089c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1400109c1
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1400109e2
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1400108d5
mov rdx, r9
mov word [rbx], cx
jmp 0x1400108fc
cmp r9, r8
jae 0x14001090c
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 0x1400108b6
jmp 0x1400109c1
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 0x1400109b6
cmp dword [rsp + 0x80], esi
je 0x1400109b6
lea r8, [0x1400297d0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14001098e
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14001095e
mov word [rbx], r13w
jmp 0x1400109be
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 0x14001096b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400109be
cmp word [rsp + 0x70], r13w
jne 0x14001099b
cmp rbx, r14
je 0x140010958
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140015ea0
cmp word [rsp + 0x70], r13w
je 0x1400109c1
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, [0x1400297d0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400109bb
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1400109c1
Function at 0x1400126e0
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 0x140012767
mov rsi, rbx
cmp word [rax], bp
je 0x140012726
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140012710
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14001270c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14000cb38
mov rdi, rax
test rax, rax
je 0x140012754
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140019420
mov rbp, rdi
xor ecx, ecx
call fcn.14000cafc
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 0x140015898
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1400158ae
mov al, 1
jmp 0x14001590e
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400158bf
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14001590c
mov ecx, dword [rcx + 0x18]
nop
call fcn.140012c28
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001590c
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001590c
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14001590c
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001590e
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140017f00
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.140015ea0
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140015ea0
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140018050
cmp rax, 0xffffffffffffffff
je 0x140018050
xor edi, edi
test rbp, rbp
jle 0x140017ffb
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14000ebf0
mov rbx, rax
test rax, rax
jne 0x140017f88
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140017ff1
mov edx, 0x8000
mov ecx, r14d
call fcn.14000bbb8
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.14000fd8c
cmp eax, 0xffffffff
je 0x140017fd1
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140017f98
mov edx, r15d
mov ecx, r14d
call fcn.14000bbb8
jmp 0x140017ff1
cmp byte [rsi + 0x38], dil
je 0x140017fe8
cmp dword [rsi + 0x34], 5
jne 0x140017fe8
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140017ff1
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14000cafc
jmp 0x140018064
jns 0x140018064
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140015ea0
cmp rax, 0xffffffffffffffff
jne 0x14001801c
cmp byte [rsi + 0x30], dil
je 0x140018064
mov edi, dword [rsi + 0x2c]
jmp 0x140018064
mov ecx, r14d
call fcn.140012c28
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140018064
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 0x140018064
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14001805d
mov eax, dword [rsi + 0x2c]
jmp 0x140018062
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140015ea0
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 0x140018c90
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140018cb8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140018cb8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14087a680
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.14087a807
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 0x14087a6b1
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14087a697
add dl, dl
jne 0x14087a6be
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14087a71e
xor eax, eax
add dl, dl
jne 0x14087a6cd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14087a7d5
add dl, dl
jne 0x14087a6de
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14087a6eb
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14087a6f8
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14087a705
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14087a712
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14087a6a6
mov eax, 1
add dl, dl
jne 0x14087a72e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14087a73b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14087a723
sub eax, ebx
mov ebx, 1
jne 0x14087a774
mov ecx, 1
add dl, dl
jne 0x14087a756
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14087a763
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14087a74b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14087a6a6
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14087a790
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14087a79d
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14087a785
cmp eax, 0x7d00
jae 0x14087a7c3
cmp eax, 0x500
jb 0x14087a7be
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14087a6a6
cmp eax, 0x7f
ja 0x14087a7c6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14087a6a6
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14087a7fa
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 0x14087a6a6
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001850
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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.1400075d0
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.1400075d0
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 0x1400018c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140010164]
mov rbx, rcx
test esi, esi
jle 0x1400019f0
mov rax, qword [0x140010168]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000190b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001995
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400018f0
mov rcx, rbx
call fcn.140002310
mov rdi, rax
test rax, rax
je 0x140001a12
mov rax, qword [0x140010168]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140002450
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140010168]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400019f7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000198e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400019a0
add dword [0x140010164], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
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 [0x140010168]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000198e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001850
nop dword [rax]
xor esi, esi
jmp 0x140001918
mov rax, qword [0x140010168]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140001850
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140001850
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140001f80
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400101c0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400101a0]
test rbx, rbx
je 0x140001fdc
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 0x140001fd3
test rsi, rsi
je 0x140001fd3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001fb8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]