joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140043830
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.140046ad0
sub rsp, rax
mov rax, qword [0x14005e020]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x14005fec0]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x70]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x140043a3d
lea rax, [rsp + 0x147e]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x38], rax
jae 0x140043989
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x140043989
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
mov word [rsp + 0x40], ax
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
movzx eax, word [rsp + 0x40]
mov word [rsp + 0x30], ax
movzx eax, word [rsp + 0x30]
cmp eax, 0xa
jne 0x140043969
mov eax, dword [rsp + 0x78]
add eax, 2
mov dword [rsp + 0x78], eax
mov eax, 0xd
mov rcx, qword [rsp + 0x38]
mov word [rcx], ax
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, word [rsp + 0x30]
mov word [rax], cx
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
jmp 0x1400438f8
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov eax, eax
shl rax, 1
mov dword [rsp + 0x44], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x44]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400439fd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140043a5c
mov eax, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x74]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jae 0x140043a38
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140043a5c
jmp 0x1400438ce
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.140001a70
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x1400010a0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x250
mov rax, qword [0x140021f60]
xor rax, rsp
mov qword [rsp + 0x240], rax
xor ebx, ebx
mov rsi, rdx
mov rdi, r9
mov ebp, r8d
mov dword [0x1400232c0], 0x39374342
mov dword [0x1400232c4], 0x64363165
lea edx, [rbx + 0x10]
mov dword [0x1400232c8], 0x366c3231
mov dword [0x1400232cc], 0x39783266
mov ecx, ebx
lea r14, [0x140000000]
nop word [rax + rax]
movzx eax, byte [rcx + r14 + 0x232c0]
lea rcx, [rcx + 1]
xor al, 0xa4
mov byte [rcx + r14 + 0x232cf], al
dec rdx
jne 0x140001110
lea rcx, [rsp + 0x20]
mov r8d, 0x101
call fcn.140007260
lea rcx, [rsp + 0x130]
xor edx, edx
mov r8d, 0x101
call fcn.140007260
mov eax, ebx
lea rcx, [rsp + 0x20]
mov r8d, pe_nt_image_headers64
nop
mov byte [rcx], al
inc eax
lea rcx, [rcx + 1]
cmp eax, r8d
jb 0x140001160
mov r11d, dword [rsp + 0x290]
mov eax, ebx
test r11d, r11d
je 0x1400011ab
lea r9, [rsp + 0x130]
mov r10, r8
nop word [rax + rax]
cmp eax, r11d
lea r9, [r9 + 1]
cmove eax, ebx
movzx edx, byte [rax + rdi]
inc eax
mov byte [r9 - 1], dl
dec r10
jne 0x140001190
jmp 0x1400011d3
lea rdx, [rsp + 0x130]
mov r9, r8
cmp eax, 0x10
lea rdx, [rdx + 1]
cmove eax, ebx
movzx ecx, byte [rax + r14 + 0x232d0]
inc eax
mov byte [rdx - 1], cl
dec r9
jne 0x1400011b6
mov r10d, ebx
mov r9, rbx
nop dword [rax]
movsx edx, byte [rsp + r9 + 0x20]
movsx ecx, byte [rsp + r9 + 0x130]
lea r9, [r9 + 1]
add ecx, r10d
add ecx, edx
movzx r10d, cl
lea rcx, [rsp + 0x20]
movzx eax, byte [rcx + r10]
mov byte [rsp + r9 + 0x1f], al
mov byte [rcx + r10], dl
dec r8
jne 0x1400011e0
mov r9d, ebx
test ebp, ebp
je 0x140001266
mov r10, rbp
nop
lea eax, [r9 + 1]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x20]
movzx r9d, al
lea rsi, [rsi + 1]
movsx r8d, byte [rdx + r9]
lea eax, [rbx + r8]
movzx ebx, al
movzx eax, byte [rcx + rbx]
mov byte [rdx + r9], al
mov byte [rcx + rbx], r8b
movsx ecx, byte [rdx + r9]
add ecx, r8d
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
xor byte [rsi - 1], cl
dec r10
jne 0x140001220
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140007230
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret

Function at 0x140001340
Capabilities:
Get common file path

Disassembly:
push rbx
sub rsp, 0x160
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov rax, qword [0x140021f60]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov rbx, rcx
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x20], 0
mov byte [rsp + 0x40], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x41]
call fcn.140007260
xor r9d, r9d
lea r8d, [r9 + 0x23]
lea rdx, [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
or r8d, 0xffffffff
lea rdx, [0x140017600]
mov rcx, rbx
call fcn.140003a60
mov dword [rsp + 0x20], 1
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.140003720
lea rdx, str.NETGATEFortKnox_Firewall
mov rcx, rbx
call fcn.140003910
mov rax, rbx
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.140007230
add rsp, 0x160
pop rbx
ret
Function at 0x140001740
Capabilities:
Create process on windows
Persist via run registry key
Set current directory

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0xc0
mov qword [rax - 0x28], 0xfffffffffffffffe
mov qword [rax + 8], rbx
lea rcx, [rax - 0x40]
call fcn.140001400
nop
lea rbx, [0x140017600]
mov rcx, rbx
mov rax, qword [rsp + 0x90]
test rax, rax
cmovne rcx, rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, rbx
mov rax, qword [rsp + 0x90]
test rax, rax
cmovne rcx, rax
xor edi, edi
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rcx
lea r9, str.FortKnox.mof
lea r8, str.mofcomp
xor edx, edx
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
lea rcx, [rsp + 0x40]
call fcn.140003dd0
nop
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea r8, str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfile
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x40]
call fcn.140003df0
test eax, eax
jne 0x140001808
lea r8, str.EnableFirewall
xor edx, edx
lea rcx, [rsp + 0x40]
call fcn.140003e50
lea rcx, [rsp + 0x50]
call fcn.140003dd0
nop
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea r8, str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyDomainProfile
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x50]
call fcn.140003df0
test eax, eax
jne 0x14000185b
lea r8, str.EnableFirewall
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.140003e50
or r8d, 0xffffffff
lea rdx, [0x140017a18]
lea rcx, [rsp + 0x70]
call fcn.140003a60
nop
lea rcx, [rsp + 0xa8]
call fcn.140001400
nop
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.1400037c0
nop
lea rcx, [rsp + 0xa8]
call fcn.140002e20
lea rdx, str.FortKnoxGUI.exe_
lea rcx, [rsp + 0x70]
call fcn.140003910
lea rcx, [rsp + 0x60]
call fcn.140003dd0
nop
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea r8, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x60]
call fcn.140003df0
test eax, eax
jne 0x14000190c
mov rax, qword [rsp + 0x78]
test rax, rax
cmovne rbx, rax
lea r8, str.FortKnoxPersonalFirewall
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.140003e90
nop
lea rcx, [rsp + 0x60]
call fcn.140003ee0
nop
lea rcx, [rsp + 0x70]
call fcn.140002e20
nop
lea rcx, [rsp + 0x50]
call fcn.140003ee0
nop
lea rcx, [rsp + 0x40]
call fcn.140003ee0
nop
lea rcx, [rsp + 0x88]
call fcn.140002e20
mov rbx, qword [rsp + 0xd0]
add rsp, 0xc0
pop rdi
ret
Function at 0x140001960
Capabilities:
Create process on windows
Set current directory

Disassembly:
push rdi
sub rsp, 0x80
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x90], rbx
lea rcx, [rsp + 0x58]
call fcn.140003dd0
nop
xor edi, edi
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea r8, str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfile
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x58]
call fcn.140003df0
test eax, eax
jne 0x1400019d0
lea r8, str.EnableFirewall
lea edx, [rdi + 1]
lea rcx, [rsp + 0x58]
call fcn.140003e50
lea rcx, [rsp + 0x48]
call fcn.140003dd0
nop
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], edi
xor r9d, r9d
lea r8, str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyDomainProfile
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x48]
call fcn.140003df0
test eax, eax
jne 0x140001a24
lea r8, str.EnableFirewall
lea edx, [rax + 1]
lea rcx, [rsp + 0x48]
call fcn.140003e50
lea rcx, [rsp + 0x68]
call fcn.140001400
lea rbx, [0x140017600]
mov rcx, rbx
mov rax, qword [rsp + 0x70]
test rax, rax
cmovne rcx, rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rax, qword [rsp + 0x70]
test rax, rax
cmovne rbx, rax
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rbx
lea r9, str.__B___Nologo_FortKnoxDel.vbs
lea r8, str.cscript
xor edx, edx
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
lea rcx, [rsp + 0x68]
call fcn.140002e20
nop
lea rcx, [rsp + 0x48]
call fcn.140003ee0
nop
lea rcx, [rsp + 0x58]
call fcn.140003ee0
mov rbx, qword [rsp + 0x90]
add rsp, 0x80
pop rdi
ret
Function at 0x140003e50
Capabilities:
Set registry value

Disassembly:
mov dword [rsp + 0x10], edx
sub rsp, 0x38
mov rcx, qword [rcx + 8]
mov rax, r8
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rdx
mov r9d, 4
mov rdx, rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
add rsp, 0x38
ret

Function at 0x140003e90
Capabilities:
Set registry value

Disassembly:
push rdi
sub rsp, 0x30
mov r10, rcx
xor eax, eax
mov rdi, rdx
mov r11, r8
mov rcx, 0xffffffffffffffff
lea r9d, [rax + 1]
repne scasb al, byte [rdi]
xor r8d, r8d
not rcx
and ecx, ecx
mov dword [rsp + 0x28], ecx
mov rcx, qword [r10 + 8]
mov qword [rsp + 0x20], rdx
mov rdx, r11
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
add rsp, 0x30
pop rdi
ret

Function at 0x1400041b0
Capabilities:
Read file on windows

Disassembly:
push rbx
mov rax, rsp
sub rsp, 0x60
mov qword [rsp + 0x30], 0xfffffffffffffffe
xor ebx, ebx
mov dword [rax + 0x20], ebx
test r8d, r8d
je 0x140004239
mov qword [rax - 0x40], rbx
lea r9, [rax + 0x20]
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140004232
lea rax, [0x140017bf8]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x40], ebx
lea rcx, [rsp + 0x48]
call fcn.140002ce0
nop
lea rax, [0x140017bf8]
mov qword [rsp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
mov edx, eax
lea rcx, [rsp + 0x48]
call fcn.140003c30
nop
lea rdx, [0x14001f8e0]
lea rcx, [rsp + 0x38]
call fcn.140007a20
int3
mov ebx, dword [rsp + 0x80]
mov eax, ebx
add rsp, 0x60
pop rbx
ret

Function at 0x140004270
Capabilities:
Write file on windows

Disassembly:
push rbx
mov rax, rsp
sub rsp, 0x60
mov qword [rsp + 0x30], 0xfffffffffffffffe
xor ebx, ebx
mov dword [rax + 0x20], ebx
test r8d, r8d
je 0x1400042f9
mov qword [rax - 0x40], rbx
lea r9, [rax + 0x20]
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400042f2
lea rax, [0x140017bf8]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x40], ebx
lea rcx, [rsp + 0x48]
call fcn.140002ce0
nop
lea rax, [0x140017bf8]
mov qword [rsp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
mov edx, eax
lea rcx, [rsp + 0x48]
call fcn.140003c30
nop
lea rdx, [0x14001f8e0]
lea rcx, [rsp + 0x38]
call fcn.140007a20
int3
mov ebx, dword [rsp + 0x80]
mov eax, ebx
add rsp, 0x60
pop rbx
ret
Function at 0x140004330
Capabilities:
Get file size

Disassembly:
sub rsp, 0x58
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rdi
mov rdi, rdx
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x1400043be
test rdi, rdi
je 0x14000436a
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1400043be
lea rax, [0x140017bf8]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x30], 0
lea rcx, [rsp + 0x38]
call fcn.140002ce0
nop
lea rax, [0x140017bf8]
mov qword [rsp + 0x28], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.140003c30
nop
lea rdx, [0x14001f8e0]
lea rcx, [rsp + 0x28]
call fcn.140007a20
int3
mov eax, ebx
mov rbx, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x58
ret
Function at 0x140008a34
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.14000889c
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00404570]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x00404580]
mov dword [rax], 1
mov rax, qword [0x00404590]
mov dword [rax], 1
mov rax, qword [0x00404560]
mov dword [rax], 1
mov rax, qword [0x00404450]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x00404550]
mov dword [0x0040700c], 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 [0x00404510]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x00404400]
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 0x401ae0
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 0x401b50
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00407614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x401cf8
mov rax, qword [0x00407618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x401b9c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401c27
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x401b80
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x401d32
mov rax, qword [0x00407618]
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 [0x00407618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401d41
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401c20
sub eax, 4
and eax, 0xfffffffb
jne 0x401cb0
add dword [0x00407614], 1
cmp ebx, 8
jae 0x401c58
test bl, 4
jne 0x401d00
test ebx, ebx
je 0x401c49
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x401d20
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 0x401c49
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 0x401c8a
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 [0x00407618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401c20
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 0x401ba7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x401c49
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x401c49
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x00407618]
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 0x402520
Capabilities:
Get thread local storage value

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

Function at 0x4027a0
Capabilities:
Parse pe header

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

Function at 0x4027c0
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 0x402805
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 0x4027fc
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402807
add rax, 0x28
cmp rax, r9
jne 0x4027e8
xor eax, eax
ret

Function at 0x4028b0
Capabilities:
Enumerate pe sections

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

Function at 0x402a10
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00404450]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x402a7f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402a7f
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 0x402a7d
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 0x402a74
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402a88
add rax, 0x28
cmp rax, r9
jne 0x402a60
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x402aa0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00404450]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x402b18
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402b18
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x402b18
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x402b18
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 0x402b0c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x402b20
add rdx, 0x28
cmp rdx, r10
jne 0x402af8
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x402b30
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x402b3e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x402b15
test r8d, r8d
jg 0x402b28
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x1800016c0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
push rdi
push r12
sub rsp, 0x20
cmp byte [rcx + 8], 0
mov r12, r9
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
je 0x18000187d
test r9, r9
je 0x18000187d
movsxd r8, dword [rcx + 0x3d0]
xor edx, edx
mov rax, r9
div r8
test rdx, rdx
jne 0x18000187d
mov ecx, dword [rsp + 0x60]
mov qword [rsp + 0x40], rbp
xor ebp, ebp
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x50], r15
cmp ecx, 1
jne 0x1800017aa
mov r15d, ebp
test rax, rax
je 0x18000186e
lea r14, [rbx + 0x3f8]
mov rax, r14
cmp byte [rbx + 8], bpl
je 0x180001765
mov edx, ebp
test r8d, r8d
jle 0x180001765
mov r8, rsi
sub r8, r14
nop dword [rax + rax]
movzx ecx, byte [r8 + rax]
inc edx
xor byte [rax], cl
lea rax, [rax + 1]
cmp edx, dword [rbx + 0x3d0]
jl 0x180001750
mov r8, rdi
mov rdx, r14
mov rcx, rbx
call fcn.180001890
movsxd r8, dword [rbx + 0x3d0]
mov rdx, rdi
mov rcx, r14
call fcn.18003e0a0
movsxd r8, dword [rbx + 0x3d0]
xor edx, edx
mov rax, r12
inc r15d
div r8
add rsi, r8
mov ecx, r15d
add rdi, r8
cmp rcx, rax
jb 0x180001735
jmp 0x18000186e
cmp ecx, 2
jne 0x18000183d
mov r14d, ebp
test rax, rax
je 0x18000186e
nop
mov r8, rdi
lea rdx, [rbx + 0x3f8]
mov rcx, rbx
call fcn.180001890
mov rcx, rdi
cmp byte [rbx + 8], bpl
je 0x180001805
mov edx, ebp
cmp dword [rbx + 0x3d0], edx
jle 0x180001805
mov r8, rsi
sub r8, rdi
nop dword [rax + rax]
movzx eax, byte [r8 + rcx]
inc edx
xor byte [rcx], al
lea rcx, [rcx + 1]
cmp edx, dword [rbx + 0x3d0]
jl 0x1800017f0
movsxd r8, dword [rbx + 0x3d0]
lea rcx, [rbx + 0x3f8]
mov rdx, rdi
call fcn.18003e0a0
movsxd rcx, dword [rbx + 0x3d0]
xor edx, edx
mov rax, r12
inc r14d
div rcx
add rsi, rcx
add rdi, rcx
mov ecx, r14d
cmp rcx, rax
jb 0x1800017c0
jmp 0x18000186e
test rax, rax
je 0x18000186e
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
call fcn.180001890
movsxd rcx, dword [rbx + 0x3d0]
xor edx, edx
mov rax, r12
inc ebp
div rcx
add rsi, rcx
add rdi, rcx
mov ecx, ebp
cmp rcx, rax
jb 0x180001842
mov r14, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
mov r15, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r12
pop rdi
pop rsi
ret