Function at 0x140040538
Capabilities:
Create thread
Encode data using xor
Inject dll
Inject thread

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x688]
sub rsp, 0x750
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rax, qword [0x140184e90]
xor rax, rsp
mov qword [rbp + 0x640], rax
mov r15, rdx
mov rdi, rcx
movsxd rsi, r8d
mov dword [rsp + 0x20], 4
mov r9d, 0x1000
mov r8, rsi
xor edx, edx
mov rcx, qword [rcx + 0x1d0]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x50], rax
mov r12d, 8
xor r13d, r13d
test rax, rax
jne 0x1400408af
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
lea r8, [0x140188610]
cmp byte [0x14018d858], r13b
jne 0x14004062b
mov dword [rbp + 0x510], 0x11000f
mov dword [rbp + 0x514], 0x190008
mov dword [rbp + 0x518], 0x450008
mov dword [rbp + 0x51c], 0x9000b
lea r9d, [r12 + 1]
mov dword [rbp + 0x520], 0xf
mov edx, r13d
lea rax, [0x140187da0]
movzx eax, byte [rdx + rax]
xor ax, word [rbp + rdx*2 + 0x510]
mov word [r8 + rdx*2], ax
inc rdx
cmp rdx, r9
jl 0x140040604
mov byte [0x14018d858], 1
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
jne 0x1400406c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x1d0], r13
mov edx, r14d
lea rcx, [rbp + 0x90]
call fcn.14003a388
mov rdi, rax
mov edx, ebx
lea rcx, [rbp + 0x410]
call fcn.14003a388
nop
lea r8, [0x140120de8]
mov rdx, rax
lea rcx, [rbp + 0xd0]
call fcn.140025860
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rbp + 0x310]
call fcn.14004389c
mov r8, rax
call fcn.14003c50c
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.14003cb30
lea rdx, [0x14014f7e8]
lea rcx, [rbp - 0x68]
call fcn.1400b8b68
nop
lea rdx, str.NtAllocateVirtualMemory
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
mov qword [rsp + 0x70], rsi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0x1000
lea r9, [rsp + 0x70]
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, qword [rdi + 0x1d0]
call rbx
mov ebx, eax
test eax, eax
je 0x140040870
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x1d0], r13
cmp ebx, 0xc000010a
jne 0x140040765
call fcn.14003acb0
mov rdx, rax
lea r8, [0x14011ddd8]
lea rcx, [rbp + 0x20]
call fcn.14003ca78
lea rdx, [0x14014f7e8]
lea rcx, [rbp + 0x20]
call fcn.1400b8b68
int3
cmp ebx, 0xc0000022
jne 0x140040798
call fcn.14003b95c
mov rdx, rax
lea r8, [0x14011ddd8]
lea rcx, [rsp + 0x78]
call fcn.14003ca78
lea rdx, [0x14014f7e8]
lea rcx, [rsp + 0x78]
call fcn.1400b8b68
int3
cmp ebx, 0xc0000017
jne 0x1400407c9
call fcn.14003c29c
mov rdx, rax
lea r8, [0x14011ddd8]
lea rcx, [rbp]
call fcn.14003ca78
lea rdx, [0x14014f7e8]
lea rcx, [rbp]
call fcn.1400b8b68
int3
mov edx, esi
lea rcx, [rbp + 0x110]
call fcn.14003a388
mov rdi, rax
mov edx, ebx
lea rcx, [rbp + 0x450]
call fcn.14003a2d4
mov rbx, rax
mov edx, r14d
lea rcx, [rbp + 0x150]
call fcn.14003a388
nop
lea r8, [0x140120c54]
mov rdx, rax
lea rcx, [rbp + 0x350]
call fcn.140025860
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0x190]
call fcn.14004389c
nop
lea r8, [0x140120c50]
mov rdx, rax
lea rcx, [rbp + 0x50]
call fcn.140025860
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rbp + 0x1d0]
call fcn.14004389c
mov r8, rax
call fcn.14003b1f8
mov rdx, rax
lea rcx, [rbp - 0x20]
call fcn.14003cb30
lea rdx, [0x14014f7e8]
lea rcx, [rbp - 0x20]
call fcn.1400b8b68
nop
call fcn.14003c698
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.140001cb0
nop
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.1400424e0
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400408aa
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x68], 1
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x20], rcx
mov r9, rsi
mov r8, r15
mov rdx, rax
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x14004098e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r9d, 0x8000
mov r8, rsi
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x1d0], r13
mov edx, ebx
lea rcx, [rbp + 0x390]
call fcn.14003a388
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x210]
call fcn.14003a388
nop
lea r8, [0x140120ca4]
mov rdx, rax
lea rcx, [rbp + 0x470]
call fcn.140025860
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0x250]
call fcn.14004389c
mov r9, rax
call fcn.14003c028
mov rdx, rax
mov r8, r9
lea rcx, [rbp - 0x78]
call fcn.14003cb30
lea rdx, [0x14014f7e8]
lea rcx, [rbp - 0x78]
call fcn.1400b8b68
nop
call fcn.14003bb18
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, [0x140120ca8]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
mov rcx, qword [rdi + 0x1d0]
test rax, rax
jne 0x140040a1f
mov r9d, 0x8000
mov r8, rsi
mov rdx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x1d0], r13
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x3d0]
call fcn.14003a388
mov r11, rax
call fcn.14003ab84
mov rdx, rax
mov r8, r11
lea rcx, [rbp - 0x48]
call fcn.14003cb30
lea rdx, [0x14014f7e8]
lea rcx, [rbp - 0x48]
call fcn.1400b8b68
nop
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9, rbx
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x140040d9b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
cmp eax, r12d
je 0x140040b10
cmp eax, 5
je 0x140040b10
mov r9d, 0x8000
mov r8, rsi
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x1d0], r13
mov edx, r14d
lea rcx, [rbp + 0x290]
call fcn.14003a388
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x490]
call fcn.14003a388
nop
lea r8, [0x140120ca4]
mov rdx, rax
lea rcx, [rbp + 0x2d0]
call fcn.140025860
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0x70]
call fcn.14004389c
mov r8, rax
call fcn.14003b13c
mov rdx, rax
lea rcx, [rbp - 0x30]
call fcn.14003cb30
lea rdx, [0x14014f7e8]
lea rcx, [rbp - 0x30]
call fcn.1400b8b68
nop
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
jne 0x140040c0d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r9d, 0x8000
mov r8, rsi
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x1d0], r13
mov edx, ebx
lea rcx, [rbp + 0xb0]
call fcn.14003a388
mov rdi, rax
mov edx, r14d
lea rcx, [rbp + 0xf0]
call fcn.14003a388
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x130]
call fcn.14003a388
nop
lea r8, [0x140120de8]
mov rdx, rax
lea rcx, [rbp + 0x170]
call fcn.140025860
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0x1b0]
call fcn.14004389c
nop
lea r8, [0x140120c54]
mov rdx, rax
lea rcx, [rbp + 0x1f0]
call fcn.140025860
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rbp + 0x230]
call fcn.14004389c
mov r8, rax
call fcn.14003c50c
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.14003cb30
lea rdx, [0x14014f7e8]
lea rcx, [rbp - 0x10]
call fcn.1400b8b68
nop
lea rdx, str.RtlCreateUserThread
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor ecx, ecx
mov qword [rbp + 0x40], rcx
mov qword [rbp + 0x48], rcx
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x40], rcx
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rdi + 0x1d0]
call rax
mov r12d, eax
test eax, eax
je 0x140040d95
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r9d, 0x8000
mov r8, rsi
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x1d0], r13
mov edx, ebx
lea rcx, [rbp + 0x270]
call fcn.14003a388
mov rsi, rax
mov edx, r12d
lea rcx, [rbp + 0x2b0]
call fcn.14003a2d4
mov rdi, rax
mov edx, r14d
lea rcx, [rbp + 0x2f0]
call fcn.14003a388
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x330]
call fcn.14003a388
nop
lea r8, [0x140120de8]
mov rdx, rax
lea rcx, [rbp + 0x370]
call fcn.140025860
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0x3b0]
call fcn.14004389c
nop
lea r8, [0x140120c54]
mov rdx, rax
lea rcx, [rbp + 0x3f0]
call fcn.140025860
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rbp + 0x430]
call fcn.14004389c
nop
lea r8, [0x140120c50]
mov rdx, rax
lea rcx, [rbp + 0x4b0]
call fcn.140025860
nop
mov r8, rsi
mov rdx, rax
lea rcx, [rbp + 0x4f0]
call fcn.14004389c
mov rbx, rax
call fcn.14003b704
mov rdx, rax
mov r8, rbx
lea rcx, [rbp + 0x10]
call fcn.14003cb30
lea rdx, [0x14014f7e8]
lea rcx, [rbp + 0x10]
call fcn.1400b8b68
nop
mov r12d, 8
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9, rsi
lea r8, [rbp + 0x530]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x140040e49
mov r8, rsi
mov rdx, r15
lea rcx, [rbp + 0x530]
call fcn.1400b61f0
test eax, eax
je 0x140040e0f
call fcn.14003c3bc
mov rdx, rax
lea r8, [0x14011ddd8]
lea rcx, [rbp + 0x30]
call fcn.14003ca78
lea rdx, [0x14014f7e8]
lea rcx, [rbp + 0x30]
call fcn.1400b8b68
int3
mov edx, 0x1388
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r9d, 0x8000
mov r8, r12
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rdi + 0x1d0]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140040e85
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x4d0]
call fcn.14003a388
mov r10, rax
call fcn.14003c3bc
mov rdx, rax
mov r8, r10
lea rcx, [rbp - 0x58]
call fcn.14003cb30
lea rdx, [0x14014f7e8]
lea rcx, [rbp - 0x58]
call fcn.1400b8b68
nop
mov rcx, qword [rbp + 0x640]
xor rcx, rsp
call fcn.1400b0c90
mov rbx, qword [rsp + 0x7a8]
add rsp, 0x750
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret