Function at 0x404940
Capabilities:
Enumerate files on windows
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x764
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x760], eax
push ebx
push esi
push edi
push 0x200
lea eax, [esp + 0x56c]
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x268]
push 0x200
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x18]
push 0x250
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x468]
or ebx, 0xffffffff
push pe_nt_image_headers32
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x568]
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
xor eax, eax
lea edi, [esp + 0x568]
mov dword [esp + 0x75e], eax
mov dword [esp + 0x762], eax
mov word [esp + 0x766], ax
mov dword [esp + 0x10], edi
cmp ax, word [esp + 0x568]
je 0x404ccc
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 5
je 0x404cae
push 0xff
lea eax, [esp + 0x26c]
push edi
push eax
call fcn.0040e084
add esp, 0xc
xor eax, eax
mov word [esp + 0x466], ax
lea eax, [esp + 0x268]
push 0xff
push 0x42e420
push eax
call fcn.0040de40
xor eax, eax
add esp, 0xc
mov word [esp + 0x466], ax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404cae
nop word [eax + eax]
test dword [esp + 0x18], 0x10
je 0x404c8c
mov eax, 0x2e
cmp ax, word [esp + 0x44]
je 0x404c8c
xor eax, eax
mov word [esp + 0x280], ax
lea eax, [esp + 0x44]
push 0xff
push eax
lea eax, [esp + 0x270]
push eax
call fcn.0040de40
add esp, 0xc
xor eax, eax
mov word [esp + 0x466], ax
lea eax, [esp + 0x44]
push str.Epic_Games
push eax
call fcn.0040df83
add esp, 8
test eax, eax
je 0x404c8c
lea eax, [esp + 0x44]
push str.Rockstar_Games
push eax
call fcn.0040df83
add esp, 8
test eax, eax
lea eax, [esp + 0x268]
jne 0x404b4f
push 0xff
push str.dd_launcher.exe
push eax
call fcn.0040de40
xor eax, eax
add esp, 0xc
mov word [esp + 0x466], ax
lea eax, [esp + 0x268]
push eax
call esi
test al, 0x10
jne 0x404c8c
push 0
push 0
mov edx, str.__no_launch
lea ecx, [esp + 0x270]
call section..text
add esp, 8
jmp 0x404c8c
push eax
mov edx, 0xff
lea ecx, [esp + 0x46c]
call fcn.00408670
add esp, 4
mov byte [esp + 0x567], 0
lea eax, [esp + 0x468]
push 0xff
push str.dd_launcher.json
push eax
call fcn.0040e200
add esp, 0xc
mov byte [esp + 0x567], 0
lea ecx, [esp + 0x468]
call fcn.004089e0
mov esi, eax
test esi, esi
je 0x404c86
mov dword [esp + 0x14], esi
cmp byte [esi], 0xef
jne 0x404bc0
cmp byte [esi + 1], 0xbb
jne 0x404bc0
cmp byte [esi + 2], 0xbf
jne 0x404bc0
lea eax, [esi + 3]
mov dword [esp + 0x14], eax
xor edx, edx
lea ecx, [esp + 0x14]
call fcn.00408f30
push esi
mov edi, eax
call fcn.0041501c
add esp, 4
test edi, edi
je 0x404c86
cmp dword [edi + 4], 4
jne 0x404c77
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x404c77
push 0xe
mov edx, str.is_epic_family
call fcn.00408b60
add esp, 4
test eax, eax
je 0x404c77
cmp dword [eax + 4], 6
jne 0x404c77
cmp dword [eax + 8], 0
je 0x404c77
lea ecx, [esp + 0x268]
call fcn.004044b0
push 0xff
lea eax, [esp + 0x26c]
push str.dd_launcher.exe
push eax
call fcn.0040de40
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor eax, eax
add esp, 0xc
mov word [esp + 0x466], ax
lea eax, [esp + 0x268]
push eax
call esi
test al, 0x10
jne 0x404c7d
push 0
push 0
mov edx, str.__no_launch
lea ecx, [esp + 0x270]
call section..text
add esp, 8
mov ecx, edi
call fcn.0040a700
jmp 0x404c8c
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, edi
call fcn.0040a700
jmp 0x404c8c
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [esp + 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404a80
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x10]
or ebx, 0xffffffff
add edi, 8
xor eax, eax
mov dword [esp + 0x10], edi
cmp ax, word [edi]
jne 0x404a03
cmp ebx, 0xffffffff
je 0x404ccc
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x76c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040a851
mov esp, ebp
pop ebp
ret