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

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

Function at 0x14000fc64
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14000fa60
Function at 0x140015248
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x140015278
xor eax, eax
jmp 0x14001533b
mov rbp, rbx
cmp word [rax], si
je 0x14001529d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140015284
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140015280
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.140015168
movsxd r14, eax
test eax, eax
jne 0x1400152db
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140015271
mov rcx, r14
call fcn.140012034
mov rdi, rax
test rax, rax
jne 0x1400152f4
xor ecx, ecx
call fcn.140010968
jmp 0x1400152d0
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.140015168
test eax, eax
jne 0x140015325
mov rcx, rdi
call fcn.140010968
jmp 0x14001532f
xor ecx, ecx
call fcn.140010968
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x140019120
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140019136
mov al, 1
jmp 0x140019196
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140019147
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140019194
mov ecx, dword [rcx + 0x18]
nop
call fcn.140015b68
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140019194
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140019194
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140019194
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140019196
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x14001a530
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.14000b584
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14001a5ba
cmp byte [rbp - 0x21], r15b
je 0x14001a5b5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14001a5f0
call fcn.14001160c
test eax, eax
jne 0x14001a5dc
cmp byte [rbp - 0x21], r15b
je 0x14001a5d4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14001a5f0
cmp byte [rbp - 0x21], r15b
je 0x14001a5ed
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1400138b4
test eax, eax
jne 0x14001a690
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14000b584
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14001a62f
cmp byte [rbp - 0x21], r15b
je 0x14001a664
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14001a664
call fcn.14001160c
test eax, eax
jne 0x14001a650
cmp byte [rbp - 0x21], r15b
je 0x14001a649
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14001a664
cmp byte [rbp - 0x21], r15b
je 0x14001a661
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1400138b4
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14001a690
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14001a693
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14001a6a1
mov rcx, rdi
call fcn.140010968
cmp byte [rbp + 0x3f], r15b
je 0x14001a6b0
mov rcx, qword [rbp + 0x27]
call fcn.140010968
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x14001c8c0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14001c8e8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14001c8e8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001000
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x20
mov eax, dword [rcx + 0x28]
mov rbx, rdx
add rax, rdx
mov edx, 0x2000
test word [rcx + 0x16], dx
je 0x14000108d
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 1]
call rax
mov eax, 0x5a4d
cmp word [rbx], ax
je 0x140001034
xor edx, edx
jmp 0x140001074
movsxd rax, dword [rbx + 0x3c]
add rax, rbx
cmp dword [rax], 0x4550
jne 0x140001030
mov ecx, 0x8664
cmp word [rax + 4], cx
jne 0x140001030
mov ecx, 0x20b
cmp word [rax + 0x18], cx
jne 0x140001030
cmp dword [rax + 0x84], 0
jbe 0x140001030
cmp dword [rax + 0x8c], 0
je 0x140001030
mov edx, dword [rax + 0x88]
add rdx, rbx
mov r9d, 0x4498fa65
mov r8d, 0x5d3195da
mov rcx, rbx
call fcn.140002158
test rax, rax
je 0x14000108f
call rax
add rsp, 0x20
pop rbx
ret
Function at 0x140002158
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
mov r10d, dword [rdx + 0x20]
mov r12d, r8d
mov edi, dword [rdx + 0x24]
add r10, rcx
mov esi, dword [rdx + 0x1c]
add rdi, rcx
mov ebp, dword [rdx + 0x18]
add rsi, rcx
xor r8d, r8d
mov r15d, r9d
mov r11, rcx
test ebp, ebp
je 0x140002204
mov r9d, dword [r10]
add r9, r11
xor ecx, ecx
mov eax, ecx
inc ecx
cmp byte [rax + r9], 0
jne 0x14000219f
or eax, 0xffffffff
mov ebx, r12d
cmp ecx, eax
cmovb eax, ecx
test eax, eax
je 0x1400021f3
mov r14d, eax
mov al, byte [r9]
movzx edx, byte [r9]
sub al, 0x20
movzx ecx, al
sub edx, 0x61
movzx eax, byte [r9]
cmp edx, 0x19
cmova ecx, eax
inc r9
movzx edx, cl
sub ebx, edx
mov eax, edx
or eax, 1
rol ebx, 5
imul eax, edx
lea eax, [rax + rax*2]
xor ebx, eax
sub r14, 1
jne 0x1400021bc
cmp ebx, r15d
je 0x140002221
inc r8d
add r10, 4
cmp r8d, ebp
jb 0x140002197
xor eax, eax
mov rbx, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
pop r15
pop r14
pop r12
ret
movzx ecx, word [rdi + r8*2]
mov eax, dword [rsi + rcx*4]
add rax, r11
jmp 0x140002206

Function at 0x140002230
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov r9, qword [rcx]
mov edi, r8d
mov esi, edx
mov r10, rcx
cmp r9, rcx
je 0x1400022c0
xor ebp, ebp
mov rbx, qword [r9 + 0x50]
mov r8d, ebp
mov eax, r8d
inc r8d
cmp word [rbx + rax*2], bp
jne 0x14000225c
or eax, 0xffffffff
mov r11d, esi
cmp r8d, eax
cmovb eax, r8d
add eax, eax
je 0x1400022b3
mov r8d, eax
mov al, byte [rbx]
movzx edx, byte [rbx]
sub al, 0x20
movzx ecx, al
sub edx, 0x61
movzx eax, byte [rbx]
cmp edx, 0x19
cmova ecx, eax
inc rbx
movzx edx, cl
sub r11d, edx
mov eax, edx
or eax, 1
rol r11d, 5
imul eax, edx
lea eax, [rax + rax*2]
xor r11d, eax
sub r8, 1
jne 0x14000227c
cmp edi, r11d
je 0x1400022d7
mov r9, qword [r9]
cmp r9, r10
jne 0x140002255
xor eax, eax
mov rbx, qword [rsp + 8]
mov rbp, qword [rsp + 0x10]
mov rsi, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
ret
mov rax, qword [r9 + 0x20]
jmp 0x1400022c2

Function at 0x1400022e0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov r10, rdx
mov r9d, ecx
xor edx, edx
mov ecx, edx
mov eax, ecx
inc ecx
cmp word [r10 + rax*2], dx
jne 0x1400022ea
cmp ecx, r8d
cmovb r8d, ecx
add r8d, r8d
je 0x14000233e
mov r11d, r8d
mov al, byte [r10]
movzx edx, byte [r10]
sub al, 0x20
sub edx, 0x61
movzx ecx, al
movzx eax, byte [r10]
cmp edx, 0x19
cmova ecx, eax
inc r10
movzx edx, cl
sub r9d, edx
mov ecx, edx
or ecx, 1
rol r9d, 5
imul ecx, edx
lea ecx, [rcx + rcx*2]
xor r9d, ecx
sub r11, 1
jne 0x140002304
mov eax, r9d
ret
Function at 0x1400023b4
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400023ff
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x1400023ff
mov edx, 0x8664
cmp word [rax + 4], dx
jne 0x1400023ff
mov edx, 0x20b
cmp word [rax + 0x18], dx
jne 0x1400023ff
cmp dword [rax + 0x84], 0
jbe 0x1400023ff
cmp dword [rax + 0x8c], 0
je 0x1400023ff
mov eax, dword [rax + 0x88]
add rax, rcx
ret
xor eax, eax
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004d6090]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004d60a0]
mov dword [rax], 1
mov rax, qword [0x004d60b0]
mov dword [rax], 1
mov rax, qword [0x004d6080]
mov dword [rax], 1
mov rax, qword [0x004d5f50]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004d6070]
mov dword [0x0050000c], 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 [0x004d6030]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004d5390]
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 0x40c930
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 0x40c9a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00500634]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x40cb48
mov rax, qword [0x00500638]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40c9ec
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x40ca77
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x40c9d0
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x40cb82
mov rax, qword [0x00500638]
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 [0x00500638]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40cb91
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40ca70
sub eax, 4
and eax, 0xfffffffb
jne 0x40cb00
add dword [0x00500634], 1
cmp ebx, 8
jae 0x40caa8
test bl, 4
jne 0x40cb50
test ebx, ebx
je 0x40ca99
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x40cb70
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 0x40ca99
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 0x40cada
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 [0x00500638]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40ca70
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 0x40c9f7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x40ca99
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x40ca99
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x00500638]
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 0x40d370
Capabilities:
Get thread local storage value

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

Function at 0x40d5f0
Capabilities:
Parse pe header

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

Function at 0x40d610
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 0x40d655
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 0x40d64c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40d657
add rax, 0x28
cmp rax, r9
jne 0x40d638
xor eax, eax
ret

Function at 0x40d700
Capabilities:
Enumerate pe sections

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

Function at 0x40d860
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004d5f50]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40d8cf
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d8cf
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 0x40d8cd
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 0x40d8c4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d8d8
add rax, 0x28
cmp rax, r9
jne 0x40d8b0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x40d8f0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004d5f50]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x40d968
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d968
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x40d968
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40d968
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 0x40d95c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x40d970
add rdx, 0x28
cmp rdx, r10
jne 0x40d948
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x40d980
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x40d98e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x40d965
test r8d, r8d
jg 0x40d978
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x40e110
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.0040d9b0
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 0x40e20a
int3
mov rcx, r14
add esi, 0x51
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
je 0x40e258
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 0x40e283
mov edx, r15d
sub edx, eax
movsxd rdx, edx
mov byte [r14 + rdx], 0x41
sub eax, 1
jne 0x40e270
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
jne 0x40e297
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 0x40e2bd
mov rcx, r13
call sym.free
jmp 0x40e22f
xor edx, edx
mov r8, rbx
mov rcx, rax
call sym.memset
cmp qword [rbp], 0
je 0x40e22f
mov rcx, r14
call qword [rbp]
jmp 0x40e22f
Function at 0x40efe0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r14
push r13
push r12
push rdi
sub rsp, 0x238
mov r12, rcx
call sym._errno
mov dword [rax], 0
test r12, r12
je 0x40f150
cmp word [r12], 0
je 0x40f140
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f160
test al, 0x10
je 0x40f140
lea r13, [rsp + 0x20]
mov rdx, r12
mov r8d, 0x104
mov rcx, r13
call sym._wfullpath
mov rcx, r13
call sym.wcslen
lea rcx, [0x004d4940]
mov r12, rax
call sym.wcslen
lea rcx, [0x004d4944]
add r12, rax
call sym.wcslen
lea rcx, [r12 + rax + 0x229]
add rcx, rcx
call sym.malloc
mov r12, rax
test rax, rax
je 0x40f173
lea r14, [rax + 0x44c]
mov rdx, r13
mov rcx, r14
call sym.wcscpy
cmp word [r12 + 0x44c], 0
jne 0x40f100
lea rdx, [0x004d4944]
mov rcx, r14
call sym.wcscat
lea rdx, [r12 + 0x238]
mov ecx, 0x41
xor eax, eax
mov qword [r12 + 0x440], 0xffffffffffffffff
mov rdi, rdx
mov dword [r12 + 0x448], 0
mov qword [r12 + 0x230], 0
rep stosq qword [rdi], rax
mov rax, r12
add rsp, 0x238
pop rdi
pop r12
pop r13
pop r14
ret
mov rcx, r14
call sym.wcslen
cmp word [r12 + rax*2 + 0x44a], 0x2f
je 0x40f0a1
mov rcx, r14
call sym.wcslen
cmp word [r12 + rax*2 + 0x44a], 0x5c
je 0x40f0a1
lea rdx, [0x004d4940]
mov rcx, r14
call sym.wcscat
jmp 0x40f0a1
call sym._errno
xor r12d, r12d
mov dword [rax], 0x14
jmp 0x40f0e9
call sym._errno
mov dword [rax], 0xe
jmp 0x40f0e9
call sym._errno
xor r12d, r12d
mov dword [rax], 2
jmp 0x40f0e9
call sym._errno
mov dword [rax], 0xc
jmp 0x40f0e9