joyce8/EMBER2024-capa huggingface dataset:
Function at 0x66205e10
Capabilities:
Get file attributes

Disassembly:
mov byte [rsp + 0x18], r8b
mov byte [rsp + 0x10], dl
push rbp
push rsi
push rdi
sub rsp, 0x160
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x198], rbx
mov rbp, r9
mov rdi, rcx
add rcx, 0x1c0
call fcn.662081d0
xor esi, esi
cmp qword [rdi + 0x1a0], rsi
jne 0x66205f60
cmp qword [rdi + 8], rsi
je 0x66205f24
lea rcx, [rsp + 0x90]
call fcn.662035e0
nop
lea rdx, [rsp + 0x90]
mov rcx, qword [rdi]
call fcn.6620bf30
lea rcx, [rsp + 0x90]
call fcn.662048a0
mov dword [rsp + 0x40], 0x30
mov qword [rsp + 0x48], rsi
mov dword [rsp + 0x58], 0x40
mov qword [rsp + 0x50], rax
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
mov eax, 0x20
cmp byte [rdi + 0x1e4], sil
mov ecx, esi
cmovne eax, ecx
or eax, 0x40
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 1
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x40]
mov edx, dword [rdi + 0x1e0]
lea rcx, [rdi + 0x1b0]
call qword [sym.imp.ntdll.dll_NtOpenFile]
mov dword [rsp + 0x180], eax
test eax, eax
jns 0x66205f17
xor eax, eax
mov qword [rdi + 0x1b0], rax
lea rcx, [rsp + 0x90]
call fcn.66203630
mov eax, dword [rsp + 0x180]
jmp 0x66206021
lea rcx, [rsp + 0x90]
call fcn.66203630
mov dword [rsp + 0x20], 5
mov r9d, 0x18
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x30]
mov rcx, qword [rdi + 0x1b0]
call qword [sym.imp.ntdll.dll_NtQueryInformationFile]
test eax, eax
js 0x66206021
mov rax, qword [rsp + 0x80]
mov qword [rdi + 0x1a8], rax
mov rcx, rdi
call fcn.66206260
mov esi, eax
test eax, eax
jns 0x66205f89
lea rcx, [rdi + 0x1c0]
call fcn.662081d0
mov rcx, rdi
call fcn.66205160
mov eax, esi
jmp 0x66206021
cmp byte [rsp + 0x188], 0
je 0x66205f9a
xor eax, eax
jmp 0x66206021
mov rbx, qword [rdi + 0x1c0]
mov rcx, rbx
call fcn.66205000
test al, al
je 0x66205f93
cmp byte [rsp + 0x190], 0
je 0x66205f93
mov rax, qword [rdi + 0x1b0]
mov qword [rdi + 0x1b8], rax
xor esi, esi
mov qword [rdi + 0x1b0], rsi
test rbp, rbp
je 0x66205fe4
or r8, 0xffffffffffffffff
mov rdx, rbp
mov rcx, rdi
call fcn.662046d0
jmp 0x66206011
mov rcx, rbx
call fcn.66204fe0
mov rbx, rax
mov rcx, rdi
call fcn.662045a0
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], esi
or r9, 0xffffffffffffffff
mov r8, rbx
mov dl, 1
mov rcx, rax
call fcn.66203710
xor r9d, r9d
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.66205e10
mov rbx, qword [rsp + 0x198]
add rsp, 0x160
pop rdi
pop rsi
pop rbp
ret
Function at 0x662060c0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push r14
sub rsp, 0x60
mov r14d, r9d
mov rbp, r8
mov rbx, rcx
lea rax, [r14 + rdx]
cmp qword [rcx + 0x1a8], rax
jge 0x662060fe
mov eax, 0xc000007b
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r14
pop rsi
pop rbp
ret
mov rax, qword [rcx + 0x1a0]
test rax, rax
je 0x6620612b
add rdx, rax
mov r8, r14
mov rcx, rbp
call fcn.6620e700
xor eax, eax
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x1b0], 0
jne 0x6620614b
mov eax, 0xc0000008
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r14
pop rsi
pop rbp
ret
cmp byte [rcx + 0x1e4], 0
mov qword [rsp + 0x90], rdi
mov qword [rsp + 0x80], 0
je 0x662061af
mov rdi, qword [rsp + 0xa0]
test rdi, rdi
jne 0x6620619d
lea rcx, [rsp + 0x80]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x100002
mov byte [rsp + 0x20], dil
call qword [sym.imp.ntdll.dll_NtCreateEvent]
mov rdi, qword [rsp + 0x80]
jmp 0x662061a6
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtClearEvent]
test eax, eax
jns 0x662061b1
jmp 0x66206241
xor edi, edi
mov rcx, qword [rbx + 0x1b0]
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x88]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x50]
mov dword [rsp + 0x30], r14d
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtReadFile]
mov ebx, eax
cmp eax, 0x103
jne 0x6620621b
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov ebx, eax
test eax, eax
je 0x66206217
js 0x6620622c
mov ebx, 0xc0000001
jmp 0x6620622c
mov ebx, dword [rsp + 0x50]
test ebx, ebx
js 0x6620622c
cmp qword [rsp + 0x58], r14
mov eax, 0xc000007b
cmovne ebx, eax
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x6620623f
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, ebx
mov rdi, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r14
pop rsi
pop rbp
ret
Function at 0x6620a920
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x30
mov r15, r9
movzx r12d, r8b
mov rbx, rdx
mov r14, rcx
test rdx, rdx
je 0x6620aa98
mov eax, 0xffffffff
cmp rdx, rax
je 0x6620aa98
cmp rdx, 0xffffffffffffffff
je 0x6620aa98
mov rdi, qword [rsp + 0x78]
cmp rdi, 0x40
jae 0x6620a97c
mov eax, 0xc000007b
jmp 0x6620aa9d
lea r8, [rsp + 0x58]
call fcn.6620a290
test eax, eax
js 0x6620aa9d
mov eax, 0x5a4d
cmp word [rsp + 0x58], ax
je 0x6620a9a4
mov eax, 0xc000007b
jmp 0x6620aa9d
lea rdx, [rbx + 0x3c]
lea r8, [rsp + 0x20]
mov rcx, r14
call fcn.6620a1d0
test eax, eax
js 0x6620aa9d
mov ecx, dword [rsp + 0x20]
mov edx, ecx
cmp rcx, rdi
jae 0x6620aa8a
lea eax, [rcx + 0x18]
cmp eax, ecx
jb 0x6620aa8a
cmp rax, rdi
jae 0x6620aa8a
cmp ecx, 0x10000000
jae 0x6620aa8a
add rdx, rbx
lea r8, [rsp + 0x24]
mov rcx, r14
call fcn.6620a1d0
test eax, eax
js 0x6620aa9d
cmp dword [rsp + 0x24], 0x4550
je 0x6620aa18
mov eax, 0xc000007b
jmp 0x6620aa9d
mov esi, dword [rsp + 0x20]
add rsi, rbx
test r15, r15
je 0x6620aa27
mov qword [r15], rsi
mov rdi, qword [rsp + 0x70]
test rdi, rdi
je 0x6620aa86
mov qword [rdi + 0x108], rsi
mov qword [rdi + 0x110], rbx
mov byte [rdi + 0x118], r12b
mov r9d, 0x18
mov r8, rdi
mov rdx, rsi
mov rcx, r14
call fcn.66209e30
test eax, eax
js 0x6620aa9d
movzx ecx, word [rdi + 0x14]
mov eax, 0xf0
cmp ax, cx
jb 0x6620aa6f
movzx eax, cx
mov r9d, eax
lea r8, [rdi + 0x18]
lea rdx, [rsi + 0x18]
mov rcx, r14
call fcn.66209e30
test eax, eax
js 0x6620aa9d
xor eax, eax
jmp 0x6620aa9d
mov eax, 0xc000007b
jmp 0x6620aa9d
mov eax, 0xc000000d
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop r12
ret
Function at 0x6620aac0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x60
mov rbx, qword [rdx + 0x108]
movzx r10d, word [rdx + 0x14]
xor edi, edi
add rbx, 0x18
mov r15, r9
mov ebp, r8d
add rbx, r10
mov r14, rdx
mov rsi, rcx
cmp di, word [rdx + 6]
jae 0x6620abb1
cmp byte [rsi + 0x70], 0
je 0x6620ab1e
lea rcx, [rsp + 0x30]
mov r8d, 0x28
mov rdx, rbx
call fcn.6620e700
jmp 0x6620ab8e
call fcn.66209a30
test rax, rax
je 0x6620ab5a
cmp byte [rax + 0x3c], 0
je 0x6620ab5a
mov rdx, qword [rsi + 0x58]
lea rcx, [rsp + 0x88]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x28], rcx
mov r8, rbx
mov rcx, rax
mov qword [rsp + 0x20], 0x28
call fcn.66209ef0
jmp 0x6620ab7f
mov rcx, qword [rsi + 0x58]
lea rax, [rsp + 0x88]
lea r8, [rsp + 0x30]
mov r9d, 0x28
mov rdx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtReadVirtualMemory]
test eax, eax
js 0x6620abb6
cmp qword [rsp + 0x88], 0x28
jne 0x6620ac05
mov ecx, dword [rsp + 0x3c]
cmp ecx, ebp
ja 0x6620ab9e
add ecx, dword [rsp + 0x40]
cmp ebp, ecx
jb 0x6620abd0
movzx eax, word [r14 + 6]
inc edi
add rbx, 0x28
cmp edi, eax
jb 0x6620ab03
mov eax, 0xc000007a
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
test r15, r15
je 0x6620abd8
mov qword [r15], rbx
mov rax, qword [rsp + 0xa0]
test rax, rax
je 0x6620ac01
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [rax], xmm0
movsd xmm0, qword [rsp + 0x50]
movups xmmword [rax + 0x10], xmm1
movsd qword [rax + 0x20], xmm0
xor eax, eax
jmp 0x6620abb6
mov eax, 0xc0000004
jmp 0x6620abb6

Function at 0x6620cbe0
Capabilities:
Encode data using xor

Disassembly:
movzx eax, byte [rcx]
mov r10, r8
movsxd r8, r9d
add al, 0x29
cmp al, 1
ja 0x6620c5e7
mov rdx, r10
jmp 0x6620cbe0
lea rdx, [rcx + 1]
mov rcx, r10
jmp fcn.6620e700
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
movzx esi, byte [rcx]
inc rcx
mov rbx, r8
lea eax, [rsi + 0x29]
mov rdi, rdx
cmp al, 1
jbe 0x6620cc30
test rbx, rbx
je 0x6620ccac
sub rcx, rdx
nop
movzx eax, byte [rcx + rdi]
lea rdi, [rdi + 1]
mov byte [rdi - 1], al
dec rbx
jne 0x6620cc10
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
call fcn.6620ce60
cmp sil, 0xd8
jne 0x6620ccac
xor ecx, ecx
test rbx, rbx
je 0x6620ccac
cmp rbx, 0x20
jb 0x6620cc89
movdqa xmm2, xmmword [0x66220050]
mov rax, rbx
mov rdx, rbx
and eax, 0x1f
sub rdx, rax
lea rax, [rdi + 0x10]
movdqu xmm0, xmmword [rax - 0x10]
add rcx, 0x20
lea rax, [rax + 0x20]
pxor xmm0, xmm2
movdqu xmmword [rax - 0x30], xmm0
movdqu xmm1, xmmword [rax - 0x20]
pxor xmm1, xmm2
movdqu xmmword [rax - 0x20], xmm1
cmp rcx, rdx
jb 0x6620cc60
cmp rcx, rbx
jae 0x6620ccac
lea rax, [rcx + rdi]
sub rbx, rcx
nop word [rax + rax]
xor byte [rax], 0xf0
lea rax, [rax + 1]
dec rbx
jne 0x6620cca0
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140001e00
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.140019260
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.140019260
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 0x140001e70
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x14001f0b4]
mov r12, rcx
test ebx, ebx
jle 0x140001fa0
mov rax, qword [0x14001f0b8]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x140001ebc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140001f43
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x140001ea0
mov rcx, r12
call fcn.140002810
mov rsi, rax
test rax, rax
je 0x140001fc2
mov rax, qword [0x14001f0b8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.140002940
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x14001f0b8]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001fa7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001f3c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001f50
add dword [0x14001f0b4], 1
add rsp, 0x50
pop rbx
pop rsi
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 rbx, qword [0x14001f0b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001f3c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001e00
nop dword [rax]
xor ebx, ebx
jmp 0x140001ec7
mov rax, qword [0x14001f0b8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140001e00
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140001e00
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002480
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x14001f120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14001f100]
test rbx, rbx
je 0x1400024d4
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 0x1400024cb
test r12, r12
je 0x1400024cb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400024b0
lea rcx, [0x14001f120]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140002810
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14001c500]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002830
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002838
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002830
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x140002885
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14000287c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002830
add rax, 0x28
cmp rax, r9
jne 0x140002868
xor eax, eax
ret

Function at 0x140002890
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14001c500]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x1400028b0
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400028b8
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400028b0
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x140002940
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14001c500]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140002960
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x140002968
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret

Function at 0x140004130
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x14001c580]
mov rax, qword [rsi]
test rax, rax
je 0x1400041c0
cmp qword [rax + 0x30], 0
jne 0x1400041e0
lea rbx, [0x14001a088]
mov qword [rax + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [rsi]
test rax, rax
je 0x140004190
cmp qword [rax + 0x30], 0
jne 0x1400041b0
lea rdx, [0x14001a088]
mov qword [rax + 0x30], rdx
mov rax, rdx
cmp dword [rax], 0xffffffff
je 0x1400193f0
add rsp, 0x28
pop rbx
pop rsi
ret
call fcn.140009030
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x140004172
test rax, rax
jne 0x1400041b0
call fcn.140009030
nop dword [rax]
mov rax, qword [rax + 0x30]
jmp 0x140004180
call fcn.140009030
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x140004150
test rax, rax
jne 0x1400041e0
call fcn.140009030
nop dword [rax]
mov rbx, qword [rax + 0x30]
jmp 0x14000415b
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
mov rax, qword [pe_dos_header]
ud2
Function at 0x1400041f0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x40], rax
xor eax, eax
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov word [rsp + 0x88], ax
mov byte [rsp + 0x8a], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x140004302
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x1400042da
add rax, 1
cmp rax, 0x6b
je 0x1400042f7
cmp byte [rcx + rax], 0
movsxd rdx, eax
jne 0x1400042d0
cmp edx, 0x6a
je 0x1400042f7
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rdx + 0x20], 0xa
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov eax, 0x28
mov edx, 0x27
lea rcx, [rsp + 0x20]
jmp 0x1400042eb
Function at 0x140004d10
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rsi, qword [0x14001c580]
mov rax, qword [rsi]
test rax, rax
je 0x140004f00
cmp qword [rax + 0x28], 0
jne 0x140004ee8
lea rcx, [0x14001f1d8]
cmp dword [rcx], 1
mov qword [rax + 0x28], rcx
je 0x140004ef5
call fcn.140004320
mov rax, qword [rsi]
test rax, rax
je 0x140004d90
cmp qword [rax + 0x30], 0
jne 0x140004db0
lea rdx, [0x14001a088]
mov qword [rax + 0x30], rdx
mov rax, rdx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x140004dc4
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.140009030
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x140004d60
test rax, rax
jne 0x140004db0
call fcn.140009030
nop dword [rax]
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
jne 0x140004d7e
call fcn.140003e60
cmp qword [0x140022050], 0
mov rbx, rax
je 0x140004d7e
test rax, rax
je 0x140004d7e
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.14000aed0
cmp eax, 1
je 0x140004f6d
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, r12
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x1400193f6
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [rsi]
test rax, rax
je 0x140004f48
cmp qword [rax + 0x30], 0
je 0x140004f30
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1400193f6
mov r12, rbx
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x140004d4c
mov rax, qword [rsi]
jmp 0x140004d59
call fcn.140009030
cmp qword [rax + 0x28], 0
mov rax, qword [rsi]
je 0x140004d38
test rax, rax
jne 0x140004ee8
call fcn.140009030
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x140004d4c
jmp 0x140004d51
lea rdx, [0x14001a088]
mov qword [rax + 0x30], rdx
mov rax, rdx
jmp 0x140004ebe
call fcn.140009030
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x140004f30
test rax, rax
jne 0x140004eba
call fcn.140009030
jmp 0x140004eba
call fcn.1400041f0
nop word cs:[rax + rax]
nop dword [rax]
mov rax, qword [0x14001c580]
mov rdx, qword [rax]
lea rax, [0x14001f1e8]
mov qword [rdx + 0x10], rax
ret
Function at 0x140008eb0
Capabilities:
Print debug messages

Disassembly:
push r12
push rbx
sub rsp, 0x58
mov r12, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140008ed0
add rsp, 0x58
pop rbx
pop r12
ret
lea rdx, [rsp + 0x48]
mov r9d, 0x400
mov r8d, eax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], rdx
mov ecx, 0x1100
xor edx, edx
mov dword [rsp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
jne 0x140008f18
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x140008ec4
int3
mov rcx, qword [rsp + 0x48]
mov rbx, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call rbx
mov rcx, r12
call rbx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140008f05
Function at 0x140009030
Capabilities:
Check mutex on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x30
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [0x14001f2c0]
mov dword [rsp + 0x2c], eax
lea rcx, [rsp + 0x2c]
lea r9, [rsp + 0x30]
movzx eax, byte [rcx]
add rcx, 1
add rdx, 2
mov r8d, eax
and eax, 0xf
shr r8b, 4
add eax, 0x61
add r8d, 0x41
mov byte [rdx - 1], al
mov byte [rdx - 2], r8b
cmp rcx, r9
jne 0x140009053
lea rax, [0x14001f2c8]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x1a]
jmp 0x14000909b
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x140009098
lea rax, [0x14001f300]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x19]
jmp 0x1400090cb
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x1400090c8
xor ecx, ecx
mov byte [0x14001f319], 0x2d
movabs rax, 0x6161616161616161
movabs rdx, 0x6161616161616161
mov qword [0x14001f322], rdx
lea r8, [0x14001f2c0]
lea rbx, [0x14001f31a]
mov qword [0x14001f332], rdx
mov qword [0x14001f342], rdx
mov qword [0x14001f352], rdx
xor edx, edx
mov qword [0x14001f31a], rax
mov qword [0x14001f32a], rax
mov qword [0x14001f33a], rax
mov qword [0x14001f34a], rax
mov byte [0x14001f35a], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1400092a6
lea rcx, [0x14001f300]
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x1400091f1
lea rsi, [0x14001f200]
lea r8, [0x14001f35a]
mov rax, rbx
lea ecx, [rbx + 0x40]
nop dword [rax]
mov edx, ecx
sub edx, eax
bt rsi, rdx
jae 0x14000919d
mov byte [rax], 0x41
add rax, 1
cmp r8, rax
jne 0x140009190
lea rcx, [0x14001f300]
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
je 0x140009293
lea rcx, [0x140008f40]
mov qword [0x14001f200], rsi
call sub.msvcrt.dll__onexit
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x14001f200]
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
mov r8d, 0x5b
lea rdx, [0x14001f300]
movzx ecx, ax
call qword [sym.imp.KERNEL32.dll_GetAtomNameA]
lea r8, [0x14001f35a]
xor edx, edx
lea r10d, [rbx + 0x40]
mov r11d, eax
mov r9d, 1
mov rax, rbx
test r11d, r11d
je 0x1400092c6
nop dword [rax]
cmp byte [rax], 0x41
jne 0x140009243
mov ecx, r10d
mov rbx, r9
sub ecx, eax
shl rbx, cl
or rdx, rbx
add rax, 1
cmp r8, rax
jne 0x140009230
mov rax, rdx
mov qword [0x14001f200], rax
lea rsi, [0x14001f200]
jmp 0x140009269
cmp rdx, rsi
je 0x1400091cf
mov rdx, rax
mov rax, qword [rax + 8]
test rax, rax
jne 0x140009260
cmp rdx, rsi
je 0x1400091cf
mov qword [rdx + 8], rsi
lea rcx, [0x140008f40]
call sub.msvcrt.dll__onexit
jmp 0x1400091cf
lea rcx, str.failed_to_add_string_to_atom_table_n
call fcn.140008eb0
xor eax, eax
jmp 0x1400091e8
lea rcx, str.failed_to_to_lock_creation_mutex_n
call fcn.140008eb0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
lea rcx, str.failed_to_get_string_from_atom_n
call fcn.140008eb0
xor eax, eax
jmp 0x14000924f
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14000eae0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14000eaf0]
mov dword [rax], 1
mov rax, qword [0x14000eb00]
mov dword [rax], 1
mov rax, qword [0x14000ea80]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14000ead0]
mov dword [0x140012020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x14000ebb0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x14000eb90]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x14000ea30]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a