joyce8/EMBER2024-capa huggingface dataset:
Function at 0x66205250
Capabilities:
Map section object

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x148]
sub rsp, 0x220
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov r13, r9
mov esi, r8d
mov r12d, edx
mov rdi, rcx
test rcx, rcx
je 0x6620529b
cmp r8d, 0xffffffff
jne 0x6620529b
mov r15b, 1
jmp 0x6620529e
xor r15b, r15b
mov r8b, 1
or rdx, 0xffffffffffffffff
lea rcx, [rbp - 0x80]
call fcn.66208a10
nop
test r15b, r15b
je 0x662052e2
mov qword [rsp + 0x20], r12
lea r9, [rbp]
xor r8d, r8d
mov rdx, rdi
lea rcx, [rbp - 0x80]
call fcn.66209c40
mov ebx, eax
test eax, eax
js 0x6620544c
lea rcx, [rbp]
call fcn.66209ea0
mov esi, dword [rbp + 0x50]
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov eax, esi
mov qword [rsp + 0x68], rax
mov eax, 0x40
mov ecx, 4
cmp byte [rbp + 0x180], r14b
cmovne eax, ecx
mov dword [rbp + 0x150], eax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x68]
xor r8d, r8d
lea edx, [rcx + 0xb]
lea rcx, [rsp + 0x58]
call qword [sym.imp.ntdll.dll_NtCreateSection]
mov ebx, eax
test eax, eax
js 0x6620544c
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x60], r14
mov eax, dword [rbp + 0x150]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], 0x100000
mov dword [rsp + 0x38], 2
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
lea r9d, [r14 + 1]
lea r8, [rsp + 0x50]
or rdx, 0xffffffffffffffff
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov ebx, eax
test eax, eax
js 0x662053c0
test r15b, r15b
je 0x662053cd
mov r9, qword [rsp + 0x50]
mov r8d, r12d
mov rdx, rdi
lea rcx, [rbp]
call fcn.662095c0
mov ebx, eax
test eax, eax
jns 0x662053fc
mov rdx, qword [rsp + 0x50]
or rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x6620544c
test rdi, rdi
je 0x662053fc
test r12d, r12d
je 0x662053ec
mov r9d, esi
mov r8, qword [rsp + 0x50]
mov edx, r12d
mov rcx, rdi
call fcn.6620cad0
jmp 0x662053fc
mov r8d, esi
mov rdx, rdi
mov rcx, qword [rsp + 0x50]
call fcn.6620ec30
test r13, r13
jne 0x6620540e
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x66205417
mov rax, qword [rsp + 0x58]
mov qword [r13], rax
mov rcx, qword [rbp + 0x170]
test rcx, rcx
jne 0x66205434
mov rdx, qword [rsp + 0x50]
or rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
jmp 0x6620543c
mov rax, qword [rsp + 0x50]
mov qword [rcx], rax
mov rax, qword [rbp + 0x178]
test rax, rax
je 0x6620544f
mov dword [rax], esi
jmp 0x6620544f
mov r14d, ebx
lea rcx, [rbp - 0x80]
call fcn.66208b70
mov eax, r14d
lea r11, [rsp + 0x220]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
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 + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x198], rbx
mov rbp, r9
mov rdi, rcx
add rcx, 0x1c0
call fcn.662082e0
xor esi, esi
cmp qword [rdi + 0x1a0], rsi
jne 0x66205f77
cmp qword [rdi + 8], rsi
je 0x66205f29
lea rcx, [rsp + 0x90]
call fcn.662035e0
nop
lea rdx, [rsp + 0x90]
mov rcx, qword [rdi]
call fcn.6620c430
lea rcx, [rsp + 0x90]
call fcn.662048a0
mov dword [rsp + 0x50], 0x30
mov qword [rsp + 0x58], rsi
mov dword [rsp + 0x68], 0x40
mov qword [rsp + 0x60], rax
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x70], 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 + 0x80]
lea r8, [rsp + 0x50]
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 0x66205f1a
xor eax, eax
mov qword [rdi + 0x1b0], rax
lea rcx, [rsp + 0x90]
call fcn.66203630
mov eax, dword [rsp + 0x180]
jmp 0x66206038
lea rcx, [rsp + 0x90]
call fcn.66203630
xor esi, esi
mov dword [rsp + 0x30], esi
xor eax, eax
mov qword [rsp + 0x34], rax
mov qword [rsp + 0x3c], rax
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x20], 5
lea r9d, [rax + 0x18]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x80]
mov rcx, qword [rdi + 0x1b0]
call qword [sym.imp.ntdll.dll_NtQueryInformationFile]
test eax, eax
js 0x66206038
mov rax, qword [rsp + 0x38]
mov qword [rdi + 0x1a8], rax
mov rcx, rdi
call fcn.66206280
mov esi, eax
test eax, eax
jns 0x66205fa0
lea rcx, [rdi + 0x1c0]
call fcn.662082e0
mov rcx, rdi
call fcn.66205160
mov eax, esi
jmp 0x66206038
cmp byte [rsp + 0x188], 0
je 0x66205fb1
xor eax, eax
jmp 0x66206038
mov rbx, qword [rdi + 0x1c0]
mov rcx, rbx
call fcn.66205000
test al, al
je 0x66205faa
cmp byte [rsp + 0x190], 0
je 0x66205faa
mov rax, qword [rdi + 0x1b0]
mov qword [rdi + 0x1b8], rax
xor esi, esi
mov qword [rdi + 0x1b0], rsi
test rbp, rbp
je 0x66205ffb
or r8, 0xffffffffffffffff
mov rdx, rbp
mov rcx, rdi
call fcn.662046d0
jmp 0x66206028
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 0x662060d0
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 0x6620610e
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 0x6620613b
add rdx, rax
mov r8, r14
mov rcx, rbp
call fcn.6620ec30
xor eax, eax
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x1b0], 0
jne 0x6620615b
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 0x662061bf
mov rdi, qword [rsp + 0xa0]
test rdi, rdi
jne 0x662061ad
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 0x662061b6
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtClearEvent]
test eax, eax
jns 0x662061c1
jmp 0x6620625d
xor edi, edi
mov rcx, qword [rbx + 0x1b0]
xor eax, eax
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x88]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x50]
mov dword [rsp + 0x30], r14d
xor r8d, r8d
mov rdx, rdi
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x50], 0
call qword [sym.imp.ntdll.dll_NtReadFile]
mov ebx, eax
cmp eax, 0x103
jne 0x66206237
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov ebx, eax
test eax, eax
je 0x66206233
js 0x66206248
mov ebx, 0xc0000001
jmp 0x66206248
mov ebx, dword [rsp + 0x50]
test ebx, ebx
js 0x66206248
cmp qword [rsp + 0x58], r14
mov eax, 0xc000007b
cmovne ebx, eax
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x6620625b
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 0x662080b0
Capabilities:
Get windows directory from kuser_shared_data

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rbx, rdx
mov rdi, rcx
test rcx, rcx
je 0x6620811a
test rdx, rdx
je 0x6620811a
xor edx, edx
mov rcx, rbx
call fcn.662041f0
xor eax, eax
or r9, 0xffffffffffffffff
mov qword [rsp + 0x28], rax
mov r8d, 0x7ffe0030
mov dl, 1
mov rcx, rbx
mov dword [rsp + 0x20], eax
call fcn.66203710
lea rdx, str.System32
mov rcx, rbx
call fcn.6620c360
mov rdx, rdi
mov rcx, rbx
call fcn.6620c360
xor eax, eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov eax, 0xc000000d
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x6620d0e0
Capabilities:
Encode data using xor

Disassembly:
movzx eax, byte [rcx]
mov r10, r8
movsxd r8, r9d
add al, 0x29
cmp al, 1
ja 0x6620cae7
mov rdx, r10
jmp 0x6620d0e0
lea rdx, [rcx + 1]
mov rcx, r10
jmp fcn.6620ec30
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 0x6620d130
test rbx, rbx
je 0x6620d1ac
sub rcx, rdx
nop
movzx eax, byte [rcx + rdi]
lea rdi, [rdi + 1]
mov byte [rdi - 1], al
dec rbx
jne 0x6620d110
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
call fcn.6620d390
cmp sil, 0xd8
jne 0x6620d1ac
xor ecx, ecx
test rbx, rbx
je 0x6620d1ac
cmp rbx, 0x20
jb 0x6620d189
movdqa xmm2, xmmword [0x66220070]
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 0x6620d160
cmp rcx, rbx
jae 0x6620d1ac
lea rax, [rcx + rdi]
sub rbx, rcx
nop word [rax + rax]
xor byte [rax], 0xf0
lea rax, [rax + 1]
dec rbx
jne 0x6620d1a0
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x1400010ce
Capabilities:
Execute anti-debugging instructions

Disassembly:
xor eax, eax
nop
cpuid
nop
mov eax, 1
nop
cpuid
nop
movabs r9, 0xb2d05e00
nop
cpuid
nop
rdtsc
nop
shl rdx, 0x20
nop
or rax, rdx
nop
mov rcx, rax
nop
fldpi
nop
frndint
nop
rdtsc
nop
shl rdx, 0x20
nop
or rax, rdx
nop
sub rax, rcx
nop
cmp rax, r9
nop
jb 0x1400010fb
nop
nop
push rbp
nop
mov rbp, rsp
nop
sub rsp, 8
nop
mov r10, 0xa
nop
mov rcx, 0xffffffff9f345678
nop
dec rcx
nop
xor r9, r9
nop
mov rax, rcx
nop
jne 0x140001134
nop
xor rax, rax
nop
mov rax, rbx
nop
add rax, rdx
nop
dec r10
nop
xor r11, r11
nop
jne 0x14000112b
nop
xor rax, rax
mov rax, 0xa
nop
dec rax
nop
add rsp, 8
pop rbp
ret
Function at 0x140003410
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rdi
sub rsp, 0x20
xor ebp, ebp
mov rbx, rcx
lea r8d, [rbp + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
je 0x1400034ba
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x1400034ba
mov rcx, rax
mov qword [rsp + 0x30], rsi
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rdi
mov rcx, rbx
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov eax, 2
shr ebx, 1
lea ecx, [rbx + 1]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140003958
add rbx, rbx
mov rdx, rsi
mov r8, rbx
mov rcx, rax
mov rdi, rax
call fcn.140004890
mov rsi, qword [rsp + 0x30]
mov rax, rdi
mov word [rbx + rdi], bp
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rbx, qword [rsp + 0x38]
mov rax, rbp
mov rbp, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140007da4
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140007bd0
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004bd990]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004bd9a0]
mov dword [rax], 1
mov rax, qword [0x004bd9b0]
mov dword [rax], 1
mov rax, qword [0x004bd980]
mov dword [rax], 1
mov rax, qword [0x004bd850]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004bd970]
mov dword [0x004e400c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x4010b0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x004bd930]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004bcc90]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401067
cmp dword [rax + 0x84], 0xe
jbe 0x401067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x401067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x401067

Function at 0x40c4e0
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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x40c550
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x004e4634]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x40c6f8
mov rax, qword [0x004e4638]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40c59c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x40c627
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x40c580
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x40c732
mov rax, qword [0x004e4638]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004e4638]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40c741
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40c620
sub eax, 4
and eax, 0xfffffffb
jne 0x40c6b0
add dword [0x004e4634], 1
cmp ebx, 8
jae 0x40c658
test bl, 4
jne 0x40c700
test ebx, ebx
je 0x40c649
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x40c720
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 0x40c649
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 0x40c68a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x004e4638]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40c620
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor edi, edi
jmp 0x40c5a7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x40c649
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x40c649
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x004e4638]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
nop
nop dword [rax]
Function at 0x40cf20
Capabilities:
Get thread local storage value

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

Function at 0x40d1a0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
jne 0x40d1b0
jmp sym._ValidateImageBase.part.0
xor eax, eax
ret

Function at 0x40d1c0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d205
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x40d1fc
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40d207
add rax, 0x28
cmp rax, r9
jne 0x40d1e8
xor eax, eax
ret

Function at 0x40d2b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x004bd850]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x40d329
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d329
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 0x40d326
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 0x40d31d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x40d329
add r8, 0x28
cmp r8, r9
jne 0x40d308
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x40d410
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004bd850]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40d47f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d47f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x40d47d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x40d474
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d488
add rax, 0x28
cmp rax, r9
jne 0x40d460
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x40d4a0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004bd850]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x40d518
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d518
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x40d518
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d518
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x40d50c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x40d520
add rdx, 0x28
cmp rdx, r10
jne 0x40d4f8
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x40d530
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x40d53e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x40d515
test r8d, r8d
jg 0x40d528
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x40dcc0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x80]
mov qword [rbp], r8
mov r15, rcx
movsxd rbx, edx
call sym.strlen
mov rsi, rax
lea r13d, [rax + 0xf]
lea edi, [rax + 0x10]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040d560
sub rsp, rax
movsxd r12, esi
mov rdx, r15
movsxd r13, r13d
mov r8, r12
lea r14, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
movabs rax, 0x656d68732d636367
mov qword [rsp + 0x20], rax
mov eax, 0x326d
lea r15d, [rsi + 0x50]
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
mov byte [rsp + 0x2e], 0x2d
call sym.memcpy
lea rax, [r14 + r12 + 0x10]
mov r8, r14
movabs rdx, 0x6161616161616161
movabs rcx, 0x6161616161616161
mov qword [rax], rdx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rcx
mov qword [rax + 0x30], rdx
xor edx, edx
mov qword [rax + 0x38], rcx
movsxd rax, r15d
xor ecx, ecx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + r13 + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + r13 + 0x20], 0x2d
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40ddba
int3
mov rcx, r14
add esi, 0x51
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
je 0x40de08
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, esi
call dbg.get_ptr_from_atom
mov r14, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
lea rsp, [rbp - 0x58]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rcx, rbx
call sym.malloc
mov r13, rax
mov eax, 0x40
nop dword [rax + rax]
bt r13, rax
jae 0x40de33
mov edx, r15d
sub edx, eax
movsxd rdx, edx
mov byte [r14 + rdx], 0x41
sub eax, 1
jne 0x40de20
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
jne 0x40de47
int3
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, esi
call dbg.get_ptr_from_atom
mov r14, rax
cmp r13, rax
je 0x40de6d
mov rcx, r13
call sym.free
jmp 0x40dddf
xor edx, edx
mov r8, rbx
mov rcx, rax
call sym.memset
cmp qword [rbp], 0
je 0x40dddf
mov rcx, r14
call qword [rbp]
jmp 0x40dddf

Function at 0x418970
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_cond_locked_shmem_cond]
mov edx, 8
lea rcx, str.cond_locked_shmem_cond
jmp sym.__shmem_winpthreads_grab
Function at 0x41b130
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x004e5408]
test rbx, rbx
je 0x41b168
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x004e5408]
test rax, rax
je 0x41b190
cmp dword [rax], 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x20
pop rbx
ret
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004e5408], rax
mov rbx, rax
jmp 0x41b141
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004e5408], rax
jmp 0x41b155

Function at 0x41b640
Capabilities:
Print debug messages

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rbx, rcx
test rcx, rcx
je 0x41b665
call sym.pthread_spin_destroy
cmp eax, 1
je 0x41b672
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop r12
ret
lea r12, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
mov rdi, r12
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
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 0x41b6f8
mov eax, 0x28
jmp 0x41b6ca
add rax, 1
cmp rax, 0x6b
je 0x41b6ea
cmp byte [r12 + rax], 0
mov edx, eax
jne 0x41b6c0
cmp eax, 0x6a
je 0x41b6ea
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov edx, 0x27
jmp 0x41b6d8