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

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

Function at 0x1401669e0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x140166a2d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140166a24
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140166a2f
add rax, 0x28
cmp rax, r9
jne 0x140166a10
xor eax, eax
ret

Function at 0x140166a30
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140166ac0
mov rdx, qword [0x1401a31b0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x140166aae
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x140166aae
cmp word [rax + 0x18], 0x20b
jne 0x140166aae
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140166ac0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140166a99
add rbx, 0x28
cmp rbx, rdi
je 0x140166ac0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140166a90
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140166ad0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1401a31b0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140166af0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140166af8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140166af0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140166b4d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140166b44
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140166af0
add rax, 0x28
cmp rax, r9
jne 0x140166b30
xor eax, eax
ret

Function at 0x140166b50
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1401a31b0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140166b6f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140166b78
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140166b6f
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x140166b90
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1401a31b0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140166bb0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140166bb8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140166bb0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140166c00
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140166bf7
test rcx, rcx
je 0x140166bb0
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x140166be8
xor eax, eax
ret

Function at 0x140166c10
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1401a31b0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140166c2f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140166c38
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140166c50
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1401a31b0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140166c70
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140166c78
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140166c70
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140166c70
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x140166cc4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140166cd0
add rdx, 0x28
cmp rdx, r9
jne 0x140166cb0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x140166ce0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x1401a31b0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140166d02
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140166d10
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140166d02
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140166d02
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140166d02
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140166d65
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140166d78
add rdx, 0x28
cmp r10, rdx
jne 0x140166d50
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140166d87
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140166d97
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140166d6e
test ecx, ecx
jg 0x140166d80
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140001460
Capabilities:
Hash data using djb2

Disassembly:
push rbx
push rbp
push rdi
push r14
push r15
sub rsp, 0x40
mov rax, qword [0x14000a040]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbp, rcx
xor r15d, r15d
mov rcx, qword [rcx + 0x128]
mov r14, r8
mov rbx, rdx
cmp dword [rcx + 0x47c], r15d
jne 0x140001643
lea rdi, [rcx + 0x228]
cmp dword [rcx + 0x478], r15d
je 0x1400014b4
mov dword [rcx + 0x478], r15d
jmp 0x1400014cc
mov rcx, qword [rcx + 0x480]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x140001643
test rdi, rdi
je 0x140001643
lea r9, [rdi + 0x2c]
mov qword [rsp + 0x88], rsi
mov r8d, 0x105
mov qword [rsp + 0x20], 0x105
lea rdx, [rbx + 0x1c]
lea rcx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstombs_s]
test eax, eax
je 0x140001536
lea r9, [rdi + 0x234]
cmp word [r9], r15w
je 0x14000152e
mov r8d, 0x105
mov qword [rsp + 0x20], 0x105
lea rdx, [rbx + 0x1c]
lea rcx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstombs_s]
test eax, eax
jne 0x140001612
mov rax, qword [rsp + 0x30]
dec rax
mov qword [rbx + 0x10], rax
mov eax, dword [rdi]
test al, 0x40
je 0x140001551
mov dword [rbx + 0x18], 0x2000
jmp 0x140001572
bt eax, 0xa
jae 0x140001560
mov dword [rbx + 0x18], 0xc000
jmp 0x140001572
test al, 0x10
mov ecx, 0x4000
mov eax, 0x8000
cmovne eax, ecx
mov dword [rbx + 0x18], eax
mov rcx, qword [rbp + 0x128]
cmp dword [rcx + 0x47c], r15d
jne 0x140001604
lea rdi, [rcx + 0x228]
cmp dword [rcx + 0x478], r15d
je 0x14000159f
mov dword [rcx + 0x478], r15d
jmp 0x1400015b3
mov rcx, qword [rcx + 0x480]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x140001604
test rdi, rdi
je 0x140001604
lea rcx, [rdi + 0x2c]
mov eax, 0x1505
add rdi, 0x234
cmp rcx, rdi
je 0x1400015e5
nop dword [rax]
movzx edx, word [rcx]
add rcx, 2
test edx, edx
je 0x1400015e5
imul eax, eax, 0x21
add eax, edx
cmp rcx, rdi
jne 0x1400015d0
btr eax, 0x1f
mov dword [rbx + 4], eax
mov rax, qword [rbp + 0x128]
mov dword [rax + 0x478], 1
mov eax, 0x128
jmp 0x14000162f
mov dword [rbx + 4], 0x7fffffff
mov eax, 0x128
jmp 0x14000162f
mov word [rbx + 0x1c], 0x3f
movzx eax, r15w
mov qword [rbx + 0x10], 1
mov dword [rbx + 0x18], r15d
mov dword [rbx + 4], 0xffffffff
mov dword [rbx], r15d
mov word [rbx + 8], ax
mov rsi, qword [rsp + 0x88]
mov qword [r14], rbx
jmp 0x140001646
mov qword [r14], r15
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140004d10
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rbp
pop rbx
ret
Function at 0x1400039e0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14000a040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140003a0d
xor eax, eax
jmp 0x140003b79
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140003a47
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140003a47
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140003b79
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140003b6c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140003a8a
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140003ab5
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140003b71
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140003b24
sub eax, 1
je 0x140003b24
cmp eax, 2
jne 0x140003b6c
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140003b71
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140003b52
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140003b6c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140003b71
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140004d10
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140003ee0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14000a040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140003fb3
cmp byte [rcx + 0x71], 0
je 0x140003fb3
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140003faf
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140003f74
sub eax, 1
je 0x140003f78
cmp eax, 2
jne 0x140003faf
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140004d10
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140003fa6
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x140003faf
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140003f5c
xor al, al
jmp 0x140003f5c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140004d10
add rsp, 0x60
pop rbx
ret

Function at 0x140005690
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004bdab0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004bdac0]
mov dword [rax], 1
mov rax, qword [0x004bdad0]
mov dword [rax], 1
mov rax, qword [0x004bdaa0]
mov dword [rax], 1
mov rax, qword [0x004bd970]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004bda90]
mov dword [0x004e500c], 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 [0x004bda50]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004bcdb0]
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 0x40c620
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 0x40c690
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x004e5634]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x40c838
mov rax, qword [0x004e5638]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40c6dc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x40c767
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x40c6c0
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x40c872
mov rax, qword [0x004e5638]
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 [0x004e5638]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40c881
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40c760
sub eax, 4
and eax, 0xfffffffb
jne 0x40c7f0
add dword [0x004e5634], 1
cmp ebx, 8
jae 0x40c798
test bl, 4
jne 0x40c840
test ebx, ebx
je 0x40c789
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x40c860
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 0x40c789
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 0x40c7ca
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 [0x004e5638]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40c760
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 0x40c6e7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x40c789
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x40c789
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x004e5638]
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 0x40d060
Capabilities:
Get thread local storage value

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

Function at 0x40d2e0
Capabilities:
Parse pe header

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

Function at 0x40d300
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 0x40d345
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 0x40d33c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40d347
add rax, 0x28
cmp rax, r9
jne 0x40d328
xor eax, eax
ret

Function at 0x40d3f0
Capabilities:
Enumerate pe sections

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

Function at 0x40d550
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004bd970]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40d5bf
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d5bf
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 0x40d5bd
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 0x40d5b4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d5c8
add rax, 0x28
cmp rax, r9
jne 0x40d5a0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x40d5e0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004bd970]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x40d658
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d658
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x40d658
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d658
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 0x40d64c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x40d660
add rdx, 0x28
cmp rdx, r10
jne 0x40d638
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x40d670
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x40d67e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x40d655
test r8d, r8d
jg 0x40d668
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x40de00
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.0040d6a0
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 0x40defa
int3
mov rcx, r14
add esi, 0x51
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
je 0x40df48
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 0x40df73
mov edx, r15d
sub edx, eax
movsxd rdx, edx
mov byte [r14 + rdx], 0x41
sub eax, 1
jne 0x40df60
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
jne 0x40df87
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 0x40dfad
mov rcx, r13
call sym.free
jmp 0x40df1f
xor edx, edx
mov r8, rbx
mov rcx, rax
call sym.memset
cmp qword [rbp], 0
je 0x40df1f
mov rcx, r14
call qword [rbp]
jmp 0x40df1f

Function at 0x418ab0
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