joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180710058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1807101df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x180710089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x18071006f
add dl, dl
jne 0x180710096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1807100f6
xor eax, eax
add dl, dl
jne 0x1807100a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1807101ad
add dl, dl
jne 0x1807100b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1807100c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1807100d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1807100dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1807100ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x18071007e
mov eax, 1
add dl, dl
jne 0x180710106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x180710113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1807100fb
sub eax, ebx
mov ebx, 1
jne 0x18071014c
mov ecx, 1
add dl, dl
jne 0x18071012e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x18071013b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x180710123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18071007e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x180710168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x180710175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x18071015d
cmp eax, 0x7d00
jae 0x18071019b
cmp eax, 0x500
jb 0x180710196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18071007e
cmp eax, 0x7f
ja 0x18071019e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18071007e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1807101d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x18071007e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140f97058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.140f971df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x140f97089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140f9706f
add dl, dl
jne 0x140f97096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140f970f6
xor eax, eax
add dl, dl
jne 0x140f970a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140f971ad
add dl, dl
jne 0x140f970b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140f970c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140f970d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140f970dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140f970ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140f9707e
mov eax, 1
add dl, dl
jne 0x140f97106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140f97113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140f970fb
sub eax, ebx
mov ebx, 1
jne 0x140f9714c
mov ecx, 1
add dl, dl
jne 0x140f9712e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140f9713b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140f97123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140f9707e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140f97168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140f97175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140f9715d
cmp eax, 0x7d00
jae 0x140f9719b
cmp eax, 0x500
jb 0x140f97196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140f9707e
cmp eax, 0x7f
ja 0x140f9719e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140f9707e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140f971d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x140f9707e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001490
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r14
sub rsp, 0x160
mov rax, qword [0x14002a590]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov rbx, rcx
mov qword [rsp + 0x48], rcx
xor r12d, r12d
mov dword [rsp + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov qword [rbx], r12
mov qword [rbx + 0x10], r12
mov esi, 0xf
mov qword [rbx + 0x18], rsi
mov byte [rbx], r12b
mov r14, 0xffffffffffffffff
mov r8, r14
inc r8
cmp byte [rax + r8], 0
jne 0x1400014f0
mov rdx, rax
mov rcx, rbx
call fcn.1400012e0
mov dword [rsp + 0x20], 1
mov rbp, qword [rbx + 0x10]
mov rdi, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x14000151e
mov rdi, qword [rbx]
test rbp, rbp
je 0x14000156c
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rsp + 0x50]
call fcn.14000cda0
mov byte [rsp + 0x70], 1
lea rax, [rbp - 1]
mov rcx, r14
cmp rax, r14
cmovb rcx, rax
add rcx, rdi
movzx eax, byte [rcx]
cmp byte [rsp + rax + 0x50], 0
jne 0x140001567
cmp rcx, rdi
je 0x14000156c
dec rcx
movzx eax, byte [rcx]
cmp byte [rsp + rax + 0x50], 0
je 0x140001555
sub rcx, rdi
jmp 0x14000156f
mov rcx, r14
inc rcx
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x40], rsi
cmp rbp, rcx
jb 0x140001682
sub rbp, rcx
cmp rbp, 0xffffffffffffffff
cmovb r14, rbp
mov rax, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x1400015a2
mov rax, qword [rbx]
lea rdx, [rax + rcx]
mov r8, r14
lea rcx, [rsp + 0x28]
call fcn.1400012e0
lea rax, [rsp + 0x28]
cmp rbx, rax
je 0x140001612
mov rdx, qword [rbx + 0x18]
cmp rdx, 0x10
jb 0x1400015f7
mov rcx, qword [rbx]
inc rdx
cmp rdx, 0x1000
jb 0x1400015f2
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000167c
mov rcx, r8
call fcn.14000b360
mov byte [rbx], 0
movups xmm0, xmmword [rsp + 0x28]
movups xmmword [rbx], xmm0
movups xmm1, xmmword [rsp + 0x38]
movups xmmword [rbx + 0x10], xmm1
mov byte [rsp + 0x28], 0
jmp 0x140001617
mov rsi, qword [rsp + 0x40]
cmp rsi, 0x10
jb 0x14000164c
lea rdx, [rsi + 1]
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001647
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000167c
call fcn.14000b360
mov rax, rbx
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.14000ad40
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r12
pop rdi
ret
call fcn.140011a2c
int3
call fcn.140009fa0
int3
Function at 0x140011fe8
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140011dd8
Function at 0x140017b58
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 0x140017b88
xor eax, eax
jmp 0x140017c4b
mov rbp, rbx
cmp word [rax], si
je 0x140017bad
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140017b94
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140017b90
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.140017aa8
movsxd r14, eax
test eax, eax
jne 0x140017beb
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140017b81
mov rcx, r14
call fcn.14001601c
mov rdi, rax
test rax, rax
jne 0x140017c04
xor ecx, ecx
call fcn.140013894
jmp 0x140017be0
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.140017aa8
test eax, eax
jne 0x140017c35
mov rcx, rdi
call fcn.140013894
jmp 0x140017c3f
xor ecx, ecx
call fcn.140013894
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 0x140019a28
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x14002bec0]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x140019a86
cmp word [rdx], r12w
jne 0x140019a86
or byte [rax + r8*8 + 0x38], cl
jmp 0x140019a8c
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x140019be7
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x140019bc2
lea r9, [rcx + 2]
cmp ax, r13w
je 0x140019ac5
mov rcx, r9
jmp 0x140019ae8
cmp r9, rdx
jae 0x140019aff
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x140019aa9
jmp 0x140019be7
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140019bbc
cmp dword [rsp + 0x80], edi
je 0x140019bbc
mov rdx, r14
lea r11, [0x14002bec0]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x140019b95
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x140019b68
mov word [rbx], r12w
jmp 0x140019be3
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x140019b71
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x140019be3
cmp word [rsp + 0x70], r12w
jne 0x140019ba2
cmp rbx, rsi
je 0x140019b62
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.140019760
cmp word [rsp + 0x70], r12w
je 0x140019be7
mov word [rbx], r13w
jmp 0x140019be3
lea r11, [0x14002bec0]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x140019bdf
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x140019be7
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x14001bf98
Capabilities:
Clear file content

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
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.140019760
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140019760
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14001c0e8
cmp rax, 0xffffffffffffffff
je 0x14001c0e8
xor edi, edi
test rbp, rbp
jle 0x14001c093
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.140016170
mov rbx, rax
test rax, rax
jne 0x14001c020
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14001c089
mov edx, 0x8000
mov ecx, r14d
call fcn.140012d84
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.140015188
cmp eax, 0xffffffff
je 0x14001c069
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14001c030
mov edx, r15d
mov ecx, r14d
call fcn.140012d84
jmp 0x14001c089
cmp byte [rsi + 0x38], dil
je 0x14001c080
cmp dword [rsi + 0x34], 5
jne 0x14001c080
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14001c089
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140013894
jmp 0x14001c0fc
jns 0x14001c0fc
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140019760
cmp rax, 0xffffffffffffffff
jne 0x14001c0b4
cmp byte [rsi + 0x30], dil
je 0x14001c0fc
mov edi, dword [rsi + 0x2c]
jmp 0x14001c0fc
mov ecx, r14d
call fcn.14001883c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14001c0fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x14001c0fc
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14001c0f5
mov eax, dword [rsi + 0x2c]
jmp 0x14001c0fa
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140019760
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0048ccf0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x0048cd00]
mov dword [rax], 1
mov rax, qword [0x0048cd10]
mov dword [rax], 1
mov rax, qword [0x0048cce0]
mov dword [rax], 1
mov rax, qword [0x0048cb60]
cmp word [rax], 0x5a4d
je 0x4010d0
mov rax, qword [0x0048ccd0]
mov dword [0x004a7008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010c2
mov ecx, 2
call sym.__set_app_type
mov rcx, 0xffffffffffffffff
call dbg._encode_pointer
mov rdx, qword [0x0048cc10]
mov qword [rdx], rax
mov rdx, qword [0x0048cc00]
mov qword [rdx], rax
mov rax, qword [0x0048cc90]
mov edx, dword [rax]
mov rax, qword [sym.imp.msvcrt.dll__fmode]
mov rax, qword [rax]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x0048c260]
cmp dword [rax], 1
je 0x401120
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401133
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x40dfc0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movsxd rbp, dword [0x004a7064]
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
test ebp, ebp
jle 0x40e0da
mov rax, qword [0x004a7068]
xor r9d, r9d
add rax, 8
mov r10, qword [rax]
cmp rbx, r10
jb 0x40e00e
mov rdx, qword [rax + 8]
mov r11d, dword [rdx + 8]
add r10, r11
cmp rbx, r10
jb 0x40e0c0
add r9d, 1
add rax, 0x18
cmp r9d, ebp
jne 0x40dff2
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40e112
lea rbp, [rbp + rbp*2]
shl rbp, 3
mov r13, rbp
add r13, qword [0x004a7068]
mov qword [r13 + 0x10], rax
mov dword [r13], 0
call dbg._GetPEImageBase
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [r13 + 8], rax
mov rax, qword [0x004a7068]
mov rcx, qword [rax + rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40e0f5
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40e0b9
sub eax, 0x40
and eax, 0xffffffbf
je 0x40e0b9
mov r9, rbp
add r9, qword [0x004a7068]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40e0e1
add dword [0x004a7064], 1
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sym.memcpy
xor ebp, ebp
jmp 0x40e01b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
mov rax, qword [0x004a7068]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbp + 8]
call dbg.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call dbg.__report_error
nop
nop word cs:[rax + rax]

Function at 0x40ecf0
Capabilities:
Parse pe header

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

Function at 0x40ed10
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 0x40ed51
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x40ed48
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x40ed53
add rax, 0x28
cmp rax, r9
jne 0x40ed34
xor eax, eax
repz ret

Function at 0x40ee00
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x0048cb60]
cmp word [rbx], 0x5a4d
je 0x40ee20
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rsi, rcx
mov rcx, rbx
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40ee14
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp dbg._FindPESection
Function at 0x40f070
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004a79c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004a79a0]
test rbx, rbx
je 0x40f0c4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40f0bb
test rsi, rsi
je 0x40f0bb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40f0a0
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x004a79c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax

Function at 0x40f860
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov rdi, rcx
movsxd r12, edx
mov r13, r8
call sym.strlen
mov rsi, rax
lea ebx, [rax + 0xf]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040f7a0
sub rsp, rax
movsxd r14, esi
movabs rax, 0x656d68732d636367
lea r15, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov r8, r14
mov rdx, rdi
mov qword [rsp + 0x20], rax
mov eax, 0x326d
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
movsxd rbx, ebx
mov byte [rsp + 0x2e], 0x2d
call sym.memcpy
lea rax, [r15 + r14 + 0x10]
lea r14d, [rsi + 0x50]
movabs rdx, 0x6161616161616161
xor ecx, ecx
mov r8, r15
mov qword [rax], rdx
mov qword [rax + 8], rdx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rdx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rdx
mov qword [rax + 0x30], rdx
mov qword [rax + 0x38], rdx
movsxd rax, r14d
xor edx, edx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + rbx + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + rbx + 0x20], 0x2d
mov rdi, rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40f949
int3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x40f9e8
mov rcx, r12
call sym.malloc
lea r9d, [rsi + 0x10]
mov rbx, rax
mov r10d, 0x40
bt rbx, r10
jae 0x40f984
mov r11d, r14d
sub r11d, r10d
movsxd r11, r11d
mov byte [r15 + r11], 0x41
sub r10d, 1
jne 0x40f970
mov dword [rbp - 0x54], r9d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
mov r9d, dword [rbp - 0x54]
je 0x40f9e5
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call dbg.get_ptr_from_atom
cmp rax, rbx
mov rsi, rax
je 0x40fa00
mov rcx, rbx
call sym.free
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
lea rsp, [rbp - 0x48]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
int3
lea r9d, [rsi + 0x10]
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call dbg.get_ptr_from_atom
mov rsi, rax
jmp 0x40f9bf
xor edx, edx
mov r8, r12
mov rcx, rbx
call sym.memset
test r13, r13
je 0x40f9bf
mov rcx, rbx
call r13
jmp 0x40f9bf
Function at 0x415e00
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x60
mov rax, rcx
movzx ecx, word [rcx + 0xa]
and cx, 0x7fff
cmp cx, 0x7fff
je 0x415e93
movzx ecx, word [rdx + 0xa]
and cx, 0x7fff
cmp cx, 0x7fff
je 0x415ec2
lea rsi, [rsp + 0x20]
lea rdi, [rsp + 0x40]
mov rcx, rax
mov rbx, rdx
mov rdx, rsi
call dbg.__emovi
mov rdx, rdi
mov rcx, rbx
call dbg.__emovi
movzx r8d, word [rsp + 0x20]
xor eax, eax
lea rcx, [rsi + 2]
cmp r8w, word [rsp + 0x40]
lea rdx, [rdi + 2]
je 0x415ee0
cmp word [rcx + rax], 0
jne 0x415f20
cmp word [rdx + rax], 0
jne 0x415f20
add rax, 2
cmp rax, 0xe
jne 0x415e69
xor al, al
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
lea r8, [rax + 0xa]
mov rcx, rax
add rcx, 2
cmp word [rcx - 2], 0
jne 0x415f35
cmp rcx, r8
jne 0x415e9a
movzx ecx, word [rdx + 0xa]
and cx, 0x7fff
cmp cx, 0x7fff
jne 0x415e2e
lea r8, [rdx + 0xa]
mov rcx, rdx
add rcx, 2
cmp word [rcx - 2], 0
jne 0x415f35
cmp rcx, r8
jne 0x415ec9
jmp 0x415e2e
cmp r8w, 1
sbb eax, eax
xor ecx, ecx
add rsi, 2
and eax, 2
sub eax, 1
movzx edx, word [rsi + rcx]
add rcx, 2
movzx r8d, word [rdi + rcx]
cmp dx, r8w
jne 0x415f42
cmp rcx, 0xe
jne 0x415ef3
xor eax, eax
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
cmp r8w, 1
sbb eax, eax
and eax, 2
sub eax, 1
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
mov eax, 0xfffffffe
add rsp, 0x60
pop rbx
pop rsi
pop rdi
ret
cmp r8w, dx
setae dl
movzx edx, dl
mov ecx, edx
neg ecx
xor eax, ecx
add eax, edx
jmp 0x415e8b

Function at 0x41abe0
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x004a8508]
test rbx, rbx
je 0x41ac10
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x004a8508]
test rax, rax
je 0x41ac34
cmp dword [rax], 0xffffffff
je 0x41ac55
add rsp, 0x20
pop rbx
ret
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov rbx, rax
mov qword [0x004a8508], rax
jmp 0x41abf1
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004a8508], rax
jmp 0x41ac05
call sym.abort
nop
nop dword [rax + rax]