joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14022a698
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
movsxd r9, dword [rcx + 0xc]
mov r10, rcx
movsxd rbx, r8d
test r8d, r8d
jle 0x14022a6e6
mov r11, r9
xor edi, edi
mov al, byte [rdi + rdx]
mov rcx, qword [r10]
xor byte [rcx + r11], al
lea ecx, [r9 + 1]
xor r9d, r9d
lea rax, [r11 + 1]
cmp ecx, dword [r10 + 8]
cmovl r9d, ecx
xor r11d, r11d
inc rdi
cmp ecx, dword [r10 + 8]
cmovl r11, rax
cmp rdi, rbx
jl 0x14022a6b6
add dword [r10 + 0x10], r8d
mov rbx, qword [rsp + 8]
mov rdi, qword [rsp + 0x10]
mov dword [r10 + 0xc], r9d
ret
Function at 0x14022dd6c
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rbx, r8
mov r14d, r9d
and ebx, 0x1f
mov rsi, rdx
mov rdi, rcx
movabs r13, 0x9e3779b185ebca87
cmp rbx, 8
jb 0x14022dc2a
mov ebp, ebx
shr rbp, 3
imul rax, rbp, 0xfffffffffffffff8
add rbx, rax
cmp r14d, 1
jne 0x14022dbf2
lea r8d, [r14 + 7]
mov rdx, rsi
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rsp + 0x50]
jmp 0x14022dbf5
mov rdx, qword [rsi]
xor ecx, ecx
call fcn.14022dd34
xor rax, rdi
mov edx, 0x1b
mov rcx, rax
add rsi, 8
call sub.api_ms_win_crt_utility_l1_1_0.dll__rotl64
mov rdi, rax
movabs rax, 0x7a1435883d4d519d
imul rdi, r13
sub rdi, rax
sub rbp, 1
jne 0x14022dbd4
mov ebp, 4
movabs r15, 0xc2b2ae3d27d4eb4f
movabs r12, 0x165667b19e3779f9
cmp rbx, rbp
jb 0x14022dc89
cmp r14d, 1
jne 0x14022dc64
mov r8d, ebp
lea rcx, [rsp + 0x50]
mov rdx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x50]
jmp 0x14022dc66
mov eax, dword [rsi]
mov ecx, eax
mov edx, 0x17
imul rcx, r13
add rsi, rbp
xor rcx, rdi
call sub.api_ms_win_crt_utility_l1_1_0.dll__rotl64
mov rdi, rax
imul rdi, r15
add rdi, r12
sub rbx, rbp
test rbx, rbx
je 0x14022dcbc
movzx eax, byte [rsi]
movabs rcx, 0x27d4eb2f165667c5
imul rcx, rax
mov edx, 0xb
inc rsi
xor rcx, rdi
call sub.api_ms_win_crt_utility_l1_1_0.dll__rotl64
mov rdi, rax
imul rdi, r13
sub rbx, 1
jne 0x14022dc8e
mov rbx, qword [rsp + 0x58]
mov rax, rdi
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
shr rax, 0x21
xor rax, rdi
imul rax, r15
mov rcx, rax
shr rcx, 0x1d
xor rcx, rax
imul rcx, r12
mov rax, rcx
shr rax, 0x20
xor rax, rcx
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
cmp qword [rcx], 0x20
mov rsi, rcx
jb 0x14022ddf8
mov rcx, qword [rcx + 0x20]
mov edx, 0x12
call sub.api_ms_win_crt_utility_l1_1_0.dll__rotl64
mov rcx, qword [rsi + 0x18]
mov edx, 0xc
mov rbx, rax
call sub.api_ms_win_crt_utility_l1_1_0.dll__rotl64
mov rcx, qword [rsi + 0x10]
mov edx, 7
add rbx, rax
call sub.api_ms_win_crt_utility_l1_1_0.dll__rotl64
mov rcx, qword [rsi + 8]
mov edx, 1
add rbx, rax
call sub.api_ms_win_crt_utility_l1_1_0.dll__rotl64
mov rdx, qword [rsi + 8]
lea rcx, [rbx + rax]
call fcn.14022dd00
mov rdx, qword [rsi + 0x10]
mov rcx, rax
call fcn.14022dd00
mov rdx, qword [rsi + 0x18]
mov rcx, rax
call fcn.14022dd00
mov rdx, qword [rsi + 0x20]
mov rcx, rax
call fcn.14022dd00
jmp 0x14022de09
mov rax, qword [rcx + 0x18]
movabs rcx, 0x27d4eb2f165667c5
add rax, rcx
mov r8, qword [rsi]
lea rdx, [rsi + 0x28]
xor r9d, r9d
lea rcx, [r8 + rax]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x14022db8c
Function at 0x14027b488
Capabilities:
Encode data using xor

Disassembly:
cmp dword [rcx + 0x60], 0
mov r8, rcx
movzx edx, byte [rcx + 0x5c]
jle 0x14027b4c3
mov ecx, dword [rcx + 0x288]
mov r9d, dword [r8 + 0x60]
mov eax, ecx
lea r11, [0x14036ec20]
shr rax, 0x18
xor rax, rdx
shl ecx, 8
xor ecx, dword [r11 + rax*4]
mov dword [r8 + 0x288], ecx
sub r9, 1
jne 0x14027b49f
mov eax, dword [r8 + 0x5c]
mov byte [rax + r8 + 0x80], 1
mov ecx, dword [r8 + 0x60]
sub ecx, 1
je 0x14027b56b
sub ecx, 1
je 0x14027b54f
cmp ecx, 1
je 0x14027b524
movsxd rax, dword [r8 + 0x60]
mov r9d, 4
mov byte [rax + r8 + 0x7c], 1
movsxd rcx, dword [r8 + 0x6c]
mov rax, qword [r8 + 0x40]
mov byte [rcx + rax], dl
movsxd rcx, dword [r8 + 0x6c]
lea eax, [rcx + 1]
mov dword [r8 + 0x6c], eax
sub r9, 1
jne 0x14027b4f7
mov dl, byte [r8 + 0x60]
sub dl, 4
mov rax, qword [r8 + 0x40]
mov byte [rcx + rax + 1], dl
jmp 0x14027b576
movsxd rcx, dword [r8 + 0x6c]
mov rax, qword [r8 + 0x40]
mov byte [rcx + rax], dl
movsxd rcx, dword [r8 + 0x6c]
lea eax, [rcx + 1]
mov dword [r8 + 0x6c], eax
mov rax, qword [r8 + 0x40]
mov byte [rcx + rax + 1], dl
movsxd rcx, dword [r8 + 0x6c]
lea eax, [rcx + 1]
mov dword [r8 + 0x6c], eax
jmp 0x14027b51a
mov r9d, 2
movsxd rcx, dword [r8 + 0x6c]
mov rax, qword [r8 + 0x40]
mov byte [rcx + rax], dl
inc dword [r8 + 0x6c]
sub r9, 1
jne 0x14027b555
ret
movsxd rcx, dword [r8 + 0x6c]
mov rax, qword [r8 + 0x40]
mov byte [rcx + rax], dl
inc dword [r8 + 0x6c]
ret
Function at 0x1402808b0
Capabilities:
Parse pe header

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

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

Function at 0x140005128
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140005197
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140005197
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140005197
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140005197
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140005197
cmp dword [rcx + 0x84], 0xe
jbe 0x140005197
cmp dword [rcx + 0xf8], 0
je 0x140005197
mov ecx, ebx
call fcn.140005248
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140005024
nop
cmp dword [rbp + 0x20], 0
je 0x1400051e5
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.1400051f0
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x140005128

Function at 0x14000532c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140005128
Function at 0x1400083ec
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 0x14000841c
xor eax, eax
jmp 0x1400084df
mov rbp, rbx
cmp word [rax], si
je 0x140008441
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140008428
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140008424
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.14000830c
movsxd r14, eax
test eax, eax
jne 0x14000847f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140008415
mov rcx, r14
call fcn.1400092c8
mov rdi, rax
test rax, rax
jne 0x140008498
xor ecx, ecx
call fcn.14000696c
jmp 0x140008474
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.14000830c
test eax, eax
jne 0x1400084c9
mov rcx, rdi
call fcn.14000696c
jmp 0x1400084d3
xor ecx, ecx
call fcn.14000696c
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 0x14000b9d0
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.1400073dc
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14000ba5a
cmp byte [rbp - 0x21], r15b
je 0x14000ba55
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14000ba90
call fcn.140009ad8
test eax, eax
jne 0x14000ba7c
cmp byte [rbp - 0x21], r15b
je 0x14000ba74
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14000ba90
cmp byte [rbp - 0x21], r15b
je 0x14000ba8d
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.1400069bc
test eax, eax
jne 0x14000bb30
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1400073dc
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14000bacf
cmp byte [rbp - 0x21], r15b
je 0x14000bb04
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14000bb04
call fcn.140009ad8
test eax, eax
jne 0x14000baf0
cmp byte [rbp - 0x21], r15b
je 0x14000bae9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14000bb04
cmp byte [rbp - 0x21], r15b
je 0x14000bb01
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.1400069bc
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14000bb30
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14000bb33
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14000bb41
mov rcx, rdi
call fcn.14000696c
cmp byte [rbp + 0x3f], r15b
je 0x14000bb50
mov rcx, qword [rbp + 0x27]
call fcn.14000696c
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 0x14000e980
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0048cc70]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x0048cc80]
mov dword [rax], 1
mov rax, qword [0x0048cc90]
mov dword [rax], 1
mov rax, qword [0x0048cc60]
mov dword [rax], 1
mov rax, qword [0x0048cae0]
cmp word [rax], 0x5a4d
je 0x4010d0
mov rax, qword [0x0048cc50]
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 [0x0048cb90]
mov qword [rdx], rax
mov rdx, qword [0x0048cb80]
mov qword [rdx], rax
mov rax, qword [0x0048cc10]
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 [0x0048c1e0]
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 0x401571
Capabilities:
Check for unmoving mouse cursor
Log keystrokes via polling

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
call dbg.__main
mov byte [rbp - 1], 0
lea rcx, str.F1___set_point_nRight_click___autotrap_nBy_Zeta
call sym.printf_char_const__::_
mov ecx, 0x70
mov rax, qword [sym.imp.USER32.dll_GetAsyncKeyState]
call rax
test ax, ax
setne al
test al, al
je 0x4015b6
lea rax, [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_GetCursorPos]
call rax
mov ecx, 2
mov rax, qword [sym.imp.USER32.dll_GetAsyncKeyState]
call rax
test ax, ax
setne al
test al, al
je 0x401762
mov byte [rbp - 1], 1
lea rax, [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_GetCursorPos]
call rax
mov r9d, 0
mov r8d, 0
mov edx, 0
mov ecx, 0x42
mov rax, qword [sym.imp.USER32.dll_keybd_event]
call rax
mov r9d, 0
mov r8d, 2
mov edx, 0
mov ecx, 0x42
mov rax, qword [sym.imp.USER32.dll_keybd_event]
call rax
mov r9d, 0
mov r8d, 0
mov edx, 0
mov ecx, 0x10
mov rax, qword [sym.imp.USER32.dll_keybd_event]
call rax
mov ecx, 0x96
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov edx, dword [rbp - 0xc]
mov eax, dword [rbp - 0x10]
add eax, 1
mov dword [rbp - 0x10], eax
mov eax, dword [rbp - 0x10]
mov ecx, eax
mov rax, qword [sym.imp.USER32.dll_SetCursorPos]
call rax
mov ecx, 1
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
mov ecx, 2
mov rax, qword [sym.imp.USER32.dll_mouse_event]
call rax
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
mov ecx, 4
mov rax, qword [sym.imp.USER32.dll_mouse_event]
call rax
mov ecx, 1
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov edx, dword [rbp - 0x1c]
mov eax, dword [rbp - 0x20]
mov ecx, eax
mov rax, qword [sym.imp.USER32.dll_SetCursorPos]
call rax
jmp 0x401748
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
mov ecx, 2
mov rax, qword [sym.imp.USER32.dll_mouse_event]
call rax
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
mov ecx, 4
mov rax, qword [sym.imp.USER32.dll_mouse_event]
call rax
mov ecx, 1
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov ecx, 2
mov rax, qword [sym.imp.USER32.dll_GetAsyncKeyState]
call rax
test ax, ax
setne al
test al, al
jne 0x4016ea
jmp 0x4017c9
cmp byte [rbp - 1], 0
je 0x4017c9
mov r9d, 0
mov r8d, 2
mov edx, 0
mov ecx, 0x10
mov rax, qword [sym.imp.USER32.dll_keybd_event]
call rax
mov r9d, 0
mov r8d, 0
mov edx, 0
mov ecx, 0x1b
mov rax, qword [sym.imp.USER32.dll_keybd_event]
call rax
mov r9d, 0
mov r8d, 2
mov edx, 0
mov ecx, 0x1b
mov rax, qword [sym.imp.USER32.dll_keybd_event]
call rax
mov byte [rbp - 1], 0
mov ecx, 1
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
jmp 0x40158e
Function at 0x40e040
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 0x40e15a
mov rax, qword [0x004a7068]
xor r9d, r9d
add rax, 8
mov r10, qword [rax]
cmp rbx, r10
jb 0x40e08e
mov rdx, qword [rax + 8]
mov r11d, dword [rdx + 8]
add r10, r11
cmp rbx, r10
jb 0x40e140
add r9d, 1
add rax, 0x18
cmp r9d, ebp
jne 0x40e072
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40e192
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 0x40e175
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40e139
sub eax, 0x40
and eax, 0xffffffbf
je 0x40e139
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 0x40e161
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 0x40e09b
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 0x40ed70
Capabilities:
Parse pe header

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

Function at 0x40ed90
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 0x40edd1
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 0x40edc8
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x40edd3
add rax, 0x28
cmp rax, r9
jne 0x40edb4
xor eax, eax
repz ret

Function at 0x40ee80
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x0048cae0]
cmp word [rbx], 0x5a4d
je 0x40eea0
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 0x40ee94
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp dbg._FindPESection
Function at 0x40f0f0
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 0x40f144
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 0x40f13b
test rsi, rsi
je 0x40f13b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40f120
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 0x40f8a0
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.0040fa60
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 0x40f989
int3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x40fa28
mov rcx, r12
call sym.malloc
lea r9d, [rsi + 0x10]
mov rbx, rax
mov r10d, 0x40
bt rbx, r10
jae 0x40f9c4
mov r11d, r14d
sub r11d, r10d
movsxd r11, r11d
mov byte [r15 + r11], 0x41
sub r10d, 1
jne 0x40f9b0
mov dword [rbp - 0x54], r9d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
mov r9d, dword [rbp - 0x54]
je 0x40fa25
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call dbg.get_ptr_from_atom
cmp rax, rbx
mov rsi, rax
je 0x40fa40
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 0x40f9ff
xor edx, edx
mov r8, r12
mov rcx, rbx
call sym.memset
test r13, r13
je 0x40f9ff
mov rcx, rbx
call r13
jmp 0x40f9ff