Function at 0x405020
Capabilities:
Copy file
Enumerate files on windows
Get disk information
Get file attributes
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xdc4
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0xdc0], eax
push ebx
push esi
push edi
push 0x200
lea eax, [esp + 0xbcc]
mov dword [esp + 0x18], ecx
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x4c0]
push 0x200
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x20]
push 0x250
push 0
push eax
call fcn.0040bf00
add esp, 0xc
mov dword [esp + 0xc], 0xffffffff
lea eax, [esp + 0xac8]
push pe_nt_image_headers32
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0xbc8]
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
xor eax, eax
lea ecx, [esp + 0xbc8]
mov dword [esp + 0xdbe], eax
mov dword [esp + 0xdc2], eax
mov word [esp + 0xdc6], ax
mov dword [esp + 0x10], ecx
cmp ax, word [esp + 0xbc8]
je 0x40585a
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov edi, dword [sym.imp.KERNEL32.dll_FindClose]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 5
je 0x405838
push 0xff
push dword [esp + 0x14]
lea eax, [esp + 0x4c8]
push eax
call fcn.0040e084
add esp, 0xc
xor eax, eax
mov word [esp + 0x6be], ax
lea eax, [esp + 0x4c0]
push 0xff
push 0x42e420
push eax
call fcn.0040de40
xor eax, eax
add esp, 0xc
mov word [esp + 0x6be], ax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x4c4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
je 0x40583c
mov edi, eax
test dword [esp + 0x20], 0x10
je 0x405816
mov edx, 0x2e
cmp dx, word [esp + 0x4c]
jne 0x4051ad
mov ax, word [esp + 0x4e]
xor ecx, ecx
cmp cx, ax
je 0x405816
cmp dx, ax
jne 0x4051ad
xor eax, eax
cmp ax, word [esp + 0x50]
je 0x405816
xor eax, eax
mov word [esp + 0x4d8], ax
lea eax, [esp + 0x4c]
push 0xff
push eax
lea eax, [esp + 0x4c8]
push eax
call fcn.0040de40
add esp, 0xc
xor eax, eax
mov word [esp + 0x6be], ax
lea eax, [esp + 0x4c]
push str.steam
push eax
call fcn.0040df83
add esp, 8
test eax, eax
je 0x405816
lea eax, [esp + 0x4c]
push str.Rockstar_Games
push eax
call fcn.0040df83
add esp, 8
test eax, eax
jne 0x40525e
lea eax, [esp + 0x4c0]
push 0xff
push str.dd_launcher.exe
push eax
call fcn.0040de40
xor eax, eax
add esp, 0xc
mov word [esp + 0x6be], ax
lea eax, [esp + 0x4c0]
push eax
call esi
test al, 0x10
jne 0x405816
push 0
push 0
mov edx, str.__no_launch
lea ecx, [esp + 0x4c8]
call section..text
add esp, 8
jmp 0x405816
lea eax, [esp + 0x4c]
push str.Origin
push eax
call fcn.0040df83
add esp, 8
test eax, eax
je 0x40520b
lea eax, [esp + 0x4c]
push str.Epic_Games
push eax
call fcn.0040df83
add esp, 8
test eax, eax
je 0x40520b
lea eax, [esp + 0x4c]
push str.Uplay
push eax
call fcn.0040df83
add esp, 8
test eax, eax
lea eax, [esp + 0x4c0]
je 0x405212
push eax
mov edx, 0xff
lea ecx, [esp + 0xacc]
call fcn.00408670
add esp, 4
mov byte [esp + 0xbc7], 0
lea eax, [esp + 0xac8]
push 0xff
push str.dd_launcher.json
push eax
call fcn.0040e200
add esp, 0xc
mov byte [esp + 0xbc7], 0
lea ecx, [esp + 0xac8]
call fcn.004089e0
mov esi, eax
test esi, esi
je 0x405810
mov dword [esp + 0x1c], esi
cmp byte [esi], 0xef
jne 0x40531c
cmp byte [esi + 1], 0xbb
jne 0x40531c
cmp byte [esi + 2], 0xbf
jne 0x40531c
lea eax, [esi + 3]
mov dword [esp + 0x1c], eax
xor edx, edx
lea ecx, [esp + 0x1c]
call fcn.00408f30
mov edi, eax
push esi
mov dword [esp + 0x1c], edi
call fcn.0041501c
add esp, 4
test edi, edi
je 0x40580c
cmp dword [edi + 4], 4
jne 0x405805
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x405805
push 0xf
mov edx, str.is_steam_family
call fcn.00408b60
add esp, 4
test eax, eax
je 0x405805
cmp dword [eax + 4], 6
jne 0x405805
cmp dword [eax + 8], 0
je 0x405805
lea eax, [esp + 0x4c0]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, edi
call fcn.004015d0
mov ecx, edi
call fcn.004017e0
mov ecx, edi
call fcn.00401f50
mov ecx, edi
call fcn.004022a0
mov ecx, edi
call fcn.00401b00
mov ecx, edi
call fcn.004012d0
mov ecx, edi
call fcn.004025f0
push 0x208
lea eax, [esp + 0x8c4]
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x8c0]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x8c0]
push 0x5c
push eax
call fcn.0040b6e5
xor ecx, ecx
mov word [eax + 2], cx
lea eax, [esp + 0x8c8]
push eax
call fcn.0040e6e9
add esp, 0xc
lea eax, [esp + 0x270]
push 0x250
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x6c0]
push 0x200
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x8c0]
push 0x200
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x4c0]
push 0xff
push eax
lea eax, [esp + 0x6c8]
push eax
call fcn.0040e084
add esp, 0xc
xor eax, eax
mov word [esp + 0x8be], ax
lea eax, [esp + 0x6c0]
push 0xff
push str._appmanifest_.acf
push eax
call fcn.0040de40
add esp, 0xc
lea eax, [esp + 0x270]
push eax
lea eax, [esp + 0x6c4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x405619
test dword [esp + 0x270], 0x10
jne 0x4055f7
push 0xff
lea eax, [esp + 0x4c4]
push eax
lea eax, [esp + 0x6c8]
push eax
call fcn.0040e084
add esp, 0xc
xor eax, eax
mov word [esp + 0x8be], ax
lea eax, [esp + 0x6c0]
push 0xff
push 0x42dce8
push eax
call fcn.0040de40
add esp, 0xc
xor eax, eax
mov word [esp + 0x8be], ax
lea eax, [esp + 0x29c]
push 0xff
push eax
lea eax, [esp + 0x6c8]
push eax
call fcn.0040de40
add esp, 0xc
xor eax, eax
mov word [esp + 0x8be], ax
lea eax, [esp + 0x8c0]
push 0xff
push dword [esp + 0x18]
push eax
call fcn.0040e084
add esp, 0xc
xor eax, eax
mov word [esp + 0xabe], ax
lea eax, [esp + 0x8c0]
push 0xff
push 0x42dce8
push eax
call fcn.0040de40
add esp, 0xc
xor eax, eax
mov word [esp + 0xabe], ax
lea eax, [esp + 0x29c]
push 0xff
push eax
lea eax, [esp + 0x8c8]
push eax
call fcn.0040de40
add esp, 0xc
lea ecx, [esp + 0x6c0]
xor eax, eax
mov word [esp + 0xabe], ax
call fcn.00404f40
lea ecx, [esp + 0x8c0]
mov edi, eax
mov esi, edx
call fcn.00404f40
cmp esi, edx
jb 0x4055f7
ja 0x4055cc
cmp edi, eax
jbe 0x4055f7
push 0x80
lea eax, [esp + 0x8c4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
lea eax, [esp + 0x8c4]
push eax
lea eax, [esp + 0x6c8]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [esp + 0x270]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4054b5
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x18]
push 0x250
lea eax, [esp + 0x274]
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x6c0]
push 0x200
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x8c0]
push 0x200
push 0
push eax
call fcn.0040bf00
add esp, 0xc
lea eax, [esp + 0x4c0]
push 0xff
push eax
lea eax, [esp + 0x6c8]
push eax
call fcn.0040e084
add esp, 0xc
xor eax, eax
mov word [esp + 0x8be], ax
lea eax, [esp + 0x6c0]
push 0xff
push 0x42e68c
push eax
call fcn.0040de40
add esp, 0xc
lea eax, [esp + 0x270]
push eax
lea eax, [esp + 0x6c4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405805
mov edi, dword [esp + 0x14]
nop word [eax + eax]
test dword [esp + 0x270], 0x10
je 0x4057e7
mov eax, 0x2e
cmp ax, word [esp + 0x29c]
je 0x4057e7
push 0xff
lea eax, [esp + 0x4c4]
push eax
lea eax, [esp + 0x6c8]
push eax
call fcn.0040e084
add esp, 0xc
xor eax, eax
mov word [esp + 0x8be], ax
lea eax, [esp + 0x6c0]
push 0xff
push 0x42dce8
push eax
call fcn.0040de40
add esp, 0xc
xor eax, eax
mov word [esp + 0x8be], ax
lea eax, [esp + 0x29c]
push 0xff
push eax
lea eax, [esp + 0x6c8]
push eax
call fcn.0040de40
add esp, 0xc
xor eax, eax
mov word [esp + 0x8be], ax
lea eax, [esp + 0x8c0]
push 0xff
push edi
push eax
call fcn.0040e084
add esp, 0xc
xor eax, eax
mov word [esp + 0xabe], ax
lea eax, [esp + 0x8c0]
push 0xff
push str.common_
push eax
call fcn.0040de40
add esp, 0xc
xor eax, eax
mov word [esp + 0xabe], ax
lea eax, [esp + 0x29c]
push 0xff
push eax
lea eax, [esp + 0x8c8]
push eax
call fcn.0040de40
add esp, 8
lea edx, [esp + 0x6c4]
xor eax, eax
lea ecx, [esp + 0x8c4]
mov word [esp + 0xac2], ax
call fcn.00407740
add esp, 4
lea eax, [esp + 0x270]
push eax
push esi
call ebx
test eax, eax
jne 0x4056d0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x18]
mov ecx, edi
call fcn.0040a700
mov edi, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [esp + 0x20]
push eax
push edi
call ebx
test eax, eax
jne 0x405171
push edi
mov edi, dword [sym.imp.KERNEL32.dll_FindClose]
call edi
or eax, 0xffffffff
mov dword [esp + 0xc], eax
jmp 0x40583c
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
xor edx, edx
add ecx, 8
mov dword [esp + 0x10], ecx
cmp dx, word [ecx]
jne 0x4050f8
cmp eax, 0xffffffff
je 0x40585a
push eax
call edi
mov ecx, dword [esp + 0xdcc]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040a851
mov esp, ebp
pop ebp
ret